WPide - Version 2.0.14

Version Description

  • Fixed error Warning: Creating default object from empty value in WPide.php
  • Updated the ace editor to current build
Download this release

Release Info

Developer WPsites
Plugin Icon 128x128 WPide
Version 2.0.14
Comparing to
See all releases

Code changes from version 2.0.13 to 2.0.14

Files changed (94) hide show
  1. WPide.php +2 -2
  2. ace-0.2.0/ChangeLog.txt +49 -9
  3. ace-0.2.0/LICENSE +24 -476
  4. ace-0.2.0/README.md +21 -0
  5. ace-0.2.0/demo/kitchen-sink/styles.css +3 -1
  6. ace-0.2.0/editor.html +1 -3
  7. ace-0.2.0/kitchen-sink-req.html +243 -0
  8. ace-0.2.0/kitchen-sink.html +106 -75
  9. ace-0.2.0/kitchen-sink/demo.js +3543 -0
  10. ace-0.2.0/kitchen-sink/docs/AsciiDoc.asciidoc +6040 -0
  11. ace-0.2.0/kitchen-sink/docs/AsciiDoc.html +1544 -0
  12. ace-0.2.0/kitchen-sink/docs/Haxe.hx +17 -0
  13. ace-0.2.0/kitchen-sink/docs/Makefile +122 -0
  14. ace-0.2.0/kitchen-sink/docs/OpenSCAD.scad +21 -0
  15. ace-0.2.0/kitchen-sink/docs/c9search.c9search_results +25 -0
  16. ace-0.2.0/kitchen-sink/docs/clojure.clj +19 -0
  17. ace-0.2.0/kitchen-sink/docs/coffeescript.coffee +22 -0
  18. ace-0.2.0/kitchen-sink/docs/coldfusion.cfm +5 -0
  19. ace-0.2.0/kitchen-sink/docs/cpp.cpp +13 -0
  20. ace-0.2.0/kitchen-sink/docs/csharp.cs +4 -0
  21. ace-0.2.0/kitchen-sink/docs/css.css +28 -0
  22. ace-0.2.0/kitchen-sink/docs/dart.dart +58 -0
  23. ace-0.2.0/kitchen-sink/docs/diff.diff +69 -0
  24. ace-0.2.0/kitchen-sink/docs/dot.dot +110 -0
  25. ace-0.2.0/kitchen-sink/docs/glsl.glsl +20 -0
  26. ace-0.2.0/kitchen-sink/docs/golang.go +34 -0
  27. ace-0.2.0/kitchen-sink/docs/groovy.groovy +41 -0
  28. ace-0.2.0/kitchen-sink/docs/haml.haml +36 -0
  29. ace-0.2.0/kitchen-sink/docs/html.html +16 -0
  30. ace-0.2.0/kitchen-sink/docs/jade.jade +45 -0
  31. ace-0.2.0/kitchen-sink/docs/java.java +15 -0
  32. ace-0.2.0/kitchen-sink/docs/javascript.js +5 -0
  33. ace-0.2.0/kitchen-sink/docs/json.json +66 -0
  34. ace-0.2.0/kitchen-sink/docs/jsp.jsp +46 -0
  35. ace-0.2.0/kitchen-sink/docs/jsx.jsx +9 -0
  36. ace-0.2.0/kitchen-sink/docs/latex.tex +22 -0
  37. ace-0.2.0/kitchen-sink/docs/less.less +28 -0
  38. ace-0.2.0/kitchen-sink/docs/liquid.liquid +76 -0
  39. ace-0.2.0/kitchen-sink/docs/lisp.lisp +22 -0
  40. ace-0.2.0/kitchen-sink/docs/lua.lua +36 -0
  41. ace-0.2.0/kitchen-sink/docs/luapage.lp +71 -0
  42. ace-0.2.0/kitchen-sink/docs/lucene.lucene +1 -0
  43. ace-0.2.0/kitchen-sink/docs/markdown.md +186 -0
  44. ace-0.2.0/kitchen-sink/docs/objectivec.m +104 -0
  45. ace-0.2.0/kitchen-sink/docs/ocaml.ml +18 -0
  46. ace-0.2.0/kitchen-sink/docs/perl.pl +32 -0
  47. ace-0.2.0/kitchen-sink/docs/pgsql.pgsql +100 -0
  48. ace-0.2.0/kitchen-sink/docs/php.php +19 -0
  49. ace-0.2.0/kitchen-sink/docs/plaintext.txt +11 -0
  50. ace-0.2.0/kitchen-sink/docs/powershell.ps1 +24 -0
  51. ace-0.2.0/kitchen-sink/docs/python.py +19 -0
  52. ace-0.2.0/kitchen-sink/docs/r.r +20 -0
  53. ace-0.2.0/kitchen-sink/docs/rdoc.Rd +64 -0
  54. ace-0.2.0/kitchen-sink/docs/rhtml.Rhtml +22 -0
  55. ace-0.2.0/kitchen-sink/docs/ruby.rb +23 -0
  56. ace-0.2.0/kitchen-sink/docs/scala.scala +69 -0
  57. ace-0.2.0/kitchen-sink/docs/scss.scss +20 -0
  58. ace-0.2.0/kitchen-sink/docs/sh.sh +38 -0
  59. ace-0.2.0/kitchen-sink/docs/sql.sql +6 -0
  60. ace-0.2.0/kitchen-sink/docs/stylus.styl +55 -0
  61. ace-0.2.0/kitchen-sink/docs/svg.svg +83 -0
  62. ace-0.2.0/kitchen-sink/docs/tcl.tcl +40 -0
  63. ace-0.2.0/kitchen-sink/docs/tex.tex +20 -0
  64. ace-0.2.0/kitchen-sink/docs/textile.textile +29 -0
  65. ace-0.2.0/kitchen-sink/docs/typescript.ts +72 -0
  66. ace-0.2.0/kitchen-sink/docs/xml.xml +55 -0
  67. ace-0.2.0/kitchen-sink/docs/xquery.xq +6 -0
  68. ace-0.2.0/kitchen-sink/docs/yaml.yaml +35 -0
  69. ace-0.2.0/kitchen-sink/logo.png +0 -0
  70. ace-0.2.0/kitchen-sink/styles.css +43 -0
  71. ace-0.2.0/scrollable-page.html +152 -0
  72. ace-0.2.0/src-min-noconflict/ace.js +11 -0
  73. ace-0.2.0/src-min-noconflict/ext-static_highlight.js +1 -0
  74. ace-0.2.0/src-min-noconflict/ext-textarea.js +1 -0
  75. ace-0.2.0/src-min-noconflict/keybinding-emacs.js +1 -0
  76. ace-0.2.0/src-min-noconflict/keybinding-vim.js +1 -0
  77. ace-0.2.0/src-min-noconflict/mode-abap.js +1 -0
  78. ace-0.2.0/src-min-noconflict/mode-asciidoc.js +1 -0
  79. ace-0.2.0/src-min-noconflict/mode-c9search.js +1 -0
  80. ace-0.2.0/src-min-noconflict/mode-c_cpp.js +1 -0
  81. ace-0.2.0/src-min-noconflict/mode-clojure.js +1 -0
  82. ace-0.2.0/src-min-noconflict/mode-coffee.js +1 -0
  83. ace-0.2.0/src-min-noconflict/mode-coldfusion.js +1 -0
  84. ace-0.2.0/src-min-noconflict/mode-csharp.js +1 -0
  85. ace-0.2.0/src-min-noconflict/mode-css.js +1 -0
  86. ace-0.2.0/src-min-noconflict/mode-dart.js +1 -0
  87. ace-0.2.0/src-min-noconflict/mode-diff.js +1 -0
  88. ace-0.2.0/src-min-noconflict/mode-dot.js +1 -0
  89. ace-0.2.0/src-min-noconflict/mode-glsl.js +1 -0
  90. ace-0.2.0/src-min-noconflict/mode-golang.js +1 -0
  91. ace-0.2.0/src-min-noconflict/mode-groovy.js +1 -0
  92. ace-0.2.0/src-min-noconflict/mode-haml.js +1 -0
  93. ace-0.2.0/src-min-noconflict/mode-haxe.js +1 -0
  94. ace-0.2.0/src-min-noconflict/mode-html.js +1 -0
WPide.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WPide
4
  Plugin URI: https://github.com/WPsites/WPide
5
  Description: WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
6
- Version: 2.0.13
7
  Author: Simon Dunton
8
  Author URI: http://www.wpsites.co.uk
9
  */
@@ -83,7 +83,7 @@ class wpide
83
 
84
 
85
 
86
- $WPide->site_url = get_bloginfo('url');
87
 
88
 
89
  }
3
  Plugin Name: WPide
4
  Plugin URI: https://github.com/WPsites/WPide
5
  Description: WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
6
+ Version: 2.0.14
7
  Author: Simon Dunton
8
  Author URI: http://www.wpsites.co.uk
9
  */
83
 
84
 
85
 
86
+ $this->site_url = get_bloginfo('url');
87
 
88
 
89
  }
ace-0.2.0/ChangeLog.txt CHANGED
@@ -1,3 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  2011.08.02, Version 0.2.0
2
 
3
  * Split view (Julian Viereck)
@@ -27,15 +71,14 @@
27
  - SCAD (Jacob Hansson)
28
 
29
  * Live syntax checks
30
- - Lint for Css using CSS Lint <http://csslint.net/>
31
  - CoffeeScript
32
 
33
  * New Themes
34
  - Crimson Editor (iebuggy)
35
  - Merbivore (Michael Schwartz)
36
  - Merbivore soft (Michael Schwartz)
37
- - Solarized dark/light <http://ethanschoonover.com/solarized> (David Alan
38
- Hjelle)
39
  - Vibrant Ink (Michael Schwartz)
40
 
41
  * Small Features/Enhancements
@@ -48,10 +91,8 @@
48
  highlight are not affected (Irakli Gozalishvili)
49
  - Added setFontSize method
50
  - Improved vi keybindings (Trent Ogren)
51
- - When unfocused make cursor transparent instead of removing it (Harutyun
52
- Amirjanyan)
53
- - Support for matching groups in tokenizer with arrays of tokens (Chris
54
- Spencer)
55
 
56
  * Bug fixes
57
  - Add support for the new OSX scroll bars
@@ -59,8 +100,7 @@
59
  - Proper handling of unicode characters in JavaScript identifiers
60
  - Fix remove lines command on last line (Harutyun Amirjanyan)
61
  - Fix scroll wheel sluggishness in Safari
62
- - Make keyboard infrastructure route keys like []^$ the right way (Julian
63
- Viereck)
64
 
65
  2011.02.14, Version 0.1.6
66
 
1
+ 2012.09.17, Version 1.0.0
2
+
3
+ * New Features
4
+ - Multiple cursors and selections (https://c9.io/site/blog/2012/08/be-an-armenian-warrior-with-block-selection-on-steroids/)
5
+ - Fold buttons displayed in the gutter
6
+ - Indent Guides
7
+ - Completely reworked vim mode (Sergi Mansilla)
8
+ - Improved emacs keybindings
9
+ - Autoclosing of html tags (danyaPostfactum)
10
+
11
+ * 20 New language modes
12
+ - Coldfusion (Russ)
13
+ - Diff
14
+ - GLSL (Ed Mackey)
15
+ - Go (Davide Saurino)
16
+ - Haxe (Jason O'Neil)
17
+ - Jade (Garen Torikian)
18
+ - jsx (Syu Kato)
19
+ - LaTeX (James Allen)
20
+ - Less (John Roepke)
21
+ - Liquid (Bernie Telles)
22
+ - Lua (Lee Gao)
23
+ - LuaPage (Choonster)
24
+ - Markdown (Chris Spencer)
25
+ - PostgreSQL (John DeSoi)
26
+ - Powershell (John Kane)
27
+ - Sh (Richo Healey)
28
+ - SQL (Jonathan Camile)
29
+ - Tcl (Cristoph Hochreiner)
30
+ - XQuery (William Candillion)
31
+ - Yaml (Meg Sharkey)
32
+
33
+ * Live syntax checks
34
+ - for XQuery and JSON
35
+
36
+ * New Themes
37
+ - Ambiance (Irakli Gozalishvili)
38
+ - Dreamweaver (Adam Jimenez)
39
+ - Github (bootstraponline)
40
+ - Tommorrow themes (https://github.com/chriskempson/tomorrow-theme)
41
+ - XCode
42
+
43
+ * Many Small Enhancements and Bugfixes
44
+
45
  2011.08.02, Version 0.2.0
46
 
47
  * Split view (Julian Viereck)
71
  - SCAD (Jacob Hansson)
72
 
73
  * Live syntax checks
74
+ - Lint for CSS using CSS Lint <http://csslint.net/>
75
  - CoffeeScript
76
 
77
  * New Themes
78
  - Crimson Editor (iebuggy)
79
  - Merbivore (Michael Schwartz)
80
  - Merbivore soft (Michael Schwartz)
81
+ - Solarized dark/light <http://ethanschoonover.com/solarized> (David Alan Hjelle)
 
82
  - Vibrant Ink (Michael Schwartz)
83
 
84
  * Small Features/Enhancements
91
  highlight are not affected (Irakli Gozalishvili)
92
  - Added setFontSize method
93
  - Improved vi keybindings (Trent Ogren)
94
+ - When unfocused make cursor transparent instead of removing it (Harutyun Amirjanyan)
95
+ - Support for matching groups in tokenizer with arrays of tokens (Chris Spencer)
 
 
96
 
97
  * Bug fixes
98
  - Add support for the new OSX scroll bars
100
  - Proper handling of unicode characters in JavaScript identifiers
101
  - Fix remove lines command on last line (Harutyun Amirjanyan)
102
  - Fix scroll wheel sluggishness in Safari
103
+ - Make keyboard infrastructure route keys like []^$ the right way (Julian Viereck)
 
104
 
105
  2011.02.14, Version 0.1.6
106
 
ace-0.2.0/LICENSE CHANGED
@@ -1,476 +1,24 @@
1
- Licensed under the tri-license MPL/LGPL/GPL.
2
-
3
- MOZILLA PUBLIC LICENSE
4
- Version 1.1
5
-
6
- ---------------
7
-
8
- 1. Definitions.
9
-
10
- 1.0.1. "Commercial Use" means distribution or otherwise making the
11
- Covered Code available to a third party.
12
-
13
- 1.1. "Contributor" means each entity that creates or contributes to
14
- the creation of Modifications.
15
-
16
- 1.2. "Contributor Version" means the combination of the Original
17
- Code, prior Modifications used by a Contributor, and the Modifications
18
- made by that particular Contributor.
19
-
20
- 1.3. "Covered Code" means the Original Code or Modifications or the
21
- combination of the Original Code and Modifications, in each case
22
- including portions thereof.
23
-
24
- 1.4. "Electronic Distribution Mechanism" means a mechanism generally
25
- accepted in the software development community for the electronic
26
- transfer of data.
27
-
28
- 1.5. "Executable" means Covered Code in any form other than Source
29
- Code.
30
-
31
- 1.6. "Initial Developer" means the individual or entity identified
32
- as the Initial Developer in the Source Code notice required by Exhibit
33
- A.
34
-
35
- 1.7. "Larger Work" means a work which combines Covered Code or
36
- portions thereof with code not governed by the terms of this License.
37
-
38
- 1.8. "License" means this document.
39
-
40
- 1.8.1. "Licensable" means having the right to grant, to the maximum
41
- extent possible, whether at the time of the initial grant or
42
- subsequently acquired, any and all of the rights conveyed herein.
43
-
44
- 1.9. "Modifications" means any addition to or deletion from the
45
- substance or structure of either the Original Code or any previous
46
- Modifications. When Covered Code is released as a series of files, a
47
- Modification is:
48
- A. Any addition to or deletion from the contents of a file
49
- containing Original Code or previous Modifications.
50
-
51
- B. Any new file that contains any part of the Original Code or
52
- previous Modifications.
53
-
54
- 1.10. "Original Code" means Source Code of computer software code
55
- which is described in the Source Code notice required by Exhibit A as
56
- Original Code, and which, at the time of its release under this
57
- License is not already Covered Code governed by this License.
58
-
59
- 1.10.1. "Patent Claims" means any patent claim(s), now owned or
60
- hereafter acquired, including without limitation, method, process,
61
- and apparatus claims, in any patent Licensable by grantor.
62
-
63
- 1.11. "Source Code" means the preferred form of the Covered Code for
64
- making modifications to it, including all modules it contains, plus
65
- any associated interface definition files, scripts used to control
66
- compilation and installation of an Executable, or source code
67
- differential comparisons against either the Original Code or another
68
- well known, available Covered Code of the Contributor's choice. The
69
- Source Code can be in a compressed or archival form, provided the
70
- appropriate decompression or de-archiving software is widely available
71
- for no charge.
72
-
73
- 1.12. "You" (or "Your") means an individual or a legal entity
74
- exercising rights under, and complying with all of the terms of, this
75
- License or a future version of this License issued under Section 6.1.
76
- For legal entities, "You" includes any entity which controls, is
77
- controlled by, or is under common control with You. For purposes of
78
- this definition, "control" means (a) the power, direct or indirect,
79
- to cause the direction or management of such entity, whether by
80
- contract or otherwise, or (b) ownership of more than fifty percent
81
- (50%) of the outstanding shares or beneficial ownership of such
82
- entity.
83
-
84
- 2. Source Code License.
85
-
86
- 2.1. The Initial Developer Grant.
87
- The Initial Developer hereby grants You a world-wide, royalty-free,
88
- non-exclusive license, subject to third party intellectual property
89
- claims:
90
- (a) under intellectual property rights (other than patent or
91
- trademark) Licensable by Initial Developer to use, reproduce,
92
- modify, display, perform, sublicense and distribute the Original
93
- Code (or portions thereof) with or without Modifications, and/or
94
- as part of a Larger Work; and
95
-
96
- (b) under Patents Claims infringed by the making, using or
97
- selling of Original Code, to make, have made, use, practice,
98
- sell, and offer for sale, and/or otherwise dispose of the
99
- Original Code (or portions thereof).
100
-
101
- (c) the licenses granted in this Section 2.1(a) and (b) are
102
- effective on the date Initial Developer first distributes
103
- Original Code under the terms of this License.
104
-
105
- (d) Notwithstanding Section 2.1(b) above, no patent license is
106
- granted: 1) for code that You delete from the Original Code; 2)
107
- separate from the Original Code; or 3) for infringements caused
108
- by: i) the modification of the Original Code or ii) the
109
- combination of the Original Code with other software or devices.
110
-
111
- 2.2. Contributor Grant.
112
- Subject to third party intellectual property claims, each Contributor
113
- hereby grants You a world-wide, royalty-free, non-exclusive license
114
-
115
- (a) under intellectual property rights (other than patent or
116
- trademark) Licensable by Contributor, to use, reproduce, modify,
117
- display, perform, sublicense and distribute the Modifications
118
- created by such Contributor (or portions thereof) either on an
119
- unmodified basis, with other Modifications, as Covered Code
120
- and/or as part of a Larger Work; and
121
-
122
- (b) under Patent Claims infringed by the making, using, or
123
- selling of Modifications made by that Contributor either alone
124
- and/or in combination with its Contributor Version (or portions
125
- of such combination), to make, use, sell, offer for sale, have
126
- made, and/or otherwise dispose of: 1) Modifications made by that
127
- Contributor (or portions thereof); and 2) the combination of
128
- Modifications made by that Contributor with its Contributor
129
- Version (or portions of such combination).
130
-
131
- (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
132
- effective on the date Contributor first makes Commercial Use of
133
- the Covered Code.
134
-
135
- (d) Notwithstanding Section 2.2(b) above, no patent license is
136
- granted: 1) for any code that Contributor has deleted from the
137
- Contributor Version; 2) separate from the Contributor Version;
138
- 3) for infringements caused by: i) third party modifications of
139
- Contributor Version or ii) the combination of Modifications made
140
- by that Contributor with other software (except as part of the
141
- Contributor Version) or other devices; or 4) under Patent Claims
142
- infringed by Covered Code in the absence of Modifications made by
143
- that Contributor.
144
-
145
- 3. Distribution Obligations.
146
-
147
- 3.1. Application of License.
148
- The Modifications which You create or to which You contribute are
149
- governed by the terms of this License, including without limitation
150
- Section 2.2. The Source Code version of Covered Code may be
151
- distributed only under the terms of this License or a future version
152
- of this License released under Section 6.1, and You must include a
153
- copy of this License with every copy of the Source Code You
154
- distribute. You may not offer or impose any terms on any Source Code
155
- version that alters or restricts the applicable version of this
156
- License or the recipients' rights hereunder. However, You may include
157
- an additional document offering the additional rights described in
158
- Section 3.5.
159
-
160
- 3.2. Availability of Source Code.
161
- Any Modification which You create or to which You contribute must be
162
- made available in Source Code form under the terms of this License
163
- either on the same media as an Executable version or via an accepted
164
- Electronic Distribution Mechanism to anyone to whom you made an
165
- Executable version available; and if made available via Electronic
166
- Distribution Mechanism, must remain available for at least twelve (12)
167
- months after the date it initially became available, or at least six
168
- (6) months after a subsequent version of that particular Modification
169
- has been made available to such recipients. You are responsible for
170
- ensuring that the Source Code version remains available even if the
171
- Electronic Distribution Mechanism is maintained by a third party.
172
-
173
- 3.3. Description of Modifications.
174
- You must cause all Covered Code to which You contribute to contain a
175
- file documenting the changes You made to create that Covered Code and
176
- the date of any change. You must include a prominent statement that
177
- the Modification is derived, directly or indirectly, from Original
178
- Code provided by the Initial Developer and including the name of the
179
- Initial Developer in (a) the Source Code, and (b) in any notice in an
180
- Executable version or related documentation in which You describe the
181
- origin or ownership of the Covered Code.
182
-
183
- 3.4. Intellectual Property Matters
184
- (a) Third Party Claims.
185
- If Contributor has knowledge that a license under a third party's
186
- intellectual property rights is required to exercise the rights
187
- granted by such Contributor under Sections 2.1 or 2.2,
188
- Contributor must include a text file with the Source Code
189
- distribution titled "LEGAL" which describes the claim and the
190
- party making the claim in sufficient detail that a recipient will
191
- know whom to contact. If Contributor obtains such knowledge after
192
- the Modification is made available as described in Section 3.2,
193
- Contributor shall promptly modify the LEGAL file in all copies
194
- Contributor makes available thereafter and shall take other steps
195
- (such as notifying appropriate mailing lists or newsgroups)
196
- reasonably calculated to inform those who received the Covered
197
- Code that new knowledge has been obtained.
198
-
199
- (b) Contributor APIs.
200
- If Contributor's Modifications include an application programming
201
- interface and Contributor has knowledge of patent licenses which
202
- are reasonably necessary to implement that API, Contributor must
203
- also include this information in the LEGAL file.
204
-
205
- (c) Representations.
206
- Contributor represents that, except as disclosed pursuant to
207
- Section 3.4(a) above, Contributor believes that Contributor's
208
- Modifications are Contributor's original creation(s) and/or
209
- Contributor has sufficient rights to grant the rights conveyed by
210
- this License.
211
-
212
- 3.5. Required Notices.
213
- You must duplicate the notice in Exhibit A in each file of the Source
214
- Code. If it is not possible to put such notice in a particular Source
215
- Code file due to its structure, then You must include such notice in a
216
- location (such as a relevant directory) where a user would be likely
217
- to look for such a notice. If You created one or more Modification(s)
218
- You may add your name as a Contributor to the notice described in
219
- Exhibit A. You must also duplicate this License in any documentation
220
- for the Source Code where You describe recipients' rights or ownership
221
- rights relating to Covered Code. You may choose to offer, and to
222
- charge a fee for, warranty, support, indemnity or liability
223
- obligations to one or more recipients of Covered Code. However, You
224
- may do so only on Your own behalf, and not on behalf of the Initial
225
- Developer or any Contributor. You must make it absolutely clear than
226
- any such warranty, support, indemnity or liability obligation is
227
- offered by You alone, and You hereby agree to indemnify the Initial
228
- Developer and every Contributor for any liability incurred by the
229
- Initial Developer or such Contributor as a result of warranty,
230
- support, indemnity or liability terms You offer.
231
-
232
- 3.6. Distribution of Executable Versions.
233
- You may distribute Covered Code in Executable form only if the
234
- requirements of Section 3.1-3.5 have been met for that Covered Code,
235
- and if You include a notice stating that the Source Code version of
236
- the Covered Code is available under the terms of this License,
237
- including a description of how and where You have fulfilled the
238
- obligations of Section 3.2. The notice must be conspicuously included
239
- in any notice in an Executable version, related documentation or
240
- collateral in which You describe recipients' rights relating to the
241
- Covered Code. You may distribute the Executable version of Covered
242
- Code or ownership rights under a license of Your choice, which may
243
- contain terms different from this License, provided that You are in
244
- compliance with the terms of this License and that the license for the
245
- Executable version does not attempt to limit or alter the recipient's
246
- rights in the Source Code version from the rights set forth in this
247
- License. If You distribute the Executable version under a different
248
- license You must make it absolutely clear that any terms which differ
249
- from this License are offered by You alone, not by the Initial
250
- Developer or any Contributor. You hereby agree to indemnify the
251
- Initial Developer and every Contributor for any liability incurred by
252
- the Initial Developer or such Contributor as a result of any such
253
- terms You offer.
254
-
255
- 3.7. Larger Works.
256
- You may create a Larger Work by combining Covered Code with other code
257
- not governed by the terms of this License and distribute the Larger
258
- Work as a single product. In such a case, You must make sure the
259
- requirements of this License are fulfilled for the Covered Code.
260
-
261
- 4. Inability to Comply Due to Statute or Regulation.
262
-
263
- If it is impossible for You to comply with any of the terms of this
264
- License with respect to some or all of the Covered Code due to
265
- statute, judicial order, or regulation then You must: (a) comply with
266
- the terms of this License to the maximum extent possible; and (b)
267
- describe the limitations and the code they affect. Such description
268
- must be included in the LEGAL file described in Section 3.4 and must
269
- be included with all distributions of the Source Code. Except to the
270
- extent prohibited by statute or regulation, such description must be
271
- sufficiently detailed for a recipient of ordinary skill to be able to
272
- understand it.
273
-
274
- 5. Application of this License.
275
-
276
- This License applies to code to which the Initial Developer has
277
- attached the notice in Exhibit A and to related Covered Code.
278
-
279
- 6. Versions of the License.
280
-
281
- 6.1. New Versions.
282
- Netscape Communications Corporation ("Netscape") may publish revised
283
- and/or new versions of the License from time to time. Each version
284
- will be given a distinguishing version number.
285
-
286
- 6.2. Effect of New Versions.
287
- Once Covered Code has been published under a particular version of the
288
- License, You may always continue to use it under the terms of that
289
- version. You may also choose to use such Covered Code under the terms
290
- of any subsequent version of the License published by Netscape. No one
291
- other than Netscape has the right to modify the terms applicable to
292
- Covered Code created under this License.
293
-
294
- 6.3. Derivative Works.
295
- If You create or use a modified version of this License (which you may
296
- only do in order to apply it to code which is not already Covered Code
297
- governed by this License), You must (a) rename Your license so that
298
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
299
- "MPL", "NPL" or any confusingly similar phrase do not appear in your
300
- license (except to note that your license differs from this License)
301
- and (b) otherwise make it clear that Your version of the license
302
- contains terms which differ from the Mozilla Public License and
303
- Netscape Public License. (Filling in the name of the Initial
304
- Developer, Original Code or Contributor in the notice described in
305
- Exhibit A shall not of themselves be deemed to be modifications of
306
- this License.)
307
-
308
- 7. DISCLAIMER OF WARRANTY.
309
-
310
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
311
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
312
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
313
- DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
314
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
315
- IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
316
- YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
317
- COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
318
- OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
319
- ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
320
-
321
- 8. TERMINATION.
322
-
323
- 8.1. This License and the rights granted hereunder will terminate
324
- automatically if You fail to comply with terms herein and fail to cure
325
- such breach within 30 days of becoming aware of the breach. All
326
- sublicenses to the Covered Code which are properly granted shall
327
- survive any termination of this License. Provisions which, by their
328
- nature, must remain in effect beyond the termination of this License
329
- shall survive.
330
-
331
- 8.2. If You initiate litigation by asserting a patent infringement
332
- claim (excluding declatory judgment actions) against Initial Developer
333
- or a Contributor (the Initial Developer or Contributor against whom
334
- You file such action is referred to as "Participant") alleging that:
335
-
336
- (a) such Participant's Contributor Version directly or indirectly
337
- infringes any patent, then any and all rights granted by such
338
- Participant to You under Sections 2.1 and/or 2.2 of this License
339
- shall, upon 60 days notice from Participant terminate prospectively,
340
- unless if within 60 days after receipt of notice You either: (i)
341
- agree in writing to pay Participant a mutually agreeable reasonable
342
- royalty for Your past and future use of Modifications made by such
343
- Participant, or (ii) withdraw Your litigation claim with respect to
344
- the Contributor Version against such Participant. If within 60 days
345
- of notice, a reasonable royalty and payment arrangement are not
346
- mutually agreed upon in writing by the parties or the litigation claim
347
- is not withdrawn, the rights granted by Participant to You under
348
- Sections 2.1 and/or 2.2 automatically terminate at the expiration of
349
- the 60 day notice period specified above.
350
-
351
- (b) any software, hardware, or device, other than such Participant's
352
- Contributor Version, directly or indirectly infringes any patent, then
353
- any rights granted to You by such Participant under Sections 2.1(b)
354
- and 2.2(b) are revoked effective as of the date You first made, used,
355
- sold, distributed, or had made, Modifications made by that
356
- Participant.
357
-
358
- 8.3. If You assert a patent infringement claim against Participant
359
- alleging that such Participant's Contributor Version directly or
360
- indirectly infringes any patent where such claim is resolved (such as
361
- by license or settlement) prior to the initiation of patent
362
- infringement litigation, then the reasonable value of the licenses
363
- granted by such Participant under Sections 2.1 or 2.2 shall be taken
364
- into account in determining the amount or value of any payment or
365
- license.
366
-
367
- 8.4. In the event of termination under Sections 8.1 or 8.2 above,
368
- all end user license agreements (excluding distributors and resellers)
369
- which have been validly granted by You or any distributor hereunder
370
- prior to termination shall survive termination.
371
-
372
- 9. LIMITATION OF LIABILITY.
373
-
374
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
375
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
376
- DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
377
- OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
378
- ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
379
- CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
380
- WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
381
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
382
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
383
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
384
- RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
385
- PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
386
- EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
387
- THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
388
-
389
- 10. U.S. GOVERNMENT END USERS.
390
-
391
- The Covered Code is a "commercial item," as that term is defined in
392
- 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
393
- software" and "commercial computer software documentation," as such
394
- terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
395
- C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
396
- all U.S. Government End Users acquire Covered Code with only those
397
- rights set forth herein.
398
-
399
- 11. MISCELLANEOUS.
400
-
401
- This License represents the complete agreement concerning subject
402
- matter hereof. If any provision of this License is held to be
403
- unenforceable, such provision shall be reformed only to the extent
404
- necessary to make it enforceable. This License shall be governed by
405
- California law provisions (except to the extent applicable law, if
406
- any, provides otherwise), excluding its conflict-of-law provisions.
407
- With respect to disputes in which at least one party is a citizen of,
408
- or an entity chartered or registered to do business in the United
409
- States of America, any litigation relating to this License shall be
410
- subject to the jurisdiction of the Federal Courts of the Northern
411
- District of California, with venue lying in Santa Clara County,
412
- California, with the losing party responsible for costs, including
413
- without limitation, court costs and reasonable attorneys' fees and
414
- expenses. The application of the United Nations Convention on
415
- Contracts for the International Sale of Goods is expressly excluded.
416
- Any law or regulation which provides that the language of a contract
417
- shall be construed against the drafter shall not apply to this
418
- License.
419
-
420
- 12. RESPONSIBILITY FOR CLAIMS.
421
-
422
- As between Initial Developer and the Contributors, each party is
423
- responsible for claims and damages arising, directly or indirectly,
424
- out of its utilization of rights under this License and You agree to
425
- work with Initial Developer and Contributors to distribute such
426
- responsibility on an equitable basis. Nothing herein is intended or
427
- shall be deemed to constitute any admission of liability.
428
-
429
- 13. MULTIPLE-LICENSED CODE.
430
-
431
- Initial Developer may designate portions of the Covered Code as
432
- "Multiple-Licensed". "Multiple-Licensed" means that the Initial
433
- Developer permits you to utilize portions of the Covered Code under
434
- Your choice of the NPL or the alternative licenses, if any, specified
435
- by the Initial Developer in the file described in Exhibit A.
436
-
437
- EXHIBIT A -Mozilla Public License.
438
-
439
- ``The contents of this file are subject to the Mozilla Public License
440
- Version 1.1 (the "License"); you may not use this file except in
441
- compliance with the License. You may obtain a copy of the License at
442
- http://www.mozilla.org/MPL/
443
-
444
- Software distributed under the License is distributed on an "AS IS"
445
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
446
- License for the specific language governing rights and limitations
447
- under the License.
448
-
449
- The Original Code is ______________________________________.
450
-
451
- The Initial Developer of the Original Code is ________________________.
452
- Portions created by ______________________ are Copyright (C) ______
453
- _______________________. All Rights Reserved.
454
-
455
- Contributor(s): ______________________________________.
456
-
457
- Alternatively, the contents of this file may be used under the terms
458
- of the _____ license (the "[___] License"), in which case the
459
- provisions of [______] License are applicable instead of those
460
- above. If you wish to allow use of your version of this file only
461
- under the terms of the [____] License and not to allow others to use
462
- your version of this file under the MPL, indicate your decision by
463
- deleting the provisions above and replace them with the notice and
464
- other provisions required by the [___] License. If you do not delete
465
- the provisions above, a recipient may use your version of this file
466
- under either the MPL or the [___] License."
467
-
468
- [NOTE: The text of this Exhibit A may differ slightly from the text of
469
- the notices in the Source Code files of the Original Code. You should
470
- use the text of this Exhibit A rather than the text found in the
471
- Original Code Source Code for Your Modifications.]
472
-
473
-
474
-
475
- GNU LESSER GENERAL PUBLIC LICENSE
476
- Version 3, 29 June 2007
1
+ Copyright (c) 2010, Ajax.org B.V.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of Ajax.org B.V. nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ace-0.2.0/README.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Ace (Ajax.org Cloud9 Editor)
2
+ ============================
3
+
4
+ Ace is a code editor written in JavaScript.
5
+
6
+ This repository has only generated files.
7
+ If you want to work on ace please go to https://github.com/ajaxorg/ace instead.
8
+
9
+
10
+ here you can find pre-built files for convenience of embedding.
11
+ it contains 4 versions
12
+ * [src](https://github.com/ajaxorg/ace-builds/tree/master/src) concatenated but not minified
13
+ * [src-min](https://github.com/ajaxorg/ace-builds/tree/master/src-min) concatenated and minified with uglify.js
14
+ * [src-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-noconflict) uses ace.require instead of require
15
+ * [src-min-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-min-noconflict) -
16
+
17
+
18
+ For a simple way of embedding ace into webpage see https://github.com/ajaxorg/ace-builds/blob/master/editor.html
19
+ To see ace in action go to [kitchen-sink-demo](http://ajaxorg.github.com/ace-builds/kitchen-sink.html), [scrollable-page-demo](http://ajaxorg.github.com/ace-builds/scrollable-page.html), or [minimal demo](http://ajaxorg.github.com/ace-builds/editor.html)
20
+
21
+
ace-0.2.0/demo/kitchen-sink/styles.css CHANGED
@@ -1,4 +1,6 @@
 
1
  @import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);
 
2
 
3
  html {
4
  height: 100%;
@@ -26,7 +28,7 @@ body {
26
  #editor {
27
  position: absolute;
28
  top: 0px;
29
- left: 300px;
30
  bottom: 0px;
31
  right: 0px;
32
  background: white;
1
+ /*PACKAGE
2
  @import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono);
3
+ PACKAGE*/
4
 
5
  html {
6
  height: 100%;
28
  #editor {
29
  position: absolute;
30
  top: 0px;
31
+ left: 280px;
32
  bottom: 0px;
33
  right: 0px;
34
  background: white;
ace-0.2.0/editor.html CHANGED
@@ -28,13 +28,11 @@
28
  }
29
  }</pre>
30
 
31
- <script src="src/ace-uncompressed-noconflict.js" type="text/javascript" charset="utf-8"></script>
32
  <script>
33
- window.onload = function() {
34
  var editor = ace.edit("editor");
35
  editor.setTheme("ace/theme/twilight");
36
  editor.getSession().setMode("ace/mode/javascript");
37
- };
38
  </script>
39
 
40
  </body>
28
  }
29
  }</pre>
30
 
31
+ <script src="src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
32
  <script>
 
33
  var editor = ace.edit("editor");
34
  editor.setTheme("ace/theme/twilight");
35
  editor.getSession().setMode("ace/mode/javascript");
 
36
  </script>
37
 
38
  </body>
ace-0.2.0/kitchen-sink-req.html ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
+ "http://www.w3.org/TR/html4/strict.dtd">
3
+
4
+ <html lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7
+ <title>Ace Kitchen Sink</title>
8
+ <meta name="author" content="Fabian Jakobs">
9
+ <!--
10
+
11
+ Ace
12
+ version
13
+ commit
14
+
15
+ -->
16
+
17
+
18
+
19
+
20
+ <link rel="stylesheet" href="kitchen-sink/styles.css" type="text/css" media="screen" charset="utf-8">
21
+
22
+ </head>
23
+ <body>
24
+ <a href="http://ajaxorg.github.com/ace/" >
25
+ <img id="logo" src="kitchen-sink/logo.png">
26
+ </a>
27
+ <table id="controls">
28
+ <tr>
29
+ <td>
30
+ <label for="doc">Document</label>
31
+ </td><td>
32
+ <select id="doc" size="1">
33
+ </select>
34
+ </td>
35
+ </tr>
36
+ <tr>
37
+ <td >
38
+ <label for="mode">Mode</label>
39
+ </td><td>
40
+ <select id="mode" size="1">
41
+ </select>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <td>
46
+ <label for="split">Split</label>
47
+ </td><td>
48
+ <select id="split" size="1">
49
+ <option value="none">None</option>
50
+ <option value="below">Below</option>
51
+ <option value="beside">Beside</option>
52
+ </select>
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <td >
57
+ <label for="theme">Theme</label>
58
+ </td><td>
59
+ <select id="theme" size="1">
60
+ <option value="ace/theme/chrome">Chrome</option>
61
+ <option value="ace/theme/clouds">Clouds</option>
62
+ <option value="ace/theme/clouds_midnight">Clouds Midnight</option>
63
+ <option value="ace/theme/cobalt">Cobalt</option>
64
+ <option value="ace/theme/crimson_editor">Crimson Editor</option>
65
+ <option value="ace/theme/dawn">Dawn</option>
66
+ <option value="ace/theme/dreamweaver">Dreamweaver</option>
67
+ <option value="ace/theme/eclipse">Eclipse</option>
68
+ <option value="ace/theme/github">GitHub</option>
69
+ <option value="ace/theme/idle_fingers">idleFingers</option>
70
+ <option value="ace/theme/kr_theme">krTheme</option>
71
+ <option value="ace/theme/merbivore">Merbivore</option>
72
+ <option value="ace/theme/merbivore_soft">Merbivore Soft</option>
73
+ <option value="ace/theme/mono_industrial">Mono Industrial</option>
74
+ <option value="ace/theme/monokai">Monokai</option>
75
+ <option value="ace/theme/pastel_on_dark">Pastel on dark</option>
76
+ <option value="ace/theme/solarized_dark">Solarized Dark</option>
77
+ <option value="ace/theme/solarized_light">Solarized Light</option>
78
+ <option value="ace/theme/textmate" selected="selected">TextMate</option>
79
+ <option value="ace/theme/twilight">Twilight</option>
80
+ <option value="ace/theme/tomorrow">Tomorrow</option>
81
+ <option value="ace/theme/tomorrow_night">Tomorrow Night</option>
82
+ <option value="ace/theme/tomorrow_night_blue">Tomorrow Night Blue</option>
83
+ <option value="ace/theme/tomorrow_night_bright">Tomorrow Night Bright</option>
84
+ <option value="ace/theme/tomorrow_night_eighties">Tomorrow Night 80s</option>
85
+ <option value="ace/theme/vibrant_ink">Vibrant Ink</option>
86
+ </select>
87
+ </td>
88
+ </tr>
89
+ <tr>
90
+ <td>
91
+ <label for="fontsize">Font Size</label>
92
+ </td><td>
93
+ <select id="fontsize" size="1">
94
+ <option value="10px">10px</option>
95
+ <option value="11px">11px</option>
96
+ <option value="12px" selected="selected">12px</option>
97
+ <option value="14px">14px</option>
98
+ <option value="16px">16px</option>
99
+ <option value="20px">20px</option>
100
+ <option value="24px">24px</option>
101
+ </select>
102
+ </td>
103
+ </tr>
104
+ <tr>
105
+ <td>
106
+ <label for="folding">Code Folding</label>
107
+ </td><td>
108
+ <select id="folding" size="1">
109
+ <option value="manual">manual</option>
110
+ <option value="markbegin" selected="selected">mark begin</option>
111
+ <option value="markbeginend">mark begin and end</option>
112
+ </select>
113
+ </td>
114
+ </tr>
115
+ <tr>
116
+ <td >
117
+ <label for="keybinding">Key Binding</label>
118
+ </td><td>
119
+ <select id="keybinding" size="1">
120
+ <option value="ace">Ace</option>
121
+ <option value="vim">Vim</option>
122
+ <option value="emacs">Emacs</option>
123
+ <option value="custom">Custom</option>
124
+ </select>
125
+ </td>
126
+ </tr>
127
+ <tr>
128
+ <td >
129
+ <label for="soft_wrap">Soft Wrap</label>
130
+ </td><td>
131
+ <select id="soft_wrap" size="1">
132
+ <option value="off">Off</option>
133
+ <option value="40">40 Chars</option>
134
+ <option value="80">80 Chars</option>
135
+ <option value="free">Free</option>
136
+ </select>
137
+ </td>
138
+ </tr>
139
+
140
+ <tr><td colspan="2">
141
+ <table id="more-controls">
142
+ <tr>
143
+ <td>
144
+ <label for="select_style">Full Line Selection</label>
145
+ </td><td>
146
+ <input type="checkbox" name="select_style" id="select_style" checked>
147
+ </td>
148
+ </tr>
149
+ <tr>
150
+ <td>
151
+ <label for="highlight_active">Highlight Active Line</label>
152
+ </td><td>
153
+ <input type="checkbox" name="highlight_active" id="highlight_active" checked>
154
+ </td>
155
+ </tr>
156
+ <tr>
157
+ <td >
158
+ <label for="show_hidden">Show Invisibles</label>
159
+ </td><td>
160
+ <input type="checkbox" name="show_hidden" id="show_hidden" checked>
161
+ </td>
162
+ </tr>
163
+ <tr>
164
+ <td >
165
+ <label for="show_hscroll">Persistent HScroll</label>
166
+ </td><td>
167
+ <input type="checkbox" name="show_hscroll" id="show_hscroll">
168
+ </td>
169
+ </tr>
170
+ <tr>
171
+ <td >
172
+ <label for="animate_scroll">Animate scrolling</label>
173
+ </td><td>
174
+ <input type="checkbox" name="animate_scroll" id="animate_scroll">
175
+ </td>
176
+ </tr>
177
+ <tr>
178
+ <td >
179
+ <label for="show_gutter">Show Gutter</label>
180
+ </td><td>
181
+ <input type="checkbox" id="show_gutter" checked>
182
+ </td>
183
+ </tr>
184
+ <tr>
185
+ <td >
186
+ <label for="show_print_margin">Show Print Margin</label>
187
+ </td><td>
188
+ <input type="checkbox" id="show_print_margin" checked>
189
+ </td>
190
+ </tr>
191
+ <tr>
192
+ <td >
193
+ <label for="soft_tab">Use Soft Tab</label>
194
+ </td><td>
195
+ <input type="checkbox" id="soft_tab" checked>
196
+ </td>
197
+ </tr>
198
+ <tr>
199
+ <td >
200
+ <label for="highlight_selected_word">Highlight selected word</label>
201
+ </td>
202
+ <td>
203
+ <input type="checkbox" id="highlight_selected_word" checked>
204
+ </td>
205
+ </tr>
206
+ <tr>
207
+ <td >
208
+ <label for="enable_behaviours">Enable Behaviours</label>
209
+ </td>
210
+ <td>
211
+ <input type="checkbox" id="enable_behaviours">
212
+ </td>
213
+ </tr>
214
+ <tr>
215
+ <td >
216
+ <label for="fade_fold_widgets">Fade Fold Widgets</label>
217
+ </td>
218
+ <td>
219
+ <input type="checkbox" id="fade_fold_widgets" checked>
220
+ </td>
221
+ </tr>
222
+ </table>
223
+ </td></tr>
224
+ </table>
225
+ </div>
226
+ <div id="editor"></div>
227
+
228
+
229
+
230
+
231
+ <script src="../demo/kitchen-sink/require.js"></script>
232
+ <script src="src/ace.js" data-ace-base="src"></script>
233
+ <script src="src/keybinding-vim.js"></script>
234
+ <script src="src/keybinding-emacs.js"></script>
235
+ <script src="kitchen-sink/demo.js"></script>
236
+ <script type="text/javascript" charset="utf-8">
237
+ require(["kitchen-sink/demo", "ace/ace"])
238
+ require("kitchen-sink/demo");
239
+ </script>
240
+
241
+
242
+ </body>
243
+ </html>
ace-0.2.0/kitchen-sink.html CHANGED
@@ -1,23 +1,32 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
- "http://www.w3.org/TR/html4/strict.dtd">
3
 
4
  <html lang="en">
5
  <head>
6
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7
  <title>Ace Kitchen Sink</title>
8
  <meta name="author" content="Fabian Jakobs">
9
- <link rel="stylesheet" href="demo/kitchen-sink/styles.css" type="text/css" media="screen" charset="utf-8">
10
  <!--
11
-
12
  Ace
13
- version 0.2.0
14
- commit 461baf4e583262d49fb5cef2a811415d8f55ef93
 
15
 
 
16
 
17
- -->
 
 
 
 
18
  </head>
19
  <body>
20
- <img id="logo" src="demo/kitchen-sink/logo.png">
 
 
 
 
 
 
21
  <table id="controls">
22
  <tr>
23
  <td>
@@ -51,31 +60,39 @@
51
  <label for="theme">Theme</label>
52
  </td><td>
53
  <select id="theme" size="1">
54
- <option value="ace/theme/chrome">Chrome</option>
55
- <option value="ace/theme/clouds">Clouds</option>
56
- <option value="ace/theme/clouds_midnight">Clouds Midnight</option>
57
- <option value="ace/theme/cobalt">Cobalt</option>
58
- <option value="ace/theme/crimson_editor">Crimson Editor</option>
59
- <option value="ace/theme/dawn">Dawn</option>
60
- <option value="ace/theme/dreamweaver">Dreamweaver</option>
61
- <option value="ace/theme/eclipse">Eclipse</option>
62
- <option value="ace/theme/idle_fingers">idleFingers</option>
63
- <option value="ace/theme/kr_theme">krTheme</option>
64
- <option value="ace/theme/merbivore">Merbivore</option>
65
- <option value="ace/theme/merbivore_soft">Merbivore Soft</option>
66
- <option value="ace/theme/mono_industrial">Mono Industrial</option>
67
- <option value="ace/theme/monokai">Monokai</option>
68
- <option value="ace/theme/pastel_on_dark">Pastel on dark</option>
69
- <option value="ace/theme/solarized_dark">Solarized Dark</option>
70
- <option value="ace/theme/solarized_light">Solarized Light</option>
71
- <option value="ace/theme/textmate" selected="selected">TextMate</option>
72
- <option value="ace/theme/twilight">Twilight</option>
73
- <option value="ace/theme/tomorrow">Tomorrow</option>
74
- <option value="ace/theme/tomorrow_night">Tomorrow Night</option>
75
- <option value="ace/theme/tomorrow_night_blue">Tomorrow Night Blue</option>
76
- <option value="ace/theme/tomorrow_night_bright">Tomorrow Night Bright</option>
77
- <option value="ace/theme/tomorrow_night_eighties">Tomorrow Night 80s</option>
78
- <option value="ace/theme/vibrant_ink">Vibrant Ink</option>
 
 
 
 
 
 
 
 
79
  </select>
80
  </td>
81
  </tr>
@@ -105,6 +122,33 @@
105
  </select>
106
  </td>
107
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  <tr>
109
  <td>
110
  <label for="select_style">Full Line Selection</label>
@@ -128,40 +172,23 @@
128
  </tr>
129
  <tr>
130
  <td >
131
- <label for="show_hscroll">Persistent HScroll</label>
132
  </td><td>
133
- <input type="checkbox" name="show_hscroll" id="show_hscroll">
134
  </td>
135
  </tr>
136
  <tr>
137
  <td >
138
- <label for="animate_scroll">Animate scrolling</label>
139
- </td><td>
140
- <input type="checkbox" name="animate_scroll" id="animate_scroll">
141
- </td>
142
- </tr>
143
- <tr>
144
- <td >
145
- <label for="keybinding">Key Binding</label>
146
  </td><td>
147
- <select id="keybinding" size="1">
148
- <option value="ace">Ace</option>
149
- <option value="vim">Vim</option>
150
- <option value="emacs">Emacs</option>
151
- <option value="custom">Custom</option>
152
- </select>
153
  </td>
154
  </tr>
155
  <tr>
156
  <td >
157
- <label for="soft_wrap">Soft Wrap</label>
158
  </td><td>
159
- <select id="soft_wrap" size="1">
160
- <option value="off">Off</option>
161
- <option value="40">40 Chars</option>
162
- <option value="80">80 Chars</option>
163
- <option value="free">Free</option>
164
- </select>
165
  </td>
166
  </tr>
167
  <tr>
@@ -206,33 +233,37 @@
206
  <label for="fade_fold_widgets">Fade Fold Widgets</label>
207
  </td>
208
  <td>
209
- <input type="checkbox" id="fade_fold_widgets" checked>
210
  </td>
211
  </tr>
212
- </table>
213
-
214
- <div id="editor">
215
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
216
 
217
- <!--
218
- <script type="text/javascript">
219
- var require = {
220
- baseUrl: window.location.protocol + "//" + window.location.host + window.location.pathname.split("/").slice(0, -1).join("/"),
221
- paths: {
222
- ace: "lib/ace"
223
- }
224
- };
225
- </script>
226
- <script src="demo/kitchen-sink/require.js" data-main="demo/kitchen-sink/demo" type="text/javascript"></script>
227
 
228
- -->
229
 
230
 
231
- <script src="demo/kitchen-sink/kitchen-sink-uncompressed.js" data-ace-suffix="-uncompressed.js" data-ace-base="demo/kitchen-sink" type="text/javascript" charset="utf-8"></script>
 
 
 
232
  <script type="text/javascript" charset="utf-8">
233
  require("kitchen-sink/demo");
234
  </script>
235
- <!--
236
 
237
  </body>
238
- </html>
1
+ <!DOCTYPE html>
 
2
 
3
  <html lang="en">
4
  <head>
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
  <title>Ace Kitchen Sink</title>
7
  <meta name="author" content="Fabian Jakobs">
 
8
  <!--
 
9
  Ace
10
+ version
11
+ commit
12
+ -->
13
 
14
+
15
 
16
+ <link href="./doc/resources/ace/skeleton/images/favicon.ico" rel="icon" type="image/x-icon">
17
+
18
+ <link rel="stylesheet" href="kitchen-sink/styles.css" type="text/css" media="screen" charset="utf-8">
19
+ <script src="http://use.edgefonts.net/source-code-pro.js"></script>
20
+
21
  </head>
22
  <body>
23
+ <div id="optionsPanel" style="position:absolute;height:100%;width:260px">
24
+ <a href="http://ajaxorg.github.com/ace/" >
25
+ <img id="logo" src="kitchen-sink/logo.png">
26
+ </a>
27
+ <div style="position: absolute; overflow: hidden; top:80px; bottom:0">
28
+ <div style="width: 120%; height:100%; overflow-y: scroll">
29
+
30
  <table id="controls">
31
  <tr>
32
  <td>
60
  <label for="theme">Theme</label>
61
  </td><td>
62
  <select id="theme" size="1">
63
+ <optgroup label="Bright">
64
+ <option value="ace/theme/chrome">Chrome</option>
65
+ <option value="ace/theme/clouds">Clouds</option>
66
+ <option value="ace/theme/crimson_editor">Crimson Editor</option>
67
+ <option value="ace/theme/dawn">Dawn</option>
68
+ <option value="ace/theme/dreamweaver">Dreamweaver</option>
69
+ <option value="ace/theme/eclipse">Eclipse</option>
70
+ <option value="ace/theme/github">GitHub</option>
71
+ <option value="ace/theme/solarized_light">Solarized Light</option>
72
+ <option value="ace/theme/textmate" selected="selected">TextMate</option>
73
+ <option value="ace/theme/tomorrow">Tomorrow</option>
74
+ <option value="ace/theme/xcode">XCode</option>
75
+ </optgroup>
76
+ <optgroup label="Dark">
77
+ <option value="ace/theme/ambiance">Ambiance</option>
78
+ <option value="ace/theme/chaos">Chaos</option>
79
+ <option value="ace/theme/clouds_midnight">Clouds Midnight</option>
80
+ <option value="ace/theme/cobalt">Cobalt</option>
81
+ <option value="ace/theme/idle_fingers">idleFingers</option>
82
+ <option value="ace/theme/kr_theme">krTheme</option>
83
+ <option value="ace/theme/merbivore">Merbivore</option>
84
+ <option value="ace/theme/merbivore_soft">Merbivore Soft</option>
85
+ <option value="ace/theme/mono_industrial">Mono Industrial</option>
86
+ <option value="ace/theme/monokai">Monokai</option>
87
+ <option value="ace/theme/pastel_on_dark">Pastel on dark</option>
88
+ <option value="ace/theme/solarized_dark">Solarized Dark</option>
89
+ <option value="ace/theme/twilight">Twilight</option>
90
+ <option value="ace/theme/tomorrow_night">Tomorrow Night</option>
91
+ <option value="ace/theme/tomorrow_night_blue">Tomorrow Night Blue</option>
92
+ <option value="ace/theme/tomorrow_night_bright">Tomorrow Night Bright</option>
93
+ <option value="ace/theme/tomorrow_night_eighties">Tomorrow Night 80s</option>
94
+ <option value="ace/theme/vibrant_ink">Vibrant Ink</option>
95
+ </optgroup>
96
  </select>
97
  </td>
98
  </tr>
122
  </select>
123
  </td>
124
  </tr>
125
+ <tr>
126
+ <td >
127
+ <label for="keybinding">Key Binding</label>
128
+ </td><td>
129
+ <select id="keybinding" size="1">
130
+ <option value="ace">Ace</option>
131
+ <option value="vim">Vim</option>
132
+ <option value="emacs">Emacs</option>
133
+ <option value="custom">Custom</option>
134
+ </select>
135
+ </td>
136
+ </tr>
137
+ <tr>
138
+ <td >
139
+ <label for="soft_wrap">Soft Wrap</label>
140
+ </td><td>
141
+ <select id="soft_wrap" size="1">
142
+ <option value="off">Off</option>
143
+ <option value="40">40 Chars</option>
144
+ <option value="80">80 Chars</option>
145
+ <option value="free">Free</option>
146
+ </select>
147
+ </td>
148
+ </tr>
149
+
150
+ <tr><td colspan="2">
151
+ <table id="more-controls">
152
  <tr>
153
  <td>
154
  <label for="select_style">Full Line Selection</label>
172
  </tr>
173
  <tr>
174
  <td >
175
+ <label for="display_indent_guides">Show Indent Guides</label>
176
  </td><td>
177
+ <input type="checkbox" name="display_indent_guides" id="display_indent_guides" checked>
178
  </td>
179
  </tr>
180
  <tr>
181
  <td >
182
+ <label for="show_hscroll">Persistent HScroll</label>
 
 
 
 
 
 
 
183
  </td><td>
184
+ <input type="checkbox" name="show_hscroll" id="show_hscroll">
 
 
 
 
 
185
  </td>
186
  </tr>
187
  <tr>
188
  <td >
189
+ <label for="animate_scroll">Animate scrolling</label>
190
  </td><td>
191
+ <input type="checkbox" name="animate_scroll" id="animate_scroll">
 
 
 
 
 
192
  </td>
193
  </tr>
194
  <tr>
233
  <label for="fade_fold_widgets">Fade Fold Widgets</label>
234
  </td>
235
  <td>
236
+ <input type="checkbox" id="fade_fold_widgets">
237
  </td>
238
  </tr>
239
+ <tr>
240
+ <td >
241
+ <label for="highlight_token">Show token info</label>
242
+ </td>
243
+ <td>
244
+ <input type="checkbox" id="highlight_token">
245
+ </td>
246
+ </tr>
247
+ </table>
248
+ </td></tr>
249
+ </table>
250
+
251
+ </div>
252
+ </div>
253
+ </div>
254
+ <div id="editor-container"></div>
255
 
 
 
 
 
 
 
 
 
 
 
256
 
 
257
 
258
 
259
+ <script src="src/ace.js" data-ace-base="src" type="text/javascript" charset="utf-8"></script>
260
+ <script src="src/keybinding-vim.js"></script>
261
+ <script src="src/keybinding-emacs.js"></script>
262
+ <script src="kitchen-sink/demo.js"></script>
263
  <script type="text/javascript" charset="utf-8">
264
  require("kitchen-sink/demo");
265
  </script>
266
+
267
 
268
  </body>
269
+ </html>
ace-0.2.0/kitchen-sink/demo.js ADDED
@@ -0,0 +1,3543 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2010, 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
+ * ***** END LICENSE BLOCK ***** */
30
+
31
+
32
+ define('kitchen-sink/demo', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers', 'ace/config', 'ace/lib/dom', 'ace/lib/net', 'ace/lib/lang', 'ace/lib/useragent', 'ace/lib/event', 'ace/theme/textmate', 'ace/edit_session', 'ace/undomanager', 'ace/keyboard/vim', 'ace/keyboard/emacs', 'ace/keyboard/hash_handler', 'ace/virtual_renderer', 'ace/editor', 'ace/multi_select', 'kitchen-sink/doclist', 'kitchen-sink/modelist', 'kitchen-sink/layout', 'kitchen-sink/token_tooltip', 'kitchen-sink/util', 'ace/split', 'kitchen-sink/statusbar'], function(require, exports, module) {
33
+
34
+
35
+ require("ace/lib/fixoldbrowsers");
36
+ require("ace/config").init();
37
+ var env = {};
38
+
39
+ var dom = require("ace/lib/dom");
40
+ var net = require("ace/lib/net");
41
+ var lang = require("ace/lib/lang");
42
+ var useragent = require("ace/lib/useragent");
43
+
44
+ var event = require("ace/lib/event");
45
+ var theme = require("ace/theme/textmate");
46
+ var EditSession = require("ace/edit_session").EditSession;
47
+ var UndoManager = require("ace/undomanager").UndoManager;
48
+
49
+ var vim = require("ace/keyboard/vim").handler;
50
+ var emacs = require("ace/keyboard/emacs").handler;
51
+ var HashHandler = require("ace/keyboard/hash_handler").HashHandler;
52
+
53
+ var Renderer = require("ace/virtual_renderer").VirtualRenderer;
54
+ var Editor = require("ace/editor").Editor;
55
+ var MultiSelect = require("ace/multi_select").MultiSelect;
56
+
57
+ var doclist = require("./doclist");
58
+ var modelist = require("./modelist");
59
+ var layout = require("./layout");
60
+ var TokenTooltip = require("./token_tooltip").TokenTooltip;
61
+ var util = require("./util");
62
+ var saveOption = util.saveOption;
63
+ var fillDropdown = util.fillDropdown;
64
+ var bindCheckbox = util.bindCheckbox;
65
+ var bindDropdown = util.bindDropdown;
66
+ var container = document.getElementById("editor-container");
67
+ var Split = require("ace/split").Split;
68
+ var split = new Split(container, theme, 1);
69
+ env.editor = split.getEditor(0);
70
+ split.on("focus", function(editor) {
71
+ env.editor = editor;
72
+ updateUIEditorOptions();
73
+ });
74
+ env.split = split;
75
+ window.env = env;
76
+ window.ace = env.editor;
77
+ env.editor.setAnimatedScroll(true);
78
+ require("ace/multi_select").MultiSelect(env.editor);
79
+
80
+ var consoleEl = dom.createElement("div");
81
+ container.parentNode.appendChild(consoleEl);
82
+ consoleEl.style.cssText = "position:fixed; bottom:1px; right:0;\
83
+ border:1px solid #baf; zIndex:100";
84
+
85
+ var cmdLine = new layout.singleLineEditor(consoleEl);
86
+ cmdLine.editor = env.editor;
87
+ env.editor.cmdLine = cmdLine;
88
+ env.editor.commands.addCommands([{
89
+ name: "gotoline",
90
+ bindKey: {win: "Ctrl-L", mac: "Command-L"},
91
+ exec: function(editor, line) {
92
+ if (typeof line == "object") {
93
+ var arg = this.name + " " + editor.getCursorPosition().row;
94
+ editor.cmdLine.setValue(arg, 1);
95
+ editor.cmdLine.focus();
96
+ return;
97
+ }
98
+ line = parseInt(line, 10);
99
+ if (!isNaN(line))
100
+ editor.gotoLine(line);
101
+ },
102
+ readOnly: true
103
+ }, {
104
+ name: "find",
105
+ bindKey: {win: "Ctrl-F", mac: "Command-F"},
106
+ exec: function(editor, needle) {
107
+ if (typeof needle == "object") {
108
+ var arg = this.name + " " + editor.getCopyText();
109
+ editor.cmdLine.setValue(arg, 1);
110
+ editor.cmdLine.focus();
111
+ return;
112
+ }
113
+ editor.find(needle);
114
+ },
115
+ readOnly: true
116
+ }, {
117
+ name: "focusCommandLine",
118
+ bindKey: "shift-esc",
119
+ exec: function(editor, needle) { editor.cmdLine.focus(); },
120
+ readOnly: true
121
+ }, {
122
+ name: "execute",
123
+ bindKey: "ctrl+enter",
124
+ exec: function(editor) {
125
+ try {
126
+ var r = eval(editor.getCopyText()||editor.getValue());
127
+ } catch(e) {
128
+ r = e;
129
+ }
130
+ editor.cmdLine.setValue(r + "")
131
+ },
132
+ readOnly: true
133
+ }]);
134
+
135
+ cmdLine.commands.bindKeys({
136
+ "Shift-Return|Ctrl-Return|Alt-Return": function(cmdLine) { cmdLine.insert("\n"); },
137
+ "Esc|Shift-Esc": function(cmdLine){ cmdLine.editor.focus(); },
138
+ "Return": function(cmdLine){
139
+ var command = cmdLine.getValue().split(/\s+/);
140
+ var editor = cmdLine.editor;
141
+ editor.commands.exec(command[0], editor, command[1]);
142
+ editor.focus();
143
+ }
144
+ });
145
+
146
+ cmdLine.commands.removeCommands(["find", "gotoline", "findall", "replace", "replaceall"]);
147
+
148
+ var commands = env.editor.commands;
149
+ commands.addCommand({
150
+ name: "save",
151
+ bindKey: {win: "Ctrl-S", mac: "Command-S"},
152
+ exec: function() {alert("Fake Save File");}
153
+ });
154
+
155
+ var keybindings = {
156
+ ace: null,
157
+ vim: vim,
158
+ emacs: emacs,
159
+ custom: new HashHandler({
160
+ "gotoright": "Tab",
161
+ "indent": "]",
162
+ "outdent": "[",
163
+ "gotolinestart": "^",
164
+ "gotolineend": "$"
165
+ })
166
+ };
167
+ var consoleHeight = 20;
168
+ function onResize() {
169
+ var left = env.split.$container.offsetLeft;
170
+ var width = document.documentElement.clientWidth - left;
171
+ container.style.width = width + "px";
172
+ container.style.height = document.documentElement.clientHeight - consoleHeight + "px";
173
+ env.split.resize();
174
+
175
+ consoleEl.style.width = width + "px";
176
+ cmdLine.resize();
177
+ }
178
+
179
+ window.onresize = onResize;
180
+ onResize();
181
+ var docEl = document.getElementById("doc");
182
+ var modeEl = document.getElementById("mode");
183
+ var wrapModeEl = document.getElementById("soft_wrap");
184
+ var themeEl = document.getElementById("theme");
185
+ var foldingEl = document.getElementById("folding");
186
+ var selectStyleEl = document.getElementById("select_style");
187
+ var highlightActiveEl = document.getElementById("highlight_active");
188
+ var showHiddenEl = document.getElementById("show_hidden");
189
+ var showGutterEl = document.getElementById("show_gutter");
190
+ var showPrintMarginEl = document.getElementById("show_print_margin");
191
+ var highlightSelectedWordE = document.getElementById("highlight_selected_word");
192
+ var showHScrollEl = document.getElementById("show_hscroll");
193
+ var animateScrollEl = document.getElementById("animate_scroll");
194
+ var softTabEl = document.getElementById("soft_tab");
195
+ var behavioursEl = document.getElementById("enable_behaviours");
196
+
197
+ fillDropdown(docEl, doclist.all);
198
+
199
+ fillDropdown(modeEl, modelist.modes);
200
+ var modesByName = modelist.modesByName;
201
+ bindDropdown("mode", function(value) {
202
+ env.editor.session.setMode(modesByName[value].mode || modesByName.text.mode);
203
+ env.editor.session.modeName = value;
204
+ });
205
+
206
+ bindDropdown("doc", function(name) {
207
+ doclist.loadDoc(name, function(session) {
208
+ if (!session)
209
+ return;
210
+ session = env.split.setSession(session);
211
+ updateUIEditorOptions();
212
+ env.editor.focus();
213
+ });
214
+ });
215
+
216
+ function updateUIEditorOptions() {
217
+ var editor = env.editor;
218
+ var session = editor.session;
219
+
220
+ session.setFoldStyle(foldingEl.value);
221
+
222
+ saveOption(docEl, session.name);
223
+ saveOption(modeEl, session.modeName || "text");
224
+ saveOption(wrapModeEl, session.getUseWrapMode() ? session.getWrapLimitRange().min || "free" : "off");
225
+
226
+ saveOption(selectStyleEl, editor.getSelectionStyle() == "line");
227
+ saveOption(themeEl, editor.getTheme());
228
+ saveOption(highlightActiveEl, editor.getHighlightActiveLine());
229
+ saveOption(showHiddenEl, editor.getShowInvisibles());
230
+ saveOption(showGutterEl, editor.renderer.getShowGutter());
231
+ saveOption(showPrintMarginEl, editor.renderer.getShowPrintMargin());
232
+ saveOption(highlightSelectedWordE, editor.getHighlightSelectedWord());
233
+ saveOption(showHScrollEl, editor.renderer.getHScrollBarAlwaysVisible());
234
+ saveOption(animateScrollEl, editor.getAnimatedScroll());
235
+ saveOption(softTabEl, session.getUseSoftTabs());
236
+ saveOption(behavioursEl, editor.getBehavioursEnabled());
237
+ }
238
+
239
+ event.addListener(themeEl, "mouseover", function(e){
240
+ this.desiredValue = e.target.value;
241
+ if (!this.$timer)
242
+ this.$timer = setTimeout(this.updateTheme);
243
+ });
244
+
245
+ event.addListener(themeEl, "mouseout", function(e){
246
+ this.desiredValue = null;
247
+ if (!this.$timer)
248
+ this.$timer = setTimeout(this.updateTheme, 20);
249
+ });
250
+
251
+ themeEl.updateTheme = function(){
252
+ env.split.setTheme(themeEl.desiredValue || themeEl.selectedValue);
253
+ themeEl.$timer = null;
254
+ };
255
+
256
+ bindDropdown("theme", function(value) {
257
+ if (!value)
258
+ return;
259
+ env.editor.setTheme(value);
260
+ themeEl.selectedValue = value;
261
+ });
262
+
263
+ bindDropdown("keybinding", function(value) {
264
+ env.editor.setKeyboardHandler(keybindings[value]);
265
+ });
266
+
267
+ bindDropdown("fontsize", function(value) {
268
+ env.split.setFontSize(value);
269
+ });
270
+
271
+ bindDropdown("folding", function(value) {
272
+ env.editor.session.setFoldStyle(value);
273
+ env.editor.setShowFoldWidgets(value !== "manual");
274
+ });
275
+
276
+ bindDropdown("soft_wrap", function(value) {
277
+ var session = env.editor.session;
278
+ var renderer = env.editor.renderer;
279
+ switch (value) {
280
+ case "off":
281
+ session.setUseWrapMode(false);
282
+ renderer.setPrintMarginColumn(80);
283
+ break;
284
+ case "free":
285
+ session.setUseWrapMode(true);
286
+ session.setWrapLimitRange(null, null);
287
+ renderer.setPrintMarginColumn(80);
288
+ break;
289
+ default:
290
+ session.setUseWrapMode(true);
291
+ var col = parseInt(value, 10);
292
+ session.setWrapLimitRange(col, col);
293
+ renderer.setPrintMarginColumn(col);
294
+ }
295
+ });
296
+
297
+ bindCheckbox("select_style", function(checked) {
298
+ env.editor.setSelectionStyle(checked ? "line" : "text");
299
+ });
300
+
301
+ bindCheckbox("highlight_active", function(checked) {
302
+ env.editor.setHighlightActiveLine(checked);
303
+ });
304
+
305
+ bindCheckbox("show_hidden", function(checked) {
306
+ env.editor.setShowInvisibles(checked);
307
+ });
308
+
309
+ bindCheckbox("display_indent_guides", function(checked) {
310
+ env.editor.setDisplayIndentGuides(checked);
311
+ });
312
+
313
+ bindCheckbox("show_gutter", function(checked) {
314
+ env.editor.renderer.setShowGutter(checked);
315
+ });
316
+
317
+ bindCheckbox("show_print_margin", function(checked) {
318
+ env.editor.renderer.setShowPrintMargin(checked);
319
+ });
320
+
321
+ bindCheckbox("highlight_selected_word", function(checked) {
322
+ env.editor.setHighlightSelectedWord(checked);
323
+ });
324
+
325
+ bindCheckbox("show_hscroll", function(checked) {
326
+ env.editor.renderer.setHScrollBarAlwaysVisible(checked);
327
+ });
328
+
329
+ bindCheckbox("animate_scroll", function(checked) {
330
+ env.editor.setAnimatedScroll(checked);
331
+ });
332
+
333
+ bindCheckbox("soft_tab", function(checked) {
334
+ env.editor.session.setUseSoftTabs(checked);
335
+ });
336
+
337
+ bindCheckbox("enable_behaviours", function(checked) {
338
+ env.editor.setBehavioursEnabled(checked);
339
+ });
340
+
341
+ bindCheckbox("fade_fold_widgets", function(checked) {
342
+ env.editor.setFadeFoldWidgets(checked);
343
+ });
344
+
345
+ var secondSession = null;
346
+ bindDropdown("split", function(value) {
347
+ var sp = env.split;
348
+ if (value == "none") {
349
+ if (sp.getSplits() == 2) {
350
+ secondSession = sp.getEditor(1).session;
351
+ }
352
+ sp.setSplits(1);
353
+ } else {
354
+ var newEditor = (sp.getSplits() == 1);
355
+ if (value == "below") {
356
+ sp.setOrientation(sp.BELOW);
357
+ } else {
358
+ sp.setOrientation(sp.BESIDE);
359
+ }
360
+ sp.setSplits(2);
361
+
362
+ if (newEditor) {
363
+ var session = secondSession || sp.getEditor(0).session;
364
+ var newSession = sp.setSession(session, 1);
365
+ newSession.name = session.name;
366
+ }
367
+ }
368
+ });
369
+
370
+ bindCheckbox("highlight_token", function(checked) {
371
+ var editor = env.editor;
372
+ if (editor.tokenTooltip && !checked) {
373
+ editor.tokenTooltip.destroy();
374
+ delete editor.tokenTooltip;
375
+ } else if (checked) {
376
+ editor.tokenTooltip = new TokenTooltip(editor);
377
+ }
378
+ });
379
+ event.addListener(container, "dragover", function(e) {
380
+ return event.preventDefault(e);
381
+ });
382
+
383
+ event.addListener(container, "drop", function(e) {
384
+ var file;
385
+ try {
386
+ file = e.dataTransfer.files[0];
387
+ if (window.FileReader) {
388
+ var reader = new FileReader();
389
+ reader.onload = function() {
390
+ var mode = getModeFromPath(file.name);
391
+
392
+ env.editor.session.doc.setValue(reader.result);
393
+ modeEl.value = mode.name;
394
+ env.editor.session.setMode(mode.mode);
395
+ env.editor.session.modeName = mode.name;
396
+ };
397
+ reader.readAsText(file);
398
+ }
399
+ return event.preventDefault(e);
400
+ } catch(err) {
401
+ return event.stopEvent(e);
402
+ }
403
+ });
404
+
405
+
406
+
407
+ var StatusBar = require("./statusbar").StatusBar;
408
+ new StatusBar(env.editor, cmdLine.container);
409
+
410
+ });
411
+
412
+ define('ace/theme/textmate', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
413
+
414
+
415
+ exports.isDark = false;
416
+ exports.cssClass = "ace-tm";
417
+ exports.cssText = ".ace-tm .ace_gutter {\
418
+ background: #f0f0f0;\
419
+ color: #333;\
420
+ }\
421
+ .ace-tm .ace_print-margin {\
422
+ width: 1px;\
423
+ background: #e8e8e8;\
424
+ }\
425
+ .ace-tm .ace_fold {\
426
+ background-color: #6B72E6;\
427
+ }\
428
+ .ace-tm .ace_scroller {\
429
+ background-color: #FFFFFF;\
430
+ }\
431
+ .ace-tm .ace_cursor {\
432
+ border-left: 2px solid black;\
433
+ }\
434
+ .ace-tm .ace_overwrite-cursors .ace_cursor {\
435
+ border-left: 0px;\
436
+ border-bottom: 1px solid black;\
437
+ }\
438
+ .ace-tm .ace_invisible {\
439
+ color: rgb(191, 191, 191);\
440
+ }\
441
+ .ace-tm .ace_storage,\
442
+ .ace-tm .ace_keyword {\
443
+ color: blue;\
444
+ }\
445
+ .ace-tm .ace_constant {\
446
+ color: rgb(197, 6, 11);\
447
+ }\
448
+ .ace-tm .ace_constant.ace_buildin {\
449
+ color: rgb(88, 72, 246);\
450
+ }\
451
+ .ace-tm .ace_constant.ace_language {\
452
+ color: rgb(88, 92, 246);\
453
+ }\
454
+ .ace-tm .ace_constant.ace_library {\
455
+ color: rgb(6, 150, 14);\
456
+ }\
457
+ .ace-tm .ace_invalid {\
458
+ background-color: rgba(255, 0, 0, 0.1);\
459
+ color: red;\
460
+ }\
461
+ .ace-tm .ace_support.ace_function {\
462
+ color: rgb(60, 76, 114);\
463
+ }\
464
+ .ace-tm .ace_support.ace_constant {\
465
+ color: rgb(6, 150, 14);\
466
+ }\
467
+ .ace-tm .ace_support.ace_type,\
468
+ .ace-tm .ace_support.ace_class {\
469
+ color: rgb(109, 121, 222);\
470
+ }\
471
+ .ace-tm .ace_keyword.ace_operator {\
472
+ color: rgb(104, 118, 135);\
473
+ }\
474
+ .ace-tm .ace_string {\
475
+ color: rgb(3, 106, 7);\
476
+ }\
477
+ .ace-tm .ace_comment {\
478
+ color: rgb(76, 136, 107);\
479
+ }\
480
+ .ace-tm .ace_comment.ace_doc {\
481
+ color: rgb(0, 102, 255);\
482
+ }\
483
+ .ace-tm .ace_comment.ace_doc.ace_tag {\
484
+ color: rgb(128, 159, 191);\
485
+ }\
486
+ .ace-tm .ace_constant.ace_numeric {\
487
+ color: rgb(0, 0, 205);\
488
+ }\
489
+ .ace-tm .ace_variable {\
490
+ color: rgb(49, 132, 149);\
491
+ }\
492
+ .ace-tm .ace_xml-pe {\
493
+ color: rgb(104, 104, 91);\
494
+ }\
495
+ .ace-tm .ace_entity.ace_name.ace_function {\
496
+ color: #0000A2;\
497
+ }\
498
+ .ace-tm .ace_markup.ace_heading {\
499
+ color: rgb(12, 7, 255);\
500
+ }\
501
+ .ace-tm .ace_markup.ace_list {\
502
+ color:rgb(185, 6, 144);\
503
+ }\
504
+ .ace-tm .ace_meta.ace_tag {\
505
+ color:rgb(0, 22, 142);\
506
+ }\
507
+ .ace-tm .ace_string.ace_regex {\
508
+ color: rgb(255, 0, 0)\
509
+ }\
510
+ .ace-tm .ace_marker-layer .ace_selection {\
511
+ background: rgb(181, 213, 255);\
512
+ }\
513
+ .ace-tm.ace_multiselect .ace_selection.ace_start {\
514
+ box-shadow: 0 0 3px 0px white;\
515
+ border-radius: 2px;\
516
+ }\
517
+ .ace-tm .ace_marker-layer .ace_step {\
518
+ background: rgb(252, 255, 0);\
519
+ }\
520
+ .ace-tm .ace_marker-layer .ace_stack {\
521
+ background: rgb(164, 229, 101);\
522
+ }\
523
+ .ace-tm .ace_marker-layer .ace_bracket {\
524
+ margin: -1px 0 0 -1px;\
525
+ border: 1px solid rgb(192, 192, 192);\
526
+ }\
527
+ .ace-tm .ace_marker-layer .ace_active-line {\
528
+ background: rgba(0, 0, 0, 0.07);\
529
+ }\
530
+ .ace-tm .ace_gutter-active-line {\
531
+ background-color : #dcdcdc;\
532
+ }\
533
+ .ace-tm .ace_marker-layer .ace_selected-word {\
534
+ background: rgb(250, 250, 255);\
535
+ border: 1px solid rgb(200, 200, 250);\
536
+ }\
537
+ .ace-tm .ace_indent-guide {\
538
+ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
539
+ }\
540
+ ";
541
+
542
+ var dom = require("../lib/dom");
543
+ dom.importCssString(exports.cssText, exports.cssClass);
544
+ });
545
+
546
+ define('ace/keyboard/vim', ['require', 'exports', 'module' , 'ace/keyboard/vim/commands', 'ace/keyboard/vim/maps/util', 'ace/lib/useragent'], function(require, exports, module) {
547
+
548
+
549
+ var cmds = require("./vim/commands");
550
+ var coreCommands = cmds.coreCommands;
551
+ var util = require("./vim/maps/util");
552
+ var useragent = require("../lib/useragent");
553
+
554
+ var startCommands = {
555
+ "i": {
556
+ command: coreCommands.start
557
+ },
558
+ "I": {
559
+ command: coreCommands.startBeginning
560
+ },
561
+ "a": {
562
+ command: coreCommands.append
563
+ },
564
+ "A": {
565
+ command: coreCommands.appendEnd
566
+ },
567
+ "ctrl-f": {
568
+ command: "gotopagedown"
569
+ },
570
+ "ctrl-b": {
571
+ command: "gotopageup"
572
+ }
573
+ };
574
+
575
+ exports.handler = {
576
+ handleMacRepeat: function(data, hashId, key) {
577
+ if (hashId == -1) {
578
+ data.inputChar = key;
579
+ data.lastEvent = "input";
580
+ } else if (data.inputChar && data.$lastHash == hashId && data.$lastKey == key) {
581
+ if (data.lastEvent == "input") {
582
+ data.lastEvent = "input1";
583
+ } else if (data.lastEvent == "input1") {
584
+ return true;
585
+ }
586
+ } else {
587
+ data.$lastHash = hashId;
588
+ data.$lastKey = key;
589
+ data.lastEvent = "keypress";
590
+ }
591
+ },
592
+
593
+ handleKeyboard: function(data, hashId, key, keyCode, e) {
594
+ if (hashId != 0 && (key == "" || key == "\x00"))
595
+ return null;
596
+
597
+ if (hashId == 1)
598
+ key = "ctrl-" + key;
599
+
600
+ if ((key == "esc" && hashId == 0) || key == "ctrl-[") {
601
+ return {command: coreCommands.stop};
602
+ } else if (data.state == "start") {
603
+ if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
604
+ hashId = -1;
605
+ key = data.inputChar;
606
+ }
607
+
608
+ if (hashId == -1 || hashId == 1) {
609
+ if (cmds.inputBuffer.idle && startCommands[key])
610
+ return startCommands[key];
611
+ return {
612
+ command: {
613
+ exec: function(editor) {cmds.inputBuffer.push(editor, key);}
614
+ }
615
+ };
616
+ } // if no modifier || shift: wait for input.
617
+ else if (key.length == 1 && (hashId == 0 || hashId == 4)) {
618
+ return {command: "null", passEvent: true};
619
+ } else if (key == "esc" && hashId == 0) {
620
+ return {command: coreCommands.stop};
621
+ }
622
+ } else {
623
+ if (key == "ctrl-w") {
624
+ return {command: "removewordleft"};
625
+ }
626
+ }
627
+ },
628
+
629
+ attach: function(editor) {
630
+ editor.on("click", exports.onCursorMove);
631
+ if (util.currentMode !== "insert")
632
+ cmds.coreCommands.stop.exec(editor);
633
+ editor.$vimModeHandler = this;
634
+ },
635
+
636
+ detach: function(editor) {
637
+ editor.removeListener("click", exports.onCursorMove);
638
+ util.noMode(editor);
639
+ util.currentMode = "normal";
640
+ },
641
+
642
+ actions: cmds.actions,
643
+ getStatusText: function() {
644
+ if (util.currentMode == "insert")
645
+ return "INSERT";
646
+ if (util.onVisualMode)
647
+ return (util.onVisualLineMode ? "VISUAL LINE " : "VISUAL ") + cmds.inputBuffer.status;
648
+ return cmds.inputBuffer.status;
649
+ }
650
+ };
651
+
652
+
653
+ exports.onCursorMove = function(e) {
654
+ cmds.onCursorMove(e.editor, e);
655
+ exports.onCursorMove.scheduled = false;
656
+ };
657
+
658
+ });
659
+
660
+ define('ace/keyboard/vim/commands', ['require', 'exports', 'module' , 'ace/keyboard/vim/maps/util', 'ace/keyboard/vim/maps/motions', 'ace/keyboard/vim/maps/operators', 'ace/keyboard/vim/maps/aliases', 'ace/keyboard/vim/registers'], function(require, exports, module) {
661
+
662
+ "never use strict";
663
+
664
+ var util = require("./maps/util");
665
+ var motions = require("./maps/motions");
666
+ var operators = require("./maps/operators");
667
+ var alias = require("./maps/aliases");
668
+ var registers = require("./registers");
669
+
670
+ var NUMBER = 1;
671
+ var OPERATOR = 2;
672
+ var MOTION = 3;
673
+ var ACTION = 4;
674
+ var HMARGIN = 8; // Minimum amount of line separation between margins;
675
+
676
+ var repeat = function repeat(fn, count, args) {
677
+ while (0 < count--)
678
+ fn.apply(this, args);
679
+ };
680
+
681
+ var ensureScrollMargin = function(editor) {
682
+ var renderer = editor.renderer;
683
+ var pos = renderer.$cursorLayer.getPixelPosition();
684
+
685
+ var top = pos.top;
686
+
687
+ var margin = HMARGIN * renderer.layerConfig.lineHeight;
688
+ if (2 * margin > renderer.$size.scrollerHeight)
689
+ margin = renderer.$size.scrollerHeight / 2;
690
+
691
+ if (renderer.scrollTop > top - margin) {
692
+ renderer.session.setScrollTop(top - margin);
693
+ }
694
+
695
+ if (renderer.scrollTop + renderer.$size.scrollerHeight < top + margin + renderer.lineHeight) {
696
+ renderer.session.setScrollTop(top + margin + renderer.lineHeight - renderer.$size.scrollerHeight);
697
+ }
698
+ };
699
+
700
+ var actions = exports.actions = {
701
+ "z": {
702
+ param: true,
703
+ fn: function(editor, range, count, param) {
704
+ switch (param) {
705
+ case "z":
706
+ editor.renderer.alignCursor(null, 0.5);
707
+ break;
708
+ case "t":
709
+ editor.renderer.alignCursor(null, 0);
710
+ break;
711
+ case "b":
712
+ editor.renderer.alignCursor(null, 1);
713
+ break;
714
+ }
715
+ }
716
+ },
717
+ "r": {
718
+ param: true,
719
+ fn: function(editor, range, count, param) {
720
+ if (param && param.length) {
721
+ repeat(function() { editor.insert(param); }, count || 1);
722
+ editor.navigateLeft();
723
+ }
724
+ }
725
+ },
726
+ "R": {
727
+ fn: function(editor, range, count, param) {
728
+ util.insertMode(editor);
729
+ editor.setOverwrite(true);
730
+ }
731
+ },
732
+ "~": {
733
+ fn: function(editor, range, count) {
734
+ repeat(function() {
735
+ var range = editor.selection.getRange();
736
+ if (range.isEmpty())
737
+ range.end.column++;
738
+ var text = editor.session.getTextRange(range);
739
+ var toggled = text.toUpperCase();
740
+ if (toggled == text)
741
+ editor.navigateRight();
742
+ else
743
+ editor.session.replace(range, toggled);
744
+ }, count || 1);
745
+ }
746
+ },
747
+ "*": {
748
+ fn: function(editor, range, count, param) {
749
+ editor.selection.selectWord();
750
+ editor.findNext();
751
+ ensureScrollMargin(editor);
752
+ var r = editor.selection.getRange();
753
+ editor.selection.setSelectionRange(r, true);
754
+ }
755
+ },
756
+ "#": {
757
+ fn: function(editor, range, count, param) {
758
+ editor.selection.selectWord();
759
+ editor.findPrevious();
760
+ ensureScrollMargin(editor);
761
+ var r = editor.selection.getRange();
762
+ editor.selection.setSelectionRange(r, true);
763
+ }
764
+ },
765
+ "n": {
766
+ fn: function(editor, range, count, param) {
767
+ var options = editor.getLastSearchOptions();
768
+ options.backwards = false;
769
+
770
+ editor.selection.moveCursorRight();
771
+ editor.selection.clearSelection();
772
+ editor.findNext(options);
773
+
774
+ ensureScrollMargin(editor);
775
+ var r = editor.selection.getRange();
776
+ r.end.row = r.start.row;
777
+ r.end.column = r.start.column;
778
+ editor.selection.setSelectionRange(r, true);
779
+ }
780
+ },
781
+ "N": {
782
+ fn: function(editor, range, count, param) {
783
+ var options = editor.getLastSearchOptions();
784
+ options.backwards = true;
785
+
786
+ editor.findPrevious(options);
787
+ ensureScrollMargin(editor);
788
+ var r = editor.selection.getRange();
789
+ r.end.row = r.start.row;
790
+ r.end.column = r.start.column;
791
+ editor.selection.setSelectionRange(r, true);
792
+ }
793
+ },
794
+ "v": {
795
+ fn: function(editor, range, count, param) {
796
+ editor.selection.selectRight();
797
+ util.visualMode(editor, false);
798
+ },
799
+ acceptsMotion: true
800
+ },
801
+ "V": {
802
+ fn: function(editor, range, count, param) {
803
+ var row = editor.getCursorPosition().row;
804
+ editor.selection.clearSelection();
805
+ editor.selection.moveCursorTo(row, 0);
806
+ editor.selection.selectLineEnd();
807
+ editor.selection.visualLineStart = row;
808
+
809
+ util.visualMode(editor, true);
810
+ },
811
+ acceptsMotion: true
812
+ },
813
+ "Y": {
814
+ fn: function(editor, range, count, param) {
815
+ util.copyLine(editor);
816
+ }
817
+ },
818
+ "p": {
819
+ fn: function(editor, range, count, param) {
820
+ var defaultReg = registers._default;
821
+
822
+ editor.setOverwrite(false);
823
+ if (defaultReg.isLine) {
824
+ var pos = editor.getCursorPosition();
825
+ var lines = defaultReg.text.split("\n");
826
+ editor.session.getDocument().insertLines(pos.row + 1, lines);
827
+ editor.moveCursorTo(pos.row + 1, 0);
828
+ }
829
+ else {
830
+ editor.navigateRight();
831
+ editor.insert(defaultReg.text);
832
+ editor.navigateLeft();
833
+ }
834
+ editor.setOverwrite(true);
835
+ editor.selection.clearSelection();
836
+ }
837
+ },
838
+ "P": {
839
+ fn: function(editor, range, count, param) {
840
+ var defaultReg = registers._default;
841
+ editor.setOverwrite(false);
842
+
843
+ if (defaultReg.isLine) {
844
+ var pos = editor.getCursorPosition();
845
+ var lines = defaultReg.text.split("\n");
846
+ editor.session.getDocument().insertLines(pos.row, lines);
847
+ editor.moveCursorTo(pos.row, 0);
848
+ }
849
+ else {
850
+ editor.insert(defaultReg.text);
851
+ }
852
+ editor.setOverwrite(true);
853
+ editor.selection.clearSelection();
854
+ }
855
+ },
856
+ "J": {
857
+ fn: function(editor, range, count, param) {
858
+ var session = editor.session;
859
+ range = editor.getSelectionRange();
860
+ var pos = {row: range.start.row, column: range.start.column};
861
+ count = count || range.end.row - range.start.row;
862
+ var maxRow = Math.min(pos.row + (count || 1), session.getLength() - 1);
863
+
864
+ range.start.column = session.getLine(pos.row).length;
865
+ range.end.column = session.getLine(maxRow).length;
866
+ range.end.row = maxRow;
867
+
868
+ var text = "";
869
+ for (var i = pos.row; i < maxRow; i++) {
870
+ var nextLine = session.getLine(i + 1);
871
+ text += " " + /^\s*(.*)$/.exec(nextLine)[1] || "";
872
+ }
873
+
874
+ session.replace(range, text);
875
+ editor.moveCursorTo(pos.row, pos.column);
876
+ }
877
+ },
878
+ "u": {
879
+ fn: function(editor, range, count, param) {
880
+ count = parseInt(count || 1, 10);
881
+ for (var i = 0; i < count; i++) {
882
+ editor.undo();
883
+ }
884
+ editor.selection.clearSelection();
885
+ }
886
+ },
887
+ "ctrl-r": {
888
+ fn: function(editor, range, count, param) {
889
+ count = parseInt(count || 1, 10);
890
+ for (var i = 0; i < count; i++) {
891
+ editor.redo();
892
+ }
893
+ editor.selection.clearSelection();
894
+ }
895
+ },
896
+ ":": {
897
+ fn: function(editor, range, count, param) {
898
+ }
899
+ },
900
+ "/": {
901
+ fn: function(editor, range, count, param) {
902
+ }
903
+ },
904
+ "?": {
905
+ fn: function(editor, range, count, param) {
906
+ }
907
+ },
908
+ ".": {
909
+ fn: function(editor, range, count, param) {
910
+ util.onInsertReplaySequence = inputBuffer.lastInsertCommands;
911
+ var previous = inputBuffer.previous;
912
+ if (previous) // If there is a previous action
913
+ inputBuffer.exec(editor, previous.action, previous.param);
914
+ }
915
+ }
916
+ };
917
+
918
+ var inputBuffer = exports.inputBuffer = {
919
+ accepting: [NUMBER, OPERATOR, MOTION, ACTION],
920
+ currentCmd: null,
921
+ currentCount: "",
922
+ status: "",
923
+ operator: null,
924
+ motion: null,
925
+
926
+ lastInsertCommands: [],
927
+
928
+ push: function(editor, ch, keyId) {
929
+ this.idle = false;
930
+ var wObj = this.waitingForParam;
931
+ if (wObj) {
932
+ this.exec(editor, wObj, ch);
933
+ }
934
+ else if (!(ch === "0" && !this.currentCount.length) &&
935
+ (ch.match(/^\d+$/) && this.isAccepting(NUMBER))) {
936
+ this.currentCount += ch;
937
+ this.currentCmd = NUMBER;
938
+ this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
939
+ }
940
+ else if (!this.operator && this.isAccepting(OPERATOR) && operators[ch]) {
941
+ this.operator = {
942
+ ch: ch,
943
+ count: this.getCount()
944
+ };
945
+ this.currentCmd = OPERATOR;
946
+ this.accepting = [NUMBER, MOTION, ACTION];
947
+ this.exec(editor, { operator: this.operator });
948
+ }
949
+ else if (motions[ch] && this.isAccepting(MOTION)) {
950
+ this.currentCmd = MOTION;
951
+
952
+ var ctx = {
953
+ operator: this.operator,
954
+ motion: {
955
+ ch: ch,
956
+ count: this.getCount()
957
+ }
958
+ };
959
+
960
+ if (motions[ch].param)
961
+ this.waitForParam(ctx);
962
+ else
963
+ this.exec(editor, ctx);
964
+ }
965
+ else if (alias[ch] && this.isAccepting(MOTION)) {
966
+ alias[ch].operator.count = this.getCount();
967
+ this.exec(editor, alias[ch]);
968
+ }
969
+ else if (actions[ch] && this.isAccepting(ACTION)) {
970
+ var actionObj = {
971
+ action: {
972
+ fn: actions[ch].fn,
973
+ count: this.getCount()
974
+ }
975
+ };
976
+
977
+ if (actions[ch].param) {
978
+ this.waitForParam(actionObj);
979
+ }
980
+ else {
981
+ this.exec(editor, actionObj);
982
+ }
983
+
984
+ if (actions[ch].acceptsMotion)
985
+ this.idle = false;
986
+ }
987
+ else if (this.operator) {
988
+ this.exec(editor, { operator: this.operator }, ch);
989
+ }
990
+ else {
991
+ this.reset();
992
+ }
993
+
994
+ if (this.waitingForParam || this.motion || this.operator) {
995
+ this.status += ch;
996
+ } else if (this.currentCount) {
997
+ this.status = this.currentCount;
998
+ } else if (this.status) {
999
+ this.status = "";
1000
+ } else {
1001
+ return;
1002
+ }
1003
+ editor._emit("changeStatus");
1004
+ },
1005
+
1006
+ waitForParam: function(cmd) {
1007
+ this.waitingForParam = cmd;
1008
+ },
1009
+
1010
+ getCount: function() {
1011
+ var count = this.currentCount;
1012
+ this.currentCount = "";
1013
+ return count && parseInt(count, 10);
1014
+ },
1015
+
1016
+ exec: function(editor, action, param) {
1017
+ var m = action.motion;
1018
+ var o = action.operator;
1019
+ var a = action.action;
1020
+
1021
+ if (!param)
1022
+ param = action.param;
1023
+
1024
+ if (o) {
1025
+ this.previous = {
1026
+ action: action,
1027
+ param: param
1028
+ };
1029
+ }
1030
+
1031
+ if (o && !editor.selection.isEmpty()) {
1032
+ if (operators[o.ch].selFn) {
1033
+ operators[o.ch].selFn(editor, editor.getSelectionRange(), o.count, param);
1034
+ this.reset();
1035
+ }
1036
+ return;
1037
+ }
1038
+ else if (!m && !a && o && param) {
1039
+ operators[o.ch].fn(editor, null, o.count, param);
1040
+ this.reset();
1041
+ }
1042
+ else if (m) {
1043
+ var run = function(fn) {
1044
+ if (fn && typeof fn === "function") { // There should always be a motion
1045
+ if (m.count && !motionObj.handlesCount)
1046
+ repeat(fn, m.count, [editor, null, m.count, param]);
1047
+ else
1048
+ fn(editor, null, m.count, param);
1049
+ }
1050
+ };
1051
+
1052
+ var motionObj = motions[m.ch];
1053
+ var selectable = motionObj.sel;
1054
+
1055
+ if (!o) {
1056
+ if ((util.onVisualMode || util.onVisualLineMode) && selectable)
1057
+ run(motionObj.sel);
1058
+ else
1059
+ run(motionObj.nav);
1060
+ }
1061
+ else if (selectable) {
1062
+ repeat(function() {
1063
+ run(motionObj.sel);
1064
+ operators[o.ch].fn(editor, editor.getSelectionRange(), o.count, param);
1065
+ }, o.count || 1);
1066
+ }
1067
+ this.reset();
1068
+ }
1069
+ else if (a) {
1070
+ a.fn(editor, editor.getSelectionRange(), a.count, param);
1071
+ this.reset();
1072
+ }
1073
+ handleCursorMove(editor);
1074
+ },
1075
+
1076
+ isAccepting: function(type) {
1077
+ return this.accepting.indexOf(type) !== -1;
1078
+ },
1079
+
1080
+ reset: function() {
1081
+ this.operator = null;
1082
+ this.motion = null;
1083
+ this.currentCount = "";
1084
+ this.status = "";
1085
+ this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
1086
+ this.idle = true;
1087
+ this.waitingForParam = null;
1088
+ }
1089
+ };
1090
+
1091
+ function setPreviousCommand(fn) {
1092
+ inputBuffer.previous = { action: { action: { fn: fn } } };
1093
+ }
1094
+
1095
+ exports.coreCommands = {
1096
+ start: {
1097
+ exec: function start(editor) {
1098
+ util.insertMode(editor);
1099
+ setPreviousCommand(start);
1100
+ }
1101
+ },
1102
+ startBeginning: {
1103
+ exec: function startBeginning(editor) {
1104
+ editor.navigateLineStart();
1105
+ util.insertMode(editor);
1106
+ setPreviousCommand(startBeginning);
1107
+ }
1108
+ },
1109
+ stop: {
1110
+ exec: function stop(editor) {
1111
+ inputBuffer.reset();
1112
+ util.onVisualMode = false;
1113
+ util.onVisualLineMode = false;
1114
+ inputBuffer.lastInsertCommands = util.normalMode(editor);
1115
+ }
1116
+ },
1117
+ append: {
1118
+ exec: function append(editor) {
1119
+ var pos = editor.getCursorPosition();
1120
+ var lineLen = editor.session.getLine(pos.row).length;
1121
+ if (lineLen)
1122
+ editor.navigateRight();
1123
+ util.insertMode(editor);
1124
+ setPreviousCommand(append);
1125
+ }
1126
+ },
1127
+ appendEnd: {
1128
+ exec: function appendEnd(editor) {
1129
+ editor.navigateLineEnd();
1130
+ util.insertMode(editor);
1131
+ setPreviousCommand(appendEnd);
1132
+ }
1133
+ }
1134
+ };
1135
+
1136
+ var handleCursorMove = exports.onCursorMove = function(editor, e) {
1137
+ if (util.currentMode === 'insert' || handleCursorMove.running)
1138
+ return;
1139
+ else if(!editor.selection.isEmpty()) {
1140
+ handleCursorMove.running = true;
1141
+ if (util.onVisualLineMode) {
1142
+ var originRow = editor.selection.visualLineStart;
1143
+ var cursorRow = editor.getCursorPosition().row;
1144
+ if(originRow <= cursorRow) {
1145
+ var endLine = editor.session.getLine(cursorRow);
1146
+ editor.selection.clearSelection();
1147
+ editor.selection.moveCursorTo(originRow, 0);
1148
+ editor.selection.selectTo(cursorRow, endLine.length);
1149
+ } else {
1150
+ var endLine = editor.session.getLine(originRow);
1151
+ editor.selection.clearSelection();
1152
+ editor.selection.moveCursorTo(originRow, endLine.length);
1153
+ editor.selection.selectTo(cursorRow, 0);
1154
+ }
1155
+ }
1156
+ handleCursorMove.running = false;
1157
+ return;
1158
+ }
1159
+ else {
1160
+ if (e && (util.onVisualLineMode || util.onVisualMode)) {
1161
+ editor.selection.clearSelection();
1162
+ util.normalMode(editor);
1163
+ }
1164
+
1165
+ handleCursorMove.running = true;
1166
+ var pos = editor.getCursorPosition();
1167
+ var lineLen = editor.session.getLine(pos.row).length;
1168
+
1169
+ if (lineLen && pos.column === lineLen)
1170
+ editor.navigateLeft();
1171
+ handleCursorMove.running = false;
1172
+ }
1173
+ };
1174
+ });
1175
+ define('ace/keyboard/vim/maps/util', ['require', 'exports', 'module' , 'ace/keyboard/vim/registers', 'ace/lib/dom'], function(require, exports, module) {
1176
+ var registers = require("../registers");
1177
+
1178
+ var dom = require("../../../lib/dom");
1179
+ dom.importCssString('.insert-mode .ace_cursor{\
1180
+ border-left: 2px solid #333333;\
1181
+ }\
1182
+ .ace_dark.insert-mode .ace_cursor{\
1183
+ border-left: 2px solid #eeeeee;\
1184
+ }\
1185
+ .normal-mode .ace_cursor{\
1186
+ border: 0!important;\
1187
+ background-color: red;\
1188
+ opacity: 0.5;\
1189
+ }', 'vimMode');
1190
+
1191
+ module.exports = {
1192
+ onVisualMode: false,
1193
+ onVisualLineMode: false,
1194
+ currentMode: 'normal',
1195
+ noMode: function(editor) {
1196
+ editor.unsetStyle('insert-mode');
1197
+ editor.unsetStyle('normal-mode');
1198
+ if (editor.commands.recording)
1199
+ editor.commands.toggleRecording(editor);
1200
+ editor.setOverwrite(false);
1201
+ },
1202
+ insertMode: function(editor) {
1203
+ this.currentMode = 'insert';
1204
+ editor.setStyle('insert-mode');
1205
+ editor.unsetStyle('normal-mode');
1206
+
1207
+ editor.setOverwrite(false);
1208
+ editor.keyBinding.$data.buffer = "";
1209
+ editor.keyBinding.$data.state = "insertMode";
1210
+ this.onVisualMode = false;
1211
+ this.onVisualLineMode = false;
1212
+ if(this.onInsertReplaySequence) {
1213
+ editor.commands.macro = this.onInsertReplaySequence;
1214
+ editor.commands.replay(editor);
1215
+ this.onInsertReplaySequence = null;
1216
+ this.normalMode(editor);
1217
+ } else {
1218
+ editor._emit("changeStatus");
1219
+ if(!editor.commands.recording)
1220
+ editor.commands.toggleRecording(editor);
1221
+ }
1222
+ },
1223
+ normalMode: function(editor) {
1224
+ this.currentMode = 'normal';
1225
+
1226
+ editor.unsetStyle('insert-mode');
1227
+ editor.setStyle('normal-mode');
1228
+ editor.clearSelection();
1229
+
1230
+ var pos;
1231
+ if (!editor.getOverwrite()) {
1232
+ pos = editor.getCursorPosition();
1233
+ if (pos.column > 0)
1234
+ editor.navigateLeft();
1235
+ }
1236
+
1237
+ editor.setOverwrite(true);
1238
+ editor.keyBinding.$data.buffer = "";
1239
+ editor.keyBinding.$data.state = "start";
1240
+ this.onVisualMode = false;
1241
+ this.onVisualLineMode = false;
1242
+ editor._emit("changeStatus");
1243
+ if (editor.commands.recording) {
1244
+ editor.commands.toggleRecording(editor);
1245
+ return editor.commands.macro;
1246
+ }
1247
+ else {
1248
+ return [];
1249
+ }
1250
+ },
1251
+ visualMode: function(editor, lineMode) {
1252
+ if (
1253
+ (this.onVisualLineMode && lineMode)
1254
+ || (this.onVisualMode && !lineMode)
1255
+ ) {
1256
+ this.normalMode(editor);
1257
+ return;
1258
+ }
1259
+
1260
+ editor.setStyle('insert-mode');
1261
+ editor.unsetStyle('normal-mode');
1262
+
1263
+ editor._emit("changeStatus");
1264
+ if (lineMode) {
1265
+ this.onVisualLineMode = true;
1266
+ } else {
1267
+ this.onVisualMode = true;
1268
+ this.onVisualLineMode = false;
1269
+ }
1270
+ },
1271
+ getRightNthChar: function(editor, cursor, ch, n) {
1272
+ var line = editor.getSession().getLine(cursor.row);
1273
+ var matches = line.substr(cursor.column + 1).split(ch);
1274
+
1275
+ return n < matches.length ? matches.slice(0, n).join(ch).length : null;
1276
+ },
1277
+ getLeftNthChar: function(editor, cursor, ch, n) {
1278
+ var line = editor.getSession().getLine(cursor.row);
1279
+ var matches = line.substr(0, cursor.column).split(ch);
1280
+
1281
+ return n < matches.length ? matches.slice(-1 * n).join(ch).length : null;
1282
+ },
1283
+ toRealChar: function(ch) {
1284
+ if (ch.length === 1)
1285
+ return ch;
1286
+
1287
+ if (/^shift-./.test(ch))
1288
+ return ch[ch.length - 1].toUpperCase();
1289
+ else
1290
+ return "";
1291
+ },
1292
+ copyLine: function(editor) {
1293
+ var pos = editor.getCursorPosition();
1294
+ editor.selection.clearSelection();
1295
+ editor.moveCursorTo(pos.row, pos.column);
1296
+ editor.selection.selectLine();
1297
+ registers._default.isLine = true;
1298
+ registers._default.text = editor.getCopyText().replace(/\n$/, "");
1299
+ editor.selection.clearSelection();
1300
+ editor.moveCursorTo(pos.row, pos.column);
1301
+ }
1302
+ };
1303
+ });
1304
+
1305
+ define('ace/keyboard/vim/registers', ['require', 'exports', 'module' ], function(require, exports, module) {
1306
+
1307
+ "never use strict";
1308
+
1309
+ module.exports = {
1310
+ _default: {
1311
+ text: "",
1312
+ isLine: false
1313
+ }
1314
+ };
1315
+
1316
+ });
1317
+
1318
+
1319
+ define('ace/keyboard/vim/maps/motions', ['require', 'exports', 'module' , 'ace/keyboard/vim/maps/util', 'ace/search', 'ace/range'], function(require, exports, module) {
1320
+
1321
+
1322
+ var util = require("./util");
1323
+
1324
+ var keepScrollPosition = function(editor, fn) {
1325
+ var scrollTopRow = editor.renderer.getScrollTopRow();
1326
+ var initialRow = editor.getCursorPosition().row;
1327
+ var diff = initialRow - scrollTopRow;
1328
+ fn && fn.call(editor);
1329
+ editor.renderer.scrollToRow(editor.getCursorPosition().row - diff);
1330
+ };
1331
+
1332
+ function Motion(m) {
1333
+ if (typeof m == "function") {
1334
+ var getPos = m;
1335
+ m = this;
1336
+ } else {
1337
+ var getPos = m.getPos;
1338
+ }
1339
+ m.nav = function(editor, range, count, param) {
1340
+ var a = getPos(editor, range, count, param, false);
1341
+ if (!a)
1342
+ return;
1343
+ editor.clearSelection();
1344
+ editor.moveCursorTo(a.row, a.column);
1345
+ };
1346
+ m.sel = function(editor, range, count, param) {
1347
+ var a = getPos(editor, range, count, param, true);
1348
+ if (!a)
1349
+ return;
1350
+ editor.selection.selectTo(a.row, a.column);
1351
+ };
1352
+ return m;
1353
+ }
1354
+
1355
+ var nonWordRe = /[\s.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/;
1356
+ var wordSeparatorRe = /[.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/;
1357
+ var whiteRe = /\s/;
1358
+ var StringStream = function(editor, cursor) {
1359
+ var sel = editor.selection;
1360
+ this.range = sel.getRange();
1361
+ cursor = cursor || sel.selectionLead;
1362
+ this.row = cursor.row;
1363
+ this.col = cursor.column;
1364
+ var line = editor.session.getLine(this.row);
1365
+ var maxRow = editor.session.getLength();
1366
+ this.ch = line[this.col] || '\n';
1367
+ this.skippedLines = 0;
1368
+
1369
+ this.next = function() {
1370
+ this.ch = line[++this.col] || this.handleNewLine(1);
1371
+ return this.ch;
1372
+ };
1373
+ this.prev = function() {
1374
+ this.ch = line[--this.col] || this.handleNewLine(-1);
1375
+ return this.ch;
1376
+ };
1377
+ this.peek = function(dir) {
1378
+ var ch = line[this.col + dir];
1379
+ if (ch)
1380
+ return ch;
1381
+ if (dir == -1)
1382
+ return '\n';
1383
+ if (this.col == line.length - 1)
1384
+ return '\n';
1385
+ return editor.session.getLine(this.row + 1)[0] || '\n';
1386
+ };
1387
+
1388
+ this.handleNewLine = function(dir) {
1389
+ if (dir == 1){
1390
+ if (this.col == line.length)
1391
+ return '\n';
1392
+ if (this.row == maxRow - 1)
1393
+ return '';
1394
+ this.col = 0;
1395
+ this.row ++;
1396
+ line = editor.session.getLine(this.row);
1397
+ this.skippedLines++;
1398
+ return line[0] || '\n';
1399
+ }
1400
+ if (dir == -1) {
1401
+ if (this.row === 0)
1402
+ return '';
1403
+ this.row --;
1404
+ line = editor.session.getLine(this.row);
1405
+ this.col = line.length;
1406
+ this.skippedLines--;
1407
+ return '\n';
1408
+ }
1409
+ };
1410
+ this.debug = function() {
1411
+ console.log(line.substring(0, this.col)+'|'+this.ch+'\''+this.col+'\''+line.substr(this.col+1));
1412
+ };
1413
+ };
1414
+
1415
+ var Search = require("../../../search").Search;
1416
+ var search = new Search();
1417
+
1418
+ function find(editor, needle, dir) {
1419
+ search.$options.needle = needle;
1420
+ search.$options.backwards = dir == -1;
1421
+ return search.find(editor.session);
1422
+ }
1423
+
1424
+ var Range = require("../../../range").Range;
1425
+
1426
+ module.exports = {
1427
+ "w": new Motion(function(editor) {
1428
+ var str = new StringStream(editor);
1429
+
1430
+ if (str.ch && wordSeparatorRe.test(str.ch)) {
1431
+ while (str.ch && wordSeparatorRe.test(str.ch))
1432
+ str.next();
1433
+ } else {
1434
+ while (str.ch && !nonWordRe.test(str.ch))
1435
+ str.next();
1436
+ }
1437
+ while (str.ch && whiteRe.test(str.ch) && str.skippedLines < 2)
1438
+ str.next();
1439
+
1440
+ str.skippedLines == 2 && str.prev();
1441
+ return {column: str.col, row: str.row};
1442
+ }),
1443
+ "W": new Motion(function(editor) {
1444
+ var str = new StringStream(editor);
1445
+ while(str.ch && !(whiteRe.test(str.ch) && !whiteRe.test(str.peek(1))) && str.skippedLines < 2)
1446
+ str.next();
1447
+ if (str.skippedLines == 2)
1448
+ str.prev();
1449
+ else
1450
+ str.next();
1451
+
1452
+ return {column: str.col, row: str.row};
1453
+ }),
1454
+ "b": new Motion(function(editor) {
1455
+ var str = new StringStream(editor);
1456
+
1457
+ str.prev();
1458
+ while (str.ch && whiteRe.test(str.ch) && str.skippedLines > -2)
1459
+ str.prev();
1460
+
1461
+ if (str.ch && wordSeparatorRe.test(str.ch)) {
1462
+ while (str.ch && wordSeparatorRe.test(str.ch))
1463
+ str.prev();
1464
+ } else {
1465
+ while (str.ch && !nonWordRe.test(str.ch))
1466
+ str.prev();
1467
+ }
1468
+ str.ch && str.next();
1469
+ return {column: str.col, row: str.row};
1470
+ }),
1471
+ "B": new Motion(function(editor) {
1472
+ var str = new StringStream(editor);
1473
+ str.prev();
1474
+ while(str.ch && !(!whiteRe.test(str.ch) && whiteRe.test(str.peek(-1))) && str.skippedLines > -2)
1475
+ str.prev();
1476
+
1477
+ if (str.skippedLines == -2)
1478
+ str.next();
1479
+
1480
+ return {column: str.col, row: str.row};
1481
+ }),
1482
+ "e": new Motion(function(editor) {
1483
+ var str = new StringStream(editor);
1484
+
1485
+ str.next();
1486
+ while (str.ch && whiteRe.test(str.ch))
1487
+ str.next();
1488
+
1489
+ if (str.ch && wordSeparatorRe.test(str.ch)) {
1490
+ while (str.ch && wordSeparatorRe.test(str.ch))
1491
+ str.next();
1492
+ } else {
1493
+ while (str.ch && !nonWordRe.test(str.ch))
1494
+ str.next();
1495
+ }
1496
+ str.ch && str.prev();
1497
+ return {column: str.col, row: str.row};
1498
+ }),
1499
+ "E": new Motion(function(editor) {
1500
+ var str = new StringStream(editor);
1501
+ str.next();
1502
+ while(str.ch && !(!whiteRe.test(str.ch) && whiteRe.test(str.peek(1))))
1503
+ str.next();
1504
+
1505
+ return {column: str.col, row: str.row};
1506
+ }),
1507
+
1508
+ "l": {
1509
+ nav: function(editor) {
1510
+ editor.navigateRight();
1511
+ },
1512
+ sel: function(editor) {
1513
+ var pos = editor.getCursorPosition();
1514
+ var col = pos.column;
1515
+ var lineLen = editor.session.getLine(pos.row).length;
1516
+ if (lineLen && col !== lineLen) //In selection mode you can select the newline
1517
+ editor.selection.selectRight();
1518
+ }
1519
+ },
1520
+ "h": {
1521
+ nav: function(editor) {
1522
+ var pos = editor.getCursorPosition();
1523
+ if (pos.column > 0)
1524
+ editor.navigateLeft();
1525
+ },
1526
+ sel: function(editor) {
1527
+ var pos = editor.getCursorPosition();
1528
+ if (pos.column > 0)
1529
+ editor.selection.selectLeft();
1530
+ }
1531
+ },
1532
+ "H": {
1533
+ nav: function(editor) {
1534
+ var row = editor.renderer.getScrollTopRow();
1535
+ editor.moveCursorTo(row);
1536
+ },
1537
+ sel: function(editor) {
1538
+ var row = editor.renderer.getScrollTopRow();
1539
+ editor.selection.selectTo(row);
1540
+ }
1541
+ },
1542
+ "M": {
1543
+ nav: function(editor) {
1544
+ var topRow = editor.renderer.getScrollTopRow();
1545
+ var bottomRow = editor.renderer.getScrollBottomRow();
1546
+ var row = topRow + ((bottomRow - topRow) / 2);
1547
+ editor.moveCursorTo(row);
1548
+ },
1549
+ sel: function(editor) {
1550
+ var topRow = editor.renderer.getScrollTopRow();
1551
+ var bottomRow = editor.renderer.getScrollBottomRow();
1552
+ var row = topRow + ((bottomRow - topRow) / 2);
1553
+ editor.selection.selectTo(row);
1554
+ }
1555
+ },
1556
+ "L": {
1557
+ nav: function(editor) {
1558
+ var row = editor.renderer.getScrollBottomRow();
1559
+ editor.moveCursorTo(row);
1560
+ },
1561
+ sel: function(editor) {
1562
+ var row = editor.renderer.getScrollBottomRow();
1563
+ editor.selection.selectTo(row);
1564
+ }
1565
+ },
1566
+ "k": {
1567
+ nav: function(editor) {
1568
+ editor.navigateUp();
1569
+ },
1570
+ sel: function(editor) {
1571
+ editor.selection.selectUp();
1572
+ }
1573
+ },
1574
+ "j": {
1575
+ nav: function(editor) {
1576
+ editor.navigateDown();
1577
+ },
1578
+ sel: function(editor) {
1579
+ editor.selection.selectDown();
1580
+ }
1581
+ },
1582
+
1583
+ "i": {
1584
+ param: true,
1585
+ sel: function(editor, range, count, param) {
1586
+ switch (param) {
1587
+ case "w":
1588
+ editor.selection.selectWord();
1589
+ break;
1590
+ case "W":
1591
+ editor.selection.selectAWord();
1592
+ break;
1593
+ case "(":
1594
+ case "{":
1595
+ case "[":
1596
+ var cursor = editor.getCursorPosition();
1597
+ var end = editor.session.$findClosingBracket(param, cursor, /paren/);
1598
+ if (!end)
1599
+ return;
1600
+ var start = editor.session.$findOpeningBracket(editor.session.$brackets[param], cursor, /paren/);
1601
+ if (!start)
1602
+ return;
1603
+ start.column ++;
1604
+ editor.selection.setSelectionRange(Range.fromPoints(start, end));
1605
+ break;
1606
+ case "'":
1607
+ case '"':
1608
+ case "/":
1609
+ var end = find(editor, param, 1);
1610
+ if (!end)
1611
+ return;
1612
+ var start = find(editor, param, -1);
1613
+ if (!start)
1614
+ return;
1615
+ editor.selection.setSelectionRange(Range.fromPoints(start.end, end.start));
1616
+ break;
1617
+ }
1618
+ }
1619
+ },
1620
+ "a": {
1621
+ param: true,
1622
+ sel: function(editor, range, count, param) {
1623
+ switch (param) {
1624
+ case "w":
1625
+ editor.selection.selectAWord();
1626
+ break;
1627
+ case "W":
1628
+ editor.selection.selectAWord();
1629
+ break;
1630
+ case "(":
1631
+ case "{":
1632
+ case "[":
1633
+ var cursor = editor.getCursorPosition();
1634
+ var end = editor.session.$findClosingBracket(param, cursor, /paren/);
1635
+ if (!end)
1636
+ return;
1637
+ var start = editor.session.$findOpeningBracket(editor.session.$brackets[param], cursor, /paren/);
1638
+ if (!start)
1639
+ return;
1640
+ end.column ++;
1641
+ editor.selection.setSelectionRange(Range.fromPoints(start, end));
1642
+ break;
1643
+ case "'":
1644
+ case "\"":
1645
+ case "/":
1646
+ var end = find(editor, param, 1);
1647
+ if (!end)
1648
+ return;
1649
+ var start = find(editor, param, -1);
1650
+ if (!start)
1651
+ return;
1652
+ end.column ++;
1653
+ editor.selection.setSelectionRange(Range.fromPoints(start.start, end.end));
1654
+ break;
1655
+ }
1656
+ }
1657
+ },
1658
+
1659
+ "f": new Motion({
1660
+ param: true,
1661
+ handlesCount: true,
1662
+ getPos: function(editor, range, count, param, isSel) {
1663
+ var cursor = editor.getCursorPosition();
1664
+ var column = util.getRightNthChar(editor, cursor, param, count || 1);
1665
+
1666
+ if (typeof column === "number") {
1667
+ cursor.column += column + (isSel ? 2 : 1);
1668
+ return cursor;
1669
+ }
1670
+ }
1671
+ }),
1672
+ "F": new Motion({
1673
+ param: true,
1674
+ handlesCount: true,
1675
+ getPos: function(editor, range, count, param, isSel) {
1676
+ var cursor = editor.getCursorPosition();
1677
+ var column = util.getLeftNthChar(editor, cursor, param, count || 1);
1678
+
1679
+ if (typeof column === "number") {
1680
+ cursor.column -= column + 1;
1681
+ return cursor;
1682
+ }
1683
+ }
1684
+ }),
1685
+ "t": new Motion({
1686
+ param: true,
1687
+ handlesCount: true,
1688
+ getPos: function(editor, range, count, param, isSel) {
1689
+ var cursor = editor.getCursorPosition();
1690
+ var column = util.getRightNthChar(editor, cursor, param, count || 1);
1691
+
1692
+ if (typeof column === "number") {
1693
+ cursor.column += column + (isSel ? 1 : 0);
1694
+ return cursor;
1695
+ }
1696
+ }
1697
+ }),
1698
+ "T": new Motion({
1699
+ param: true,
1700
+ handlesCount: true,
1701
+ getPos: function(editor, range, count, param, isSel) {
1702
+ var cursor = editor.getCursorPosition();
1703
+ var column = util.getLeftNthChar(editor, cursor, param, count || 1);
1704
+
1705
+ if (typeof column === "number") {
1706
+ cursor.column -= column;
1707
+ return cursor;
1708
+ }
1709
+ }
1710
+ }),
1711
+
1712
+ "^": {
1713
+ nav: function(editor) {
1714
+ editor.navigateLineStart();
1715
+ },
1716
+ sel: function(editor) {
1717
+ editor.selection.selectLineStart();
1718
+ }
1719
+ },
1720
+ "$": {
1721
+ nav: function(editor) {
1722
+ editor.navigateLineEnd();
1723
+ },
1724
+ sel: function(editor) {
1725
+ editor.selection.selectLineEnd();
1726
+ }
1727
+ },
1728
+ "0": new Motion(function(ed) {
1729
+ return {row: ed.selection.lead.row, column: 0};
1730
+ }),
1731
+ "G": {
1732
+ nav: function(editor, range, count, param) {
1733
+ if (!count && count !== 0) { // Stupid JS
1734
+ count = editor.session.getLength();
1735
+ }
1736
+ editor.gotoLine(count);
1737
+ },
1738
+ sel: function(editor, range, count, param) {
1739
+ if (!count && count !== 0) { // Stupid JS
1740
+ count = editor.session.getLength();
1741
+ }
1742
+ editor.selection.selectTo(count, 0);
1743
+ }
1744
+ },
1745
+ "g": {
1746
+ param: true,
1747
+ nav: function(editor, range, count, param) {
1748
+ switch(param) {
1749
+ case "m":
1750
+ console.log("Middle line");
1751
+ break;
1752
+ case "e":
1753
+ console.log("End of prev word");
1754
+ break;
1755
+ case "g":
1756
+ editor.gotoLine(count || 0);
1757
+ case "u":
1758
+ editor.gotoLine(count || 0);
1759
+ case "U":
1760
+ editor.gotoLine(count || 0);
1761
+ }
1762
+ },
1763
+ sel: function(editor, range, count, param) {
1764
+ switch(param) {
1765
+ case "m":
1766
+ console.log("Middle line");
1767
+ break;
1768
+ case "e":
1769
+ console.log("End of prev word");
1770
+ break;
1771
+ case "g":
1772
+ editor.selection.selectTo(count || 0, 0);
1773
+ }
1774
+ }
1775
+ },
1776
+ "o": {
1777
+ nav: function(editor, range, count, param) {
1778
+ count = count || 1;
1779
+ var content = "";
1780
+ while (0 < count--)
1781
+ content += "\n";
1782
+
1783
+ if (content.length) {
1784
+ editor.navigateLineEnd()
1785
+ editor.insert(content);
1786
+ util.insertMode(editor);
1787
+ }
1788
+ }
1789
+ },
1790
+ "O": {
1791
+ nav: function(editor, range, count, param) {
1792
+ var row = editor.getCursorPosition().row;
1793
+ count = count || 1;
1794
+ var content = "";
1795
+ while (0 < count--)
1796
+ content += "\n";
1797
+
1798
+ if (content.length) {
1799
+ if(row > 0) {
1800
+ editor.navigateUp();
1801
+ editor.navigateLineEnd()
1802
+ editor.insert(content);
1803
+ } else {
1804
+ editor.session.insert({row: 0, column: 0}, content);
1805
+ editor.navigateUp();
1806
+ }
1807
+ util.insertMode(editor);
1808
+ }
1809
+ }
1810
+ },
1811
+ "%": new Motion(function(editor){
1812
+ var brRe = /[\[\]{}()]/g;
1813
+ var cursor = editor.getCursorPosition();
1814
+ var ch = editor.session.getLine(cursor.row)[cursor.column];
1815
+ if (!brRe.test(ch)) {
1816
+ var range = find(editor, brRe);
1817
+ if (!range)
1818
+ return;
1819
+ cursor = range.start;
1820
+ }
1821
+ var match = editor.session.findMatchingBracket({
1822
+ row: cursor.row,
1823
+ column: cursor.column + 1
1824
+ });
1825
+
1826
+ return match;
1827
+ }),
1828
+ "{": new Motion(function(ed) {
1829
+ var session = ed.session;
1830
+ var row = session.selection.lead.row;
1831
+ while(row > 0 && !/\S/.test(session.getLine(row)))
1832
+ row--;
1833
+ while(/\S/.test(session.getLine(row)))
1834
+ row--;
1835
+ return {column: 0, row: row};
1836
+ }),
1837
+ "}": new Motion(function(ed) {
1838
+ var session = ed.session;
1839
+ var l = session.getLength();
1840
+ var row = session.selection.lead.row;
1841
+ while(row < l && !/\S/.test(session.getLine(row)))
1842
+ row++;
1843
+ while(/\S/.test(session.getLine(row)))
1844
+ row++;
1845
+ return {column: 0, row: row};
1846
+ }),
1847
+ "ctrl-d": {
1848
+ nav: function(editor, range, count, param) {
1849
+ editor.selection.clearSelection();
1850
+ keepScrollPosition(editor, editor.gotoPageDown);
1851
+ },
1852
+ sel: function(editor, range, count, param) {
1853
+ keepScrollPosition(editor, editor.selectPageDown);
1854
+ }
1855
+ },
1856
+ "ctrl-u": {
1857
+ nav: function(editor, range, count, param) {
1858
+ editor.selection.clearSelection();
1859
+ keepScrollPosition(editor, editor.gotoPageUp);
1860
+
1861
+ },
1862
+ sel: function(editor, range, count, param) {
1863
+ keepScrollPosition(editor, editor.selectPageUp);
1864
+ }
1865
+ }
1866
+ };
1867
+
1868
+ module.exports.backspace = module.exports.left = module.exports.h;
1869
+ module.exports.right = module.exports.l;
1870
+ module.exports.up = module.exports.k;
1871
+ module.exports.down = module.exports.j;
1872
+ module.exports.pagedown = module.exports["ctrl-d"];
1873
+ module.exports.pageup = module.exports["ctrl-u"];
1874
+
1875
+ });
1876
+
1877
+ define('ace/keyboard/vim/maps/operators', ['require', 'exports', 'module' , 'ace/keyboard/vim/maps/util', 'ace/keyboard/vim/registers'], function(require, exports, module) {
1878
+
1879
+ "never use strict";
1880
+
1881
+ var util = require("./util");
1882
+ var registers = require("../registers");
1883
+
1884
+ module.exports = {
1885
+ "d": {
1886
+ selFn: function(editor, range, count, param) {
1887
+ registers._default.text = editor.getCopyText();
1888
+ registers._default.isLine = util.onVisualLineMode;
1889
+ if(util.onVisualLineMode)
1890
+ editor.removeLines();
1891
+ else
1892
+ editor.session.remove(range);
1893
+ util.normalMode(editor);
1894
+ },
1895
+ fn: function(editor, range, count, param) {
1896
+ count = count || 1;
1897
+ switch (param) {
1898
+ case "d":
1899
+ registers._default.text = "";
1900
+ registers._default.isLine = true;
1901
+ for (var i = 0; i < count; i++) {
1902
+ editor.selection.selectLine();
1903
+ registers._default.text += editor.getCopyText();
1904
+ var selRange = editor.getSelectionRange();
1905
+ if (!selRange.isMultiLine()) {
1906
+ lastLineReached = true
1907
+ var row = selRange.start.row - 1;
1908
+ var col = editor.session.getLine(row).length
1909
+ selRange.setStart(row, col);
1910
+ editor.session.remove(selRange);
1911
+ editor.selection.clearSelection();
1912
+ break;
1913
+ }
1914
+ editor.session.remove(selRange);
1915
+ editor.selection.clearSelection();
1916
+ }
1917
+ registers._default.text = registers._default.text.replace(/\n$/, "");
1918
+ break;
1919
+ default:
1920
+ if (range) {
1921
+ editor.selection.setSelectionRange(range);
1922
+ registers._default.text = editor.getCopyText();
1923
+ registers._default.isLine = false;
1924
+ editor.session.remove(range);
1925
+ editor.selection.clearSelection();
1926
+ }
1927
+ }
1928
+ }
1929
+ },
1930
+ "c": {
1931
+ selFn: function(editor, range, count, param) {
1932
+ editor.session.remove(range);
1933
+ util.insertMode(editor);
1934
+ },
1935
+ fn: function(editor, range, count, param) {
1936
+ count = count || 1;
1937
+ switch (param) {
1938
+ case "c":
1939
+ for (var i = 0; i < count; i++) {
1940
+ editor.removeLines();
1941
+ util.insertMode(editor);
1942
+ }
1943
+
1944
+ break;
1945
+ default:
1946
+ if (range) {
1947
+ editor.session.remove(range);
1948
+ util.insertMode(editor);
1949
+ }
1950
+ }
1951
+ }
1952
+ },
1953
+ "y": {
1954
+ selFn: function(editor, range, count, param) {
1955
+ registers._default.text = editor.getCopyText();
1956
+ registers._default.isLine = util.onVisualLineMode;
1957
+ editor.selection.clearSelection();
1958
+ util.normalMode(editor);
1959
+ },
1960
+ fn: function(editor, range, count, param) {
1961
+ count = count || 1;
1962
+ switch (param) {
1963
+ case "y":
1964
+ var pos = editor.getCursorPosition();
1965
+ editor.selection.selectLine();
1966
+ for (var i = 0; i < count - 1; i++) {
1967
+ editor.selection.moveCursorDown();
1968
+ }
1969
+ registers._default.text = editor.getCopyText().replace(/\n$/, "");
1970
+ editor.selection.clearSelection();
1971
+ registers._default.isLine = true;
1972
+ editor.moveCursorToPosition(pos);
1973
+ break;
1974
+ default:
1975
+ if (range) {
1976
+ var pos = editor.getCursorPosition();
1977
+ editor.selection.setSelectionRange(range);
1978
+ registers._default.text = editor.getCopyText();
1979
+ registers._default.isLine = false;
1980
+ editor.selection.clearSelection();
1981
+ editor.moveCursorTo(pos.row, pos.column);
1982
+ }
1983
+ }
1984
+ }
1985
+ },
1986
+ ">": {
1987
+ selFn: function(editor, range, count, param) {
1988
+ count = count || 1;
1989
+ for (var i = 0; i < count; i++) {
1990
+ editor.indent();
1991
+ }
1992
+ util.normalMode(editor);
1993
+ },
1994
+ fn: function(editor, range, count, param) {
1995
+ count = parseInt(count || 1, 10);
1996
+ switch (param) {
1997
+ case ">":
1998
+ var pos = editor.getCursorPosition();
1999
+ editor.selection.selectLine();
2000
+ for (var i = 0; i < count - 1; i++) {
2001
+ editor.selection.moveCursorDown();
2002
+ }
2003
+ editor.indent();
2004
+ editor.selection.clearSelection();
2005
+ editor.moveCursorToPosition(pos);
2006
+ editor.navigateLineEnd();
2007
+ editor.navigateLineStart();
2008
+ break;
2009
+ }
2010
+ }
2011
+ },
2012
+ "<": {
2013
+ selFn: function(editor, range, count, param) {
2014
+ count = count || 1;
2015
+ for (var i = 0; i < count; i++) {
2016
+ editor.blockOutdent();
2017
+ }
2018
+ util.normalMode(editor);
2019
+ },
2020
+ fn: function(editor, range, count, param) {
2021
+ count = count || 1;
2022
+ switch (param) {
2023
+ case "<":
2024
+ var pos = editor.getCursorPosition();
2025
+ editor.selection.selectLine();
2026
+ for (var i = 0; i < count - 1; i++) {
2027
+ editor.selection.moveCursorDown();
2028
+ }
2029
+ editor.blockOutdent();
2030
+ editor.selection.clearSelection();
2031
+ editor.moveCursorToPosition(pos);
2032
+ editor.navigateLineEnd();
2033
+ editor.navigateLineStart();
2034
+ break;
2035
+ }
2036
+ }
2037
+ }
2038
+ };
2039
+ });
2040
+
2041
+ "use strict"
2042
+
2043
+ define('ace/keyboard/vim/maps/aliases', ['require', 'exports', 'module' ], function(require, exports, module) {
2044
+ module.exports = {
2045
+ "x": {
2046
+ operator: {
2047
+ ch: "d",
2048
+ count: 1
2049
+ },
2050
+ motion: {
2051
+ ch: "l",
2052
+ count: 1
2053
+ }
2054
+ },
2055
+ "X": {
2056
+ operator: {
2057
+ ch: "d",
2058
+ count: 1
2059
+ },
2060
+ motion: {
2061
+ ch: "h",
2062
+ count: 1
2063
+ }
2064
+ },
2065
+ "D": {
2066
+ operator: {
2067
+ ch: "d",
2068
+ count: 1
2069
+ },
2070
+ motion: {
2071
+ ch: "$",
2072
+ count: 1
2073
+ }
2074
+ },
2075
+ "C": {
2076
+ operator: {
2077
+ ch: "c",
2078
+ count: 1
2079
+ },
2080
+ motion: {
2081
+ ch: "$",
2082
+ count: 1
2083
+ }
2084
+ },
2085
+ "s": {
2086
+ operator: {
2087
+ ch: "c",
2088
+ count: 1
2089
+ },
2090
+ motion: {
2091
+ ch: "l",
2092
+ count: 1
2093
+ }
2094
+ },
2095
+ "S": {
2096
+ operator: {
2097
+ ch: "c",
2098
+ count: 1
2099
+ },
2100
+ param: "c"
2101
+ }
2102
+ };
2103
+ });
2104
+
2105
+ define('ace/keyboard/emacs', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/keyboard/hash_handler', 'ace/lib/keys'], function(require, exports, module) {
2106
+
2107
+
2108
+ var dom = require("../lib/dom");
2109
+
2110
+ var screenToTextBlockCoordinates = function(pageX, pageY) {
2111
+ var canvasPos = this.scroller.getBoundingClientRect();
2112
+
2113
+ var col = Math.floor(
2114
+ (pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft()) / this.characterWidth
2115
+ );
2116
+ var row = Math.floor(
2117
+ (pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop()) / this.lineHeight
2118
+ );
2119
+
2120
+ return this.session.screenToDocumentPosition(row, col);
2121
+ };
2122
+
2123
+ var HashHandler = require("./hash_handler").HashHandler;
2124
+ exports.handler = new HashHandler();
2125
+
2126
+ var initialized = false;
2127
+ exports.handler.attach = function(editor) {
2128
+ if (!initialized) {
2129
+ initialized = true;
2130
+ dom.importCssString('\
2131
+ .emacs-mode .ace_cursor{\
2132
+ border: 2px rgba(50,250,50,0.8) solid!important;\
2133
+ -moz-box-sizing: border-box!important;\
2134
+ -webkit-box-sizing: border-box!important;\
2135
+ box-sizing: border-box!important;\
2136
+ background-color: rgba(0,250,0,0.9);\
2137
+ opacity: 0.5;\
2138
+ }\
2139
+ .emacs-mode .ace_cursor.ace_hidden{\
2140
+ opacity: 1;\
2141
+ background-color: transparent;\
2142
+ }\
2143
+ .emacs-mode .ace_overwrite-cursors .ace_cursor {\
2144
+ opacity: 1;\
2145
+ background-color: transparent;\
2146
+ border-width: 0 0 2px 2px !important;\
2147
+ }\
2148
+ .emacs-mode .ace_text-layer {\
2149
+ z-index: 4\
2150
+ }\
2151
+ .emacs-mode .ace_cursor-layer {\
2152
+ z-index: 2\
2153
+ }', 'emacsMode'
2154
+ );
2155
+ }
2156
+
2157
+ editor.renderer.screenToTextCoordinates = screenToTextBlockCoordinates;
2158
+ editor.setStyle("emacs-mode");
2159
+ };
2160
+
2161
+ exports.handler.detach = function(editor) {
2162
+ delete editor.renderer.screenToTextCoordinates;
2163
+ editor.unsetStyle("emacs-mode");
2164
+ };
2165
+
2166
+
2167
+ var keys = require("../lib/keys").KEY_MODS;
2168
+ var eMods = {
2169
+ C: "ctrl", S: "shift", M: "alt"
2170
+ };
2171
+ ["S-C-M", "S-C", "S-M", "C-M", "S", "C", "M"].forEach(function(c) {
2172
+ var hashId = 0;
2173
+ c.split("-").forEach(function(c){
2174
+ hashId = hashId | keys[eMods[c]];
2175
+ });
2176
+ eMods[hashId] = c.toLowerCase() + "-";
2177
+ });
2178
+
2179
+ exports.handler.bindKey = function(key, command) {
2180
+ if (!key)
2181
+ return;
2182
+
2183
+ var ckb = this.commmandKeyBinding;
2184
+ key.split("|").forEach(function(keyPart) {
2185
+ keyPart = keyPart.toLowerCase();
2186
+ ckb[keyPart] = command;
2187
+ keyPart = keyPart.split(" ")[0];
2188
+ if (!ckb[keyPart])
2189
+ ckb[keyPart] = "null";
2190
+ }, this);
2191
+ };
2192
+
2193
+
2194
+ exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
2195
+ if (hashId == -1) {
2196
+ if (data.count) {
2197
+ var str = Array(data.count + 1).join(key);
2198
+ data.count = null;
2199
+ return {command: "insertstring", args: str};
2200
+ }
2201
+ }
2202
+
2203
+ if (key == "\x00")
2204
+ return;
2205
+
2206
+ var modifier = eMods[hashId];
2207
+ if (modifier == "c-" || data.universalArgument) {
2208
+ var count = parseInt(key[key.length - 1]);
2209
+ if (count) {
2210
+ data.count = count;
2211
+ return {command: "null"};
2212
+ }
2213
+ }
2214
+ data.universalArgument = false;
2215
+
2216
+ if (modifier)
2217
+ key = modifier + key;
2218
+
2219
+ if (data.keyChain)
2220
+ key = data.keyChain += " " + key;
2221
+
2222
+ var command = this.commmandKeyBinding[key];
2223
+ data.keyChain = command == "null" ? key : "";
2224
+
2225
+ if (!command)
2226
+ return;
2227
+
2228
+ if (command == "null")
2229
+ return {command: "null"};
2230
+
2231
+ if (command == "universalArgument") {
2232
+ data.universalArgument = true;
2233
+ return {command: "null"};
2234
+ }
2235
+
2236
+ if (typeof command != "string") {
2237
+ var args = command.args;
2238
+ command = command.command;
2239
+ }
2240
+
2241
+ if (typeof command == "string") {
2242
+ command = this.commands[command] || data.editor.commands.commands[command];
2243
+ }
2244
+
2245
+ if (!command.readonly && !command.isYank)
2246
+ data.lastCommand = null;
2247
+
2248
+ if (data.count) {
2249
+ var count = data.count;
2250
+ data.count = 0;
2251
+ return {
2252
+ args: args,
2253
+ command: {
2254
+ exec: function(editor, args) {
2255
+ for (var i = 0; i < count; i++)
2256
+ command.exec(editor, args);
2257
+ }
2258
+ }
2259
+ };
2260
+ }
2261
+
2262
+ return {command: command, args: args};
2263
+ };
2264
+
2265
+ exports.emacsKeys = {
2266
+ "Up|C-p" : "golineup",
2267
+ "Down|C-n" : "golinedown",
2268
+ "Left|C-b" : "gotoleft",
2269
+ "Right|C-f" : "gotoright",
2270
+ "C-Left|M-b" : "gotowordleft",
2271
+ "C-Right|M-f" : "gotowordright",
2272
+ "Home|C-a" : "gotolinestart",
2273
+ "End|C-e" : "gotolineend",
2274
+ "C-Home|S-M-,": "gotostart",
2275
+ "C-End|S-M-." : "gotoend",
2276
+ "S-Up|S-C-p" : "selectup",
2277
+ "S-Down|S-C-n" : "selectdown",
2278
+ "S-Left|S-C-b" : "selectleft",
2279
+ "S-Right|S-C-f" : "selectright",
2280
+ "S-C-Left|S-M-b" : "selectwordleft",
2281
+ "S-C-Right|S-M-f" : "selectwordright",
2282
+ "S-Home|S-C-a" : "selecttolinestart",
2283
+ "S-End|S-C-e" : "selecttolineend",
2284
+ "S-C-Home" : "selecttostart",
2285
+ "S-C-End" : "selecttoend",
2286
+
2287
+ "C-l" : "recenterTopBottom",
2288
+ "M-s" : "centerselection",
2289
+ "M-g": "gotoline",
2290
+ "C-x C-p": "selectall",
2291
+ "C-Down": "gotopagedown",
2292
+ "C-Up": "gotopageup",
2293
+ "PageDown|C-v": "gotopagedown",
2294
+ "PageUp|M-v": "gotopageup",
2295
+ "S-C-Down": "selectpagedown",
2296
+ "S-C-Up": "selectpageup",
2297
+ "C-s": "findnext",
2298
+ "C-r": "findprevious",
2299
+ "M-C-s": "findnext",
2300
+ "M-C-r": "findprevious",
2301
+ "S-M-5": "replace",
2302
+ "Backspace": "backspace",
2303
+ "Delete|C-d": "del",
2304
+ "Return|C-m": {command: "insertstring", args: "\n"}, // "newline"
2305
+ "C-o": "splitline",
2306
+
2307
+ "M-d|C-Delete": {command: "killWord", args: "right"},
2308
+ "C-Backspace|M-Backspace|M-Delete": {command: "killWord", args: "left"},
2309
+ "C-k": "killLine",
2310
+
2311
+ "C-y|S-Delete": "yank",
2312
+ "M-y": "yankRotate",
2313
+ "C-g": "keyboardQuit",
2314
+
2315
+ "C-w": "killRegion",
2316
+ "M-w": "killRingSave",
2317
+
2318
+ "C-Space": "setMark",
2319
+ "C-x C-x": "exchangePointAndMark",
2320
+
2321
+ "C-t": "transposeletters",
2322
+
2323
+ "M-u": "touppercase",
2324
+ "M-l": "tolowercase",
2325
+ "M-/": "autocomplete",
2326
+ "C-u": "universalArgument",
2327
+ "M-;": "togglecomment",
2328
+
2329
+ "C-/|C-x u|S-C--|C-z": "undo",
2330
+ "S-C-/|S-C-x u|C--|S-C-z": "redo", //infinite undo?
2331
+ "C-x r": "selectRectangularRegion"
2332
+ };
2333
+
2334
+
2335
+ exports.handler.bindKeys(exports.emacsKeys);
2336
+
2337
+ exports.handler.addCommands({
2338
+ recenterTopBottom: function(editor) {
2339
+ var renderer = editor.renderer;
2340
+ var pos = renderer.$cursorLayer.getPixelPosition();
2341
+ var h = renderer.$size.scrollerHeight - renderer.lineHeight;
2342
+ var scrollTop = renderer.scrollTop;
2343
+ if (Math.abs(pos.top - scrollTop) < 2) {
2344
+ scrollTop = pos.top - h;
2345
+ } else if (Math.abs(pos.top - scrollTop - h * 0.5) < 2) {
2346
+ scrollTop = pos.top;
2347
+ } else {
2348
+ scrollTop = pos.top - h * 0.5;
2349
+ }
2350
+ editor.session.setScrollTop(scrollTop);
2351
+ },
2352
+ selectRectangularRegion: function(editor) {
2353
+ editor.multiSelect.toggleBlockSelection();
2354
+ },
2355
+ setMark: function() {
2356
+ },
2357
+ exchangePointAndMark: {
2358
+ exec: function(editor) {
2359
+ var range = editor.selection.getRange();
2360
+ editor.selection.setSelectionRange(range, !editor.selection.isBackwards());
2361
+ },
2362
+ readonly: true,
2363
+ multiselectAction: "forEach"
2364
+ },
2365
+ killWord: {
2366
+ exec: function(editor, dir) {
2367
+ editor.clearSelection();
2368
+ if (dir == "left")
2369
+ editor.selection.selectWordLeft();
2370
+ else
2371
+ editor.selection.selectWordRight();
2372
+
2373
+ var range = editor.getSelectionRange();
2374
+ var text = editor.session.getTextRange(range);
2375
+ exports.killRing.add(text);
2376
+
2377
+ editor.session.remove(range);
2378
+ editor.clearSelection();
2379
+ },
2380
+ multiselectAction: "forEach"
2381
+ },
2382
+ killLine: function(editor) {
2383
+ editor.selection.selectLine();
2384
+ var range = editor.getSelectionRange();
2385
+ var text = editor.session.getTextRange(range);
2386
+ exports.killRing.add(text);
2387
+
2388
+ editor.session.remove(range);
2389
+ editor.clearSelection();
2390
+ },
2391
+ yank: function(editor) {
2392
+ editor.onPaste(exports.killRing.get());
2393
+ editor.keyBinding.$data.lastCommand = "yank";
2394
+ },
2395
+ yankRotate: function(editor) {
2396
+ if (editor.keyBinding.$data.lastCommand != "yank")
2397
+ return;
2398
+
2399
+ editor.undo();
2400
+ editor.onPaste(exports.killRing.rotate());
2401
+ editor.keyBinding.$data.lastCommand = "yank";
2402
+ },
2403
+ killRegion: function(editor) {
2404
+ exports.killRing.add(editor.getCopyText());
2405
+ editor.commands.byName.cut.exec(editor);
2406
+ },
2407
+ killRingSave: function(editor) {
2408
+ exports.killRing.add(editor.getCopyText());
2409
+ }
2410
+ });
2411
+
2412
+ var commands = exports.handler.commands;
2413
+ commands.yank.isYank = true;
2414
+ commands.yankRotate.isYank = true;
2415
+
2416
+ exports.killRing = {
2417
+ $data: [],
2418
+ add: function(str) {
2419
+ str && this.$data.push(str);
2420
+ if (this.$data.length > 30)
2421
+ this.$data.shift();
2422
+ },
2423
+ get: function() {
2424
+ return this.$data[this.$data.length - 1] || "";
2425
+ },
2426
+ pop: function() {
2427
+ if (this.$data.length > 1)
2428
+ this.$data.pop();
2429
+ return this.get();
2430
+ },
2431
+ rotate: function() {
2432
+ this.$data.unshift(this.$data.pop());
2433
+ return this.get();
2434
+ }
2435
+ };
2436
+
2437
+
2438
+ });
2439
+
2440
+ define('kitchen-sink/doclist', ['require', 'exports', 'module' , 'ace/edit_session', 'ace/undomanager', 'ace/lib/net', 'kitchen-sink/modelist'], function(require, exports, module) {
2441
+
2442
+
2443
+ var EditSession = require("ace/edit_session").EditSession;
2444
+ var UndoManager = require("ace/undomanager").UndoManager;
2445
+ var net = require("ace/lib/net");
2446
+
2447
+ var modelist = require("./modelist");
2448
+ var fileCache = {};
2449
+
2450
+ function initDoc(file, path, doc) {
2451
+ if (doc.prepare)
2452
+ file = doc.prepare(file);
2453
+
2454
+ var session = new EditSession(file);
2455
+ session.setUndoManager(new UndoManager());
2456
+ doc.session = session;
2457
+ doc.path = path;
2458
+ if (doc.wrapped) {
2459
+ session.setUseWrapMode(true);
2460
+ session.setWrapLimitRange(80, 80);
2461
+ }
2462
+ var mode = modelist.getModeFromPath(path);
2463
+ session.modeName = mode.name;
2464
+ session.setMode(mode.mode);
2465
+ }
2466
+
2467
+
2468
+ function makeHuge(txt) {
2469
+ for (var i = 0; i < 5; i++)
2470
+ txt += txt;
2471
+ return txt;
2472
+ }
2473
+
2474
+ var docs = {
2475
+ "docs/AsciiDoc.asciidoc": "AsciiDoc",
2476
+ "docs/javascript.js": "JavaScript",
2477
+ "docs/clojure.clj": "Clojure",
2478
+ "docs/coffeescript.coffee": "Coffeescript",
2479
+ "docs/coldfusion.cfm": "ColdFusion",
2480
+ "docs/cpp.cpp": "C/C++",
2481
+ "docs/csharp.cs": "C#",
2482
+ "docs/css.css": "CSS",
2483
+ "docs/dart.dart": "Dart",
2484
+ "docs/diff.diff": "Diff",
2485
+ "docs/dot.dot": "Dot",
2486
+ "docs/glsl.glsl": "Glsl",
2487
+ "docs/golang.go": "Go",
2488
+ "docs/groovy.groovy": "Groovy",
2489
+ "docs/haml.haml": "Haml",
2490
+ "docs/Haxe.hx": "haXe",
2491
+ "docs/html.html": "HTML",
2492
+ "docs/jade.jade": "Jade",
2493
+ "docs/java.java": "Java",
2494
+ "docs/jsp.jsp": "JSP",
2495
+ "docs/json.json": "JSON",
2496
+ "docs/jsx.jsx": "JSX",
2497
+ "docs/latex.tex": {name: "LaTeX", wrapped: true},
2498
+ "docs/less.less": "LESS",
2499
+ "docs/lisp.lisp": "Lisp",
2500
+ "docs/liquid.liquid": "Liquid",
2501
+ "docs/lua.lua": "Lua",
2502
+ "docs/lucene.lucene": "Lucene",
2503
+ "docs/luapage.lp": "LuaPage",
2504
+ "docs/Makefile": "Makefile",
2505
+ "docs/markdown.md": {name: "Markdown", wrapped: true},
2506
+ "docs/objectivec.m": {name: "Objective-C"},
2507
+ "docs/ocaml.ml": "OCaml",
2508
+ "docs/OpenSCAD.scad": "OpenSCAD",
2509
+ "docs/perl.pl": "Perl",
2510
+ "docs/pgsql.pgsql": {name: "pgSQL", wrapped: true},
2511
+ "docs/php.php": "PHP",
2512
+ "docs/plaintext.txt": {name: "Plain Text", prepare: makeHuge, wrapped: true},
2513
+ "docs/powershell.ps1": "Powershell",
2514
+ "docs/python.py": "Python",
2515
+ "docs/r.r": "R",
2516
+ "docs/rdoc.Rd": "RDoc",
2517
+ "docs/rhtml.rhtml": "RHTML",
2518
+ "docs/ruby.rb": "Ruby",
2519
+ "docs/abap.abap": "SAP - ABAP",
2520
+ "docs/scala.scala": "Scala",
2521
+ "docs/scss.scss": "SCSS",
2522
+ "docs/sh.sh": "SH",
2523
+ "docs/stylus.styl": "Stylus",
2524
+ "docs/sql.sql": {name: "SQL", wrapped: true},
2525
+ "docs/svg.svg": "SVG",
2526
+ "docs/tcl.tcl": "Tcl",
2527
+ "docs/tex.tex": "Tex",
2528
+ "docs/textile.textile": {name: "Textile", wrapped: true},
2529
+ "docs/typescript.ts": "Typescript",
2530
+ "docs/xml.xml": "XML",
2531
+ "docs/xquery.xq": "XQuery",
2532
+ "docs/yaml.yaml": "YAML",
2533
+ "docs/c9search.c9search_results": "C9 Search Results"
2534
+ };
2535
+
2536
+ var ownSource = {
2537
+ };
2538
+
2539
+ var hugeDocs = {
2540
+ "src/ace.js": "",
2541
+ "src-min/ace.js": ""
2542
+ };
2543
+
2544
+ if (window.require && window.require.s) try {
2545
+ for (var path in window.require.s.contexts._.defined) {
2546
+ if (path.indexOf("!") != -1)
2547
+ path = path.split("!").pop();
2548
+ else
2549
+ path = path + ".js";
2550
+ ownSource[path] = "";
2551
+ }
2552
+ } catch(e) {}
2553
+
2554
+ function prepareDocList(docs) {
2555
+ var list = [];
2556
+ for (var path in docs) {
2557
+ var doc = docs[path];
2558
+ if (typeof doc != "object")
2559
+ doc = {name: doc || path};
2560
+
2561
+ doc.path = path;
2562
+ doc.desc = doc.name.replace(/^(ace|docs|demo|build)\//, "");
2563
+ if (doc.desc.length > 18)
2564
+ doc.desc = doc.desc.slice(0, 7) + ".." + doc.desc.slice(-9);
2565
+
2566
+ fileCache[doc.name] = doc;
2567
+ list.push(doc);
2568
+ }
2569
+
2570
+ return list;
2571
+ }
2572
+
2573
+ function loadDoc(name, callback) {
2574
+ var doc = fileCache[name];
2575
+ if (!doc)
2576
+ return callback(null);
2577
+
2578
+ if (doc.session)
2579
+ return callback(doc.session);
2580
+ var path = doc.path;
2581
+ var parts = path.split("/");
2582
+ if (parts[0] == "docs")
2583
+ path = "kitchen-sink/" + path;
2584
+ else if (parts[0] == "ace")
2585
+ path = "lib/" + path;
2586
+
2587
+ net.get(path, function(x) {
2588
+ initDoc(x, path, doc);
2589
+ callback(doc.session);
2590
+ });
2591
+ }
2592
+
2593
+ module.exports = {
2594
+ fileCache: fileCache,
2595
+ docs: prepareDocList(docs),
2596
+ ownSource: prepareDocList(ownSource),
2597
+ hugeDocs: prepareDocList(hugeDocs),
2598
+ initDoc: initDoc,
2599
+ loadDoc: loadDoc
2600
+ };
2601
+ module.exports.all = {
2602
+ "Mode Examples": module.exports.docs,
2603
+ "Huge documents": module.exports.hugeDocs,
2604
+ "own source": module.exports.ownSource
2605
+ };
2606
+
2607
+ });
2608
+
2609
+ define('kitchen-sink/modelist', ['require', 'exports', 'module' ], function(require, exports, module) {
2610
+ var modes = [];
2611
+ function getModeFromPath(path) {
2612
+ var mode = modesByName.text;
2613
+ var fileName = path.split(/[\/\\]/).pop();
2614
+ for (var i = 0; i < modes.length; i++) {
2615
+ if (modes[i].supportsFile(fileName)) {
2616
+ mode = modes[i];
2617
+ break;
2618
+ }
2619
+ }
2620
+ return mode;
2621
+ }
2622
+
2623
+ var Mode = function(name, desc, extensions) {
2624
+ this.name = name;
2625
+ this.desc = desc;
2626
+ this.mode = "ace/mode/" + name;
2627
+ if (/\^/.test(extensions)) {
2628
+ var re = extensions.replace(/\|(\^)?/g, function(a, b){
2629
+ return "$|" + (b ? "^" : "^.*\\.");
2630
+ }) + "$";
2631
+ } else {
2632
+ var re = "^.*\\.(" + extensions + ")$";
2633
+ }
2634
+
2635
+ this.extRe = new RegExp(re, "gi");
2636
+ };
2637
+
2638
+ Mode.prototype.supportsFile = function(filename) {
2639
+ return filename.match(this.extRe);
2640
+ };
2641
+
2642
+ var modesByName = {
2643
+ abap: ["ABAP" , "abap"],
2644
+ asciidoc: ["AsciiDoc" , "asciidoc"],
2645
+ c9search: ["C9Search" , "c9search_results"],
2646
+ coffee: ["CoffeeScript" , "^Cakefile|coffee|cf"],
2647
+ coldfusion: ["ColdFusion" , "cfm"],
2648
+ csharp: ["C#" , "cs"],
2649
+ css: ["CSS" , "css"],
2650
+ dart: ["Dart" , "dart"],
2651
+ diff: ["Diff" , "diff|patch"],
2652
+ dot: ["Dot" , "dot"],
2653
+ glsl: ["Glsl" , "glsl|frag|vert"],
2654
+ golang: ["Go" , "go"],
2655
+ groovy: ["Groovy" , "groovy"],
2656
+ haxe: ["haXe" , "hx"],
2657
+ haml: ["HAML" , "haml"],
2658
+ html: ["HTML" , "htm|html|xhtml"],
2659
+ c_cpp: ["C/C++" , "c|cc|cpp|cxx|h|hh|hpp"],
2660
+ clojure: ["Clojure" , "clj"],
2661
+ jade: ["Jade" , "jade"],
2662
+ java: ["Java" , "java"],
2663
+ jsp: ["JSP" , "jsp"],
2664
+ javascript: ["JavaScript" , "js"],
2665
+ json: ["JSON" , "json"],
2666
+ jsx: ["JSX" , "jsx"],
2667
+ latex: ["LaTeX" , "latex|tex|ltx|bib"],
2668
+ less: ["LESS" , "less"],
2669
+ lisp: ["Lisp" , "lisp|scm|rkt"],
2670
+ liquid: ["Liquid" , "liquid"],
2671
+ lua: ["Lua" , "lua"],
2672
+ luapage: ["LuaPage" , "lp"], // http://keplerproject.github.com/cgilua/manual.html#templates
2673
+ lucene: ["Lucene" , "lucene"],
2674
+ makefile: ["Makefile" , "^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],
2675
+ markdown: ["Markdown" , "md|markdown"],
2676
+ objectivec: ["Objective-C" , "m"],
2677
+ ocaml: ["OCaml" , "ml|mli"],
2678
+ perl: ["Perl" , "pl|pm"],
2679
+ pgsql: ["pgSQL" , "pgsql"],
2680
+ php: ["PHP" , "php|phtml"],
2681
+ powershell: ["Powershell" , "ps1"],
2682
+ python: ["Python" , "py"],
2683
+ r: ["R" , "r"],
2684
+ rdoc: ["RDoc" , "Rd"],
2685
+ rhtml: ["RHTML" , "Rhtml"],
2686
+ ruby: ["Ruby" , "ru|gemspec|rake|rb"],
2687
+ scad: ["OpenSCAD" , "scad"],
2688
+ scala: ["Scala" , "scala"],
2689
+ scss: ["SCSS" , "scss|sass"],
2690
+ sh: ["SH" , "sh|bash|bat"],
2691
+ sql: ["SQL" , "sql"],
2692
+ stylus: ["Stylus" , "styl|stylus"],
2693
+ svg: ["SVG" , "svg"],
2694
+ tcl: ["Tcl" , "tcl"],
2695
+ tex: ["Tex" , "tex"],
2696
+ text: ["Text" , "txt"],
2697
+ textile: ["Textile" , "textile"],
2698
+ typescript: ["Typescript" , "typescript|ts|str"],
2699
+ xml: ["XML" , "xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],
2700
+ xquery: ["XQuery" , "xq"],
2701
+ yaml: ["YAML" , "yaml"]
2702
+ };
2703
+
2704
+ for (var name in modesByName) {
2705
+ var mode = modesByName[name];
2706
+ mode = new Mode(name, mode[0], mode[1]);
2707
+ modesByName[name] = mode;
2708
+ modes.push(mode);
2709
+ }
2710
+
2711
+ module.exports = {
2712
+ getModeFromPath: getModeFromPath,
2713
+ modes: modes,
2714
+ modesByName: modesByName
2715
+ };
2716
+
2717
+ });
2718
+
2719
+
2720
+ define('kitchen-sink/layout', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/event', 'ace/edit_session', 'ace/undomanager', 'ace/virtual_renderer', 'ace/editor', 'ace/multi_select', 'ace/theme/textmate'], function(require, exports, module) {
2721
+
2722
+
2723
+ var dom = require("ace/lib/dom");
2724
+ var event = require("ace/lib/event");
2725
+
2726
+ var EditSession = require("ace/edit_session").EditSession;
2727
+ var UndoManager = require("ace/undomanager").UndoManager;
2728
+ var Renderer = require("ace/virtual_renderer").VirtualRenderer;
2729
+ var Editor = require("ace/editor").Editor;
2730
+ var MultiSelect = require("ace/multi_select").MultiSelect;
2731
+
2732
+ dom.importCssString("\
2733
+ splitter {\
2734
+ border: 1px solid #C6C6D2;\
2735
+ width: 0px;\
2736
+ cursor: ew-resize;\
2737
+ z-index:10}\
2738
+ splitter:hover {\
2739
+ margin-left: -2px;\
2740
+ width:3px;\
2741
+ border-color: #B5B4E0;\
2742
+ }\
2743
+ ", "splitEditor");
2744
+
2745
+ exports.edit = function(el) {
2746
+ if (typeof(el) == "string")
2747
+ el = document.getElementById(el);
2748
+
2749
+ var editor = new Editor(new Renderer(el, require("ace/theme/textmate")));
2750
+
2751
+ editor.resize();
2752
+ event.addListener(window, "resize", function() {
2753
+ editor.resize();
2754
+ });
2755
+ return editor;
2756
+ };
2757
+
2758
+
2759
+ var SplitRoot = function(el, theme, position, getSize) {
2760
+ el.style.position = position || "relative";
2761
+ this.container = el;
2762
+ this.getSize = getSize || this.getSize;
2763
+ this.resize = this.$resize.bind(this);
2764
+
2765
+ event.addListener(el.ownerDocument.defaultView, "resize", this.resize);
2766
+ this.editor = this.createEditor();
2767
+ };
2768
+
2769
+ (function(){
2770
+ this.createEditor = function() {
2771
+ var el = document.createElement("div");
2772
+ el.className = this.$editorCSS;
2773
+ el.style.cssText = "position: absolute; top:0px; bottom:0px";
2774
+ this.$container.appendChild(el);
2775
+ var session = new EditSession("");
2776
+ var editor = new Editor(new Renderer(el, this.$theme));
2777
+
2778
+ this.$editors.push(editor);
2779
+ editor.setFontSize(this.$fontSize);
2780
+ return editor;
2781
+ };
2782
+ this.$resize = function() {
2783
+ var size = this.getSize(this.container);
2784
+ this.rect = {
2785
+ x: size.left,
2786
+ y: size.top,
2787
+ w: size.width,
2788
+ h: size.height
2789
+ };
2790
+ this.item.resize(this.rect);
2791
+ };
2792
+ this.getSize = function(el) {
2793
+ return el.getBoundingClientRect();
2794
+ };
2795
+ this.destroy = function() {
2796
+ var win = this.container.ownerDocument.defaultView;
2797
+ event.removeListener(win, "resize", this.resize);
2798
+ };
2799
+
2800
+
2801
+ }).call(SplitRoot.prototype);
2802
+
2803
+
2804
+
2805
+ var Split = function(){
2806
+
2807
+ };
2808
+ (function(){
2809
+ this.execute = function(options) {
2810
+ this.$u.execute(options);
2811
+ };
2812
+
2813
+ }).call(Split.prototype);
2814
+
2815
+
2816
+
2817
+ exports.singleLineEditor = function(el) {
2818
+ var renderer = new Renderer(el);
2819
+ el.style.overflow = "hidden";
2820
+ renderer.scrollBar.element.style.top = "0";
2821
+ renderer.scrollBar.element.style.display = "none";
2822
+ renderer.scrollBar.orginalWidth = renderer.scrollBar.width;
2823
+ renderer.scrollBar.width = 0;
2824
+ renderer.content.style.height = "auto";
2825
+
2826
+ renderer.screenToTextCoordinates = function(x, y) {
2827
+ var pos = this.pixelToScreenCoordinates(x, y);
2828
+ return this.session.screenToDocumentPosition(
2829
+ Math.min(this.session.getScreenLength() - 1, Math.max(pos.row, 0)),
2830
+ Math.max(pos.column, 0)
2831
+ );
2832
+ };
2833
+
2834
+ renderer.maxLines = 4;
2835
+ renderer.$computeLayerConfigWithScroll = renderer.$computeLayerConfig;
2836
+ renderer.$computeLayerConfig = function() {
2837
+ var config = this.layerConfig;
2838
+ var height = this.session.getScreenLength() * this.lineHeight;
2839
+ if (config.height != height) {
2840
+ var vScroll = height > this.maxLines * this.lineHeight;
2841
+
2842
+ if (vScroll != this.$vScroll) {
2843
+ if (vScroll) {
2844
+ this.scrollBar.element.style.display = "";
2845
+ this.scrollBar.width = this.scrollBar.orginalWidth;
2846
+ this.container.style.height = config.height + "px";
2847
+ height = config.height;
2848
+ this.scrollTop = height - this.maxLines * this.lineHeight;
2849
+ } else {
2850
+ this.scrollBar.element.style.display = "none";
2851
+ this.scrollBar.width = 0;
2852
+ }
2853
+
2854
+ this.onResize();
2855
+ this.$vScroll = vScroll;
2856
+ }
2857
+
2858
+ if (this.$vScroll)
2859
+ return renderer.$computeLayerConfigWithScroll();
2860
+
2861
+ this.container.style.height = height + "px";
2862
+ this.scroller.style.height = height + "px";
2863
+ this.content.style.height = height + "px";
2864
+ this._emit("resize");
2865
+ }
2866
+
2867
+ var longestLine = this.$getLongestLine();
2868
+ var firstRow = 0;
2869
+ var lastRow = this.session.getLength();
2870
+
2871
+ this.scrollTop = 0;
2872
+ config.width = longestLine;
2873
+ config.padding = this.$padding;
2874
+ config.firstRow = 0;
2875
+ config.firstRowScreen = 0;
2876
+ config.lastRow = lastRow;
2877
+ config.lineHeight = this.lineHeight;
2878
+ config.characterWidth = this.characterWidth;
2879
+ config.minHeight = height;
2880
+ config.maxHeight = height;
2881
+ config.offset = 0;
2882
+ config.height = height;
2883
+
2884
+ this.$gutterLayer.element.style.marginTop = 0 + "px";
2885
+ this.content.style.marginTop = 0 + "px";
2886
+ this.content.style.width = longestLine + 2 * this.$padding + "px";
2887
+ };
2888
+ renderer.isScrollableBy=function(){return false};
2889
+
2890
+ renderer.setStyle("ace_one-line");
2891
+ var editor = new Editor(renderer);
2892
+ new MultiSelect(editor);
2893
+ editor.session.setUndoManager(new UndoManager());
2894
+
2895
+ editor.setHighlightActiveLine(false);
2896
+ editor.setShowPrintMargin(false);
2897
+ editor.renderer.setShowGutter(false);
2898
+ editor.renderer.setHighlightGutterLine(false);
2899
+
2900
+ editor.$mouseHandler.$focusWaitTimout = 0;
2901
+
2902
+ return editor;
2903
+ };
2904
+
2905
+
2906
+
2907
+ });
2908
+
2909
+ define('kitchen-sink/token_tooltip', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/event', 'ace/range'], function(require, exports, module) {
2910
+
2911
+
2912
+ var dom = require("ace/lib/dom");
2913
+ var event = require("ace/lib/event");
2914
+ var Range = require("ace/range").Range;
2915
+
2916
+ var tooltipNode;
2917
+
2918
+ var TokenTooltip = function(editor) {
2919
+ if (editor.tokenTooltip)
2920
+ return;
2921
+ editor.tokenTooltip = this;
2922
+ this.editor = editor;
2923
+
2924
+ editor.tooltip = tooltipNode || this.$init();
2925
+
2926
+ this.update = this.update.bind(this);
2927
+ this.onMouseMove = this.onMouseMove.bind(this);
2928
+ this.onMouseOut = this.onMouseOut.bind(this);
2929
+ event.addListener(editor.renderer.scroller, "mousemove", this.onMouseMove);
2930
+ event.addListener(editor.renderer.content, "mouseout", this.onMouseOut);
2931
+ };
2932
+
2933
+ (function(){
2934
+ this.token = {};
2935
+ this.range = new Range();
2936
+
2937
+ this.update = function() {
2938
+ this.$timer = null;
2939
+
2940
+ var r = this.editor.renderer;
2941
+ if (this.lastT - (r.timeStamp || 0) > 1000) {
2942
+ r.rect = null;
2943
+ r.timeStamp = this.lastT;
2944
+ this.maxHeight = innerHeight;
2945
+ this.maxWidth = innerWidth;
2946
+ }
2947
+
2948
+ var canvasPos = r.rect || (r.rect = r.scroller.getBoundingClientRect());
2949
+ var offset = (this.x + r.scrollLeft - canvasPos.left - r.$padding) / r.characterWidth;
2950
+ var row = Math.floor((this.y + r.scrollTop - canvasPos.top) / r.lineHeight);
2951
+ var col = Math.round(offset);
2952
+
2953
+ var screenPos = {row: row, column: col, side: offset - col > 0 ? 1 : -1};
2954
+ var session = this.editor.session;
2955
+ var docPos = session.screenToDocumentPosition(screenPos.row, screenPos.column);
2956
+ var token = session.getTokenAt(docPos.row, docPos.column);
2957
+
2958
+ if (!token && !session.getLine(docPos.row)) {
2959
+ token = {
2960
+ type: "",
2961
+ value: "",
2962
+ state: session.bgTokenizer.getState(0)
2963
+ };
2964
+ }
2965
+ if (!token) {
2966
+ session.removeMarker(this.marker);
2967
+ tooltipNode.style.display = "none";
2968
+ this.isOpen = false;
2969
+ return;
2970
+ }
2971
+ if (!this.isOpen) {
2972
+ tooltipNode.style.display = "";
2973
+ this.isOpen = true;
2974
+ }
2975
+
2976
+ var tokenText = token.type;
2977
+ if (token.state)
2978
+ tokenText += "|" + token.state;
2979
+ if (token.merge)
2980
+ tokenText += "\n merge";
2981
+ if (token.stateTransitions)
2982
+ tokenText += "\n " + token.stateTransitions.join("\n ");
2983
+
2984
+ if (this.tokenText != tokenText) {
2985
+ tooltipNode.textContent = tokenText;
2986
+ this.tooltipWidth = tooltipNode.offsetWidth;
2987
+ this.tooltipHeight = tooltipNode.offsetHeight;
2988
+ this.tokenText = tokenText;
2989
+ }
2990
+
2991
+ this.updateTooltipPosition(this.x, this.y);
2992
+
2993
+ this.token = token;
2994
+ session.removeMarker(this.marker);
2995
+ this.range = new Range(docPos.row, token.start, docPos.row, token.start + token.value.length);
2996
+ this.marker = session.addMarker(this.range, "ace_bracket", "text");
2997
+ };
2998
+
2999
+ this.onMouseMove = function(e) {
3000
+ this.x = e.clientX;
3001
+ this.y = e.clientY;
3002
+ if (this.isOpen) {
3003
+ this.lastT = e.timeStamp;
3004
+ this.updateTooltipPosition(this.x, this.y);
3005
+ }
3006
+ if (!this.$timer)
3007
+ this.$timer = setTimeout(this.update, 100);
3008
+ };
3009
+
3010
+ this.onMouseOut = function(e) {
3011
+ var t = e && e.relatedTarget;
3012
+ var ct = e && e.currentTarget;
3013
+ while(t && (t = t.parentNode)) {
3014
+ if (t == ct)
3015
+ return;
3016
+ }
3017
+ tooltipNode.style.display = "none";
3018
+ this.editor.session.removeMarker(this.marker);
3019
+ this.$timer = clearTimeout(this.$timer);
3020
+ this.isOpen = false;
3021
+ };
3022
+
3023
+ this.updateTooltipPosition = function(x, y) {
3024
+ var st = tooltipNode.style;
3025
+ if (x + 10 + this.tooltipWidth > this.maxWidth)
3026
+ x = innerWidth - this.tooltipWidth - 10;
3027
+ if (y > innerHeight * 0.75 || y + 20 + this.tooltipHeight > this.maxHeight)
3028
+ y = y - this.tooltipHeight - 30;
3029
+
3030
+ st.left = x + 10 + "px";
3031
+ st.top = y + 20 + "px";
3032
+ };
3033
+
3034
+ this.$init = function() {
3035
+ tooltipNode = document.documentElement.appendChild(dom.createElement("div"));
3036
+ var st = tooltipNode.style;
3037
+ st.position = "fixed";
3038
+ st.display = "none";
3039
+ st.background = "lightyellow";
3040
+ st.borderRadius = "";
3041
+ st.border = "1px solid gray";
3042
+ st.padding = "1px";
3043
+ st.zIndex = 1000;
3044
+ st.fontFamily = "monospace";
3045
+ st.whiteSpace = "pre-line";
3046
+ return tooltipNode;
3047
+ };
3048
+
3049
+ this.destroy = function() {
3050
+ this.onMouseOut();
3051
+ event.removeListener(this.editor.renderer.scroller, "mousemove", this.onMouseMove);
3052
+ event.removeListener(this.editor.renderer.content, "mouseout", this.onMouseOut);
3053
+ delete this.editor.tokenTooltip;
3054
+ };
3055
+
3056
+ }).call(TokenTooltip.prototype);
3057
+
3058
+ exports.TokenTooltip = TokenTooltip;
3059
+
3060
+ });
3061
+
3062
+ define('kitchen-sink/util', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/event', 'ace/edit_session', 'ace/undomanager', 'ace/virtual_renderer', 'ace/editor', 'ace/multi_select', 'ace/theme/textmate'], function(require, exports, module) {
3063
+
3064
+
3065
+ var dom = require("ace/lib/dom");
3066
+ var event = require("ace/lib/event");
3067
+
3068
+ var EditSession = require("ace/edit_session").EditSession;
3069
+ var UndoManager = require("ace/undomanager").UndoManager;
3070
+ var Renderer = require("ace/virtual_renderer").VirtualRenderer;
3071
+ var Editor = require("ace/editor").Editor;
3072
+ var MultiSelect = require("ace/multi_select").MultiSelect;
3073
+
3074
+ exports.createSplitEditor = function(el) {
3075
+ if (typeof(el) == "string")
3076
+ el = document.getElementById(el);
3077
+
3078
+ var e0 = document.createElement("div");
3079
+ var s = document.createElement("splitter");
3080
+ var e1 = document.createElement("div");
3081
+ el.appendChild(e0);
3082
+ el.appendChild(e1);
3083
+ el.appendChild(s);
3084
+ e0.style.position = e1.style.position = s.style.position = "absolute";
3085
+ el.style.position = "relative";
3086
+ var split = {$container: el};
3087
+
3088
+ split.editor0 = split[0] = new Editor(new Renderer(e0, require("ace/theme/textmate")));
3089
+ split.editor1 = split[1] = new Editor(new Renderer(e1, require("ace/theme/textmate")));
3090
+ split.splitter = s;
3091
+
3092
+ MultiSelect(split.editor0);
3093
+ MultiSelect(split.editor1);
3094
+
3095
+ s.ratio = 0.5;
3096
+
3097
+ split.resize = function resize(){
3098
+ var height = el.parentNode.clientHeight - el.offsetTop;
3099
+ var total = el.clientWidth;
3100
+ var w1 = total * s.ratio;
3101
+ var w2 = total * (1- s.ratio);
3102
+ s.style.left = w1 - 1 + "px";
3103
+ s.style.height = el.style.height = height + "px";
3104
+
3105
+ var st0 = split[0].container.style;
3106
+ var st1 = split[1].container.style;
3107
+ st0.width = w1 + "px";
3108
+ st1.width = w2 + "px";
3109
+ st0.left = 0 + "px";
3110
+ st1.left = w1 + "px";
3111
+
3112
+ st0.top = st1.top = "0px";
3113
+ st0.height = st1.height = height + "px";
3114
+
3115
+ split[0].resize();
3116
+ split[1].resize();
3117
+ };
3118
+
3119
+ split.onMouseDown = function(e) {
3120
+ var rect = el.getBoundingClientRect();
3121
+ var x = e.clientX;
3122
+ var y = e.clientY;
3123
+
3124
+ var button = e.button;
3125
+ if (button !== 0) {
3126
+ return;
3127
+ }
3128
+
3129
+ var onMouseMove = function(e) {
3130
+ x = e.clientX;
3131
+ y = e.clientY;
3132
+ };
3133
+ var onResizeEnd = function(e) {
3134
+ clearInterval(timerId);
3135
+ };
3136
+
3137
+ var onResizeInterval = function() {
3138
+ s.ratio = (x - rect.left) / rect.width
3139
+ split.resize()
3140
+ };
3141
+
3142
+ event.capture(s, onMouseMove, onResizeEnd);
3143
+ var timerId = setInterval(onResizeInterval, 40);
3144
+
3145
+ return e.preventDefault();
3146
+ };
3147
+
3148
+
3149
+
3150
+ event.addListener(s, "mousedown", split.onMouseDown);
3151
+ event.addListener(window, "resize", split.resize);
3152
+ split.resize();
3153
+ return split;
3154
+ };
3155
+ exports.stripLeadingComments = function(str) {
3156
+ if(str.slice(0,2)=='/*') {
3157
+ var j = str.indexOf('*/')+2;
3158
+ str = str.substr(j);
3159
+ }
3160
+ return str.trim() + "\n";
3161
+ };
3162
+ exports.saveOption = function(el, val) {
3163
+ if (!el.onchange && !el.onclick)
3164
+ return;
3165
+
3166
+ if ("checked" in el) {
3167
+ if (val !== undefined)
3168
+ el.checked = val;
3169
+
3170
+ localStorage && localStorage.setItem(el.id, el.checked ? 1 : 0);
3171
+ }
3172
+ else {
3173
+ if (val !== undefined)
3174
+ el.value = val;
3175
+
3176
+ localStorage && localStorage.setItem(el.id, el.value);
3177
+ }
3178
+ };
3179
+
3180
+ exports.bindCheckbox = function(id, callback, noInit) {
3181
+ if (typeof id == "string")
3182
+ var el = document.getElementById(id);
3183
+ else {
3184
+ var el = id;
3185
+ id = el.id;
3186
+ }
3187
+ var el = document.getElementById(id);
3188
+ if (localStorage && localStorage.getItem(id))
3189
+ el.checked = localStorage.getItem(id) == "1";
3190
+
3191
+ var onCheck = function() {
3192
+ callback(!!el.checked);
3193
+ exports.saveOption(el);
3194
+ };
3195
+ el.onclick = onCheck;
3196
+ noInit || onCheck();
3197
+ };
3198
+
3199
+ exports.bindDropdown = function(id, callback, noInit) {
3200
+ if (typeof id == "string")
3201
+ var el = document.getElementById(id);
3202
+ else {
3203
+ var el = id;
3204
+ id = el.id;
3205
+ }
3206
+ if (localStorage && localStorage.getItem(id))
3207
+ el.value = localStorage.getItem(id);
3208
+
3209
+ var onChange = function() {
3210
+ callback(el.value);
3211
+ exports.saveOption(el);
3212
+ };
3213
+
3214
+ el.onchange = onChange;
3215
+ noInit || onChange();
3216
+ };
3217
+
3218
+ exports.fillDropdown = function(el, values) {
3219
+ if (typeof el == "string")
3220
+ el = document.getElementById(el);
3221
+
3222
+ dropdown(values).forEach(function(e) {
3223
+ el.appendChild(e);
3224
+ });
3225
+ };
3226
+
3227
+ function elt(tag, attributes, content) {
3228
+ var el = dom.createElement(tag);
3229
+ if (typeof content == "string") {
3230
+ el.textContent = content;
3231
+ } else if (content) {
3232
+ content.forEach(function(ch) {
3233
+ el.appendChild(ch);
3234
+ });
3235
+ }
3236
+
3237
+ for (var i in attributes)
3238
+ el.setAttribute(i, attributes[i]);
3239
+ return el;
3240
+ }
3241
+
3242
+ function optgroup(values) {
3243
+ return values.map(function(item) {
3244
+ if (typeof item == "string")
3245
+ item = {name: item, desc: item};
3246
+ return elt("option", {value: item.name}, item.desc);
3247
+ });
3248
+ }
3249
+
3250
+ function dropdown(values) {
3251
+ if (Array.isArray(values))
3252
+ return optgroup(values);
3253
+
3254
+ return Object.keys(values).map(function(i) {
3255
+ return elt("optgroup", {"label": i}, optgroup(values[i]));
3256
+ });
3257
+ }
3258
+
3259
+
3260
+ });
3261
+
3262
+ define('ace/split', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter', 'ace/editor', 'ace/virtual_renderer', 'ace/edit_session'], function(require, exports, module) {
3263
+
3264
+
3265
+ var oop = require("./lib/oop");
3266
+ var lang = require("./lib/lang");
3267
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
3268
+
3269
+ var Editor = require("./editor").Editor;
3270
+ var Renderer = require("./virtual_renderer").VirtualRenderer;
3271
+ var EditSession = require("./edit_session").EditSession;
3272
+
3273
+
3274
+ var Split = function(container, theme, splits) {
3275
+ this.BELOW = 1;
3276
+ this.BESIDE = 0;
3277
+
3278
+ this.$container = container;
3279
+ this.$theme = theme;
3280
+ this.$splits = 0;
3281
+ this.$editorCSS = "";
3282
+ this.$editors = [];
3283
+ this.$orientation = this.BESIDE;
3284
+
3285
+ this.setSplits(splits || 1);
3286
+ this.$cEditor = this.$editors[0];
3287
+
3288
+
3289
+ this.on("focus", function(editor) {
3290
+ this.$cEditor = editor;
3291
+ }.bind(this));
3292
+ };
3293
+
3294
+ (function(){
3295
+
3296
+ oop.implement(this, EventEmitter);
3297
+
3298
+ this.$createEditor = function() {
3299
+ var el = document.createElement("div");
3300
+ el.className = this.$editorCSS;
3301
+ el.style.cssText = "position: absolute; top:0px; bottom:0px";
3302
+ this.$container.appendChild(el);
3303
+ var editor = new Editor(new Renderer(el, this.$theme));
3304
+
3305
+ editor.on("focus", function() {
3306
+ this._emit("focus", editor);
3307
+ }.bind(this));
3308
+
3309
+ this.$editors.push(editor);
3310
+ editor.setFontSize(this.$fontSize);
3311
+ return editor;
3312
+ };
3313
+
3314
+ this.setSplits = function(splits) {
3315
+ var editor;
3316
+ if (splits < 1) {
3317
+ throw "The number of splits have to be > 0!";
3318
+ }
3319
+
3320
+ if (splits == this.$splits) {
3321
+ return;
3322
+ } else if (splits > this.$splits) {
3323
+ while (this.$splits < this.$editors.length && this.$splits < splits) {
3324
+ editor = this.$editors[this.$splits];
3325
+ this.$container.appendChild(editor.container);
3326
+ editor.setFontSize(this.$fontSize);
3327
+ this.$splits ++;
3328
+ }
3329
+ while (this.$splits < splits) {
3330
+ this.$createEditor();
3331
+ this.$splits ++;
3332
+ }
3333
+ } else {
3334
+ while (this.$splits > splits) {
3335
+ editor = this.$editors[this.$splits - 1];
3336
+ this.$container.removeChild(editor.container);
3337
+ this.$splits --;
3338
+ }
3339
+ }
3340
+ this.resize();
3341
+ };
3342
+ this.getSplits = function() {
3343
+ return this.$splits;
3344
+ };
3345
+ this.getEditor = function(idx) {
3346
+ return this.$editors[idx];
3347
+ };
3348
+ this.getCurrentEditor = function() {
3349
+ return this.$cEditor;
3350
+ };
3351
+ this.focus = function() {
3352
+ this.$cEditor.focus();
3353
+ };
3354
+ this.blur = function() {
3355
+ this.$cEditor.blur();
3356
+ };
3357
+ this.setTheme = function(theme) {
3358
+ this.$editors.forEach(function(editor) {
3359
+ editor.setTheme(theme);
3360
+ });
3361
+ };
3362
+ this.setKeyboardHandler = function(keybinding) {
3363
+ this.$editors.forEach(function(editor) {
3364
+ editor.setKeyboardHandler(keybinding);
3365
+ });
3366
+ };
3367
+ this.forEach = function(callback, scope) {
3368
+ this.$editors.forEach(callback, scope);
3369
+ };
3370
+
3371
+
3372
+ this.$fontSize = "";
3373
+ this.setFontSize = function(size) {
3374
+ this.$fontSize = size;
3375
+ this.forEach(function(editor) {
3376
+ editor.setFontSize(size);
3377
+ });
3378
+ };
3379
+
3380
+ this.$cloneSession = function(session) {
3381
+ var s = new EditSession(session.getDocument(), session.getMode());
3382
+
3383
+ var undoManager = session.getUndoManager();
3384
+ if (undoManager) {
3385
+ var undoManagerProxy = new UndoManagerProxy(undoManager, s);
3386
+ s.setUndoManager(undoManagerProxy);
3387
+ }
3388
+ s.$informUndoManager = lang.deferredCall(function() { s.$deltas = []; });
3389
+ s.setTabSize(session.getTabSize());
3390
+ s.setUseSoftTabs(session.getUseSoftTabs());
3391
+ s.setOverwrite(session.getOverwrite());
3392
+ s.setBreakpoints(session.getBreakpoints());
3393
+ s.setUseWrapMode(session.getUseWrapMode());
3394
+ s.setUseWorker(session.getUseWorker());
3395
+ s.setWrapLimitRange(session.$wrapLimitRange.min,
3396
+ session.$wrapLimitRange.max);
3397
+ s.$foldData = session.$cloneFoldData();
3398
+
3399
+ return s;
3400
+ };
3401
+ this.setSession = function(session, idx) {
3402
+ var editor;
3403
+ if (idx == null) {
3404
+ editor = this.$cEditor;
3405
+ } else {
3406
+ editor = this.$editors[idx];
3407
+ }
3408
+ var isUsed = this.$editors.some(function(editor) {
3409
+ return editor.session === session;
3410
+ });
3411
+
3412
+ if (isUsed) {
3413
+ session = this.$cloneSession(session);
3414
+ }
3415
+ editor.setSession(session);
3416
+ return session;
3417
+ };
3418
+ this.getOrientation = function() {
3419
+ return this.$orientation;
3420
+ };
3421
+ this.setOrientation = function(orientation) {
3422
+ if (this.$orientation == orientation) {
3423
+ return;
3424
+ }
3425
+ this.$orientation = orientation;
3426
+ this.resize();
3427
+ };
3428
+ this.resize = function() {
3429
+ var width = this.$container.clientWidth;
3430
+ var height = this.$container.clientHeight;
3431
+ var editor;
3432
+
3433
+ if (this.$orientation == this.BESIDE) {
3434
+ var editorWidth = width / this.$splits;
3435
+ for (var i = 0; i < this.$splits; i++) {
3436
+ editor = this.$editors[i];
3437
+ editor.container.style.width = editorWidth + "px";
3438
+ editor.container.style.top = "0px";
3439
+ editor.container.style.left = i * editorWidth + "px";
3440
+ editor.container.style.height = height + "px";
3441
+ editor.resize();
3442
+ }
3443
+ } else {
3444
+ var editorHeight = height / this.$splits;
3445
+ for (var i = 0; i < this.$splits; i++) {
3446
+ editor = this.$editors[i];
3447
+ editor.container.style.width = width + "px";
3448
+ editor.container.style.top = i * editorHeight + "px";
3449
+ editor.container.style.left = "0px";
3450
+ editor.container.style.height = editorHeight + "px";
3451
+ editor.resize();
3452
+ }
3453
+ }
3454
+ };
3455
+
3456
+ }).call(Split.prototype);
3457
+
3458
+
3459
+ function UndoManagerProxy(undoManager, session) {
3460
+ this.$u = undoManager;
3461
+ this.$doc = session;
3462
+ }
3463
+
3464
+ (function() {
3465
+ this.execute = function(options) {
3466
+ this.$u.execute(options);
3467
+ };
3468
+
3469
+ this.undo = function() {
3470
+ var selectionRange = this.$u.undo(true);
3471
+ if (selectionRange) {
3472
+ this.$doc.selection.setSelectionRange(selectionRange);
3473
+ }
3474
+ };
3475
+
3476
+ this.redo = function() {
3477
+ var selectionRange = this.$u.redo(true);
3478
+ if (selectionRange) {
3479
+ this.$doc.selection.setSelectionRange(selectionRange);
3480
+ }
3481
+ };
3482
+
3483
+ this.reset = function() {
3484
+ this.$u.reset();
3485
+ };
3486
+
3487
+ this.hasUndo = function() {
3488
+ return this.$u.hasUndo();
3489
+ };
3490
+
3491
+ this.hasRedo = function() {
3492
+ return this.$u.hasRedo();
3493
+ };
3494
+ }).call(UndoManagerProxy.prototype);
3495
+
3496
+ exports.Split = Split;
3497
+ });
3498
+ define('kitchen-sink/statusbar', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/lang'], function(require, exports, module) {
3499
+ var dom = require("ace/lib/dom");
3500
+ var lang = require("ace/lib/lang");
3501
+
3502
+ var StatusBar = function(editor, parentNode) {
3503
+ this.element = dom.createElement("div");
3504
+ this.element.style.cssText = "color: gray; position:absolute; right:0; border-left:1px solid";
3505
+ parentNode.appendChild(this.element);
3506
+
3507
+ var statusUpdate = lang.deferredCall(function(){
3508
+ this.updateStatus(editor)
3509
+ }.bind(this));
3510
+ editor.on("changeStatus", function() {
3511
+ statusUpdate.schedule(50);
3512
+ });
3513
+ editor.on("changeSelection", function() {
3514
+ statusUpdate.schedule(50);
3515
+ });
3516
+ };
3517
+
3518
+ (function(){
3519
+ this.updateStatus = function(editor) {
3520
+ var status = [];
3521
+ function add(str, separator) {
3522
+ str && status.push(str, separator || "|");
3523
+ }
3524
+
3525
+ if (editor.$vimModeHandler)
3526
+ add(editor.$vimModeHandler.getStatusText());
3527
+ else if (editor.commands.recording)
3528
+ add("REC");
3529
+
3530
+ var c = editor.selection.lead;
3531
+ add(c.row + ":" + c.column, " ");
3532
+ if (!editor.selection.isEmpty()) {
3533
+ var r = editor.getSelectionRange();
3534
+ add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")");
3535
+ }
3536
+ status.pop();
3537
+ this.element.textContent = status.join("");
3538
+ };
3539
+ }).call(StatusBar.prototype);
3540
+
3541
+ exports.StatusBar = StatusBar;
3542
+
3543
+ });
ace-0.2.0/kitchen-sink/docs/AsciiDoc.asciidoc ADDED
@@ -0,0 +1,6040 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ AsciiDoc User Guide
2
+ ===================
3
+ Stuart Rackham <srackham@gmail.com>
4
+ :Author Initials: SJR
5
+ :toc:
6
+ :icons:
7
+ :numbered:
8
+ :website: http://www.methods.co.nz/asciidoc/
9
+
10
+ AsciiDoc is a text document format for writing notes, documentation,
11
+ articles, books, ebooks, slideshows, web pages, blogs and UNIX man
12
+ pages. AsciiDoc files can be translated to many formats including
13
+ HTML, PDF, EPUB, man page. AsciiDoc is highly configurable: both the
14
+ AsciiDoc source file syntax and the backend output markups (which can
15
+ be almost any type of SGML/XML markup) can be customized and extended
16
+ by the user.
17
+
18
+ .This document
19
+ **********************************************************************
20
+ This is an overly large document, it probably needs to be refactored
21
+ into a Tutorial, Quick Reference and Formal Reference.
22
+
23
+ If you're new to AsciiDoc read this section and the <<X6,Getting
24
+ Started>> section and take a look at the example AsciiDoc (`*.txt`)
25
+ source files in the distribution `doc` directory.
26
+ **********************************************************************
27
+
28
+
29
+ Introduction
30
+ ------------
31
+ AsciiDoc is a plain text human readable/writable document format that
32
+ can be translated to DocBook or HTML using the asciidoc(1) command.
33
+ You can then either use asciidoc(1) generated HTML directly or run
34
+ asciidoc(1) DocBook output through your favorite DocBook toolchain or
35
+ use the AsciiDoc a2x(1) toolchain wrapper to produce PDF, EPUB, DVI,
36
+ LaTeX, PostScript, man page, HTML and text formats.
37
+
38
+ The AsciiDoc format is a useful presentation format in its own right:
39
+ AsciiDoc markup is simple, intuitive and as such is easily proofed and
40
+ edited.
41
+
42
+ AsciiDoc is light weight: it consists of a single Python script and a
43
+ bunch of configuration files. Apart from asciidoc(1) and a Python
44
+ interpreter, no other programs are required to convert AsciiDoc text
45
+ files to DocBook or HTML. See <<X11,Example AsciiDoc Documents>>
46
+ below.
47
+
48
+ Text markup conventions tend to be a matter of (often strong) personal
49
+ preference: if the default syntax is not to your liking you can define
50
+ your own by editing the text based asciidoc(1) configuration files.
51
+ You can also create configuration files to translate AsciiDoc
52
+ documents to almost any SGML/XML markup.
53
+
54
+ asciidoc(1) comes with a set of configuration files to translate
55
+ AsciiDoc articles, books and man pages to HTML or DocBook backend
56
+ formats.
57
+
58
+ .My AsciiDoc Itch
59
+ **********************************************************************
60
+ DocBook has emerged as the de facto standard Open Source documentation
61
+ format. But DocBook is a complex language, the markup is difficult to
62
+ read and even more difficult to write directly -- I found I was
63
+ spending more time typing markup tags, consulting reference manuals
64
+ and fixing syntax errors, than I was writing the documentation.
65
+ **********************************************************************
66
+
67
+
68
+ [[X6]]
69
+ Getting Started
70
+ ---------------
71
+ Installing AsciiDoc
72
+ ~~~~~~~~~~~~~~~~~~~
73
+ See the `README` and `INSTALL` files for install prerequisites and
74
+ procedures. Packagers take a look at <<X38,Packager Notes>>.
75
+
76
+ [[X11]]
77
+ Example AsciiDoc Documents
78
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
79
+ The best way to quickly get a feel for AsciiDoc is to view the
80
+ AsciiDoc web site and/or distributed examples:
81
+
82
+ - Take a look at the linked examples on the AsciiDoc web site home
83
+ page {website}. Press the 'Page Source' sidebar menu item to view
84
+ corresponding AsciiDoc source.
85
+ - Read the `*.txt` source files in the distribution `./doc` directory
86
+ along with the corresponding HTML and DocBook XML files.
87
+
88
+
89
+ AsciiDoc Document Types
90
+ -----------------------
91
+ There are three types of AsciiDoc documents: article, book and
92
+ manpage. All document types share the same AsciiDoc format with some
93
+ minor variations. If you are familiar with DocBook you will have
94
+ noticed that AsciiDoc document types correspond to the same-named
95
+ DocBook document types.
96
+
97
+ Use the asciidoc(1) `-d` (`--doctype`) option to specify the AsciiDoc
98
+ document type -- the default document type is 'article'.
99
+
100
+ By convention the `.txt` file extension is used for AsciiDoc document
101
+ source files.
102
+
103
+ article
104
+ ~~~~~~~
105
+ Used for short documents, articles and general documentation. See the
106
+ AsciiDoc distribution `./doc/article.txt` example.
107
+
108
+ AsciiDoc defines standard DocBook article frontmatter and backmatter
109
+ <<X93,section markup templates>> (appendix, abstract, bibliography,
110
+ glossary, index).
111
+
112
+ book
113
+ ~~~~
114
+ Books share the same format as articles, with the following
115
+ differences:
116
+
117
+ - The part titles in multi-part books are <<X17,top level titles>>
118
+ (same level as book title).
119
+ - Some sections are book specific e.g. preface and colophon.
120
+
121
+ Book documents will normally be used to produce DocBook output since
122
+ DocBook processors can automatically generate footnotes, table of
123
+ contents, list of tables, list of figures, list of examples and
124
+ indexes.
125
+
126
+ AsciiDoc defines standard DocBook book frontmatter and backmatter
127
+ <<X93,section markup templates>> (appendix, dedication, preface,
128
+ bibliography, glossary, index, colophon).
129
+
130
+ .Example book documents
131
+ Book::
132
+ The `./doc/book.txt` file in the AsciiDoc distribution.
133
+
134
+ Multi-part book::
135
+ The `./doc/book-multi.txt` file in the AsciiDoc distribution.
136
+
137
+ manpage
138
+ ~~~~~~~
139
+ Used to generate roff format UNIX manual pages. AsciiDoc manpage
140
+ documents observe special header title and section naming conventions
141
+ -- see the <<X1,Manpage Documents>> section for details.
142
+
143
+ AsciiDoc defines the 'synopsis' <<X93,section markup template>> to
144
+ generate the DocBook `refsynopsisdiv` section.
145
+
146
+ See also the asciidoc(1) man page source (`./doc/asciidoc.1.txt`) from
147
+ the AsciiDoc distribution.
148
+
149
+
150
+ [[X5]]
151
+ AsciiDoc Backends
152
+ -----------------
153
+ The asciidoc(1) command translates an AsciiDoc formatted file to the
154
+ backend format specified by the `-b` (`--backend`) command-line
155
+ option. asciidoc(1) itself has little intrinsic knowledge of backend
156
+ formats, all translation rules are contained in customizable cascading
157
+ configuration files. Backend specific attributes are listed in the
158
+ <<X88,Backend Attributes>> section.
159
+
160
+ docbook45::
161
+ Outputs DocBook XML 4.5 markup.
162
+
163
+ html4::
164
+ This backend generates plain HTML 4.01 Transitional markup.
165
+
166
+ xhtml11::
167
+ This backend generates XHTML 1.1 markup styled with CSS2. Output
168
+ files have an `.html` extension.
169
+
170
+ html5::
171
+ This backend generates HTML 5 markup, apart from the inclusion of
172
+ <<X98,audio and video block macros>> it is functionally identical to
173
+ the 'xhtml11' backend.
174
+
175
+ slidy::
176
+ Use this backend to generate self-contained
177
+ http://www.w3.org/Talks/Tools/Slidy2/[Slidy] HTML slideshows for
178
+ your web browser from AsciiDoc documents. The Slidy backend is
179
+ documented in the distribution `doc/slidy.txt` file and
180
+ {website}slidy.html[online].
181
+
182
+ wordpress::
183
+ A minor variant of the 'html4' backend to support
184
+ http://srackham.wordpress.com/blogpost1/[blogpost].
185
+
186
+ latex::
187
+ Experimental LaTeX backend.
188
+
189
+ Backend Aliases
190
+ ~~~~~~~~~~~~~~~
191
+ Backend aliases are alternative names for AsciiDoc backends. AsciiDoc
192
+ comes with two backend aliases: 'html' (aliased to 'xhtml11') and
193
+ 'docbook' (aliased to 'docbook45').
194
+
195
+ You can assign (or reassign) backend aliases by setting an AsciiDoc
196
+ attribute named like `backend-alias-<alias>` to an AsciiDoc backend
197
+ name. For example, the following backend alias attribute definitions
198
+ appear in the `[attributes]` section of the global `asciidoc.conf`
199
+ configuration file:
200
+
201
+ backend-alias-html=xhtml11
202
+ backend-alias-docbook=docbook45
203
+
204
+ [[X100]]
205
+ Backend Plugins
206
+ ~~~~~~~~~~~~~~~
207
+ The asciidoc(1) `--backend` option is also used to install and manage
208
+ backend <<X101,plugins>>.
209
+
210
+ - A backend plugin is used just like the built-in backends.
211
+ - Backend plugins <<X27,take precedence>> over built-in backends with
212
+ the same name.
213
+ - You can use the `{asciidoc-confdir}` <<X60, intrinsic attribute>> to
214
+ refer to the built-in backend configuration file location from
215
+ backend plugin configuration files.
216
+ - You can use the `{backend-confdir}` <<X60, intrinsic attribute>> to
217
+ refer to the backend plugin configuration file location.
218
+ - By default backends plugins are installed in
219
+ `$HOME/.asciidoc/backends/<backend>` where `<backend>` is the
220
+ backend name.
221
+
222
+
223
+ DocBook
224
+ -------
225
+ AsciiDoc generates 'article', 'book' and 'refentry'
226
+ http://www.docbook.org/[DocBook] documents (corresponding to the
227
+ AsciiDoc 'article', 'book' and 'manpage' document types).
228
+
229
+ Most Linux distributions come with conversion tools (collectively
230
+ called a toolchain) for <<X12,converting DocBook files>> to
231
+ presentation formats such as Postscript, HTML, PDF, EPUB, DVI,
232
+ PostScript, LaTeX, roff (the native man page format), HTMLHelp,
233
+ JavaHelp and text. There are also programs that allow you to view
234
+ DocBook files directly, for example http://live.gnome.org/Yelp[Yelp]
235
+ (the GNOME help viewer).
236
+
237
+ [[X12]]
238
+ Converting DocBook to other file formats
239
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
240
+ DocBook files are validated, parsed and translated various
241
+ presentation file formats using a combination of applications
242
+ collectively called a DocBook 'tool chain'. The function of a tool
243
+ chain is to read the DocBook markup (produced by AsciiDoc) and
244
+ transform it to a presentation format (for example HTML, PDF, HTML
245
+ Help, EPUB, DVI, PostScript, LaTeX).
246
+
247
+ A wide range of user output format requirements coupled with a choice
248
+ of available tools and stylesheets results in many valid tool chain
249
+ combinations.
250
+
251
+ [[X43]]
252
+ a2x Toolchain Wrapper
253
+ ~~~~~~~~~~~~~~~~~~~~~
254
+ One of the biggest hurdles for new users is installing, configuring
255
+ and using a DocBook XML toolchain. `a2x(1)` can help -- it's a
256
+ toolchain wrapper command that will generate XHTML (chunked and
257
+ unchunked), PDF, EPUB, DVI, PS, LaTeX, man page, HTML Help and text
258
+ file outputs from an AsciiDoc text file. `a2x(1)` does all the grunt
259
+ work associated with generating and sequencing the toolchain commands
260
+ and managing intermediate and output files. `a2x(1)` also optionally
261
+ deploys admonition and navigation icons and a CSS stylesheet. See the
262
+ `a2x(1)` man page for more details. In addition to `asciidoc(1)` you
263
+ also need <<X40,xsltproc(1)>>, <<X13,DocBook XSL Stylesheets>> and
264
+ optionally: <<X31,dblatex>> or <<X14,FOP>> (to generate PDF);
265
+ `w3m(1)` or `lynx(1)` (to generate text).
266
+
267
+ The following examples generate `doc/source-highlight-filter.pdf` from
268
+ the AsciiDoc `doc/source-highlight-filter.txt` source file. The first
269
+ example uses `dblatex(1)` (the default PDF generator) the second
270
+ example forces FOP to be used:
271
+
272
+ $ a2x -f pdf doc/source-highlight-filter.txt
273
+ $ a2x -f pdf --fop doc/source-highlight-filter.txt
274
+
275
+ See the `a2x(1)` man page for details.
276
+
277
+ TIP: Use the `--verbose` command-line option to view executed
278
+ toolchain commands.
279
+
280
+ HTML generation
281
+ ~~~~~~~~~~~~~~~
282
+ AsciiDoc produces nicely styled HTML directly without requiring a
283
+ DocBook toolchain but there are also advantages in going the DocBook
284
+ route:
285
+
286
+ - HTML from DocBook can optionally include automatically generated
287
+ indexes, tables of contents, footnotes, lists of figures and tables.
288
+ - DocBook toolchains can also (optionally) generate separate (chunked)
289
+ linked HTML pages for each document section.
290
+ - Toolchain processing performs link and document validity checks.
291
+ - If the DocBook 'lang' attribute is set then things like table of
292
+ contents, figure and table captions and admonition captions will be
293
+ output in the specified language (setting the AsciiDoc 'lang'
294
+ attribute sets the DocBook 'lang' attribute).
295
+
296
+ On the other hand, HTML output directly from AsciiDoc is much faster,
297
+ is easily customized and can be used in situations where there is no
298
+ suitable DocBook toolchain (for example, see the {website}[AsciiDoc
299
+ website]).
300
+
301
+ PDF generation
302
+ ~~~~~~~~~~~~~~
303
+ There are two commonly used tools to generate PDFs from DocBook,
304
+ <<X31,dblatex>> and <<X14,FOP>>.
305
+
306
+ .dblatex or FOP?
307
+ - 'dblatex' is easier to install, there's zero configuration
308
+ required and no Java VM to install -- it just works out of the box.
309
+ - 'dblatex' source code highlighting and numbering is superb.
310
+ - 'dblatex' is easier to use as it converts DocBook directly to PDF
311
+ whereas before using 'FOP' you have to convert DocBook to XML-FO
312
+ using <<X13,DocBook XSL Stylesheets>>.
313
+ - 'FOP' is more feature complete (for example, callouts are processed
314
+ inside literal layouts) and arguably produces nicer looking output.
315
+
316
+ HTML Help generation
317
+ ~~~~~~~~~~~~~~~~~~~~
318
+ . Convert DocBook XML documents to HTML Help compiler source files
319
+ using <<X13,DocBook XSL Stylesheets>> and <<X40,xsltproc(1)>>.
320
+ . Convert the HTML Help source (`.hhp` and `.html`) files to HTML Help
321
+ (`.chm`) files using the <<X67,Microsoft HTML Help Compiler>>.
322
+
323
+ Toolchain components summary
324
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
325
+ AsciiDoc::
326
+ Converts AsciiDoc (`.txt`) files to DocBook XML (`.xml`) files.
327
+
328
+ [[X13]]http://docbook.sourceforge.net/projects/xsl/[DocBook XSL Stylesheets]::
329
+ These are a set of XSL stylesheets containing rules for converting
330
+ DocBook XML documents to HTML, XSL-FO, manpage and HTML Help files.
331
+ The stylesheets are used in conjunction with an XML parser such as
332
+ <<X40,xsltproc(1)>>.
333
+
334
+ [[X40]]http://www.xmlsoft.org[xsltproc]::
335
+ An XML parser for applying XSLT stylesheets (in our case the
336
+ <<X13,DocBook XSL Stylesheets>>) to XML documents.
337
+
338
+ [[X31]]http://dblatex.sourceforge.net/[dblatex]::
339
+ Generates PDF, DVI, PostScript and LaTeX formats directly from
340
+ DocBook source via the intermediate LaTeX typesetting language --
341
+ uses <<X13,DocBook XSL Stylesheets>>, <<X40,xsltproc(1)>> and
342
+ `latex(1)`.
343
+
344
+ [[X14]]http://xml.apache.org/fop/[FOP]::
345
+ The Apache Formatting Objects Processor converts XSL-FO (`.fo`)
346
+ files to PDF files. The XSL-FO files are generated from DocBook
347
+ source files using <<X13,DocBook XSL Stylesheets>> and
348
+ <<X40,xsltproc(1)>>.
349
+
350
+ [[X67]]Microsoft Help Compiler::
351
+ The Microsoft HTML Help Compiler (`hhc.exe`) is a command-line tool
352
+ that converts HTML Help source files to a single HTML Help (`.chm`)
353
+ file. It runs on MS Windows platforms and can be downloaded from
354
+ http://www.microsoft.com.
355
+
356
+ AsciiDoc dblatex configuration files
357
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
358
+ The AsciiDoc distribution `./dblatex` directory contains
359
+ `asciidoc-dblatex.xsl` (customized XSL parameter settings) and
360
+ `asciidoc-dblatex.sty` (customized LaTeX settings). These are examples
361
+ of optional <<X31,dblatex>> output customization and are used by
362
+ <<X43,a2x(1)>>.
363
+
364
+ AsciiDoc DocBook XSL Stylesheets drivers
365
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
366
+ You will have noticed that the distributed HTML and HTML Help
367
+ documentation files (for example `./doc/asciidoc.html`) are not the
368
+ plain outputs produced using the default 'DocBook XSL Stylesheets'
369
+ configuration. This is because they have been processed using
370
+ customized DocBook XSL Stylesheets along with (in the case of HTML
371
+ outputs) the custom `./stylesheets/docbook-xsl.css` CSS stylesheet.
372
+
373
+ You'll find the customized DocBook XSL drivers along with additional
374
+ documentation in the distribution `./docbook-xsl` directory. The
375
+ examples that follow are executed from the distribution documentation
376
+ (`./doc`) directory. These drivers are also used by <<X43,a2x(1)>>.
377
+
378
+ `common.xsl`::
379
+ Shared driver parameters. This file is not used directly but is
380
+ included in all the following drivers.
381
+
382
+ `chunked.xsl`::
383
+ Generate chunked XHTML (separate HTML pages for each document
384
+ section) in the `./doc/chunked` directory. For example:
385
+
386
+ $ python ../asciidoc.py -b docbook asciidoc.txt
387
+ $ xsltproc --nonet ../docbook-xsl/chunked.xsl asciidoc.xml
388
+
389
+ `epub.xsl`::
390
+ Used by <<X43,a2x(1)>> to generate EPUB formatted documents.
391
+
392
+ `fo.xsl`::
393
+ Generate XSL Formatting Object (`.fo`) files for subsequent PDF
394
+ file generation using FOP. For example:
395
+
396
+ $ python ../asciidoc.py -b docbook article.txt
397
+ $ xsltproc --nonet ../docbook-xsl/fo.xsl article.xml > article.fo
398
+ $ fop article.fo article.pdf
399
+
400
+ `htmlhelp.xsl`::
401
+ Generate Microsoft HTML Help source files for the MS HTML Help
402
+ Compiler in the `./doc/htmlhelp` directory. This example is run on
403
+ MS Windows from a Cygwin shell prompt:
404
+
405
+ $ python ../asciidoc.py -b docbook asciidoc.txt
406
+ $ xsltproc --nonet ../docbook-xsl/htmlhelp.xsl asciidoc.xml
407
+ $ c:/Program\ Files/HTML\ Help\ Workshop/hhc.exe htmlhelp.hhp
408
+
409
+ `manpage.xsl`::
410
+ Generate a `roff(1)` format UNIX man page from a DocBook XML
411
+ 'refentry' document. This example generates an `asciidoc.1` man
412
+ page file:
413
+
414
+ $ python ../asciidoc.py -d manpage -b docbook asciidoc.1.txt
415
+ $ xsltproc --nonet ../docbook-xsl/manpage.xsl asciidoc.1.xml
416
+
417
+ `xhtml.xsl`::
418
+ Convert a DocBook XML file to a single XHTML file. For example:
419
+
420
+ $ python ../asciidoc.py -b docbook asciidoc.txt
421
+ $ xsltproc --nonet ../docbook-xsl/xhtml.xsl asciidoc.xml > asciidoc.html
422
+
423
+ If you want to see how the complete documentation set is processed
424
+ take a look at the A-A-P script `./doc/main.aap`.
425
+
426
+
427
+ Generating Plain Text Files
428
+ ---------------------------
429
+ AsciiDoc does not have a text backend (for most purposes AsciiDoc
430
+ source text is fine), however you can convert AsciiDoc text files to
431
+ formatted text using the AsciiDoc <<X43,a2x(1)>> toolchain wrapper
432
+ utility.
433
+
434
+
435
+ [[X35]]
436
+ HTML5 and XHTML 1.1
437
+ -------------------
438
+ The 'xhtml11' and 'html5' backends embed or link CSS and JavaScript
439
+ files in their outputs, there is also a <<X99,themes>> plugin
440
+ framework.
441
+
442
+ - If the AsciiDoc 'linkcss' attribute is defined then CSS and
443
+ JavaScript files are linked to the output document, otherwise they
444
+ are embedded (the default behavior).
445
+ - The default locations for CSS and JavaScript files can be changed by
446
+ setting the AsciiDoc 'stylesdir' and 'scriptsdir' attributes
447
+ respectively.
448
+ - The default locations for embedded and linked files differ and are
449
+ calculated at different times -- embedded files are loaded when
450
+ asciidoc(1) generates the output document, linked files are loaded
451
+ by the browser when the user views the output document.
452
+ - Embedded files are automatically inserted in the output files but
453
+ you need to manually copy linked CSS and Javascript files from
454
+ AsciiDoc <<X27,configuration directories>> to the correct location
455
+ relative to the output document.
456
+
457
+ .Stylesheet file locations
458
+ [cols="3*",frame="topbot",options="header"]
459
+ |====================================================================
460
+ |'stylesdir' attribute
461
+ |Linked location ('linkcss' attribute defined)
462
+ |Embedded location ('linkcss' attribute undefined)
463
+
464
+ |Undefined (default).
465
+ |Same directory as the output document.
466
+ |`stylesheets` subdirectory in the AsciiDoc configuration directory
467
+ (the directory containing the backend conf file).
468
+
469
+ |Absolute or relative directory name.
470
+ |Absolute or relative to the output document.
471
+ |Absolute or relative to the AsciiDoc configuration directory (the
472
+ directory containing the backend conf file).
473
+
474
+ |====================================================================
475
+
476
+ .JavaScript file locations
477
+ [cols="3*",frame="topbot",options="header"]
478
+ |====================================================================
479
+ |'scriptsdir' attribute
480
+ |Linked location ('linkcss' attribute defined)
481
+ |Embedded location ('linkcss' attribute undefined)
482
+
483
+ |Undefined (default).
484
+ |Same directory as the output document.
485
+ |`javascripts` subdirectory in the AsciiDoc configuration directory
486
+ (the directory containing the backend conf file).
487
+
488
+ |Absolute or relative directory name.
489
+ |Absolute or relative to the output document.
490
+ |Absolute or relative to the AsciiDoc configuration directory (the
491
+ directory containing the backend conf file).
492
+
493
+ |====================================================================
494
+
495
+ [[X99]]
496
+ Themes
497
+ ~~~~~~
498
+ The AsciiDoc 'theme' attribute is used to select an alternative CSS
499
+ stylesheet and to optionally include additional JavaScript code.
500
+
501
+ - Theme files reside in an AsciiDoc <<X27,configuration directory>>
502
+ named `themes/<theme>/` (where `<theme>` is the the theme name set
503
+ by the 'theme' attribute). asciidoc(1) sets the 'themedir' attribute
504
+ to the theme directory path name.
505
+ - The 'theme' attribute can also be set using the asciidoc(1)
506
+ `--theme` option, the `--theme` option can also be used to manage
507
+ theme <<X101,plugins>>.
508
+ - AsciiDoc ships with two themes: 'flask' and 'volnitsky'.
509
+ - The `<theme>.css` file replaces the default `asciidoc.css` CSS file.
510
+ - The `<theme>.js` file is included in addition to the default
511
+ `asciidoc.js` JavaScript file.
512
+ - If the <<X66,data-uri>> attribute is defined then icons are loaded
513
+ from the theme `icons` sub-directory if it exists (i.e. the
514
+ 'iconsdir' attribute is set to theme `icons` sub-directory path).
515
+ - Embedded theme files are automatically inserted in the output files
516
+ but you need to manually copy linked CSS and Javascript files to the
517
+ location of the output documents.
518
+ - Linked CSS and JavaScript theme files are linked to the same linked
519
+ locations as <<X35,other CSS and JavaScript files>>.
520
+
521
+ For example, the command-line option `--theme foo` (or `--attribute
522
+ theme=foo`) will cause asciidoc(1) to search <<"X27","configuration
523
+ file locations 1, 2 and 3">> for a sub-directory called `themes/foo`
524
+ containing the stylesheet `foo.css` and optionally a JavaScript file
525
+ name `foo.js`.
526
+
527
+
528
+ Document Structure
529
+ ------------------
530
+ An AsciiDoc document consists of a series of <<X8,block elements>>
531
+ starting with an optional document Header, followed by an optional
532
+ Preamble, followed by zero or more document Sections.
533
+
534
+ Almost any combination of zero or more elements constitutes a valid
535
+ AsciiDoc document: documents can range from a single sentence to a
536
+ multi-part book.
537
+
538
+ Block Elements
539
+ ~~~~~~~~~~~~~~
540
+ Block elements consist of one or more lines of text and may contain
541
+ other block elements.
542
+
543
+ The AsciiDoc block structure can be informally summarized as follows
544
+ footnote:[This is a rough structural guide, not a rigorous syntax
545
+ definition]:
546
+
547
+ Document ::= (Header?,Preamble?,Section*)
548
+ Header ::= (Title,(AuthorInfo,RevisionInfo?)?)
549
+ AuthorInfo ::= (FirstName,(MiddleName?,LastName)?,EmailAddress?)
550
+ RevisionInfo ::= (RevisionNumber?,RevisionDate,RevisionRemark?)
551
+ Preamble ::= (SectionBody)
552
+ Section ::= (Title,SectionBody?,(Section)*)
553
+ SectionBody ::= ((BlockTitle?,Block)|BlockMacro)+
554
+ Block ::= (Paragraph|DelimitedBlock|List|Table)
555
+ List ::= (BulletedList|NumberedList|LabeledList|CalloutList)
556
+ BulletedList ::= (ListItem)+
557
+ NumberedList ::= (ListItem)+
558
+ CalloutList ::= (ListItem)+
559
+ LabeledList ::= (ListEntry)+
560
+ ListEntry ::= (ListLabel,ListItem)
561
+ ListLabel ::= (ListTerm+)
562
+ ListItem ::= (ItemText,(List|ListParagraph|ListContinuation)*)
563
+
564
+ Where:
565
+
566
+ - '?' implies zero or one occurrence, '+' implies one or more
567
+ occurrences, '*' implies zero or more occurrences.
568
+ - All block elements are separated by line boundaries.
569
+ - `BlockId`, `AttributeEntry` and `AttributeList` block elements (not
570
+ shown) can occur almost anywhere.
571
+ - There are a number of document type and backend specific
572
+ restrictions imposed on the block syntax.
573
+ - The following elements cannot contain blank lines: Header, Title,
574
+ Paragraph, ItemText.
575
+ - A ListParagraph is a Paragraph with its 'listelement' option set.
576
+ - A ListContinuation is a <<X15,list continuation element>>.
577
+
578
+ [[X95]]
579
+ Header
580
+ ~~~~~~
581
+ The Header contains document meta-data, typically title plus optional
582
+ authorship and revision information:
583
+
584
+ - The Header is optional, but if it is used it must start with a
585
+ document <<X17,title>>.
586
+ - Optional Author and Revision information immediately follows the
587
+ header title.
588
+ - The document header must be separated from the remainder of the
589
+ document by one or more blank lines and cannot contain blank lines.
590
+ - The header can include comments.
591
+ - The header can include <<X18,attribute entries>>, typically
592
+ 'doctype', 'lang', 'encoding', 'icons', 'data-uri', 'toc',
593
+ 'numbered'.
594
+ - Header attributes are overridden by command-line attributes.
595
+ - If the header contains non-UTF-8 characters then the 'encoding' must
596
+ precede the header (either in the document or on the command-line).
597
+
598
+ Here's an example AsciiDoc document header:
599
+
600
+ Writing Documentation using AsciiDoc
601
+ ====================================
602
+ Joe Bloggs <jbloggs@mymail.com>
603
+ v2.0, February 2003:
604
+ Rewritten for version 2 release.
605
+
606
+ The author information line contains the author's name optionally
607
+ followed by the author's email address. The author's name is formatted
608
+ like:
609
+
610
+ firstname[ [middlename ]lastname][ <email>]]
611
+
612
+ i.e. a first name followed by optional middle and last names followed
613
+ by an email address in that order. Multi-word first, middle and last
614
+ names can be entered using the underscore as a word separator. The
615
+ email address comes last and must be enclosed in angle <> brackets.
616
+ Here a some examples of author information lines:
617
+
618
+ Joe Bloggs <jbloggs@mymail.com>
619
+ Joe Bloggs
620
+ Vincent Willem van_Gogh
621
+
622
+ If the author line does not match the above specification then the
623
+ entire author line is treated as the first name.
624
+
625
+ The optional revision information line follows the author information
626
+ line. The revision information can be one of two formats:
627
+
628
+ . An optional document revision number followed by an optional
629
+ revision date followed by an optional revision remark:
630
+ +
631
+ --
632
+ * If the revision number is specified it must be followed by a
633
+ comma.
634
+ * The revision number must contain at least one numeric character.
635
+ * Any non-numeric characters preceding the first numeric character
636
+ will be dropped.
637
+ * If a revision remark is specified it must be preceded by a colon.
638
+ The revision remark extends from the colon up to the next blank
639
+ line, attribute entry or comment and is subject to normal text
640
+ substitutions.
641
+ * If a revision number or remark has been set but the revision date
642
+ has not been set then the revision date is set to the value of the
643
+ 'docdate' attribute.
644
+
645
+ Examples:
646
+
647
+ v2.0, February 2003
648
+ February 2003
649
+ v2.0,
650
+ v2.0, February 2003: Rewritten for version 2 release.
651
+ February 2003: Rewritten for version 2 release.
652
+ v2.0,: Rewritten for version 2 release.
653
+ :Rewritten for version 2 release.
654
+ --
655
+
656
+ . The revision information line can also be an RCS/CVS/SVN $Id$
657
+ marker:
658
+ +
659
+ --
660
+ * AsciiDoc extracts the 'revnumber', 'revdate', and 'author'
661
+ attributes from the $Id$ revision marker and displays them in the
662
+ document header.
663
+ * If an $Id$ revision marker is used the header author line can be
664
+ omitted.
665
+
666
+ Example:
667
+
668
+ $Id: mydoc.txt,v 1.5 2009/05/17 17:58:44 jbloggs Exp $
669
+ --
670
+
671
+ You can override or set header parameters by passing 'revnumber',
672
+ 'revremark', 'revdate', 'email', 'author', 'authorinitials',
673
+ 'firstname' and 'lastname' attributes using the asciidoc(1) `-a`
674
+ (`--attribute`) command-line option. For example:
675
+
676
+ $ asciidoc -a revdate=2004/07/27 article.txt
677
+
678
+ Attribute entries can also be added to the header for substitution in
679
+ the header template with <<X18,Attribute Entry>> elements.
680
+
681
+ The 'title' element in HTML outputs is set to the AsciiDoc document
682
+ title, you can set it to a different value by including a 'title'
683
+ attribute entry in the document header.
684
+
685
+ [[X87]]
686
+ Additional document header information
687
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
688
+ AsciiDoc has two mechanisms for optionally including additional
689
+ meta-data in the header of the output document:
690
+
691
+ 'docinfo' configuration file sections::
692
+ If a <<X7,configuration file>> section named 'docinfo' has been loaded
693
+ then it will be included in the document header. Typically the
694
+ 'docinfo' section name will be prefixed with a '+' character so that it
695
+ is appended to (rather than replace) other 'docinfo' sections.
696
+
697
+ 'docinfo' files::
698
+ Two docinfo files are recognized: one named `docinfo` and a second
699
+ named like the AsciiDoc source file with a `-docinfo` suffix. For
700
+ example, if the source document is called `mydoc.txt` then the
701
+ document information files would be `docinfo.xml` and
702
+ `mydoc-docinfo.xml` (for DocBook outputs) and `docinfo.html` and
703
+ `mydoc-docinfo.html` (for HTML outputs). The <<X97,docinfo, docinfo1
704
+ and docinfo2>> attributes control which docinfo files are included in
705
+ the output files.
706
+
707
+ The contents docinfo templates and files is dependent on the type of
708
+ output:
709
+
710
+ HTML::
711
+ Valid 'head' child elements. Typically 'style' and 'script' elements
712
+ for CSS and JavaScript inclusion.
713
+
714
+ DocBook::
715
+ Valid 'articleinfo' or 'bookinfo' child elements. DocBook defines
716
+ numerous elements for document meta-data, for example: copyrights,
717
+ document history and authorship information. See the DocBook
718
+ `./doc/article-docinfo.xml` example that comes with the AsciiDoc
719
+ distribution. The rendering of meta-data elements (or not) is
720
+ DocBook processor dependent.
721
+
722
+
723
+ [[X86]]
724
+ Preamble
725
+ ~~~~~~~~
726
+ The Preamble is an optional untitled section body between the document
727
+ Header and the first Section title.
728
+
729
+ Sections
730
+ ~~~~~~~~
731
+ In addition to the document title (level 0), AsciiDoc supports four
732
+ section levels: 1 (top) to 4 (bottom). Section levels are delimited
733
+ by section <<X17,titles>>. Sections are translated using
734
+ configuration file <<X93,section markup templates>>. AsciiDoc
735
+ generates the following <<X60,intrinsic attributes>> specifically for
736
+ use in section markup templates:
737
+
738
+ level::
739
+ The `level` attribute is the section level number, it is normally just
740
+ the <<X17,title>> level number (1..4). However, if the `leveloffset`
741
+ attribute is defined it will be added to the `level` attribute. The
742
+ `leveloffset` attribute is useful for <<X90,combining documents>>.
743
+
744
+ sectnum::
745
+ The `-n` (`--section-numbers`) command-line option generates the
746
+ `sectnum` (section number) attribute. The `sectnum` attribute is used
747
+ for section numbers in HTML outputs (DocBook section numbering are
748
+ handled automatically by the DocBook toolchain commands).
749
+
750
+ [[X93]]
751
+ Section markup templates
752
+ ^^^^^^^^^^^^^^^^^^^^^^^^
753
+ Section markup templates specify output markup and are defined in
754
+ AsciiDoc configuration files. Section markup template names are
755
+ derived as follows (in order of precedence):
756
+
757
+ 1. From the title's first positional attribute or 'template'
758
+ attribute. For example, the following three section titles are
759
+ functionally equivalent:
760
+ +
761
+ .....................................................................
762
+ [[terms]]
763
+ [glossary]
764
+ List of Terms
765
+ -------------
766
+
767
+ ["glossary",id="terms"]
768
+ List of Terms
769
+ -------------
770
+
771
+ [template="glossary",id="terms"]
772
+ List of Terms
773
+ -------------
774
+ .....................................................................
775
+
776
+ 2. When the title text matches a configuration file
777
+ <<X16,`[specialsections]`>> entry.
778
+ 3. If neither of the above the default `sect<level>` template is used
779
+ (where `<level>` is a number from 1 to 4).
780
+
781
+ In addition to the normal section template names ('sect1', 'sect2',
782
+ 'sect3', 'sect4') AsciiDoc has the following templates for
783
+ frontmatter, backmatter and other special sections: 'abstract',
784
+ 'preface', 'colophon', 'dedication', 'glossary', 'bibliography',
785
+ 'synopsis', 'appendix', 'index'. These special section templates
786
+ generate the corresponding Docbook elements; for HTML outputs they
787
+ default to the 'sect1' section template.
788
+
789
+ Section IDs
790
+ ^^^^^^^^^^^
791
+ If no explicit section ID is specified an ID will be synthesised from
792
+ the section title. The primary purpose of this feature is to ensure
793
+ persistence of table of contents links (permalinks): the missing
794
+ section IDs are generated dynamically by the JavaScript TOC generator
795
+ *after* the page is loaded. If you link to a dynamically generated TOC
796
+ address the page will load but the browser will ignore the (as yet
797
+ ungenerated) section ID.
798
+
799
+ The IDs are generated by the following algorithm:
800
+
801
+ - Replace all non-alphanumeric title characters with underscores.
802
+ - Strip leading or trailing underscores.
803
+ - Convert to lowercase.
804
+ - Prepend the `idprefix` attribute (so there's no possibility of name
805
+ clashes with existing document IDs). Prepend an underscore if the
806
+ `idprefix` attribute is not defined.
807
+ - A numbered suffix (`_2`, `_3` ...) is added if a same named
808
+ auto-generated section ID exists.
809
+ - If the `ascii-ids` attribute is defined then non-ASCII characters
810
+ are replaced with ASCII equivalents. This attribute may be
811
+ deprecated in future releases and *should be avoided*, it's sole
812
+ purpose is to accommodate deficient downstream applications that
813
+ cannot process non-ASCII ID attributes.
814
+
815
+ Example: the title 'Jim's House' would generate the ID `_jim_s_house`.
816
+
817
+ Section ID synthesis can be disabled by undefining the `sectids`
818
+ attribute.
819
+
820
+ [[X16]]
821
+ Special Section Titles
822
+ ^^^^^^^^^^^^^^^^^^^^^^
823
+ AsciiDoc has a mechanism for mapping predefined section titles
824
+ auto-magically to specific markup templates. For example a title
825
+ 'Appendix A: Code Reference' will automatically use the 'appendix'
826
+ <<X93,section markup template>>. The mappings from title to template
827
+ name are specified in `[specialsections]` sections in the Asciidoc
828
+ language configuration files (`lang-*.conf`). Section entries are
829
+ formatted like:
830
+
831
+ <title>=<template>
832
+
833
+ `<title>` is a Python regular expression and `<template>` is the name
834
+ of a configuration file markup template section. If the `<title>`
835
+ matches an AsciiDoc document section title then the backend output is
836
+ marked up using the `<template>` markup template (instead of the
837
+ default `sect<level>` section template). The `{title}` attribute value
838
+ is set to the value of the matched regular expression group named
839
+ 'title', if there is no 'title' group `{title}` defaults to the whole
840
+ of the AsciiDoc section title. If `<template>` is blank then any
841
+ existing entry with the same `<title>` will be deleted.
842
+
843
+ .Special section titles vs. explicit template names
844
+ *********************************************************************
845
+ AsciiDoc has two mechanisms for specifying non-default section markup
846
+ templates: you can specify the template name explicitly (using the
847
+ 'template' attribute) or indirectly (using 'special section titles').
848
+ Specifying a <<X93,section template>> attribute explicitly is
849
+ preferred. Auto-magical 'special section titles' have the following
850
+ drawbacks:
851
+
852
+ - They are non-obvious, you have to know the exact matching
853
+ title for each special section on a language by language basis.
854
+ - Section titles are predefined and can only be customised with a
855
+ configuration change.
856
+ - The implementation is complicated by multiple languages: every
857
+ special section title has to be defined for each language (in each
858
+ of the `lang-*.conf` files).
859
+
860
+ Specifying special section template names explicitly does add more
861
+ noise to the source document (the 'template' attribute declaration),
862
+ but the intention is obvious and the syntax is consistent with other
863
+ AsciiDoc elements c.f. bibliographic, Q&A and glossary lists.
864
+
865
+ Special section titles have been deprecated but are retained for
866
+ backward compatibility.
867
+
868
+ *********************************************************************
869
+
870
+ Inline Elements
871
+ ~~~~~~~~~~~~~~~
872
+ <<X34,Inline document elements>> are used to format text and to
873
+ perform various types of text substitution. Inline elements and inline
874
+ element syntax is defined in the asciidoc(1) configuration files.
875
+
876
+ Here is a list of AsciiDoc inline elements in the (default) order in
877
+ which they are processed:
878
+
879
+ Special characters::
880
+ These character sequences escape special characters used by
881
+ the backend markup (typically `<`, `>`, and `&` characters).
882
+ See `[specialcharacters]` configuration file sections.
883
+
884
+ Quotes::
885
+ Elements that markup words and phrases; usually for character
886
+ formatting. See `[quotes]` configuration file sections.
887
+
888
+ Special Words::
889
+ Word or word phrase patterns singled out for markup without
890
+ the need for further annotation. See `[specialwords]`
891
+ configuration file sections.
892
+
893
+ Replacements::
894
+ Each replacement defines a word or word phrase pattern to
895
+ search for along with corresponding replacement text. See
896
+ `[replacements]` configuration file sections.
897
+
898
+ Attribute references::
899
+ Document attribute names enclosed in braces are replaced by
900
+ the corresponding attribute value.
901
+
902
+ Inline Macros::
903
+ Inline macros are replaced by the contents of parametrized
904
+ configuration file sections.
905
+
906
+
907
+ Document Processing
908
+ -------------------
909
+ The AsciiDoc source document is read and processed as follows:
910
+
911
+ 1. The document 'Header' is parsed, header parameter values are
912
+ substituted into the configuration file `[header]` template section
913
+ which is then written to the output file.
914
+ 2. Each document 'Section' is processed and its constituent elements
915
+ translated to the output file.
916
+ 3. The configuration file `[footer]` template section is substituted
917
+ and written to the output file.
918
+
919
+ When a block element is encountered asciidoc(1) determines the type of
920
+ block by checking in the following order (first to last): (section)
921
+ Titles, BlockMacros, Lists, DelimitedBlocks, Tables, AttributeEntrys,
922
+ AttributeLists, BlockTitles, Paragraphs.
923
+
924
+ The default paragraph definition `[paradef-default]` is last element
925
+ to be checked.
926
+
927
+ Knowing the parsing order will help you devise unambiguous macro, list
928
+ and block syntax rules.
929
+
930
+ Inline substitutions within block elements are performed in the
931
+ following default order:
932
+
933
+ 1. Special characters
934
+ 2. Quotes
935
+ 3. Special words
936
+ 4. Replacements
937
+ 5. Attributes
938
+ 6. Inline Macros
939
+ 7. Replacements2
940
+
941
+ The substitutions and substitution order performed on
942
+ Title, Paragraph and DelimitedBlock elements is determined by
943
+ configuration file parameters.
944
+
945
+
946
+ Text Formatting
947
+ ---------------
948
+ [[X51]]
949
+ Quoted Text
950
+ ~~~~~~~~~~~
951
+ Words and phrases can be formatted by enclosing inline text with
952
+ quote characters:
953
+
954
+ _Emphasized text_::
955
+ Word phrases \'enclosed in single quote characters' (acute
956
+ accents) or \_underline characters_ are emphasized.
957
+
958
+ *Strong text*::
959
+ Word phrases \*enclosed in asterisk characters* are rendered
960
+ in a strong font (usually bold).
961
+
962
+ [[X81]]+Monospaced text+::
963
+ Word phrases \+enclosed in plus characters+ are rendered in a
964
+ monospaced font. Word phrases \`enclosed in backtick
965
+ characters` (grave accents) are also rendered in a monospaced
966
+ font but in this case the enclosed text is rendered literally
967
+ and is not subject to further expansion (see <<X80,inline
968
+ literal passthrough>>).
969
+
970
+ `Single quoted text'::
971
+ Phrases enclosed with a \`single grave accent to the left and
972
+ a single acute accent to the right' are rendered in single
973
+ quotation marks.
974
+
975
+ ``Double quoted text''::
976
+ Phrases enclosed with \\``two grave accents to the left and
977
+ two acute accents to the right'' are rendered in quotation
978
+ marks.
979
+
980
+ #Unquoted text#::
981
+ Placing \#hashes around text# does nothing, it is a mechanism
982
+ to allow inline attributes to be applied to otherwise
983
+ unformatted text.
984
+
985
+ New quote types can be defined by editing asciidoc(1) configuration
986
+ files. See the <<X7,Configuration Files>> section for details.
987
+
988
+ .Quoted text behavior
989
+ - Quoting cannot be overlapped.
990
+ - Different quoting types can be nested.
991
+ - To suppress quoted text formatting place a backslash character
992
+ immediately in front of the leading quote character(s). In the case
993
+ of ambiguity between escaped and non-escaped text you will need to
994
+ escape both leading and trailing quotes, in the case of
995
+ multi-character quotes you may even need to escape individual
996
+ characters.
997
+
998
+ [[X96]]
999
+ Quoted text attributes
1000
+ ^^^^^^^^^^^^^^^^^^^^^^
1001
+ Quoted text can be prefixed with an <<X21,attribute list>>. The first
1002
+ positional attribute ('role' attribute) is translated by AsciiDoc to
1003
+ an HTML 'span' element 'class' attribute or a DocBook 'phrase' element
1004
+ 'role' attribute.
1005
+
1006
+ DocBook XSL Stylesheets translate DocBook 'phrase' elements with
1007
+ 'role' attributes to corresponding HTML 'span' elements with the same
1008
+ 'class' attributes; CSS can then be used
1009
+ http://www.sagehill.net/docbookxsl/UsingCSS.html[to style the
1010
+ generated HTML]. Thus CSS styling can be applied to both DocBook and
1011
+ AsciiDoc generated HTML outputs. You can also specify multiple class
1012
+ names separated by spaces.
1013
+
1014
+ CSS rules for text color, text background color, text size and text
1015
+ decorators are included in the distributed AsciiDoc CSS files and are
1016
+ used in conjunction with AsciiDoc 'xhtml11', 'html5' and 'docbook'
1017
+ outputs. The CSS class names are:
1018
+
1019
+ - '<color>' (text foreground color).
1020
+ - '<color>-background' (text background color).
1021
+ - 'big' and 'small' (text size).
1022
+ - 'underline', 'overline' and 'line-through' (strike through) text
1023
+ decorators.
1024
+
1025
+ Where '<color>' can be any of the
1026
+ http://en.wikipedia.org/wiki/Web_colors#HTML_color_names[sixteen HTML
1027
+ color names]. Examples:
1028
+
1029
+ [red]#Obvious# and [big red yellow-background]*very obvious*.
1030
+
1031
+ [underline]#Underline text#, [overline]#overline text# and
1032
+ [blue line-through]*bold blue and line-through*.
1033
+
1034
+ is rendered as:
1035
+
1036
+ [red]#Obvious# and [big red yellow-background]*very obvious*.
1037
+
1038
+ [underline]#Underline text#, [overline]#overline text# and
1039
+ [bold blue line-through]*bold blue and line-through*.
1040
+
1041
+ NOTE: Color and text decorator attributes are rendered for XHTML and
1042
+ HTML 5 outputs using CSS stylesheets. The mechanism to implement
1043
+ color and text decorator attributes is provided for DocBook toolchains
1044
+ via the DocBook 'phrase' element 'role' attribute, but the actual
1045
+ rendering is toolchain specific and is not part of the AsciiDoc
1046
+ distribution.
1047
+
1048
+ [[X52]]
1049
+ Constrained and Unconstrained Quotes
1050
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1051
+ There are actually two types of quotes:
1052
+
1053
+ Constrained quotes
1054
+ ++++++++++++++++++
1055
+ Quoted must be bounded by white space or commonly adjoining
1056
+ punctuation characters. These are the most commonly used type of
1057
+ quote.
1058
+
1059
+ Unconstrained quotes
1060
+ ++++++++++++++++++++
1061
+ Unconstrained quotes have no boundary constraints and can be placed
1062
+ anywhere within inline text. For consistency and to make them easier
1063
+ to remember unconstrained quotes are double-ups of the `_`, `*`, `+`
1064
+ and `#` constrained quotes:
1065
+
1066
+ __unconstrained emphasized text__
1067
+ **unconstrained strong text**
1068
+ ++unconstrained monospaced text++
1069
+ ##unconstrained unquoted text##
1070
+
1071
+ The following example emboldens the letter F:
1072
+
1073
+ **F**ile Open...
1074
+
1075
+ Superscripts and Subscripts
1076
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1077
+ Put \^carets on either^ side of the text to be superscripted, put
1078
+ \~tildes on either side~ of text to be subscripted. For example, the
1079
+ following line:
1080
+
1081
+ e^&#960;i^+1 = 0. H~2~O and x^10^. Some ^super text^
1082
+ and ~some sub text~
1083
+
1084
+ Is rendered like:
1085
+
1086
+ e^&#960;i^+1 = 0. H~2~O and x^10^. Some ^super text^
1087
+ and ~some sub text~
1088
+
1089
+ Superscripts and subscripts are implemented as <<X52,unconstrained
1090
+ quotes>> and they can be escaped with a leading backslash and prefixed
1091
+ with with an attribute list.
1092
+
1093
+ Line Breaks
1094
+ ~~~~~~~~~~~
1095
+ A plus character preceded by at least one space character at the end
1096
+ of a non-blank line forces a line break. It generates a line break
1097
+ (`br`) tag for HTML outputs and a custom XML `asciidoc-br` processing
1098
+ instruction for DocBook outputs. The `asciidoc-br` processing
1099
+ instruction is handled by <<X43,a2x(1)>>.
1100
+
1101
+ Page Breaks
1102
+ ~~~~~~~~~~~
1103
+ A line of three or more less-than (`<<<`) characters will generate a
1104
+ hard page break in DocBook and printed HTML outputs. It uses the CSS
1105
+ `page-break-after` property for HTML outputs and a custom XML
1106
+ `asciidoc-pagebreak` processing instruction for DocBook outputs. The
1107
+ `asciidoc-pagebreak` processing instruction is handled by
1108
+ <<X43,a2x(1)>>. Hard page breaks are sometimes handy but as a general
1109
+ rule you should let your page processor generate page breaks for you.
1110
+
1111
+ Rulers
1112
+ ~~~~~~
1113
+ A line of three or more apostrophe characters will generate a ruler
1114
+ line. It generates a ruler (`hr`) tag for HTML outputs and a custom
1115
+ XML `asciidoc-hr` processing instruction for DocBook outputs. The
1116
+ `asciidoc-hr` processing instruction is handled by <<X43,a2x(1)>>.
1117
+
1118
+ Tabs
1119
+ ~~~~
1120
+ By default tab characters input files will translated to 8 spaces. Tab
1121
+ expansion is set with the 'tabsize' entry in the configuration file
1122
+ `[miscellaneous]` section and can be overridden in included files by
1123
+ setting a 'tabsize' attribute in the `include` macro's attribute list.
1124
+ For example:
1125
+
1126
+ include::addendum.txt[tabsize=2]
1127
+
1128
+ The tab size can also be set using the attribute command-line option,
1129
+ for example `--attribute tabsize=4`
1130
+
1131
+ Replacements
1132
+ ~~~~~~~~~~~~
1133
+ The following replacements are defined in the default AsciiDoc
1134
+ configuration:
1135
+
1136
+ (C) copyright, (TM) trademark, (R) registered trademark,
1137
+ -- em dash, ... ellipsis, -> right arrow, <- left arrow, => right
1138
+ double arrow, <= left double arrow.
1139
+
1140
+ Which are rendered as:
1141
+
1142
+ (C) copyright, (TM) trademark, (R) registered trademark,
1143
+ -- em dash, ... ellipsis, -> right arrow, <- left arrow, => right
1144
+ double arrow, <= left double arrow.
1145
+
1146
+ You can also include arbitrary entity references in the AsciiDoc
1147
+ source. Examples:
1148
+
1149
+ &#x278a; &#182;
1150
+
1151
+ renders:
1152
+
1153
+ &#x278a; &#182;
1154
+
1155
+ To render a replacement literally escape it with a leading back-slash.
1156
+
1157
+ The <<X7,Configuration Files>> section explains how to configure your
1158
+ own replacements.
1159
+
1160
+ Special Words
1161
+ ~~~~~~~~~~~~~
1162
+ Words defined in `[specialwords]` configuration file sections are
1163
+ automatically marked up without having to be explicitly notated.
1164
+
1165
+ The <<X7,Configuration Files>> section explains how to add and replace
1166
+ special words.
1167
+
1168
+
1169
+ [[X17]]
1170
+ Titles
1171
+ ------
1172
+ Document and section titles can be in either of two formats:
1173
+
1174
+ Two line titles
1175
+ ~~~~~~~~~~~~~~~
1176
+ A two line title consists of a title line, starting hard against the
1177
+ left margin, and an underline. Section underlines consist a repeated
1178
+ character pairs spanning the width of the preceding title (give or
1179
+ take up to two characters):
1180
+
1181
+ The default title underlines for each of the document levels are:
1182
+
1183
+
1184
+ Level 0 (top level): ======================
1185
+ Level 1: ----------------------
1186
+ Level 2: ~~~~~~~~~~~~~~~~~~~~~~
1187
+ Level 3: ^^^^^^^^^^^^^^^^^^^^^^
1188
+ Level 4 (bottom level): ++++++++++++++++++++++
1189
+
1190
+ Examples:
1191
+
1192
+ Level One Section Title
1193
+ -----------------------
1194
+
1195
+ Level 2 Subsection Title
1196
+ ~~~~~~~~~~~~~~~~~~~~~~~~
1197
+
1198
+ [[X46]]
1199
+ One line titles
1200
+ ~~~~~~~~~~~~~~~
1201
+ One line titles consist of a single line delimited on either side by
1202
+ one or more equals characters (the number of equals characters
1203
+ corresponds to the section level minus one). Here are some examples:
1204
+
1205
+ = Document Title (level 0) =
1206
+ == Section title (level 1) ==
1207
+ === Section title (level 2) ===
1208
+ ==== Section title (level 3) ====
1209
+ ===== Section title (level 4) =====
1210
+
1211
+ [NOTE]
1212
+ =====================================================================
1213
+ - One or more spaces must fall between the title and the delimiters.
1214
+ - The trailing title delimiter is optional.
1215
+ - The one-line title syntax can be changed by editing the
1216
+ configuration file `[titles]` section `sect0`...`sect4` entries.
1217
+ =====================================================================
1218
+
1219
+ Floating titles
1220
+ ~~~~~~~~~~~~~~~
1221
+ Setting the title's first positional attribute or 'style' attribute to
1222
+ 'float' generates a free-floating title. A free-floating title is
1223
+ rendered just like a normal section title but is not formally
1224
+ associated with a text body and is not part of the regular section
1225
+ hierarchy so the normal ordering rules do not apply. Floating titles
1226
+ can also be used in contexts where section titles are illegal: for
1227
+ example sidebar and admonition blocks. Example:
1228
+
1229
+ [float]
1230
+ The second day
1231
+ ~~~~~~~~~~~~~~
1232
+
1233
+ Floating titles do not appear in a document's table of contents.
1234
+
1235
+
1236
+ [[X42]]
1237
+ Block Titles
1238
+ ------------
1239
+ A 'BlockTitle' element is a single line beginning with a period
1240
+ followed by the title text. A BlockTitle is applied to the immediately
1241
+ following Paragraph, DelimitedBlock, List, Table or BlockMacro. For
1242
+ example:
1243
+
1244
+ ........................
1245
+ .Notes
1246
+ - Note 1.
1247
+ - Note 2.
1248
+ ........................
1249
+
1250
+ is rendered as:
1251
+
1252
+ .Notes
1253
+ - Note 1.
1254
+ - Note 2.
1255
+
1256
+
1257
+ [[X41]]
1258
+ BlockId Element
1259
+ ---------------
1260
+ A 'BlockId' is a single line block element containing a unique
1261
+ identifier enclosed in double square brackets. It is used to assign an
1262
+ identifier to the ensuing block element. For example:
1263
+
1264
+ [[chapter-titles]]
1265
+ Chapter titles can be ...
1266
+
1267
+ The preceding example identifies the ensuing paragraph so it can be
1268
+ referenced from other locations, for example with
1269
+ `<<chapter-titles,chapter titles>>`.
1270
+
1271
+ 'BlockId' elements can be applied to Title, Paragraph, List,
1272
+ DelimitedBlock, Table and BlockMacro elements. The BlockId element
1273
+ sets the `{id}` attribute for substitution in the subsequent block's
1274
+ markup template. If a second positional argument is supplied it sets
1275
+ the `{reftext}` attribute which is used to set the DocBook `xreflabel`
1276
+ attribute.
1277
+
1278
+ The 'BlockId' element has the same syntax and serves the same function
1279
+ to the <<X30,anchor inline macro>>.
1280
+
1281
+ [[X79]]
1282
+ AttributeList Element
1283
+ ---------------------
1284
+ An 'AttributeList' block element is an <<X21,attribute list>> on a
1285
+ line by itself:
1286
+
1287
+ - 'AttributeList' attributes are only applied to the immediately
1288
+ following block element -- the attributes are made available to the
1289
+ block's markup template.
1290
+ - Multiple contiguous 'AttributeList' elements are additively combined
1291
+ in the order they appear..
1292
+ - The first positional attribute in the list is often used to specify
1293
+ the ensuing element's <<X23,style>>.
1294
+
1295
+ Attribute value substitution
1296
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1297
+ By default, only substitutions that take place inside attribute list
1298
+ values are attribute references, this is because not all attributes
1299
+ are destined to be marked up and rendered as text (for example the
1300
+ table 'cols' attribute). To perform normal inline text substitutions
1301
+ (special characters, quotes, macros, replacements) on an attribute
1302
+ value you need to enclose it in single quotes. In the following quote
1303
+ block the second attribute value in the AttributeList is quoted to
1304
+ ensure the 'http' macro is expanded to a hyperlink.
1305
+
1306
+ ---------------------------------------------------------------------
1307
+ [quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]']
1308
+ _____________________________________________________________________
1309
+ Sir, a woman's preaching is like a dog's walking on his hind legs. It
1310
+ is not done well; but you are surprised to find it done at all.
1311
+ _____________________________________________________________________
1312
+ ---------------------------------------------------------------------
1313
+
1314
+ Common attributes
1315
+ ~~~~~~~~~~~~~~~~~
1316
+ Most block elements support the following attributes:
1317
+
1318
+ [cols="1e,1,5a",frame="topbot",options="header"]
1319
+ |====================================================================
1320
+ |Name |Backends |Description
1321
+
1322
+ |id |html4, html5, xhtml11, docbook |
1323
+ Unique identifier typically serve as link targets.
1324
+ Can also be set by the 'BlockId' element.
1325
+
1326
+ |role |html4, html5, xhtml11, docbook |
1327
+ Role contains a string used to classify or subclassify an element and
1328
+ can be applied to AsciiDoc block elements. The AsciiDoc 'role'
1329
+ attribute is translated to the 'role' attribute in DocBook outputs and
1330
+ is included in the 'class' attribute in HTML outputs, in this respect
1331
+ it behaves like the <<X96,quoted text role attribute>>.
1332
+
1333
+ DocBook XSL Stylesheets translate DocBook 'role' attributes to HTML
1334
+ 'class' attributes; CSS can then be used
1335
+ http://www.sagehill.net/docbookxsl/UsingCSS.html[to style the
1336
+ generated HTML].
1337
+
1338
+ |reftext |docbook |
1339
+ 'reftext' is used to set the DocBook 'xreflabel' attribute.
1340
+ The 'reftext' attribute can an also be set by the 'BlockId' element.
1341
+
1342
+ |====================================================================
1343
+
1344
+
1345
+ Paragraphs
1346
+ ----------
1347
+ Paragraphs are blocks of text terminated by a blank line, the end of
1348
+ file, or the start of a delimited block or a list. There are three
1349
+ paragraph syntaxes: normal, indented (literal) and admonition which
1350
+ are rendered, by default, with the corresponding paragraph style.
1351
+
1352
+ Each syntax has a default style, but you can explicitly apply any
1353
+ paragraph style to any paragraph syntax. You can also apply
1354
+ <<X104,delimited block>> styles to single paragraphs.
1355
+
1356
+ The built-in paragraph styles are: 'normal', 'literal', 'verse',
1357
+ 'quote', 'listing', 'TIP', 'NOTE', 'IMPORTANT', 'WARNING', 'CAUTION',
1358
+ 'abstract', 'partintro', 'comment', 'example', 'sidebar', 'source',
1359
+ 'music', 'latex', 'graphviz'.
1360
+
1361
+ normal paragraph syntax
1362
+ ~~~~~~~~~~~~~~~~~~~~~~~
1363
+ Normal paragraph syntax consists of one or more non-blank lines of
1364
+ text. The first line must start hard against the left margin (no
1365
+ intervening white space). The default processing expectation is that
1366
+ of a normal paragraph of text.
1367
+
1368
+ [[X85]]
1369
+ literal paragraph syntax
1370
+ ~~~~~~~~~~~~~~~~~~~~~~~~
1371
+ Literal paragraphs are rendered verbatim in a monospaced font without
1372
+ any distinguishing background or border. By default there is no text
1373
+ formatting or substitutions within Literal paragraphs apart from
1374
+ Special Characters and Callouts.
1375
+
1376
+ The 'literal' style is applied implicitly to indented paragraphs i.e.
1377
+ where the first line of the paragraph is indented by one or more space
1378
+ or tab characters. For example:
1379
+
1380
+ ---------------------------------------------------------------------
1381
+ Consul *necessitatibus* per id,
1382
+ consetetur, eu pro everti postulant
1383
+ homero verear ea mea, qui.
1384
+ ---------------------------------------------------------------------
1385
+
1386
+ Renders:
1387
+
1388
+ Consul *necessitatibus* per id,
1389
+ consetetur, eu pro everti postulant
1390
+ homero verear ea mea, qui.
1391
+
1392
+ NOTE: Because <<X64,lists>> can be indented it's possible for your
1393
+ indented paragraph to be misinterpreted as a list -- in situations
1394
+ like this apply the 'literal' style to a normal paragraph.
1395
+
1396
+ Instead of using a paragraph indent you could apply the 'literal'
1397
+ style explicitly, for example:
1398
+
1399
+ ---------------------------------------------------------------------
1400
+ [literal]
1401
+ Consul *necessitatibus* per id,
1402
+ consetetur, eu pro everti postulant
1403
+ homero verear ea mea, qui.
1404
+ ---------------------------------------------------------------------
1405
+
1406
+ Renders:
1407
+
1408
+ [literal]
1409
+ Consul *necessitatibus* per id,
1410
+ consetetur, eu pro everti postulant
1411
+ homero verear ea mea, qui.
1412
+
1413
+ [[X94]]
1414
+ quote and verse paragraph styles
1415
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1416
+ The optional 'attribution' and 'citetitle' attributes (positional
1417
+ attributes 2 and 3) specify the author and source respectively.
1418
+
1419
+ The 'verse' style retains the line breaks, for example:
1420
+
1421
+ ---------------------------------------------------------------------
1422
+ [verse, William Blake, from Auguries of Innocence]
1423
+ To see a world in a grain of sand,
1424
+ And a heaven in a wild flower,
1425
+ Hold infinity in the palm of your hand,
1426
+ And eternity in an hour.
1427
+ ---------------------------------------------------------------------
1428
+
1429
+ Which is rendered as:
1430
+
1431
+ [verse, William Blake, from Auguries of Innocence]
1432
+ To see a world in a grain of sand,
1433
+ And a heaven in a wild flower,
1434
+ Hold infinity in the palm of your hand,
1435
+ And eternity in an hour.
1436
+
1437
+ The 'quote' style flows the text at left and right margins, for
1438
+ example:
1439
+
1440
+ ---------------------------------------------------------------------
1441
+ [quote, Bertrand Russell, The World of Mathematics (1956)]
1442
+ A good notation has subtlety and suggestiveness which at times makes
1443
+ it almost seem like a live teacher.
1444
+ ---------------------------------------------------------------------
1445
+
1446
+ Which is rendered as:
1447
+
1448
+ [quote, Bertrand Russell, The World of Mathematics (1956)]
1449
+ A good notation has subtlety and suggestiveness which at times makes
1450
+ it almost seem like a live teacher.
1451
+
1452
+ [[X28]]
1453
+ Admonition Paragraphs
1454
+ ~~~~~~~~~~~~~~~~~~~~~
1455
+ 'TIP', 'NOTE', 'IMPORTANT', 'WARNING' and 'CAUTION' admonishment
1456
+ paragraph styles are generated by placing `NOTE:`, `TIP:`,
1457
+ `IMPORTANT:`, `WARNING:` or `CAUTION:` as the first word of the
1458
+ paragraph. For example:
1459
+
1460
+ NOTE: This is an example note.
1461
+
1462
+ Alternatively, you can specify the paragraph admonition style
1463
+ explicitly using an <<X79,AttributeList element>>. For example:
1464
+
1465
+ [NOTE]
1466
+ This is an example note.
1467
+
1468
+ Renders:
1469
+
1470
+ NOTE: This is an example note.
1471
+
1472
+ TIP: If your admonition requires more than a single paragraph use an
1473
+ <<X22,admonition block>> instead.
1474
+
1475
+ [[X47]]
1476
+ Admonition Icons and Captions
1477
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1478
+ NOTE: Admonition customization with `icons`, `iconsdir`, `icon` and
1479
+ `caption` attributes does not apply when generating DocBook output. If
1480
+ you are going the DocBook route then the <<X43,a2x(1)>> `--no-icons`
1481
+ and `--icons-dir` options can be used to set the appropriate XSL
1482
+ Stylesheets parameters.
1483
+
1484
+ By default the asciidoc(1) HTML backends generate text captions
1485
+ instead of admonition icon image links. To generate links to icon
1486
+ images define the <<X45,`icons`>> attribute, for example using the `-a
1487
+ icons` command-line option.
1488
+
1489
+ The <<X44,`iconsdir`>> attribute sets the location of linked icon
1490
+ images.
1491
+
1492
+ You can override the default icon image using the `icon` attribute to
1493
+ specify the path of the linked image. For example:
1494
+
1495
+ [icon="./images/icons/wink.png"]
1496
+ NOTE: What lovely war.
1497
+
1498
+ Use the `caption` attribute to customize the admonition captions (not
1499
+ applicable to `docbook` backend). The following example suppresses the
1500
+ icon image and customizes the caption of a 'NOTE' admonition
1501
+ (undefining the `icons` attribute with `icons=None` is only necessary
1502
+ if <<X45,admonition icons>> have been enabled):
1503
+
1504
+ [icons=None, caption="My Special Note"]
1505
+ NOTE: This is my special note.
1506
+
1507
+ This subsection also applies to <<X22,Admonition Blocks>>.
1508
+
1509
+
1510
+ [[X104]]
1511
+ Delimited Blocks
1512
+ ----------------
1513
+ Delimited blocks are blocks of text enveloped by leading and trailing
1514
+ delimiter lines (normally a series of four or more repeated
1515
+ characters). The behavior of Delimited Blocks is specified by entries
1516
+ in configuration file `[blockdef-*]` sections.
1517
+
1518
+ Predefined Delimited Blocks
1519
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1520
+ AsciiDoc ships with a number of predefined DelimitedBlocks (see the
1521
+ `asciidoc.conf` configuration file in the asciidoc(1) program
1522
+ directory):
1523
+
1524
+ Predefined delimited block underlines:
1525
+
1526
+ CommentBlock: //////////////////////////
1527
+ PassthroughBlock: ++++++++++++++++++++++++++
1528
+ ListingBlock: --------------------------
1529
+ LiteralBlock: ..........................
1530
+ SidebarBlock: **************************
1531
+ QuoteBlock: __________________________
1532
+ ExampleBlock: ==========================
1533
+ OpenBlock: --
1534
+
1535
+ .Default DelimitedBlock substitutions
1536
+ [cols="2e,7*^",frame="topbot",options="header,autowidth"]
1537
+ |=====================================================
1538
+ | |Attributes |Callouts |Macros | Quotes |Replacements
1539
+ |Special chars |Special words
1540
+
1541
+ |PassthroughBlock |Yes |No |Yes |No |No |No |No
1542
+ |ListingBlock |No |Yes |No |No |No |Yes |No
1543
+ |LiteralBlock |No |Yes |No |No |No |Yes |No
1544
+ |SidebarBlock |Yes |No |Yes |Yes |Yes |Yes |Yes
1545
+ |QuoteBlock |Yes |No |Yes |Yes |Yes |Yes |Yes
1546
+ |ExampleBlock |Yes |No |Yes |Yes |Yes |Yes |Yes
1547
+ |OpenBlock |Yes |No |Yes |Yes |Yes |Yes |Yes
1548
+ |=====================================================
1549
+
1550
+ Listing Blocks
1551
+ ~~~~~~~~~~~~~~
1552
+ 'ListingBlocks' are rendered verbatim in a monospaced font, they
1553
+ retain line and whitespace formatting and are often distinguished by a
1554
+ background or border. There is no text formatting or substitutions
1555
+ within Listing blocks apart from Special Characters and Callouts.
1556
+ Listing blocks are often used for computer output and file listings.
1557
+
1558
+ Here's an example:
1559
+
1560
+ [listing]
1561
+ ......................................
1562
+ --------------------------------------
1563
+ #include <stdio.h>
1564
+
1565
+ int main() {
1566
+ printf("Hello World!\n");
1567
+ exit(0);
1568
+ }
1569
+ --------------------------------------
1570
+ ......................................
1571
+
1572
+ Which will be rendered like:
1573
+
1574
+ --------------------------------------
1575
+ #include <stdio.h>
1576
+
1577
+ int main() {
1578
+ printf("Hello World!\n");
1579
+ exit(0);
1580
+ }
1581
+ --------------------------------------
1582
+
1583
+ By convention <<X59,filter blocks>> use the listing block syntax and
1584
+ are implemented as distinct listing block styles.
1585
+
1586
+ [[X65]]
1587
+ Literal Blocks
1588
+ ~~~~~~~~~~~~~~
1589
+ 'LiteralBlocks' are rendered just like <<X85,literal paragraphs>>.
1590
+ Example:
1591
+
1592
+ ---------------------------------------------------------------------
1593
+ ...................................
1594
+ Consul *necessitatibus* per id,
1595
+ consetetur, eu pro everti postulant
1596
+ homero verear ea mea, qui.
1597
+ ...................................
1598
+ ---------------------------------------------------------------------
1599
+
1600
+ Renders:
1601
+ ...................................
1602
+ Consul *necessitatibus* per id,
1603
+ consetetur, eu pro everti postulant
1604
+ homero verear ea mea, qui.
1605
+ ...................................
1606
+
1607
+ If the 'listing' style is applied to a LiteralBlock it will be
1608
+ rendered as a ListingBlock (this is handy if you have a listing
1609
+ containing a ListingBlock).
1610
+
1611
+ Sidebar Blocks
1612
+ ~~~~~~~~~~~~~~
1613
+ A sidebar is a short piece of text presented outside the narrative
1614
+ flow of the main text. The sidebar is normally presented inside a
1615
+ bordered box to set it apart from the main text.
1616
+
1617
+ The sidebar body is treated like a normal section body.
1618
+
1619
+ Here's an example:
1620
+
1621
+ ---------------------------------------------------------------------
1622
+ .An Example Sidebar
1623
+ ************************************************
1624
+ Any AsciiDoc SectionBody element (apart from
1625
+ SidebarBlocks) can be placed inside a sidebar.
1626
+ ************************************************
1627
+ ---------------------------------------------------------------------
1628
+
1629
+ Which will be rendered like:
1630
+
1631
+ .An Example Sidebar
1632
+ ************************************************
1633
+ Any AsciiDoc SectionBody element (apart from
1634
+ SidebarBlocks) can be placed inside a sidebar.
1635
+ ************************************************
1636
+
1637
+ [[X26]]
1638
+ Comment Blocks
1639
+ ~~~~~~~~~~~~~~
1640
+ The contents of 'CommentBlocks' are not processed; they are useful for
1641
+ annotations and for excluding new or outdated content that you don't
1642
+ want displayed. CommentBlocks are never written to output files.
1643
+ Example:
1644
+
1645
+ ---------------------------------------------------------------------
1646
+ //////////////////////////////////////////
1647
+ CommentBlock contents are not processed by
1648
+ asciidoc(1).
1649
+ //////////////////////////////////////////
1650
+ ---------------------------------------------------------------------
1651
+
1652
+ See also <<X25,Comment Lines>>.
1653
+
1654
+ NOTE: System macros are executed inside comment blocks.
1655
+
1656
+ [[X76]]
1657
+ Passthrough Blocks
1658
+ ~~~~~~~~~~~~~~~~~~
1659
+ By default the block contents is subject only to 'attributes' and
1660
+ 'macros' substitutions (use an explicit 'subs' attribute to apply
1661
+ different substitutions). PassthroughBlock content will often be
1662
+ backend specific. Here's an example:
1663
+
1664
+ ---------------------------------------------------------------------
1665
+ [subs="quotes"]
1666
+ ++++++++++++++++++++++++++++++++++++++
1667
+ <table border="1"><tr>
1668
+ <td>*Cell 1*</td>
1669
+ <td>*Cell 2*</td>
1670
+ </tr></table>
1671
+ ++++++++++++++++++++++++++++++++++++++
1672
+ ---------------------------------------------------------------------
1673
+
1674
+ The following styles can be applied to passthrough blocks:
1675
+
1676
+ pass::
1677
+ No substitutions are performed. This is equivalent to `subs="none"`.
1678
+
1679
+ asciimath, latexmath::
1680
+ By default no substitutions are performed, the contents are rendered
1681
+ as <<X78,mathematical formulas>>.
1682
+
1683
+ Quote Blocks
1684
+ ~~~~~~~~~~~~
1685
+ 'QuoteBlocks' are used for quoted passages of text. There are two
1686
+ styles: 'quote' and 'verse'. The style behavior is identical to
1687
+ <<X94,quote and verse paragraphs>> except that blocks can contain
1688
+ multiple paragraphs and, in the case of the 'quote' style, other
1689
+ section elements. The first positional attribute sets the style, if
1690
+ no attributes are specified the 'quote' style is used. The optional
1691
+ 'attribution' and 'citetitle' attributes (positional attributes 2 and
1692
+ 3) specify the quote's author and source. For example:
1693
+
1694
+ ---------------------------------------------------------------------
1695
+ [quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes]
1696
+ ____________________________________________________________________
1697
+ As he spoke there was the sharp sound of horses' hoofs and
1698
+ grating wheels against the curb, followed by a sharp pull at the
1699
+ bell. Holmes whistled.
1700
+
1701
+ "A pair, by the sound," said he. "Yes," he continued, glancing
1702
+ out of the window. "A nice little brougham and a pair of
1703
+ beauties. A hundred and fifty guineas apiece. There's money in
1704
+ this case, Watson, if there is nothing else."
1705
+ ____________________________________________________________________
1706
+ ---------------------------------------------------------------------
1707
+
1708
+ Which is rendered as:
1709
+
1710
+ [quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes]
1711
+ ____________________________________________________________________
1712
+ As he spoke there was the sharp sound of horses' hoofs and
1713
+ grating wheels against the curb, followed by a sharp pull at the
1714
+ bell. Holmes whistled.
1715
+
1716
+ "A pair, by the sound," said he. "Yes," he continued, glancing
1717
+ out of the window. "A nice little brougham and a pair of
1718
+ beauties. A hundred and fifty guineas apiece. There's money in
1719
+ this case, Watson, if there is nothing else."
1720
+ ____________________________________________________________________
1721
+
1722
+ [[X48]]
1723
+ Example Blocks
1724
+ ~~~~~~~~~~~~~~
1725
+ 'ExampleBlocks' encapsulate the DocBook Example element and are used
1726
+ for, well, examples. Example blocks can be titled by preceding them
1727
+ with a 'BlockTitle'. DocBook toolchains will normally automatically
1728
+ number examples and generate a 'List of Examples' backmatter section.
1729
+
1730
+ Example blocks are delimited by lines of equals characters and can
1731
+ contain any block elements apart from Titles, BlockTitles and
1732
+ Sidebars) inside an example block. For example:
1733
+
1734
+ ---------------------------------------------------------------------
1735
+ .An example
1736
+ =====================================================================
1737
+ Qui in magna commodo, est labitur dolorum an. Est ne magna primis
1738
+ adolescens.
1739
+ =====================================================================
1740
+ ---------------------------------------------------------------------
1741
+
1742
+ Renders:
1743
+
1744
+ .An example
1745
+ =====================================================================
1746
+ Qui in magna commodo, est labitur dolorum an. Est ne magna primis
1747
+ adolescens.
1748
+ =====================================================================
1749
+
1750
+ A title prefix that can be inserted with the `caption` attribute
1751
+ (HTML backends). For example:
1752
+
1753
+ ---------------------------------------------------------------------
1754
+ [caption="Example 1: "]
1755
+ .An example with a custom caption
1756
+ =====================================================================
1757
+ Qui in magna commodo, est labitur dolorum an. Est ne magna primis
1758
+ adolescens.
1759
+ =====================================================================
1760
+ ---------------------------------------------------------------------
1761
+
1762
+ [[X22]]
1763
+ Admonition Blocks
1764
+ ~~~~~~~~~~~~~~~~~
1765
+ The 'ExampleBlock' definition includes a set of admonition
1766
+ <<X23,styles>> ('NOTE', 'TIP', 'IMPORTANT', 'WARNING', 'CAUTION') for
1767
+ generating admonition blocks (admonitions containing more than a
1768
+ <<X28,single paragraph>>). Just precede the 'ExampleBlock' with an
1769
+ attribute list specifying the admonition style name. For example:
1770
+
1771
+ ---------------------------------------------------------------------
1772
+ [NOTE]
1773
+ .A NOTE admonition block
1774
+ =====================================================================
1775
+ Qui in magna commodo, est labitur dolorum an. Est ne magna primis
1776
+ adolescens.
1777
+
1778
+ . Fusce euismod commodo velit.
1779
+ . Vivamus fringilla mi eu lacus.
1780
+ .. Fusce euismod commodo velit.
1781
+ .. Vivamus fringilla mi eu lacus.
1782
+ . Donec eget arcu bibendum
1783
+ nunc consequat lobortis.
1784
+ =====================================================================
1785
+ ---------------------------------------------------------------------
1786
+
1787
+ Renders:
1788
+
1789
+ [NOTE]
1790
+ .A NOTE admonition block
1791
+ =====================================================================
1792
+ Qui in magna commodo, est labitur dolorum an. Est ne magna primis
1793
+ adolescens.
1794
+
1795
+ . Fusce euismod commodo velit.
1796
+ . Vivamus fringilla mi eu lacus.
1797
+ .. Fusce euismod commodo velit.
1798
+ .. Vivamus fringilla mi eu lacus.
1799
+ . Donec eget arcu bibendum
1800
+ nunc consequat lobortis.
1801
+ =====================================================================
1802
+
1803
+ See also <<X47,Admonition Icons and Captions>>.
1804
+
1805
+ [[X29]]
1806
+ Open Blocks
1807
+ ~~~~~~~~~~~
1808
+ Open blocks are special:
1809
+
1810
+ - The open block delimiter is line containing two hyphen characters
1811
+ (instead of four or more repeated characters).
1812
+
1813
+ - They can be used to group block elements for <<X15,List item
1814
+ continuation>>.
1815
+
1816
+ - Open blocks can be styled to behave like any other type of delimited
1817
+ block. The following built-in styles can be applied to open
1818
+ blocks: 'literal', 'verse', 'quote', 'listing', 'TIP', 'NOTE',
1819
+ 'IMPORTANT', 'WARNING', 'CAUTION', 'abstract', 'partintro',
1820
+ 'comment', 'example', 'sidebar', 'source', 'music', 'latex',
1821
+ 'graphviz'. For example, the following open block and listing block
1822
+ are functionally identical:
1823
+
1824
+ [listing]
1825
+ --
1826
+ Lorum ipsum ...
1827
+ --
1828
+
1829
+ ---------------
1830
+ Lorum ipsum ...
1831
+ ---------------
1832
+
1833
+ - An unstyled open block groups section elements but otherwise does
1834
+ nothing.
1835
+
1836
+ Open blocks are used to generate document abstracts and book part
1837
+ introductions:
1838
+
1839
+ - Apply the 'abstract' style to generate an abstract, for example:
1840
+
1841
+ [abstract]
1842
+ --
1843
+ In this paper we will ...
1844
+ --
1845
+
1846
+ . Apply the 'partintro' style to generate a book part introduction for
1847
+ a multi-part book, for example:
1848
+
1849
+ [partintro]
1850
+ .Optional part introduction title
1851
+ --
1852
+ Optional part introduction goes here.
1853
+ --
1854
+
1855
+
1856
+ [[X64]]
1857
+ Lists
1858
+ -----
1859
+ .List types
1860
+ - Bulleted lists. Also known as itemized or unordered lists.
1861
+ - Numbered lists. Also called ordered lists.
1862
+ - Labeled lists. Sometimes called variable or definition lists.
1863
+ - Callout lists (a list of callout annotations).
1864
+
1865
+ .List behavior
1866
+ - List item indentation is optional and does not determine nesting,
1867
+ indentation does however make the source more readable.
1868
+ - Another list or a literal paragraph immediately following a list
1869
+ item will be implicitly included in the list item; use <<X15, list
1870
+ item continuation>> to explicitly append other block elements to a
1871
+ list item.
1872
+ - A comment block or a comment line block macro element will terminate
1873
+ a list -- use inline comment lines to put comments inside lists.
1874
+ - The `listindex` <<X60,intrinsic attribute>> is the current list item
1875
+ index (1..). If this attribute is used outside a list then it's value
1876
+ is the number of items in the most recently closed list. Useful for
1877
+ displaying the number of items in a list.
1878
+
1879
+ Bulleted Lists
1880
+ ~~~~~~~~~~~~~~
1881
+ Bulleted list items start with a single dash or one to five asterisks
1882
+ followed by some white space then some text. Bulleted list syntaxes
1883
+ are:
1884
+
1885
+ ...................
1886
+ - List item.
1887
+ * List item.
1888
+ ** List item.
1889
+ *** List item.
1890
+ **** List item.
1891
+ ***** List item.
1892
+ ...................
1893
+
1894
+ Numbered Lists
1895
+ ~~~~~~~~~~~~~~
1896
+ List item numbers are explicit or implicit.
1897
+
1898
+ .Explicit numbering
1899
+ List items begin with a number followed by some white space then the
1900
+ item text. The numbers can be decimal (arabic), roman (upper or lower
1901
+ case) or alpha (upper or lower case). Decimal and alpha numbers are
1902
+ terminated with a period, roman numbers are terminated with a closing
1903
+ parenthesis. The different terminators are necessary to ensure 'i',
1904
+ 'v' and 'x' roman numbers are are distinguishable from 'x', 'v' and
1905
+ 'x' alpha numbers. Examples:
1906
+
1907
+ .....................................................................
1908
+ 1. Arabic (decimal) numbered list item.
1909
+ a. Lower case alpha (letter) numbered list item.
1910
+ F. Upper case alpha (letter) numbered list item.
1911
+ iii) Lower case roman numbered list item.
1912
+ IX) Upper case roman numbered list item.
1913
+ .....................................................................
1914
+
1915
+ .Implicit numbering
1916
+ List items begin one to five period characters, followed by some white
1917
+ space then the item text. Examples:
1918
+
1919
+ .....................................................................
1920
+ . Arabic (decimal) numbered list item.
1921
+ .. Lower case alpha (letter) numbered list item.
1922
+ ... Lower case roman numbered list item.
1923
+ .... Upper case alpha (letter) numbered list item.
1924
+ ..... Upper case roman numbered list item.
1925
+ .....................................................................
1926
+
1927
+ You can use the 'style' attribute (also the first positional
1928
+ attribute) to specify an alternative numbering style. The numbered
1929
+ list style can be one of the following values: 'arabic', 'loweralpha',
1930
+ 'upperalpha', 'lowerroman', 'upperroman'.
1931
+
1932
+ Here are some examples of bulleted and numbered lists:
1933
+
1934
+ ---------------------------------------------------------------------
1935
+ - Praesent eget purus quis magna eleifend eleifend.
1936
+ 1. Fusce euismod commodo velit.
1937
+ a. Fusce euismod commodo velit.
1938
+ b. Vivamus fringilla mi eu lacus.
1939
+ c. Donec eget arcu bibendum nunc consequat lobortis.
1940
+ 2. Vivamus fringilla mi eu lacus.
1941
+ i) Fusce euismod commodo velit.
1942
+ ii) Vivamus fringilla mi eu lacus.
1943
+ 3. Donec eget arcu bibendum nunc consequat lobortis.
1944
+ 4. Nam fermentum mattis ante.
1945
+ - Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
1946
+ * Fusce euismod commodo velit.
1947
+ ** Qui in magna commodo, est labitur dolorum an. Est ne magna primis
1948
+ adolescens. Sit munere ponderum dignissim et. Minim luptatum et
1949
+ vel.
1950
+ ** Vivamus fringilla mi eu lacus.
1951
+ * Donec eget arcu bibendum nunc consequat lobortis.
1952
+ - Nulla porttitor vulputate libero.
1953
+ . Fusce euismod commodo velit.
1954
+ . Vivamus fringilla mi eu lacus.
1955
+ [upperroman]
1956
+ .. Fusce euismod commodo velit.
1957
+ .. Vivamus fringilla mi eu lacus.
1958
+ . Donec eget arcu bibendum nunc consequat lobortis.
1959
+ ---------------------------------------------------------------------
1960
+
1961
+ Which render as:
1962
+
1963
+ - Praesent eget purus quis magna eleifend eleifend.
1964
+ 1. Fusce euismod commodo velit.
1965
+ a. Fusce euismod commodo velit.
1966
+ b. Vivamus fringilla mi eu lacus.
1967
+ c. Donec eget arcu bibendum nunc consequat lobortis.
1968
+ 2. Vivamus fringilla mi eu lacus.
1969
+ i) Fusce euismod commodo velit.
1970
+ ii) Vivamus fringilla mi eu lacus.
1971
+ 3. Donec eget arcu bibendum nunc consequat lobortis.
1972
+ 4. Nam fermentum mattis ante.
1973
+ - Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
1974
+ * Fusce euismod commodo velit.
1975
+ ** Qui in magna commodo, est labitur dolorum an. Est ne magna primis
1976
+ adolescens. Sit munere ponderum dignissim et. Minim luptatum et
1977
+ vel.
1978
+ ** Vivamus fringilla mi eu lacus.
1979
+ * Donec eget arcu bibendum nunc consequat lobortis.
1980
+ - Nulla porttitor vulputate libero.
1981
+ . Fusce euismod commodo velit.
1982
+ . Vivamus fringilla mi eu lacus.
1983
+ [upperroman]
1984
+ .. Fusce euismod commodo velit.
1985
+ .. Vivamus fringilla mi eu lacus.
1986
+ . Donec eget arcu bibendum nunc consequat lobortis.
1987
+
1988
+ A predefined 'compact' option is available to bulleted and numbered
1989
+ lists -- this translates to the DocBook 'spacing="compact"' lists
1990
+ attribute which may or may not be processed by the DocBook toolchain.
1991
+ Example:
1992
+
1993
+ [options="compact"]
1994
+ - Compact list item.
1995
+ - Another compact list item.
1996
+
1997
+ TIP: To apply the 'compact' option globally define a document-wide
1998
+ 'compact-option' attribute, e.g. using the `-a compact-option`
1999
+ command-line option.
2000
+
2001
+ You can set the list start number using the 'start' attribute (works
2002
+ for HTML outputs and DocBook outputs processed by DocBook XSL
2003
+ Stylesheets). Example:
2004
+
2005
+ [start=7]
2006
+ . List item 7.
2007
+ . List item 8.
2008
+
2009
+ Labeled Lists
2010
+ ~~~~~~~~~~~~~
2011
+ Labeled list items consist of one or more text labels followed by the
2012
+ text of the list item.
2013
+
2014
+ An item label begins a line with an alphanumeric character hard
2015
+ against the left margin and ends with two, three or four colons or two
2016
+ semi-colons. A list item can have multiple labels, one per line.
2017
+
2018
+ The list item text consists of one or more lines of text starting
2019
+ after the last label (either on the same line or a new line) and can
2020
+ be followed by nested List or ListParagraph elements. Item text can be
2021
+ optionally indented.
2022
+
2023
+ Here are some examples:
2024
+
2025
+ ---------------------------------------------------------------------
2026
+ In::
2027
+ Lorem::
2028
+ Fusce euismod commodo velit.
2029
+
2030
+ Fusce euismod commodo velit.
2031
+
2032
+ Ipsum:: Vivamus fringilla mi eu lacus.
2033
+ * Vivamus fringilla mi eu lacus.
2034
+ * Donec eget arcu bibendum nunc consequat lobortis.
2035
+ Dolor::
2036
+ Donec eget arcu bibendum nunc consequat lobortis.
2037
+ Suspendisse;;
2038
+ A massa id sem aliquam auctor.
2039
+ Morbi;;
2040
+ Pretium nulla vel lorem.
2041
+ In;;
2042
+ Dictum mauris in urna.
2043
+ Vivamus::: Fringilla mi eu lacus.
2044
+ Donec::: Eget arcu bibendum nunc consequat lobortis.
2045
+ ---------------------------------------------------------------------
2046
+
2047
+ Which render as:
2048
+
2049
+ In::
2050
+ Lorem::
2051
+ Fusce euismod commodo velit.
2052
+
2053
+ Fusce euismod commodo velit.
2054
+
2055
+ Ipsum:: Vivamus fringilla mi eu lacus.
2056
+ * Vivamus fringilla mi eu lacus.
2057
+ * Donec eget arcu bibendum nunc consequat lobortis.
2058
+ Dolor::
2059
+ Donec eget arcu bibendum nunc consequat lobortis.
2060
+ Suspendisse;;
2061
+ A massa id sem aliquam auctor.
2062
+ Morbi;;
2063
+ Pretium nulla vel lorem.
2064
+ In;;
2065
+ Dictum mauris in urna.
2066
+ Vivamus::: Fringilla mi eu lacus.
2067
+ Donec::: Eget arcu bibendum nunc consequat lobortis.
2068
+
2069
+ Horizontal labeled list style
2070
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2071
+ The 'horizontal' labeled list style (also the first positional
2072
+ attribute) places the list text side-by-side with the label instead of
2073
+ under the label. Here is an example:
2074
+
2075
+ ---------------------------------------------------------------------
2076
+ [horizontal]
2077
+ *Lorem*:: Fusce euismod commodo velit. Qui in magna commodo, est
2078
+ labitur dolorum an. Est ne magna primis adolescens.
2079
+
2080
+ Fusce euismod commodo velit.
2081
+
2082
+ *Ipsum*:: Vivamus fringilla mi eu lacus.
2083
+ - Vivamus fringilla mi eu lacus.
2084
+ - Donec eget arcu bibendum nunc consequat lobortis.
2085
+
2086
+ *Dolor*::
2087
+ - Vivamus fringilla mi eu lacus.
2088
+ - Donec eget arcu bibendum nunc consequat lobortis.
2089
+
2090
+ ---------------------------------------------------------------------
2091
+
2092
+ Which render as:
2093
+
2094
+ [horizontal]
2095
+ *Lorem*:: Fusce euismod commodo velit. Qui in magna commodo, est
2096
+ labitur dolorum an. Est ne magna primis adolescens.
2097
+
2098
+ Fusce euismod commodo velit.
2099
+
2100
+ *Ipsum*:: Vivamus fringilla mi eu lacus.
2101
+ - Vivamus fringilla mi eu lacus.
2102
+ - Donec eget arcu bibendum nunc consequat lobortis.
2103
+
2104
+ *Dolor*::
2105
+ - Vivamus fringilla mi eu lacus.
2106
+ - Donec eget arcu bibendum nunc consequat lobortis.
2107
+
2108
+ [NOTE]
2109
+ =====================================================================
2110
+ - Current PDF toolchains do not make a good job of determining
2111
+ the relative column widths for horizontal labeled lists.
2112
+ - Nested horizontal labeled lists will generate DocBook validation
2113
+ errors because the 'DocBook XML V4.2' DTD does not permit nested
2114
+ informal tables (although <<X13,DocBook XSL Stylesheets>> and
2115
+ <<X31,dblatex>> process them correctly).
2116
+ - The label width can be set as a percentage of the total width by
2117
+ setting the 'width' attribute e.g. `width="10%"`
2118
+ =====================================================================
2119
+
2120
+ Question and Answer Lists
2121
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
2122
+ AsciiDoc comes pre-configured with a 'qanda' style labeled list for generating
2123
+ DocBook question and answer (Q&A) lists. Example:
2124
+
2125
+ ---------------------------------------------------------------------
2126
+ [qanda]
2127
+ Question one::
2128
+ Answer one.
2129
+ Question two::
2130
+ Answer two.
2131
+ ---------------------------------------------------------------------
2132
+
2133
+ Renders:
2134
+
2135
+ [qanda]
2136
+ Question one::
2137
+ Answer one.
2138
+ Question two::
2139
+ Answer two.
2140
+
2141
+ Glossary Lists
2142
+ ~~~~~~~~~~~~~~
2143
+ AsciiDoc comes pre-configured with a 'glossary' style labeled list for
2144
+ generating DocBook glossary lists. Example:
2145
+
2146
+ ---------------------------------------------------------------------
2147
+ [glossary]
2148
+ A glossary term::
2149
+ The corresponding definition.
2150
+ A second glossary term::
2151
+ The corresponding definition.
2152
+ ---------------------------------------------------------------------
2153
+
2154
+ For working examples see the `article.txt` and `book.txt` documents in
2155
+ the AsciiDoc `./doc` distribution directory.
2156
+
2157
+ NOTE: To generate valid DocBook output glossary lists must be located
2158
+ in a section that uses the 'glossary' <<X93,section markup template>>.
2159
+
2160
+ Bibliography Lists
2161
+ ~~~~~~~~~~~~~~~~~~
2162
+ AsciiDoc comes with a predefined 'bibliography' bulleted list style
2163
+ generating DocBook bibliography entries. Example:
2164
+
2165
+ ---------------------------------------------------------------------
2166
+ [bibliography]
2167
+ .Optional list title
2168
+ - [[[taoup]]] Eric Steven Raymond. 'The Art of UNIX
2169
+ Programming'. Addison-Wesley. ISBN 0-13-142901-9.
2170
+ - [[[walsh-muellner]]] Norman Walsh & Leonard Muellner.
2171
+ 'DocBook - The Definitive Guide'. O'Reilly & Associates.
2172
+ 1999. ISBN 1-56592-580-7.
2173
+ ---------------------------------------------------------------------
2174
+
2175
+ The `[[[<reference>]]]` syntax is a bibliography entry anchor, it
2176
+ generates an anchor named `<reference>` and additionally displays
2177
+ `[<reference>]` at the anchor position. For example `[[[taoup]]]`
2178
+ generates an anchor named `taoup` that displays `[taoup]` at the
2179
+ anchor position. Cite the reference from elsewhere your document using
2180
+ `<<taoup>>`, this displays a hyperlink (`[taoup]`) to the
2181
+ corresponding bibliography entry anchor.
2182
+
2183
+ For working examples see the `article.txt` and `book.txt` documents in
2184
+ the AsciiDoc `./doc` distribution directory.
2185
+
2186
+ NOTE: To generate valid DocBook output bibliography lists must be
2187
+ located in a <<X93,bibliography section>>.
2188
+
2189
+ [[X15]]
2190
+ List Item Continuation
2191
+ ~~~~~~~~~~~~~~~~~~~~~~
2192
+ Another list or a literal paragraph immediately following a list item
2193
+ is implicitly appended to the list item; to append other block
2194
+ elements to a list item you need to explicitly join them to the list
2195
+ item with a 'list continuation' (a separator line containing a single
2196
+ plus character). Multiple block elements can be appended to a list
2197
+ item using list continuations (provided they are legal list item
2198
+ children in the backend markup).
2199
+
2200
+ Here are some examples of list item continuations: list item one
2201
+ contains multiple continuations; list item two is continued with an
2202
+ <<X29,OpenBlock>> containing multiple elements:
2203
+
2204
+ ---------------------------------------------------------------------
2205
+ 1. List item one.
2206
+ +
2207
+ List item one continued with a second paragraph followed by an
2208
+ Indented block.
2209
+ +
2210
+ .................
2211
+ $ ls *.sh
2212
+ $ mv *.sh ~/tmp
2213
+ .................
2214
+ +
2215
+ List item continued with a third paragraph.
2216
+
2217
+ 2. List item two continued with an open block.
2218
+ +
2219
+ --
2220
+ This paragraph is part of the preceding list item.
2221
+
2222
+ a. This list is nested and does not require explicit item continuation.
2223
+ +
2224
+ This paragraph is part of the preceding list item.
2225
+
2226
+ b. List item b.
2227
+
2228
+ This paragraph belongs to item two of the outer list.
2229
+ --
2230
+ ---------------------------------------------------------------------
2231
+
2232
+ Renders:
2233
+
2234
+ 1. List item one.
2235
+ +
2236
+ List item one continued with a second paragraph followed by an
2237
+ Indented block.
2238
+ +
2239
+ .................
2240
+ $ ls *.sh
2241
+ $ mv *.sh ~/tmp
2242
+ .................
2243
+ +
2244
+ List item continued with a third paragraph.
2245
+
2246
+ 2. List item two continued with an open block.
2247
+ +
2248
+ --
2249
+ This paragraph is part of the preceding list item.
2250
+
2251
+ a. This list is nested and does not require explicit item continuation.
2252
+ +
2253
+ This paragraph is part of the preceding list item.
2254
+
2255
+ b. List item b.
2256
+
2257
+ This paragraph belongs to item two of the outer list.
2258
+ --
2259
+
2260
+
2261
+ [[X92]]
2262
+ Footnotes
2263
+ ---------
2264
+ The shipped AsciiDoc configuration includes three footnote inline
2265
+ macros:
2266
+
2267
+ `footnote:[<text>]`::
2268
+ Generates a footnote with text `<text>`.
2269
+
2270
+ `footnoteref:[<id>,<text>]`::
2271
+ Generates a footnote with a reference ID `<id>` and text `<text>`.
2272
+
2273
+ `footnoteref:[<id>]`::
2274
+ Generates a reference to the footnote with ID `<id>`.
2275
+
2276
+ The footnote text can span multiple lines.
2277
+
2278
+ The 'xhtml11' and 'html5' backends render footnotes dynamically using
2279
+ JavaScript; 'html4' outputs do not use JavaScript and leave the
2280
+ footnotes inline; 'docbook' footnotes are processed by the downstream
2281
+ DocBook toolchain.
2282
+
2283
+ Example footnotes:
2284
+
2285
+ A footnote footnote:[An example footnote.];
2286
+ a second footnote with a reference ID footnoteref:[note2,Second footnote.];
2287
+ finally a reference to the second footnote footnoteref:[note2].
2288
+
2289
+ Renders:
2290
+
2291
+ A footnote footnote:[An example footnote.];
2292
+ a second footnote with a reference ID footnoteref:[note2,Second footnote.];
2293
+ finally a reference to the second footnote footnoteref:[note2].
2294
+
2295
+
2296
+ Indexes
2297
+ -------
2298
+ The shipped AsciiDoc configuration includes the inline macros for
2299
+ generating DocBook index entries.
2300
+
2301
+ `indexterm:[<primary>,<secondary>,<tertiary>]`::
2302
+ `(((<primary>,<secondary>,<tertiary>)))`::
2303
+ This inline macro generates an index term (the `<secondary>` and
2304
+ `<tertiary>` positional attributes are optional). Example:
2305
+ `indexterm:[Tigers,Big cats]` (or, using the alternative syntax
2306
+ `(((Tigers,Big cats)))`. Index terms that have secondary and
2307
+ tertiary entries also generate separate index terms for the
2308
+ secondary and tertiary entries. The index terms appear in the
2309
+ index, not the primary text flow.
2310
+
2311
+ `indexterm2:[<primary>]`::
2312
+ `((<primary>))`::
2313
+ This inline macro generates an index term that appears in both the
2314
+ index and the primary text flow. The `<primary>` should not be
2315
+ padded to the left or right with white space characters.
2316
+
2317
+ For working examples see the `article.txt` and `book.txt` documents in
2318
+ the AsciiDoc `./doc` distribution directory.
2319
+
2320
+ NOTE: Index entries only really make sense if you are generating
2321
+ DocBook markup -- DocBook conversion programs automatically generate
2322
+ an index at the point an 'Index' section appears in source document.
2323
+
2324
+
2325
+ [[X105]]
2326
+ Callouts
2327
+ --------
2328
+ Callouts are a mechanism for annotating verbatim text (for example:
2329
+ source code, computer output and user input). Callout markers are
2330
+ placed inside the annotated text while the actual annotations are
2331
+ presented in a callout list after the annotated text. Here's an
2332
+ example:
2333
+
2334
+ ---------------------------------------------------------------------
2335
+ .MS-DOS directory listing
2336
+ -----------------------------------------------------
2337
+ 10/17/97 9:04 <DIR> bin
2338
+ 10/16/97 14:11 <DIR> DOS \<1>
2339
+ 10/16/97 14:40 <DIR> Program Files
2340
+ 10/16/97 14:46 <DIR> TEMP
2341
+ 10/17/97 9:04 <DIR> tmp
2342
+ 10/16/97 14:37 <DIR> WINNT
2343
+ 10/16/97 14:25 119 AUTOEXEC.BAT \<2>
2344
+ 2/13/94 6:21 54,619 COMMAND.COM \<2>
2345
+ 10/16/97 14:25 115 CONFIG.SYS \<2>
2346
+ 11/16/97 17:17 61,865,984 pagefile.sys
2347
+ 2/13/94 6:21 9,349 WINA20.386 \<3>
2348
+ -----------------------------------------------------
2349
+
2350
+ \<1> This directory holds MS-DOS.
2351
+ \<2> System startup code for DOS.
2352
+ \<3> Some sort of Windows 3.1 hack.
2353
+ ---------------------------------------------------------------------
2354
+
2355
+ Which renders:
2356
+
2357
+ .MS-DOS directory listing
2358
+ -----------------------------------------------------
2359
+ 10/17/97 9:04 <DIR> bin
2360
+ 10/16/97 14:11 <DIR> DOS <1>
2361
+ 10/16/97 14:40 <DIR> Program Files
2362
+ 10/16/97 14:46 <DIR> TEMP
2363
+ 10/17/97 9:04 <DIR> tmp
2364
+ 10/16/97 14:37 <DIR> WINNT
2365
+ 10/16/97 14:25 119 AUTOEXEC.BAT <2>
2366
+ 2/13/94 6:21 54,619 COMMAND.COM <2>
2367
+ 10/16/97 14:25 115 CONFIG.SYS <2>
2368
+ 11/16/97 17:17 61,865,984 pagefile.sys
2369
+ 2/13/94 6:21 9,349 WINA20.386 <3>
2370
+ -----------------------------------------------------
2371
+
2372
+ <1> This directory holds MS-DOS.
2373
+ <2> System startup code for DOS.
2374
+ <3> Some sort of Windows 3.1 hack.
2375
+
2376
+ .Explanation
2377
+ - The callout marks are whole numbers enclosed in angle brackets --
2378
+ they refer to the correspondingly numbered item in the following
2379
+ callout list.
2380
+ - By default callout marks are confined to 'LiteralParagraphs',
2381
+ 'LiteralBlocks' and 'ListingBlocks' (although this is a
2382
+ configuration file option and can be changed).
2383
+ - Callout list item numbering is fairly relaxed -- list items can
2384
+ start with `<n>`, `n>` or `>` where `n` is the optional list item
2385
+ number (in the latter case list items starting with a single `>`
2386
+ character are implicitly numbered starting at one).
2387
+ - Callout lists should not be nested.
2388
+ - Callout lists start list items hard against the left margin.
2389
+ - If you want to present a number inside angle brackets you'll need to
2390
+ escape it with a backslash to prevent it being interpreted as a
2391
+ callout mark.
2392
+
2393
+ NOTE: Define the AsciiDoc 'icons' attribute (for example using the `-a
2394
+ icons` command-line option) to display callout icons.
2395
+
2396
+ Implementation Notes
2397
+ ~~~~~~~~~~~~~~~~~~~~
2398
+ Callout marks are generated by the 'callout' inline macro while
2399
+ callout lists are generated using the 'callout' list definition. The
2400
+ 'callout' macro and 'callout' list are special in that they work
2401
+ together. The 'callout' inline macro is not enabled by the normal
2402
+ 'macros' substitutions option, instead it has its own 'callouts'
2403
+ substitution option.
2404
+
2405
+ The following attributes are available during inline callout macro
2406
+ substitution:
2407
+
2408
+ `{index}`::
2409
+ The callout list item index inside the angle brackets.
2410
+ `{coid}`::
2411
+ An identifier formatted like `CO<listnumber>-<index>` that
2412
+ uniquely identifies the callout mark. For example `CO2-4`
2413
+ identifies the fourth callout mark in the second set of callout
2414
+ marks.
2415
+
2416
+ The `{coids}` attribute can be used during callout list item
2417
+ substitution -- it is a space delimited list of callout IDs that refer
2418
+ to the explanatory list item.
2419
+
2420
+ Including callouts in included code
2421
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2422
+ You can annotate working code examples with callouts -- just remember
2423
+ to put the callouts inside source code comments. This example displays
2424
+ the `test.py` source file (containing a single callout) using the
2425
+ 'source' (code highlighter) filter:
2426
+
2427
+ .AsciiDoc source
2428
+ ---------------------------------------------------------------------
2429
+ [source,python]
2430
+ -------------------------------------------
2431
+ \include::test.py[]
2432
+ -------------------------------------------
2433
+
2434
+ \<1> Print statement.
2435
+ ---------------------------------------------------------------------
2436
+
2437
+ .Included `test.py` source
2438
+ ---------------------------------------------------------------------
2439
+ print 'Hello World!' # \<1>
2440
+ ---------------------------------------------------------------------
2441
+
2442
+
2443
+ Macros
2444
+ ------
2445
+ Macros are a mechanism for substituting parametrized text into output
2446
+ documents.
2447
+
2448
+ Macros have a 'name', a single 'target' argument and an 'attribute
2449
+ list'. The usual syntax is `<name>:<target>[<attrlist>]` (for
2450
+ inline macros) and `<name>::<target>[<attrlist>]` (for block
2451
+ macros). Here are some examples:
2452
+
2453
+ http://www.docbook.org/[DocBook.org]
2454
+ include::chapt1.txt[tabsize=2]
2455
+ mailto:srackham@gmail.com[]
2456
+
2457
+ .Macro behavior
2458
+ - `<name>` is the macro name. It can only contain letters, digits or
2459
+ dash characters and cannot start with a dash.
2460
+ - The optional `<target>` cannot contain white space characters.
2461
+ - `<attrlist>` is a <<X21,list of attributes>> enclosed in square
2462
+ brackets.
2463
+ - `]` characters inside attribute lists must be escaped with a
2464
+ backslash.
2465
+ - Expansion of macro references can normally be escaped by prefixing a
2466
+ backslash character (see the AsciiDoc 'FAQ' for examples of
2467
+ exceptions to this rule).
2468
+ - Attribute references in block macros are expanded.
2469
+ - The substitutions performed prior to Inline macro macro expansion
2470
+ are determined by the inline context.
2471
+ - Macros are processed in the order they appear in the configuration
2472
+ file(s).
2473
+ - Calls to inline macros can be nested inside different inline macros
2474
+ (an inline macro call cannot contain a nested call to itself).
2475
+ - In addition to `<name>`, `<target>` and `<attrlist>` the
2476
+ `<passtext>` and `<subslist>` named groups are available to
2477
+ <<X77,passthrough macros>>. A macro is a passthrough macro if the
2478
+ definition includes a `<passtext>` named group.
2479
+
2480
+ Inline Macros
2481
+ ~~~~~~~~~~~~~
2482
+ Inline Macros occur in an inline element context. Predefined Inline
2483
+ macros include 'URLs', 'image' and 'link' macros.
2484
+
2485
+ URLs
2486
+ ^^^^
2487
+ 'http', 'https', 'ftp', 'file', 'mailto' and 'callto' URLs are
2488
+ rendered using predefined inline macros.
2489
+
2490
+ - If you don't need a custom link caption you can enter the 'http',
2491
+ 'https', 'ftp', 'file' URLs and email addresses without any special
2492
+ macro syntax.
2493
+ - If the `<attrlist>` is empty the URL is displayed.
2494
+
2495
+ Here are some examples:
2496
+
2497
+ http://www.docbook.org/[DocBook.org]
2498
+ http://www.docbook.org/
2499
+ mailto:joe.bloggs@foobar.com[email Joe Bloggs]
2500
+ joe.bloggs@foobar.com
2501
+
2502
+ Which are rendered:
2503
+
2504
+ http://www.docbook.org/[DocBook.org]
2505
+
2506
+ http://www.docbook.org/
2507
+
2508
+ mailto:joe.bloggs@foobar.com[email Joe Bloggs]
2509
+
2510
+ joe.bloggs@foobar.com
2511
+
2512
+ If the `<target>` necessitates space characters use `%20`, for example
2513
+ `large%20image.png`.
2514
+
2515
+ Internal Cross References
2516
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
2517
+ Two AsciiDoc inline macros are provided for creating hypertext links
2518
+ within an AsciiDoc document. You can use either the standard macro
2519
+ syntax or the (preferred) alternative.
2520
+
2521
+ [[X30]]
2522
+ anchor
2523
+ ++++++
2524
+ Used to specify hypertext link targets:
2525
+
2526
+ [[<id>,<xreflabel>]]
2527
+ anchor:<id>[<xreflabel>]
2528
+
2529
+ The `<id>` is a unique string that conforms to the output markup's
2530
+ anchor syntax. The optional `<xreflabel>` is the text to be displayed
2531
+ by captionless 'xref' macros that refer to this anchor. The optional
2532
+ `<xreflabel>` is only really useful when generating DocBook output.
2533
+ Example anchor:
2534
+
2535
+ [[X1]]
2536
+
2537
+ You may have noticed that the syntax of this inline element is the
2538
+ same as that of the <<X41,BlockId block element>>, this is no
2539
+ coincidence since they are functionally equivalent.
2540
+
2541
+ xref
2542
+ ++++
2543
+ Creates a hypertext link to a document anchor.
2544
+
2545
+ <<<id>,<caption>>>
2546
+ xref:<id>[<caption>]
2547
+
2548
+ The `<id>` refers to an anchor ID. The optional `<caption>` is the
2549
+ link's displayed text. Example:
2550
+
2551
+ <<X21,attribute lists>>
2552
+
2553
+ If `<caption>` is not specified then the displayed text is
2554
+ auto-generated:
2555
+
2556
+ - The AsciiDoc 'xhtml11' and 'html5' backends display the `<id>`
2557
+ enclosed in square brackets.
2558
+ - If DocBook is produced the DocBook toolchain is responsible for the
2559
+ displayed text which will normally be the referenced figure, table
2560
+ or section title number followed by the element's title text.
2561
+
2562
+ Here is an example:
2563
+
2564
+ ---------------------------------------------------------------------
2565
+ [[tiger_image]]
2566
+ .Tyger tyger
2567
+ image::tiger.png[]
2568
+
2569
+ This can be seen in <<tiger_image>>.
2570
+ ---------------------------------------------------------------------
2571
+
2572
+ Linking to Local Documents
2573
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
2574
+ Hypertext links to files on the local file system are specified using
2575
+ the 'link' inline macro.
2576
+
2577
+ link:<target>[<caption>]
2578
+
2579
+ The 'link' macro generates relative URLs. The link macro `<target>` is
2580
+ the target file name (relative to the file system location of the
2581
+ referring document). The optional `<caption>` is the link's displayed
2582
+ text. If `<caption>` is not specified then `<target>` is displayed.
2583
+ Example:
2584
+
2585
+ link:downloads/foo.zip[download foo.zip]
2586
+
2587
+ You can use the `<filename>#<id>` syntax to refer to an anchor within
2588
+ a target document but this usually only makes sense when targeting
2589
+ HTML documents.
2590
+
2591
+ [[X9]]
2592
+ Images
2593
+ ^^^^^^
2594
+ Inline images are inserted into the output document using the 'image'
2595
+ macro. The inline syntax is:
2596
+
2597
+ image:<target>[<attributes>]
2598
+
2599
+ The contents of the image file `<target>` is displayed. To display the
2600
+ image its file format must be supported by the target backend
2601
+ application. HTML and DocBook applications normally support PNG or JPG
2602
+ files.
2603
+
2604
+ `<target>` file name paths are relative to the location of the
2605
+ referring document.
2606
+
2607
+ [[X55]]
2608
+ .Image macro attributes
2609
+ - The optional 'alt' attribute is also the first positional attribute,
2610
+ it specifies alternative text which is displayed if the output
2611
+ application is unable to display the image file (see also
2612
+ http://htmlhelp.com/feature/art3.htm[Use of ALT texts in IMGs]). For
2613
+ example:
2614
+
2615
+ image:images/logo.png[Company Logo]
2616
+
2617
+ - The optional 'title' attribute provides a title for the image. The
2618
+ <<X49,block image macro>> renders the title alongside the image.
2619
+ The inline image macro displays the title as a popup ``tooltip'' in
2620
+ visual browsers (AsciiDoc HTML outputs only).
2621
+
2622
+ - The optional `width` and `height` attributes scale the image size
2623
+ and can be used in any combination. The units are pixels. The
2624
+ following example scales the previous example to a height of 32
2625
+ pixels:
2626
+
2627
+ image:images/logo.png["Company Logo",height=32]
2628
+
2629
+ - The optional `link` attribute is used to link the image to an
2630
+ external document. The following example links a screenshot
2631
+ thumbnail to a full size version:
2632
+
2633
+ image:screen-thumbnail.png[height=32,link="screen.png"]
2634
+
2635
+ - The optional `scaledwidth` attribute is only used in DocBook block
2636
+ images (specifically for PDF documents). The following example
2637
+ scales the images to 75% of the available print width:
2638
+
2639
+ image::images/logo.png[scaledwidth="75%",alt="Company Logo"]
2640
+
2641
+ - The image `scale` attribute sets the DocBook `imagedata` element
2642
+ `scale` attribute.
2643
+
2644
+ - The optional `align` attribute is used for horizontal image
2645
+ alignment. Allowed values are `center`, `left` and `right`. For
2646
+ example:
2647
+
2648
+ image::images/tiger.png["Tiger image",align="left"]
2649
+
2650
+ - The optional `float` attribute floats the image `left` or `right` on
2651
+ the page (works with HTML outputs only, has no effect on DocBook
2652
+ outputs). `float` and `align` attributes are mutually exclusive.
2653
+ Use the `unfloat::[]` block macro to stop floating.
2654
+
2655
+ Comment Lines
2656
+ ^^^^^^^^^^^^^
2657
+ See <<X25,comment block macro>>.
2658
+
2659
+ Block Macros
2660
+ ~~~~~~~~~~~~
2661
+ A Block macro reference must be contained in a single line separated
2662
+ either side by a blank line or a block delimiter.
2663
+
2664
+ Block macros behave just like Inline macros, with the following
2665
+ differences:
2666
+
2667
+ - They occur in a block context.
2668
+ - The default syntax is `<name>::<target>[<attrlist>]` (two
2669
+ colons, not one).
2670
+ - Markup template section names end in `-blockmacro` instead of
2671
+ `-inlinemacro`.
2672
+
2673
+ Block Identifier
2674
+ ^^^^^^^^^^^^^^^^
2675
+ The Block Identifier macro sets the `id` attribute and has the same
2676
+ syntax as the <<X30,anchor inline macro>> since it performs
2677
+ essentially the same function -- block templates use the `id`
2678
+ attribute as a block element ID. For example:
2679
+
2680
+ [[X30]]
2681
+
2682
+ This is equivalent to the `[id="X30"]` <<X79,AttributeList element>>).
2683
+
2684
+ [[X49]]
2685
+ Images
2686
+ ^^^^^^
2687
+ The 'image' block macro is used to display images in a block context.
2688
+ The syntax is:
2689
+
2690
+ image::<target>[<attributes>]
2691
+
2692
+ The block `image` macro has the same <<X55,macro attributes>> as it's
2693
+ <<X9,inline image macro>> counterpart.
2694
+
2695
+ Block images can be titled by preceding the 'image' macro with a
2696
+ 'BlockTitle'. DocBook toolchains normally number titled block images
2697
+ and optionally list them in an automatically generated 'List of
2698
+ Figures' backmatter section.
2699
+
2700
+ This example:
2701
+
2702
+ .Main circuit board
2703
+ image::images/layout.png[J14P main circuit board]
2704
+
2705
+ is equivalent to:
2706
+
2707
+ image::images/layout.png["J14P main circuit board",
2708
+ title="Main circuit board"]
2709
+
2710
+ A title prefix that can be inserted with the `caption` attribute
2711
+ (HTML backends). For example:
2712
+
2713
+ .Main circuit board
2714
+ [caption="Figure 2: "]
2715
+ image::images/layout.png[J14P main circuit board]
2716
+
2717
+ [[X66]]
2718
+ .Embedding images in XHTML documents
2719
+ *********************************************************************
2720
+ If you define the `data-uri` attribute then images will be embedded in
2721
+ XHTML outputs using the
2722
+ http://en.wikipedia.org/wiki/Data:_URI_scheme[data URI scheme]. You
2723
+ can use the 'data-uri' attribute with the 'xhtml11' and 'html5'
2724
+ backends to produce single-file XHTML documents with embedded images
2725
+ and CSS, for example:
2726
+
2727
+ $ asciidoc -a data-uri mydocument.txt
2728
+
2729
+ [NOTE]
2730
+ ======
2731
+ - All current popular browsers support data URIs, although versions
2732
+ of Internet Explorer prior to version 8 do not.
2733
+ - Some browsers limit the size of data URIs.
2734
+ ======
2735
+ *********************************************************************
2736
+
2737
+ [[X25]]
2738
+ Comment Lines
2739
+ ^^^^^^^^^^^^^
2740
+ Single lines starting with two forward slashes hard up against the
2741
+ left margin are treated as comments. Comment lines do not appear in
2742
+ the output unless the 'showcomments' attribute is defined. Comment
2743
+ lines have been implemented as both block and inline macros so a
2744
+ comment line can appear as a stand-alone block or within block elements
2745
+ that support inline macro expansion. Example comment line:
2746
+
2747
+ // This is a comment.
2748
+
2749
+ If the 'showcomments' attribute is defined comment lines are written
2750
+ to the output:
2751
+
2752
+ - In DocBook the comment lines are enclosed by the 'remark' element
2753
+ (which may or may not be rendered by your toolchain).
2754
+ - The 'showcomments' attribute does not expose <<X26,Comment Blocks>>.
2755
+ Comment Blocks are never passed to the output.
2756
+
2757
+ System Macros
2758
+ ~~~~~~~~~~~~~
2759
+ System macros are block macros that perform a predefined task and are
2760
+ hardwired into the asciidoc(1) program.
2761
+
2762
+ - You can escape system macros with a leading backslash character
2763
+ (as you can with other macros).
2764
+ - The syntax and tasks performed by system macros is built into
2765
+ asciidoc(1) so they don't appear in configuration files. You can
2766
+ however customize the syntax by adding entries to a configuration
2767
+ file `[macros]` section.
2768
+
2769
+ [[X63]]
2770
+ Include Macros
2771
+ ^^^^^^^^^^^^^^
2772
+ The `include` and `include1` system macros to include the contents of
2773
+ a named file into the source document.
2774
+
2775
+ The `include` macro includes a file as if it were part of the parent
2776
+ document -- tabs are expanded and system macros processed. The
2777
+ contents of `include1` files are not subject to tab expansion or
2778
+ system macro processing nor are attribute or lower priority
2779
+ substitutions performed. The `include1` macro's intended use is to
2780
+ include verbatim embedded CSS or scripts into configuration file
2781
+ headers. Example:
2782
+
2783
+ ------------------------------------
2784
+ \include::chapter1.txt[tabsize=4]
2785
+ ------------------------------------
2786
+
2787
+ .Include macro behavior
2788
+ - If the included file name is specified with a relative path then the
2789
+ path is relative to the location of the referring document.
2790
+ - Include macros can appear inside configuration files.
2791
+ - Files included from within 'DelimitedBlocks' are read to completion
2792
+ to avoid false end-of-block underline termination.
2793
+ - Attribute references are expanded inside the include 'target'; if an
2794
+ attribute is undefined then the included file is silently skipped.
2795
+ - The 'tabsize' macro attribute sets the number of space characters to
2796
+ be used for tab expansion in the included file (not applicable to
2797
+ `include1` macro).
2798
+ - The 'depth' macro attribute sets the maximum permitted number of
2799
+ subsequent nested includes (not applicable to `include1` macro which
2800
+ does not process nested includes). Setting 'depth' to '1' disables
2801
+ nesting inside the included file. By default, nesting is limited to
2802
+ a depth of ten.
2803
+ - If the he 'warnings' attribute is set to 'False' (or any other
2804
+ Python literal that evaluates to boolean false) then no warning
2805
+ message is printed if the included file does not exist. By default
2806
+ 'warnings' are enabled.
2807
+ - Internally the `include1` macro is translated to the `include1`
2808
+ system attribute which means it must be evaluated in a region where
2809
+ attribute substitution is enabled. To inhibit nested substitution in
2810
+ included files it is preferable to use the `include` macro and set
2811
+ the attribute `depth=1`.
2812
+
2813
+ Conditional Inclusion Macros
2814
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2815
+ Lines of text in the source document can be selectively included or
2816
+ excluded from processing based on the existence (or not) of a document
2817
+ attribute.
2818
+
2819
+ Document text between the `ifdef` and `endif` macros is included if a
2820
+ document attribute is defined:
2821
+
2822
+ ifdef::<attribute>[]
2823
+ :
2824
+ endif::<attribute>[]
2825
+
2826
+ Document text between the `ifndef` and `endif` macros is not included
2827
+ if a document attribute is defined:
2828
+
2829
+ ifndef::<attribute>[]
2830
+ :
2831
+ endif::<attribute>[]
2832
+
2833
+ `<attribute>` is an attribute name which is optional in the trailing
2834
+ `endif` macro.
2835
+
2836
+ If you only want to process a single line of text then the text can be
2837
+ put inside the square brackets and the `endif` macro omitted, for
2838
+ example:
2839
+
2840
+ ifdef::revnumber[Version number 42]
2841
+
2842
+ Is equivalent to:
2843
+
2844
+ ifdef::revnumber[]
2845
+ Version number 42
2846
+ endif::revnumber[]
2847
+
2848
+ 'ifdef' and 'ifndef' macros also accept multiple attribute names:
2849
+
2850
+ - Multiple ',' separated attribute names evaluate to defined if one
2851
+ or more of the attributes is defined, otherwise it's value is
2852
+ undefined.
2853
+ - Multiple '+' separated attribute names evaluate to defined if all
2854
+ of the attributes is defined, otherwise it's value is undefined.
2855
+
2856
+ Document text between the `ifeval` and `endif` macros is included if
2857
+ the Python expression inside the square brackets is true. Example:
2858
+
2859
+ ifeval::[{rs458}==2]
2860
+ :
2861
+ endif::[]
2862
+
2863
+ - Document attribute references are expanded before the expression is
2864
+ evaluated.
2865
+ - If an attribute reference is undefined then the expression is
2866
+ considered false.
2867
+
2868
+ Take a look at the `*.conf` configuration files in the AsciiDoc
2869
+ distribution for examples of conditional inclusion macro usage.
2870
+
2871
+ Executable system macros
2872
+ ^^^^^^^^^^^^^^^^^^^^^^^^
2873
+ The 'eval', 'sys' and 'sys2' block macros exhibit the same behavior as
2874
+ their same named <<X24, system attribute references>>. The difference
2875
+ is that system macros occur in a block macro context whereas system
2876
+ attributes are confined to inline contexts where attribute
2877
+ substitution is enabled.
2878
+
2879
+ The following example displays a long directory listing inside a
2880
+ literal block:
2881
+
2882
+ ------------------
2883
+ sys::[ls -l *.txt]
2884
+ ------------------
2885
+
2886
+ NOTE: There are no block macro versions of the 'eval3' and 'sys3'
2887
+ system attributes.
2888
+
2889
+ Template System Macro
2890
+ ^^^^^^^^^^^^^^^^^^^^^
2891
+ The `template` block macro allows the inclusion of one configuration
2892
+ file template section within another. The following example includes
2893
+ the `[admonitionblock]` section in the `[admonitionparagraph]`
2894
+ section:
2895
+
2896
+ [admonitionparagraph]
2897
+ template::[admonitionblock]
2898
+
2899
+ .Template macro behavior
2900
+ - The `template::[]` macro is useful for factoring configuration file
2901
+ markup.
2902
+ - `template::[]` macros cannot be nested.
2903
+ - `template::[]` macro expansion is applied after all configuration
2904
+ files have been read.
2905
+
2906
+
2907
+ [[X77]]
2908
+ Passthrough macros
2909
+ ~~~~~~~~~~~~~~~~~~
2910
+ Passthrough macros are analogous to <<X76,passthrough blocks>> and are
2911
+ used to pass text directly to the output. The substitution performed
2912
+ on the text is determined by the macro definition but can be overridden
2913
+ by the `<subslist>`. The usual syntax is
2914
+ `<name>:<subslist>[<passtext>]` (for inline macros) and
2915
+ `<name>::<subslist>[<passtext>]` (for block macros). Passthroughs, by
2916
+ definition, take precedence over all other text substitutions.
2917
+
2918
+ pass::
2919
+ Inline and block. Passes text unmodified (apart from explicitly
2920
+ specified substitutions). Examples:
2921
+
2922
+ pass:[<q>To be or not to be</q>]
2923
+ pass:attributes,quotes[<u>the '{author}'</u>]
2924
+
2925
+ asciimath, latexmath::
2926
+ Inline and block. Passes text unmodified. Used for
2927
+ <<X78,mathematical formulas>>.
2928
+
2929
+ \+++::
2930
+ Inline and block. The triple-plus passthrough is functionally
2931
+ identical to the 'pass' macro but you don't have to escape `]`
2932
+ characters and you can prefix with quoted attributes in the inline
2933
+ version. Example:
2934
+
2935
+ Red [red]+++`sum_(i=1)\^n i=(n(n+1))/2`$+++ AsciiMathML formula
2936
+
2937
+ $$::
2938
+ Inline and block. The double-dollar passthrough is functionally
2939
+ identical to the triple-plus passthrough with one exception: special
2940
+ characters are escaped. Example:
2941
+
2942
+ $$`[[a,b],[c,d]]((n),(k))`$$
2943
+
2944
+ [[X80]]`::
2945
+ Text quoted with single backtick characters constitutes an 'inline
2946
+ literal' passthrough. The enclosed text is rendered in a monospaced
2947
+ font and is only subject to special character substitution. This
2948
+ makes sense since monospace text is usually intended to be rendered
2949
+ literally and often contains characters that would otherwise have to
2950
+ be escaped. If you need monospaced text containing inline
2951
+ substitutions use a <<X81,plus character instead of a backtick>>.
2952
+
2953
+ Macro Definitions
2954
+ ~~~~~~~~~~~~~~~~~
2955
+ Each entry in the configuration `[macros]` section is a macro
2956
+ definition which can take one of the following forms:
2957
+
2958
+ `<pattern>=<name>[<subslist]`:: Inline macro definition.
2959
+ `<pattern>=#<name>[<subslist]`:: Block macro definition.
2960
+ `<pattern>=+<name>[<subslist]`:: System macro definition.
2961
+ `<pattern>`:: Delete the existing macro with this `<pattern>`.
2962
+
2963
+ `<pattern>` is a Python regular expression and `<name>` is the name of
2964
+ a markup template. If `<name>` is omitted then it is the value of the
2965
+ regular expression match group named 'name'. The optional
2966
+ `[<subslist]` is a comma-separated list of substitution names enclosed
2967
+ in `[]` brackets, it sets the default substitutions for passthrough
2968
+ text, if omitted then no passthrough substitutions are performed.
2969
+
2970
+ .Pattern named groups
2971
+ The following named groups can be used in macro `<pattern>` regular
2972
+ expressions and are available as markup template attributes:
2973
+
2974
+ name::
2975
+ The macro name.
2976
+
2977
+ target::
2978
+ The macro target.
2979
+
2980
+ attrlist::
2981
+ The macro attribute list.
2982
+
2983
+ passtext::
2984
+ Contents of this group are passed unmodified to the output subject
2985
+ only to 'subslist' substitutions.
2986
+
2987
+ subslist::
2988
+ Processed as a comma-separated list of substitution names for
2989
+ 'passtext' substitution, overrides the the macro definition
2990
+ 'subslist'.
2991
+
2992
+ .Here's what happens during macro substitution
2993
+ - Each contextually relevant macro 'pattern' from the `[macros]`
2994
+ section is matched against the input source line.
2995
+ - If a match is found the text to be substituted is loaded from a
2996
+ configuration markup template section named like
2997
+ `<name>-inlinemacro` or `<name>-blockmacro` (depending on the macro
2998
+ type).
2999
+ - Global and macro attribute list attributes are substituted in the
3000
+ macro's markup template.
3001
+ - The substituted template replaces the macro reference in the output
3002
+ document.
3003
+
3004
+
3005
+ [[X98]]
3006
+ HTML 5 audio and video block macros
3007
+ -----------------------------------
3008
+ The 'html5' backend 'audio' and 'video' block macros generate the HTML
3009
+ 5 'audio' and 'video' elements respectively. They follow the usual
3010
+ AsciiDoc block macro syntax `<name>::<target>[<attrlist>]` where:
3011
+
3012
+ [horizontal]
3013
+ `<name>`:: 'audio' or 'video'.
3014
+ `<target>`:: The URL or file name of the video or audio file.
3015
+ `<attrlist>`:: A list of named attributes (see below).
3016
+
3017
+ .Audio macro attributes
3018
+ [options="header",cols="1,5",frame="topbot"]
3019
+ |====================================================================
3020
+ |Name | Value
3021
+ |options
3022
+ |A comma separated list of one or more of the following items:
3023
+ 'autoplay', 'loop' which correspond to the same-named HTML 5 'audio'
3024
+ element boolean attributes. By default the player 'controls' are
3025
+ enabled, include the 'nocontrols' option value to hide them.
3026
+ |====================================================================
3027
+
3028
+ .Video macro attributes
3029
+ [options="header",cols="1,5",frame="topbot"]
3030
+ |====================================================================
3031
+ |Name | Value
3032
+ |height | The height of the player in pixels.
3033
+ |width | The width of the player in pixels.
3034
+ |poster | The URL or file name of an image representing the video.
3035
+ |options
3036
+ |A comma separated list of one or more of the following items:
3037
+ 'autoplay', 'loop' and 'nocontrols'. The 'autoplay' and 'loop' options
3038
+ correspond to the same-named HTML 5 'video' element boolean
3039
+ attributes. By default the player 'controls' are enabled, include the
3040
+ 'nocontrols' option value to hide them.
3041
+ |====================================================================
3042
+
3043
+ Examples:
3044
+
3045
+ ---------------------------------------------------------------------
3046
+ audio::images/example.ogg[]
3047
+
3048
+ video::gizmo.ogv[width=200,options="nocontrols,autoplay"]
3049
+
3050
+ .Example video
3051
+ video::gizmo.ogv[]
3052
+
3053
+ video::http://www.808.dk/pics/video/gizmo.ogv[]
3054
+ ---------------------------------------------------------------------
3055
+
3056
+ If your needs are more complex put raw HTML 5 in a markup block, for
3057
+ example (from http://www.808.dk/?code-html-5-video):
3058
+
3059
+ ---------------------------------------------------------------------
3060
+ ++++
3061
+ <video poster="pics/video/gizmo.jpg" id="video" style="cursor: pointer;" >
3062
+ <source src="pics/video/gizmo.mp4" />
3063
+ <source src="pics/video/gizmo.webm" type="video/webm" />
3064
+ <source src="pics/video/gizmo.ogv" type="video/ogg" />
3065
+ Video not playing? <a href="pics/video/gizmo.mp4">Download file</a> instead.
3066
+ </video>
3067
+
3068
+ <script type="text/javascript">
3069
+ var video = document.getElementById('video');
3070
+ video.addEventListener('click',function(){
3071
+ video.play();
3072
+ },false);
3073
+ </script>
3074
+ ++++
3075
+ ---------------------------------------------------------------------
3076
+
3077
+
3078
+ Tables
3079
+ ------
3080
+ The AsciiDoc table syntax looks and behaves like other delimited block
3081
+ types and supports standard <<X73,block configuration entries>>.
3082
+ Formatting is easy to read and, just as importantly, easy to enter.
3083
+
3084
+ - Cells and columns can be formatted using built-in customizable styles.
3085
+ - Horizontal and vertical cell alignment can be set on columns and
3086
+ cell.
3087
+ - Horizontal and vertical cell spanning is supported.
3088
+
3089
+ .Use tables sparingly
3090
+ *********************************************************************
3091
+ When technical users first start creating documents, tables (complete
3092
+ with column spanning and table nesting) are often considered very
3093
+ important. The reality is that tables are seldom used, even in
3094
+ technical documentation.
3095
+
3096
+ Try this exercise: thumb through your library of technical books,
3097
+ you'll be surprised just how seldom tables are actually used, even
3098
+ less seldom are tables containing block elements (such as paragraphs
3099
+ or lists) or spanned cells. This is no accident, like figures, tables
3100
+ are outside the normal document flow -- tables are for consulting not
3101
+ for reading.
3102
+
3103
+ Tables are designed for, and should normally only be used for,
3104
+ displaying column oriented tabular data.
3105
+ *********************************************************************
3106
+
3107
+ Example tables
3108
+ ~~~~~~~~~~~~~~
3109
+
3110
+ .Simple table
3111
+ [width="15%"]
3112
+ |=======
3113
+ |1 |2 |A
3114
+ |3 |4 |B
3115
+ |5 |6 |C
3116
+ |=======
3117
+
3118
+ .AsciiDoc source
3119
+ ---------------------------------------------------------------------
3120
+ [width="15%"]
3121
+ |=======
3122
+ |1 |2 |A
3123
+ |3 |4 |B
3124
+ |5 |6 |C
3125
+ |=======
3126
+ ---------------------------------------------------------------------
3127
+
3128
+ .Columns formatted with strong, monospaced and emphasis styles
3129
+ [width="50%",cols=">s,^m,e",frame="topbot",options="header,footer"]
3130
+ |==========================
3131
+ | 2+|Columns 2 and 3
3132
+ |1 |Item 1 |Item 1
3133
+ |2 |Item 2 |Item 2
3134
+ |3 |Item 3 |Item 3
3135
+ |4 |Item 4 |Item 4
3136
+ |footer 1|footer 2|footer 3
3137
+ |==========================
3138
+
3139
+ .AsciiDoc source
3140
+ ---------------------------------------------------------------------
3141
+ .An example table
3142
+ [width="50%",cols=">s,^m,e",frame="topbot",options="header,footer"]
3143
+ |==========================
3144
+ | 2+|Columns 2 and 3
3145
+ |1 |Item 1 |Item 1
3146
+ |2 |Item 2 |Item 2
3147
+ |3 |Item 3 |Item 3
3148
+ |4 |Item 4 |Item 4
3149
+ |footer 1|footer 2|footer 3
3150
+ |==========================
3151
+ ---------------------------------------------------------------------
3152
+
3153
+ .Horizontal and vertical source data
3154
+ [width="80%",cols="3,^2,^2,10",options="header"]
3155
+ |=========================================================
3156
+ |Date |Duration |Avg HR |Notes
3157
+
3158
+ |22-Aug-08 |10:24 | 157 |
3159
+ Worked out MSHR (max sustainable heart rate) by going hard
3160
+ for this interval.
3161
+
3162
+ |22-Aug-08 |23:03 | 152 |
3163
+ Back-to-back with previous interval.
3164
+
3165
+ |24-Aug-08 |40:00 | 145 |
3166
+ Moderately hard interspersed with 3x 3min intervals (2min
3167
+ hard + 1min really hard taking the HR up to 160).
3168
+
3169
+ |=========================================================
3170
+
3171
+ Short cells can be entered horizontally, longer cells vertically. The
3172
+ default behavior is to strip leading and trailing blank lines within a
3173
+ cell. These characteristics aid readability and data entry.
3174
+
3175
+ .AsciiDoc source
3176
+ ---------------------------------------------------------------------
3177
+ .Windtrainer workouts
3178
+ [width="80%",cols="3,^2,^2,10",options="header"]
3179
+ |=========================================================
3180
+ |Date |Duration |Avg HR |Notes
3181
+
3182
+ |22-Aug-08 |10:24 | 157 |
3183
+ Worked out MSHR (max sustainable heart rate) by going hard
3184
+ for this interval.
3185
+
3186
+ |22-Aug-08 |23:03 | 152 |
3187
+ Back-to-back with previous interval.
3188
+
3189
+ |24-Aug-08 |40:00 | 145 |
3190
+ Moderately hard interspersed with 3x 3min intervals (2min
3191
+ hard + 1min really hard taking the HR up to 160).
3192
+
3193
+ |=========================================================
3194
+ ---------------------------------------------------------------------
3195
+
3196
+ .A table with externally sourced CSV data
3197
+ [format="csv",cols="^1,4*2",options="header"]
3198
+ |===================================================
3199
+ ID,Customer Name,Contact Name,Customer Address,Phone
3200
+ include::customers.csv[]
3201
+ |===================================================
3202
+
3203
+ .AsciiDoc source
3204
+ ---------------------------------------------------------------------
3205
+ [format="csv",cols="^1,4*2",options="header"]
3206
+ |===================================================
3207
+ ID,Customer Name,Contact Name,Customer Address,Phone
3208
+ \include::customers.csv[]
3209
+ |===================================================
3210
+ ---------------------------------------------------------------------
3211
+
3212
+
3213
+ .Cell spans, alignments and styles
3214
+ [cols="e,m,^,>s",width="25%"]
3215
+ |============================
3216
+ |1 >s|2 |3 |4
3217
+ ^|5 2.2+^.^|6 .3+<.>m|7
3218
+ ^|8
3219
+ |9 2+>|10
3220
+ |============================
3221
+
3222
+ .AsciiDoc source
3223
+ ---------------------------------------------------------------------
3224
+ [cols="e,m,^,>s",width="25%"]
3225
+ |============================
3226
+ |1 >s|2 |3 |4
3227
+ ^|5 2.2+^.^|6 .3+<.>m|7
3228
+ ^|8
3229
+ |9 2+>|10
3230
+ |============================
3231
+ ---------------------------------------------------------------------
3232
+
3233
+ [[X68]]
3234
+ Table input data formats
3235
+ ~~~~~~~~~~~~~~~~~~~~~~~~
3236
+ AsciiDoc table data can be 'psv', 'dsv' or 'csv' formatted. The
3237
+ default table format is 'psv'.
3238
+
3239
+ AsciiDoc 'psv' ('Prefix Separated Values') and 'dsv' ('Delimiter
3240
+ Separated Values') formats are cell oriented -- the table is treated
3241
+ as a sequence of cells -- there are no explicit row separators.
3242
+
3243
+ - 'psv' prefixes each cell with a separator whereas 'dsv' delimits
3244
+ cells with a separator.
3245
+ - 'psv' and 'dsv' separators are Python regular expressions.
3246
+ - The default 'psv' separator contains <<X84, cell specifier>> related
3247
+ named regular expression groups.
3248
+ - The default 'dsv' separator is `:|\n` (a colon or a new line
3249
+ character).
3250
+ - 'psv' and 'dsv' cell separators can be escaped by preceding them
3251
+ with a backslash character.
3252
+
3253
+ Here are four 'psv' cells (the second item spans two columns; the
3254
+ last contains an escaped separator):
3255
+
3256
+ |One 2+|Two and three |A \| separator character
3257
+
3258
+ 'csv' is the quasi-standard row oriented 'Comma Separated Values
3259
+ (CSV)' format commonly used to import and export spreadsheet and
3260
+ database data.
3261
+
3262
+ [[X69]]
3263
+ Table attributes
3264
+ ~~~~~~~~~~~~~~~~
3265
+ Tables can be customized by the following attributes:
3266
+
3267
+ format::
3268
+ 'psv' (default), 'dsv' or 'csv' (See <<X68, Table Data Formats>>).
3269
+
3270
+ separator::
3271
+ The cell separator. A Python regular expression ('psv' and 'dsv'
3272
+ formats) or a single character ('csv' format).
3273
+
3274
+ frame::
3275
+ Defines the table border and can take the following values: 'topbot'
3276
+ (top and bottom), 'all' (all sides), 'none' and 'sides' (left and
3277
+ right sides). The default value is 'all'.
3278
+
3279
+ grid::
3280
+ Defines which ruler lines are drawn between table rows and columns.
3281
+ The 'grid' attribute value can be any of the following values: 'none',
3282
+ 'cols', 'rows' and 'all'. The default value is 'all'.
3283
+
3284
+ align::
3285
+ Use the 'align' attribute to horizontally align the table on the
3286
+ page (works with HTML outputs only, has no effect on DocBook outputs).
3287
+ The following values are valid: 'left', 'right', and 'center'.
3288
+
3289
+ float::
3290
+ Use the 'float' attribute to float the table 'left' or 'right' on the
3291
+ page (works with HTML outputs only, has no effect on DocBook outputs).
3292
+ Floating only makes sense in conjunction with a table 'width'
3293
+ attribute value of less than 100% (otherwise the table will take up
3294
+ all the available space). 'float' and 'align' attributes are mutually
3295
+ exclusive. Use the `unfloat::[]` block macro to stop floating.
3296
+
3297
+ halign::
3298
+ Use the 'halign' attribute to horizontally align all cells in a table.
3299
+ The following values are valid: 'left', 'right', and 'center'
3300
+ (defaults to 'left'). Overridden by <<X70,Column specifiers>> and
3301
+ <<X84,Cell specifiers>>.
3302
+
3303
+ valign::
3304
+ Use the 'valign' attribute to vertically align all cells in a table.
3305
+ The following values are valid: 'top', 'bottom', and 'middle'
3306
+ (defaults to 'top'). Overridden by <<X70,Column specifiers>> and
3307
+ <<X84,Cell specifiers>>.
3308
+
3309
+ options::
3310
+ The 'options' attribute can contain comma separated values, for
3311
+ example: 'header', 'footer'. By default header and footer rows are
3312
+ omitted. See <<X74,attribute options>> for a complete list of
3313
+ available table options.
3314
+
3315
+ cols::
3316
+ The 'cols' attribute is a comma separated list of <<X70,column
3317
+ specifiers>>. For example `cols="2<p,2*,4p,>"`.
3318
+
3319
+ - If 'cols' is present it must specify all columns.
3320
+ - If the 'cols' attribute is not specified the number of columns is
3321
+ calculated as the number of data items in the *first line* of the
3322
+ table.
3323
+ - The degenerate form for the 'cols' attribute is an integer
3324
+ specifying the number of columns e.g. `cols=4`.
3325
+
3326
+ width::
3327
+ The 'width' attribute is expressed as a percentage value
3328
+ ('"1%"'...'"99%"'). The width specifies the table width relative to
3329
+ the available width. HTML backends use this value to set the table
3330
+ width attribute. It's a bit more complicated with DocBook, see the
3331
+ <<X89,DocBook table widths>> sidebar.
3332
+
3333
+ filter::
3334
+ The 'filter' attribute defines an external shell command that is
3335
+ invoked for each cell. The built-in 'asciidoc' table style is
3336
+ implemented using a filter.
3337
+
3338
+ [[X89]]
3339
+ .DocBook table widths
3340
+ **********************************************************************
3341
+ The AsciiDoc docbook backend generates CALS tables. CALS tables do not
3342
+ support a table width attribute -- table width can only be controlled
3343
+ by specifying absolute column widths.
3344
+
3345
+ Specifying absolute column widths is not media independent because
3346
+ different presentation media have different physical dimensions. To
3347
+ get round this limitation both
3348
+ http://www.sagehill.net/docbookxsl/Tables.html#TableWidth[DocBook XSL
3349
+ Stylesheets] and
3350
+ http://dblatex.sourceforge.net/doc/manual/ch03s05.html#sec-table-width[dblatex]
3351
+ have implemented table width processing instructions for setting the
3352
+ table width as a percentage of the available width. AsciiDoc emits
3353
+ these processing instructions if the 'width' attribute is set along
3354
+ with proportional column widths (the AsciiDoc docbook backend
3355
+ 'pageunits' attribute defaults to '*').
3356
+
3357
+ To generate DocBook tables with absolute column widths set the
3358
+ 'pageunits' attribute to a CALS absolute unit such as 'pt' and set the
3359
+ 'pagewidth' attribute to match the width of the presentation media.
3360
+ **********************************************************************
3361
+
3362
+ [[X70]]
3363
+ Column Specifiers
3364
+ ~~~~~~~~~~~~~~~~~
3365
+ Column specifiers define how columns are rendered and appear in the
3366
+ table <<X69,cols attribute>>. A column specifier consists of an
3367
+ optional column multiplier followed by optional alignment, width and
3368
+ style values and is formatted like:
3369
+
3370
+ [<multiplier>*][<align>][<width>][<style>]
3371
+
3372
+ - All components are optional. The multiplier must be first and the
3373
+ style last. The order of `<align>` or `<width>` is not important.
3374
+ - Column `<width>` can be either an integer proportional value (1...)
3375
+ or a percentage (1%...100%). The default value is 1. To ensure
3376
+ portability across different backends, there is no provision for
3377
+ absolute column widths (not to be confused with output column width
3378
+ <<X72,markup attributes>> which are available in both percentage and
3379
+ absolute units).
3380
+ - The '<align>' column alignment specifier is formatted like:
3381
+
3382
+ [<horizontal>][.<vertical>]
3383
+ +
3384
+ Where `<horizontal>` and `<vertical>` are one of the following
3385
+ characters: `<`, `^` or `>` which represent 'left', 'center' and
3386
+ 'right' horizontal alignment or 'top', 'middle' and 'bottom' vertical
3387
+ alignment respectively.
3388
+
3389
+ - A `<multiplier>` can be used to specify repeated columns e.g.
3390
+ `cols="4*<"` specifies four left-justified columns. The default
3391
+ multiplier value is 1.
3392
+ - The `<style>` name specifies a <<X71,table style>> to used to markup
3393
+ column cells (you can use the full style names if you wish but the
3394
+ first letter is normally sufficient).
3395
+ - Column specific styles are not applied to header rows.
3396
+
3397
+ [[X84]]
3398
+ Cell Specifiers
3399
+ ~~~~~~~~~~~~~~~
3400
+ Cell specifiers allow individual cells in 'psv' formatted tables to be
3401
+ spanned, multiplied, aligned and styled. Cell specifiers prefix 'psv'
3402
+ `|` delimiters and are formatted like:
3403
+
3404
+ [<span>*|+][<align>][<style>]
3405
+
3406
+ - '<span>' specifies horizontal and vertical cell spans ('+' operator) or
3407
+ the number of times the cell is replicated ('*' operator). '<span>'
3408
+ is formatted like:
3409
+
3410
+ [<colspan>][.<rowspan>]
3411
+ +
3412
+ Where `<colspan>` and `<rowspan>` are integers specifying the number of
3413
+ columns and rows to span.
3414
+
3415
+ - `<align>` specifies horizontal and vertical cell alignment an is the
3416
+ same as in <<X70,column specifiers>>.
3417
+ - A `<style>` value is the first letter of <<X71,table style>> name.
3418
+
3419
+ For example, the following 'psv' formatted cell will span two columns
3420
+ and the text will be centered and emphasized:
3421
+
3422
+ `2+^e| Cell text`
3423
+
3424
+ [[X71]]
3425
+ Table styles
3426
+ ~~~~~~~~~~~~
3427
+ Table styles can be applied to the entire table (by setting the
3428
+ 'style' attribute in the table's attribute list) or on a per column
3429
+ basis (by specifying the style in the table's <<X69,cols attribute>>).
3430
+ Table data can be formatted using the following predefined styles:
3431
+
3432
+ default::
3433
+ The default style: AsciiDoc inline text formatting; blank lines are
3434
+ treated as paragraph breaks.
3435
+
3436
+ emphasis::
3437
+ Like default but all text is emphasised.
3438
+
3439
+ monospaced::
3440
+ Like default but all text is in a monospaced font.
3441
+
3442
+ strong::
3443
+ Like default but all text is bold.
3444
+
3445
+ header::
3446
+ Apply the same style as the table header. Normally used to create a
3447
+ vertical header in the first column.
3448
+
3449
+ asciidoc::
3450
+ With this style table cells can contain any of the AsciiDoc elements
3451
+ that are allowed inside document sections. This style runs asciidoc(1)
3452
+ as a filter to process cell contents. See also <<X83,Docbook table
3453
+ limitations>>.
3454
+
3455
+ literal::
3456
+ No text formatting; monospaced font; all line breaks are retained
3457
+ (the same as the AsciiDoc <<X65,LiteralBlock>> element).
3458
+
3459
+ verse::
3460
+ All line breaks are retained (just like the AsciiDoc <<X94,verse
3461
+ paragraph style>>).
3462
+
3463
+ [[X72]]
3464
+ Markup attributes
3465
+ ~~~~~~~~~~~~~~~~~
3466
+ AsciiDoc makes a number of attributes available to table markup
3467
+ templates and tags. Column specific attributes are available when
3468
+ substituting the 'colspec' cell data tags.
3469
+
3470
+ pageunits::
3471
+ DocBook backend only. Specifies table column absolute width units.
3472
+ Defaults to '*'.
3473
+
3474
+ pagewidth::
3475
+ DocBook backend only. The nominal output page width in 'pageunit'
3476
+ units. Used to calculate CALS tables absolute column and table
3477
+ widths. Defaults to '425'.
3478
+
3479
+ tableabswidth::
3480
+ Integer value calculated from 'width' and 'pagewidth' attributes.
3481
+ In 'pageunit' units.
3482
+
3483
+ tablepcwidth::
3484
+ Table width expressed as a percentage of the available width. Integer
3485
+ value (0..100).
3486
+
3487
+ colabswidth::
3488
+ Integer value calculated from 'cols' column width, 'width' and
3489
+ 'pagewidth' attributes. In 'pageunit' units.
3490
+
3491
+ colpcwidth::
3492
+ Column width expressed as a percentage of the table width. Integer
3493
+ value (0..100).
3494
+
3495
+ colcount::
3496
+ Total number of table columns.
3497
+
3498
+ rowcount::
3499
+ Total number of table rows.
3500
+
3501
+ halign::
3502
+ Horizontal cell content alignment: 'left', 'right' or 'center'.
3503
+
3504
+ valign::
3505
+ Vertical cell content alignment: 'top', 'bottom' or 'middle'.
3506
+
3507
+ colnumber, colstart::
3508
+ The number of the leftmost column occupied by the cell (1...).
3509
+
3510
+ colend::
3511
+ The number of the rightmost column occupied by the cell (1...).
3512
+
3513
+ colspan::
3514
+ Number of columns the cell should span.
3515
+
3516
+ rowspan::
3517
+ Number of rows the cell should span (1...).
3518
+
3519
+ morerows::
3520
+ Number of additional rows the cell should span (0...).
3521
+
3522
+ Nested tables
3523
+ ~~~~~~~~~~~~~
3524
+ An alternative 'psv' separator character '!' can be used (instead of
3525
+ '|') in nested tables. This allows a single level of table nesting.
3526
+ Columns containing nested tables must use the 'asciidoc' style. An
3527
+ example can be found in `./examples/website/newtables.txt`.
3528
+
3529
+ [[X83]]
3530
+ DocBook table limitations
3531
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
3532
+ Fully implementing tables is not trivial, some DocBook toolchains do
3533
+ better than others. AsciiDoc HTML table outputs are rendered
3534
+ correctly in all the popular browsers -- if your DocBook generated
3535
+ tables don't look right compare them with the output generated by the
3536
+ AsciiDoc 'xhtml11' backend or try a different DocBook toolchain. Here
3537
+ is a list of things to be aware of:
3538
+
3539
+ - Although nested tables are not legal in DocBook 4 the FOP and
3540
+ dblatex toolchains will process them correctly. If you use `a2x(1)`
3541
+ you will need to include the `--no-xmllint` option to suppress
3542
+ DocBook validation errors.
3543
+ +
3544
+ NOTE: In theory you can nest DocBook 4 tables one level using the
3545
+ 'entrytbl' element, but not all toolchains process 'entrytbl'.
3546
+
3547
+ - DocBook only allows a subset of block elements inside table cells so
3548
+ not all AsciiDoc elements produce valid DocBook inside table cells.
3549
+ If you get validation errors running `a2x(1)` try the `--no-xmllint`
3550
+ option, toolchains will often process nested block elements such as
3551
+ sidebar blocks and floating titles correctly even though, strictly
3552
+ speaking, they are not legal.
3553
+
3554
+ - Text formatting in cells using the 'monospaced' table style will
3555
+ raise validation errors because the DocBook 'literal' element was
3556
+ not designed to support formatted text (using the 'literal' element
3557
+ is a kludge on the part of AsciiDoc as there is no easy way to set
3558
+ the font style in DocBook.
3559
+
3560
+ - Cell alignments are ignored for 'verse', 'literal' or 'asciidoc'
3561
+ table styles.
3562
+
3563
+
3564
+ [[X1]]
3565
+ Manpage Documents
3566
+ -----------------
3567
+ Sooner or later, if you program in a UNIX environment, you're going
3568
+ to have to write a man page.
3569
+
3570
+ By observing a couple of additional conventions (detailed below) you
3571
+ can write AsciiDoc files that will generate HTML and PDF man pages
3572
+ plus the native manpage roff format. The easiest way to generate roff
3573
+ manpages from AsciiDoc source is to use the a2x(1) command. The
3574
+ following example generates a roff formatted manpage file called
3575
+ `asciidoc.1` (a2x(1) uses asciidoc(1) to convert `asciidoc.1.txt` to
3576
+ DocBook which it then converts to roff using DocBook XSL Stylesheets):
3577
+
3578
+ a2x --doctype manpage --format manpage asciidoc.1.txt
3579
+
3580
+ .Viewing and printing manpage files
3581
+ **********************************************************************
3582
+ Use the `man(1)` command to view the manpage file:
3583
+
3584
+ $ man -l asciidoc.1
3585
+
3586
+ To print a high quality man page to a postscript printer:
3587
+
3588
+ $ man -l -Tps asciidoc.1 | lpr
3589
+
3590
+ You could also create a PDF version of the man page by converting
3591
+ PostScript to PDF using `ps2pdf(1)`:
3592
+
3593
+ $ man -l -Tps asciidoc.1 | ps2pdf - asciidoc.1.pdf
3594
+
3595
+ The `ps2pdf(1)` command is included in the Ghostscript distribution.
3596
+ **********************************************************************
3597
+
3598
+ To find out more about man pages view the `man(7)` manpage
3599
+ (`man 7 man` and `man man-pages` commands).
3600
+
3601
+
3602
+ Document Header
3603
+ ~~~~~~~~~~~~~~~
3604
+ A manpage document Header is mandatory. The title line contains the
3605
+ man page name followed immediately by the manual section number in
3606
+ brackets, for example 'ASCIIDOC(1)'. The title name should not contain
3607
+ white space and the manual section number is a single digit optionally
3608
+ followed by a single character.
3609
+
3610
+ The NAME Section
3611
+ ~~~~~~~~~~~~~~~~
3612
+ The first manpage section is mandatory, must be titled 'NAME' and must
3613
+ contain a single paragraph (usually a single line) consisting of a
3614
+ list of one or more comma separated command name(s) separated from the
3615
+ command purpose by a dash character. The dash must have at least one
3616
+ white space character on either side. For example:
3617
+
3618
+ printf, fprintf, sprintf - print formatted output
3619
+
3620
+ The SYNOPSIS Section
3621
+ ~~~~~~~~~~~~~~~~~~~~
3622
+ The second manpage section is mandatory and must be titled 'SYNOPSIS'.
3623
+
3624
+ refmiscinfo attributes
3625
+ ~~~~~~~~~~~~~~~~~~~~~~
3626
+ In addition to the automatically created man page <<X60,intrinsic
3627
+ attributes>> you can assign DocBook
3628
+ http://www.docbook.org/tdg5/en/html/refmiscinfo.html[refmiscinfo]
3629
+ element 'source', 'version' and 'manual' values using AsciiDoc
3630
+ `{mansource}`, `{manversion}` and `{manmanual}` attributes
3631
+ respectively. This example is from the AsciiDoc header of a man page
3632
+ source file:
3633
+
3634
+ :man source: AsciiDoc
3635
+ :man version: {revnumber}
3636
+ :man manual: AsciiDoc Manual
3637
+
3638
+
3639
+ [[X78]]
3640
+ Mathematical Formulas
3641
+ ---------------------
3642
+ The 'asciimath' and 'latexmath' <<X77,passthrough macros>> along with
3643
+ 'asciimath' and 'latexmath' <<X76,passthrough blocks>> provide a
3644
+ (backend dependent) mechanism for rendering mathematical formulas. You
3645
+ can use the following math markups:
3646
+
3647
+ NOTE: The 'latexmath' macro used to include 'LaTeX Math' in DocBook
3648
+ outputs is not the same as the 'latexmath' macro used to include
3649
+ 'LaTeX MathML' in XHTML outputs. 'LaTeX Math' applies to DocBook
3650
+ outputs that are processed by <<X31,dblatex>> and is normally used to
3651
+ generate PDF files. 'LaTeXMathML' is very much a subset of 'LaTeX
3652
+ Math' and applies to XHTML documents.
3653
+
3654
+ LaTeX Math
3655
+ ~~~~~~~~~~
3656
+ ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf[LaTeX
3657
+ math] can be included in documents that are processed by
3658
+ <<X31,dblatex(1)>>. Example inline formula:
3659
+
3660
+ latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$]
3661
+
3662
+ For more examples see the {website}[AsciiDoc website] or the
3663
+ distributed `doc/latexmath.txt` file.
3664
+
3665
+ ASCIIMathML
3666
+ ~~~~~~~~~~~
3667
+ /////////////////////////////////////////////////////////////////////
3668
+ The older ASCIIMathML 1.47 version is used instead of version 2
3669
+ because:
3670
+
3671
+ 1. Version 2 doesn't work when embedded.
3672
+ 2. Version 2 is much larger.
3673
+ /////////////////////////////////////////////////////////////////////
3674
+
3675
+ http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML]
3676
+ formulas can be included in XHTML documents generated using the
3677
+ 'xhtml11' and 'html5' backends. To enable ASCIIMathML support you must
3678
+ define the 'asciimath' attribute, for example using the `-a asciimath`
3679
+ command-line option. Example inline formula:
3680
+
3681
+ asciimath:[`x/x={(1,if x!=0),(text{undefined},if x=0):}`]
3682
+
3683
+ For more examples see the {website}[AsciiDoc website] or the
3684
+ distributed `doc/asciimathml.txt` file.
3685
+
3686
+ LaTeXMathML
3687
+ ~~~~~~~~~~~
3688
+ /////////////////////////////////////////////////////////////////////
3689
+ There is an http://math.etsu.edu/LaTeXMathML/[extended LaTeXMathML
3690
+ version] by Jeff Knisley, in addition to a JavaScript file it requires
3691
+ the inclusion of a CSS file.
3692
+ /////////////////////////////////////////////////////////////////////
3693
+
3694
+ 'LaTeXMathML' allows LaTeX Math style formulas to be included in XHTML
3695
+ documents generated using the AsciiDoc 'xhtml11' and 'html5' backends.
3696
+ AsciiDoc uses the
3697
+ http://www.maths.nottingham.ac.uk/personal/drw/lm.html[original
3698
+ LaTeXMathML] by Douglas Woodall. 'LaTeXMathML' is derived from
3699
+ ASCIIMathML and is for users who are more familiar with or prefer
3700
+ using LaTeX math formulas (it recognizes a subset of LaTeX Math, the
3701
+ differences are documented on the 'LaTeXMathML' web page). To enable
3702
+ LaTeXMathML support you must define the 'latexmath' attribute, for
3703
+ example using the `-a latexmath` command-line option. Example inline
3704
+ formula:
3705
+
3706
+ latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$]
3707
+
3708
+ For more examples see the {website}[AsciiDoc website] or the
3709
+ distributed `doc/latexmathml.txt` file.
3710
+
3711
+ MathML
3712
+ ~~~~~~
3713
+ http://www.w3.org/Math/[MathML] is a low level XML markup for
3714
+ mathematics. AsciiDoc has no macros for MathML but users familiar with
3715
+ this markup could use passthrough macros and passthrough blocks to
3716
+ include MathML in output documents.
3717
+
3718
+
3719
+ [[X7]]
3720
+ Configuration Files
3721
+ -------------------
3722
+ AsciiDoc source file syntax and output file markup is largely
3723
+ controlled by a set of cascading, text based, configuration files. At
3724
+ runtime The AsciiDoc default configuration files are combined with
3725
+ optional user and document specific configuration files.
3726
+
3727
+ Configuration File Format
3728
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
3729
+ Configuration files contain named sections. Each section begins with a
3730
+ section name in square brackets []. The section body consists of the
3731
+ lines of text between adjacent section headings.
3732
+
3733
+ - Section names consist of one or more alphanumeric, underscore or
3734
+ dash characters and cannot begin or end with a dash.
3735
+ - Lines starting with a '#' character are treated as comments and
3736
+ ignored.
3737
+ - If the section name is prefixed with a '+' character then the
3738
+ section contents is appended to the contents of an already existing
3739
+ same-named section.
3740
+ - Otherwise same-named sections and section entries override
3741
+ previously loaded sections and section entries (this is sometimes
3742
+ referred to as 'cascading'). Consequently, downstream configuration
3743
+ files need only contain those sections and section entries that need
3744
+ to be overridden.
3745
+
3746
+ TIP: When creating custom configuration files you only need to include
3747
+ the sections and entries that differ from the default configuration.
3748
+
3749
+ TIP: The best way to learn about configuration files is to read the
3750
+ default configuration files in the AsciiDoc distribution in
3751
+ conjunction with asciidoc(1) output files. You can view configuration
3752
+ file load sequence by turning on the asciidoc(1) `-v` (`--verbose`)
3753
+ command-line option.
3754
+
3755
+ AsciiDoc reserves the following section names for specific purposes:
3756
+
3757
+ miscellaneous::
3758
+ Configuration options that don't belong anywhere else.
3759
+ attributes::
3760
+ Attribute name/value entries.
3761
+ specialcharacters::
3762
+ Special characters reserved by the backend markup.
3763
+ tags::
3764
+ Backend markup tags.
3765
+ quotes::
3766
+ Definitions for quoted inline character formatting.
3767
+ specialwords::
3768
+ Lists of words and phrases singled out for special markup.
3769
+ replacements, replacements2, replacements3::
3770
+ Find and replace substitution definitions.
3771
+ specialsections::
3772
+ Used to single out special section names for specific markup.
3773
+ macros::
3774
+ Macro syntax definitions.
3775
+ titles::
3776
+ Heading, section and block title definitions.
3777
+ paradef-*::
3778
+ Paragraph element definitions.
3779
+ blockdef-*::
3780
+ DelimitedBlock element definitions.
3781
+ listdef-*::
3782
+ List element definitions.
3783
+ listtags-*::
3784
+ List element tag definitions.
3785
+ tabledef-*::
3786
+ Table element definitions.
3787
+ tabletags-*::
3788
+ Table element tag definitions.
3789
+
3790
+ Each line of text in these sections is a 'section entry'. Section
3791
+ entries share the following syntax:
3792
+
3793
+ name=value::
3794
+ The entry value is set to value.
3795
+ name=::
3796
+ The entry value is set to a zero length string.
3797
+ name!::
3798
+ The entry is undefined (deleted from the configuration). This
3799
+ syntax only applies to 'attributes' and 'miscellaneous'
3800
+ sections.
3801
+
3802
+ .Section entry behavior
3803
+ - All equals characters inside the `name` must be escaped with a
3804
+ backslash character.
3805
+ - `name` and `value` are stripped of leading and trailing white space.
3806
+ - Attribute names, tag entry names and markup template section names
3807
+ consist of one or more alphanumeric, underscore or dash characters.
3808
+ Names should not begin or end with a dash.
3809
+ - A blank configuration file section (one without any entries) deletes
3810
+ any preceding section with the same name (applies to non-markup
3811
+ template sections).
3812
+
3813
+
3814
+ Miscellaneous section
3815
+ ~~~~~~~~~~~~~~~~~~~~~
3816
+ The optional `[miscellaneous]` section specifies the following
3817
+ `name=value` options:
3818
+
3819
+ newline::
3820
+ Output file line termination characters. Can include any
3821
+ valid Python string escape sequences. The default value is
3822
+ `\r\n` (carriage return, line feed). Should not be quoted or
3823
+ contain explicit spaces (use `\x20` instead). For example:
3824
+
3825
+ $ asciidoc -a 'newline=\n' -b docbook mydoc.txt
3826
+
3827
+ outfilesuffix::
3828
+ The default extension for the output file, for example
3829
+ `outfilesuffix=.html`. Defaults to backend name.
3830
+ tabsize::
3831
+ The number of spaces to expand tab characters, for example
3832
+ `tabsize=4`. Defaults to 8. A 'tabsize' of zero suppresses tab
3833
+ expansion (useful when piping included files through block
3834
+ filters). Included files can override this option using the
3835
+ 'tabsize' attribute.
3836
+ pagewidth, pageunits::
3837
+ These global table related options are documented in the
3838
+ <<X4,Table Configuration File Definitions>> sub-section.
3839
+
3840
+ NOTE: `[miscellaneous]` configuration file entries can be set using
3841
+ the asciidoc(1) `-a` (`--attribute`) command-line option.
3842
+
3843
+ Titles section
3844
+ ~~~~~~~~~~~~~~
3845
+ sectiontitle::
3846
+ Two line section title pattern. The entry value is a Python
3847
+ regular expression containing the named group 'title'.
3848
+
3849
+ underlines::
3850
+ A comma separated list of document and section title underline
3851
+ character pairs starting with the section level 0 and ending
3852
+ with section level 4 underline. The default setting is:
3853
+
3854
+ underlines="==","--","~~","^^","++"
3855
+
3856
+ sect0...sect4::
3857
+ One line section title patterns. The entry value is a Python
3858
+ regular expression containing the named group 'title'.
3859
+
3860
+ blocktitle::
3861
+ <<X42,BlockTitle element>> pattern. The entry value is a
3862
+ Python regular expression containing the named group 'title'.
3863
+
3864
+ subs::
3865
+ A comma separated list of substitutions that are performed on
3866
+ the document header and section titles. Defaults to 'normal'
3867
+ substitution.
3868
+
3869
+ Tags section
3870
+ ~~~~~~~~~~~~
3871
+ The `[tags]` section contains backend tag definitions (one per
3872
+ line). Tags are used to translate AsciiDoc elements to backend
3873
+ markup.
3874
+
3875
+ An AsciiDoc tag definition is formatted like
3876
+ `<tagname>=<starttag>|<endtag>`. For example:
3877
+
3878
+ emphasis=<em>|</em>
3879
+
3880
+ In this example asciidoc(1) replaces the | character with the
3881
+ emphasized text from the AsciiDoc input file and writes the result to
3882
+ the output file.
3883
+
3884
+ Use the `{brvbar}` attribute reference if you need to include a | pipe
3885
+ character inside tag text.
3886
+
3887
+ Attributes section
3888
+ ~~~~~~~~~~~~~~~~~~
3889
+ The optional `[attributes]` section contains predefined attributes.
3890
+
3891
+ If the attribute value requires leading or trailing spaces then the
3892
+ text text should be enclosed in quotation mark (") characters.
3893
+
3894
+ To delete a attribute insert a `name!` entry in a downstream
3895
+ configuration file or use the asciidoc(1) `--attribute name!`
3896
+ command-line option (an attribute name suffixed with a `!` character
3897
+ deletes the attribute)
3898
+
3899
+ Special Characters section
3900
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
3901
+ The `[specialcharacters]` section specifies how to escape characters
3902
+ reserved by the backend markup. Each translation is specified on a
3903
+ single line formatted like:
3904
+
3905
+ <special_character>=<translated_characters>
3906
+
3907
+ Special characters are normally confined to those that resolve
3908
+ markup ambiguity (in the case of HTML and XML markups the ampersand,
3909
+ less than and greater than characters). The following example causes
3910
+ all occurrences of the `<` character to be replaced by `&lt;`.
3911
+
3912
+ <=&lt;
3913
+
3914
+ Quoted Text section
3915
+ ~~~~~~~~~~~~~~~~~~~
3916
+ Quoting is used primarily for text formatting. The `[quotes]` section
3917
+ defines AsciiDoc quoting characters and their corresponding backend
3918
+ markup tags. Each section entry value is the name of a of a `[tags]`
3919
+ section entry. The entry name is the character (or characters) that
3920
+ quote the text. The following examples are taken from AsciiDoc
3921
+ configuration files:
3922
+
3923
+ [quotes]
3924
+ _=emphasis
3925
+
3926
+ [tags]
3927
+ emphasis=<em>|</em>
3928
+
3929
+ You can specify the left and right quote strings separately by
3930
+ separating them with a | character, for example:
3931
+
3932
+ ``|''=quoted
3933
+
3934
+ Omitting the tag will disable quoting, for example, if you don't want
3935
+ superscripts or subscripts put the following in a custom configuration
3936
+ file or edit the global `asciidoc.conf` configuration file:
3937
+
3938
+ [quotes]
3939
+ ^=
3940
+ ~=
3941
+
3942
+ <<X52,Unconstrained quotes>> are differentiated from constrained
3943
+ quotes by prefixing the tag name with a hash character, for example:
3944
+
3945
+ __=#emphasis
3946
+
3947
+ .Quoted text behavior
3948
+ - Quote characters must be non-alphanumeric.
3949
+ - To minimize quoting ambiguity try not to use the same quote
3950
+ characters in different quote types.
3951
+
3952
+ Special Words section
3953
+ ~~~~~~~~~~~~~~~~~~~~~
3954
+ The `[specialwords]` section is used to single out words and phrases
3955
+ that you want to consistently format in some way throughout your
3956
+ document without having to repeatedly specify the markup. The name of
3957
+ each entry corresponds to a markup template section and the entry
3958
+ value consists of a list of words and phrases to be marked up. For
3959
+ example:
3960
+
3961
+ [specialwords]
3962
+ strongwords=NOTE IMPORTANT
3963
+
3964
+ [strongwords]
3965
+ <strong>{words}</strong>
3966
+
3967
+ The examples specifies that any occurrence of `NOTE` or `IMPORTANT`
3968
+ should appear in a bold font.
3969
+
3970
+ Words and word phrases are treated as Python regular expressions: for
3971
+ example, the word `^NOTE` would only match `NOTE` if appeared at
3972
+ the start of a line.
3973
+
3974
+ AsciiDoc comes with three built-in Special Word types:
3975
+ 'emphasizedwords', 'monospacedwords' and 'strongwords', each has a
3976
+ corresponding (backend specific) markup template section. Edit the
3977
+ configuration files to customize existing Special Words and to add new
3978
+ ones.
3979
+
3980
+ .Special word behavior
3981
+ - Word list entries must be separated by space characters.
3982
+ - Word list entries with embedded spaces should be enclosed in quotation (")
3983
+ characters.
3984
+ - A `[specialwords]` section entry of the form
3985
+ +name=word1{nbsp}[word2...]+ adds words to existing `name` entries.
3986
+ - A `[specialwords]` section entry of the form `name` undefines
3987
+ (deletes) all existing `name` words.
3988
+ - Since word list entries are processed as Python regular expressions
3989
+ you need to be careful to escape regular expression special
3990
+ characters.
3991
+ - By default Special Words are substituted before Inline Macros, this
3992
+ may lead to undesirable consequences. For example the special word
3993
+ `foobar` would be expanded inside the macro call
3994
+ `http://www.foobar.com[]`. A possible solution is to emphasize
3995
+ whole words only by defining the word using regular expression
3996
+ characters, for example `\bfoobar\b`.
3997
+ - If the first matched character of a special word is a backslash then
3998
+ the remaining characters are output without markup i.e. the
3999
+ backslash can be used to escape special word markup. For example
4000
+ the special word `\\?\b[Tt]en\b` will mark up the words `Ten` and
4001
+ `ten` only if they are not preceded by a backslash.
4002
+
4003
+ [[X10]]
4004
+ Replacements section
4005
+ ~~~~~~~~~~~~~~~~~~~~
4006
+ `[replacements]`, `[replacements2]` and `[replacements3]`
4007
+ configuration file entries specify find and replace text and are
4008
+ formatted like:
4009
+
4010
+ <find_pattern>=<replacement_text>
4011
+
4012
+ The find text can be a Python regular expression; the replace text can
4013
+ contain Python regular expression group references.
4014
+
4015
+ Use Replacement shortcuts for often used macro references, for
4016
+ example (the second replacement allows us to backslash escape the
4017
+ macro name):
4018
+
4019
+ NEW!=image:./images/smallnew.png[New!]
4020
+ \\NEW!=NEW!
4021
+
4022
+ The only difference between the three replacement types is how they
4023
+ are applied. By default 'replacements' and 'replacement2' are applied
4024
+ in <<X102,normal>> substitution contexts whereas 'replacements3' needs
4025
+ to be configured explicitly and should only be used in backend
4026
+ configuration files.
4027
+
4028
+ .Replacement behavior
4029
+ - The built-in replacements can be escaped with a backslash.
4030
+ - If the find or replace text has leading or trailing spaces then the
4031
+ text should be enclosed in quotation (") characters.
4032
+ - Since the find text is processed as a regular expression you need to
4033
+ be careful to escape regular expression special characters.
4034
+ - Replacements are performed in the same order they appear in the
4035
+ configuration file replacements section.
4036
+
4037
+ Markup Template Sections
4038
+ ~~~~~~~~~~~~~~~~~~~~~~~~
4039
+ Markup template sections supply backend markup for translating
4040
+ AsciiDoc elements. Since the text is normally backend dependent
4041
+ you'll find these sections in the backend specific configuration
4042
+ files. Template sections differ from other sections in that they
4043
+ contain a single block of text instead of per line 'name=value'
4044
+ entries. A markup template section body can contain:
4045
+
4046
+ - Attribute references
4047
+ - System macro calls.
4048
+ - A document content placeholder
4049
+
4050
+ The document content placeholder is a single | character and is
4051
+ replaced by text from the source element. Use the `{brvbar}`
4052
+ attribute reference if you need a literal | character in the template.
4053
+
4054
+ [[X27]]
4055
+ Configuration file names, precedence and locations
4056
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4057
+ Configuration files have a `.conf` file name extension; they are
4058
+ loaded from the following locations:
4059
+
4060
+ 1. The directory containing the asciidoc executable.
4061
+ 2. If there is no `asciidoc.conf` file in the directory containing the
4062
+ asciidoc executable then load from the global configuration
4063
+ directory (normally `/etc/asciidoc` or `/usr/local/etc/asciidoc`)
4064
+ i.e. the global configuration files directory is skipped if
4065
+ AsciiDoc configuration files are installed in the same directory as
4066
+ the asciidoc executable. This allows both a system wide copy and
4067
+ multiple local copies of AsciiDoc to coexist on the same host PC.
4068
+ 3. The user's `$HOME/.asciidoc` directory (if it exists).
4069
+ 4. The directory containing the AsciiDoc source file.
4070
+ 5. Explicit configuration files specified using:
4071
+ - The `conf-files` attribute (one or more file names separated by a
4072
+ `|` character). These files are loaded in the order they are
4073
+ specified and prior to files specified using the `--conf-file`
4074
+ command-line option.
4075
+ - The asciidoc(1) `--conf-file`) command-line option. The
4076
+ `--conf-file` option can be specified multiple times, in which
4077
+ case configuration files will be processed in the same order they
4078
+ appear on the command-line.
4079
+ 6. <<X100,Backend plugin>> configuration files are loaded from
4080
+ subdirectories named like `backends/<backend>` in locations 1, 2
4081
+ and 3.
4082
+ 7. <<X59,Filter>> configuration files are loaded from subdirectories
4083
+ named like `filters/<filter>` in locations 1, 2 and 3.
4084
+
4085
+ Configuration files from the above locations are loaded in the
4086
+ following order:
4087
+
4088
+ - The `[attributes]` section only from:
4089
+ * `asciidoc.conf` in location 3
4090
+ * Files from location 5.
4091
+ +
4092
+ This first pass makes locally set attributes available in the global
4093
+ `asciidoc.conf` file.
4094
+
4095
+ - `asciidoc.conf` from locations 1, 2, 3.
4096
+ - 'attributes', 'titles' and 'specialcharacters' sections from the
4097
+ `asciidoc.conf` in location 4.
4098
+ - The document header is parsed at this point and we can assume the
4099
+ 'backend' and 'doctype' have now been defined.
4100
+ - Backend plugin `<backend>.conf` and `<backend>-<doctype>.conf` files
4101
+ from locations 6. If a backend plugin is not found then try
4102
+ locations 1, 2 and 3 for `<backend>.conf` and
4103
+ `<backend>-<doctype>.conf` backend configuration files.
4104
+ - Filter conf files from locations 7.
4105
+ - `lang-<lang>.conf` from locations 1, 2, 3.
4106
+ - `asciidoc.conf` from location 4.
4107
+ - `<backend>.conf` and `<backend>-<doctype>.conf` from location 4.
4108
+ - Filter conf files from location 4.
4109
+ - `<docfile>.conf` and `<docfile>-<backend>.conf` from location 4.
4110
+ - Configuration files from location 5.
4111
+
4112
+ Where:
4113
+
4114
+ - `<backend>` and `<doctype>` are values specified by the asciidoc(1)
4115
+ `-b` (`--backend`) and `-d` (`--doctype`) command-line options.
4116
+ - `<infile>` is the path name of the AsciiDoc input file without the
4117
+ file name extension.
4118
+ - `<lang>` is a two letter country code set by the the AsciiDoc 'lang'
4119
+ attribute.
4120
+
4121
+ [NOTE]
4122
+ =====================================================================
4123
+ The backend and language global configuration files are loaded *after*
4124
+ the header has been parsed. This means that you can set most
4125
+ attributes in the document header. Here's an example header:
4126
+
4127
+ Life's Mysteries
4128
+ ================
4129
+ :author: Hu Nose
4130
+ :doctype: book
4131
+ :toc:
4132
+ :icons:
4133
+ :data-uri:
4134
+ :lang: en
4135
+ :encoding: iso-8859-1
4136
+
4137
+ Attributes set in the document header take precedence over
4138
+ configuration file attributes.
4139
+
4140
+ =====================================================================
4141
+
4142
+ TIP: Use the asciidoc(1) `-v` (`--verbose`) command-line option to see
4143
+ which configuration files are loaded and the order in which they are
4144
+ loaded.
4145
+
4146
+
4147
+ Document Attributes
4148
+ -------------------
4149
+ A document attribute is comprised of a 'name' and a textual 'value'
4150
+ and is used for textual substitution in AsciiDoc documents and
4151
+ configuration files. An attribute reference (an attribute name
4152
+ enclosed in braces) is replaced by the corresponding attribute
4153
+ value. Attribute names are case insensitive and can only contain
4154
+ alphanumeric, dash and underscore characters.
4155
+
4156
+ There are four sources of document attributes (from highest to lowest
4157
+ precedence):
4158
+
4159
+ - Command-line attributes.
4160
+ - AttributeEntry, AttributeList, Macro and BlockId elements.
4161
+ - Configuration file `[attributes]` sections.
4162
+ - Intrinsic attributes.
4163
+
4164
+ Within each of these divisions the last processed entry takes
4165
+ precedence.
4166
+
4167
+ NOTE: If an attribute is not defined then the line containing the
4168
+ attribute reference is dropped. This property is used extensively in
4169
+ AsciiDoc configuration files to facilitate conditional markup
4170
+ generation.
4171
+
4172
+
4173
+ [[X18]]
4174
+ Attribute Entries
4175
+ -----------------
4176
+ The `AttributeEntry` block element allows document attributes to be
4177
+ assigned within an AsciiDoc document. Attribute entries are added to
4178
+ the global document attributes dictionary. The attribute name/value
4179
+ syntax is a single line like:
4180
+
4181
+ :<name>: <value>
4182
+
4183
+ For example:
4184
+
4185
+ :Author Initials: JB
4186
+
4187
+ This will set an attribute reference `{authorinitials}` to the value
4188
+ 'JB' in the current document.
4189
+
4190
+ To delete (undefine) an attribute use the following syntax:
4191
+
4192
+ :<name>!:
4193
+
4194
+ .AttributeEntry behavior
4195
+ - The attribute entry line begins with colon -- no white space allowed
4196
+ in left margin.
4197
+ - AsciiDoc converts the `<name>` to a legal attribute name (lower
4198
+ case, alphanumeric, dash and underscore characters only -- all other
4199
+ characters deleted). This allows more human friendly text to be
4200
+ used.
4201
+ - Leading and trailing white space is stripped from the `<value>`.
4202
+ - Lines ending in a space followed by a plus character are continued
4203
+ to the next line, for example:
4204
+
4205
+ :description: AsciiDoc is a text document format for writing notes, +
4206
+ documentation, articles, books, slideshows, web pages +
4207
+ and man pages.
4208
+
4209
+ - If the `<value>` is blank then the corresponding attribute value is
4210
+ set to an empty string.
4211
+ - Attribute references contained in the entry `<value>` will be
4212
+ expanded.
4213
+ - By default AttributeEntry values are substituted for
4214
+ `specialcharacters` and `attributes` (see above), if you want to
4215
+ change or disable AttributeEntry substitution use the <<X77,pass:[]
4216
+ inline macro>> syntax.
4217
+ - Attribute entries in the document Header are available for header
4218
+ markup template substitution.
4219
+ - Attribute elements override configuration file and intrinsic
4220
+ attributes but do not override command-line attributes.
4221
+
4222
+ Here are some more attribute entry examples:
4223
+
4224
+ ---------------------------------------------------------------------
4225
+ AsciiDoc User Manual
4226
+ ====================
4227
+ :author: Stuart Rackham
4228
+ :email: srackham@gmail.com
4229
+ :revdate: April 23, 2004
4230
+ :revnumber: 5.1.1
4231
+ ---------------------------------------------------------------------
4232
+
4233
+ Which creates these attributes:
4234
+
4235
+ {author}, {firstname}, {lastname}, {authorinitials}, {email},
4236
+ {revdate}, {revnumber}
4237
+
4238
+ The previous example is equivalent to this <<X95,document header>>:
4239
+
4240
+ ---------------------------------------------------------------------
4241
+ AsciiDoc User Manual
4242
+ ====================
4243
+ Stuart Rackham <srackham@gmail.com>
4244
+ 5.1.1, April 23, 2004
4245
+ ---------------------------------------------------------------------
4246
+
4247
+ Setting configuration entries
4248
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4249
+ A variant of the Attribute Entry syntax allows configuration file
4250
+ section entries and markup template sections to be set from within an
4251
+ AsciiDoc document:
4252
+
4253
+ :<section_name>.[<entry_name>]: <entry_value>
4254
+
4255
+ Where `<section_name>` is the configuration section name,
4256
+ `<entry_name>` is the name of the entry and `<entry_value>` is the
4257
+ optional entry value. This example sets the default labeled list
4258
+ style to 'horizontal':
4259
+
4260
+ :listdef-labeled.style: horizontal
4261
+
4262
+ It is exactly equivalent to a configuration file containing:
4263
+
4264
+ [listdef-labeled]
4265
+ style=horizontal
4266
+
4267
+ - If the `<entry_name>` is omitted then the entire section is
4268
+ substituted with the `<entry_value>`. This feature should only be
4269
+ used to set markup template sections. The following example sets the
4270
+ 'xref2' inline macro markup template:
4271
+
4272
+ :xref2-inlinemacro.: <a href="#{1}">{2?{2}}</a>
4273
+
4274
+ - No substitution is performed on configuration file attribute entries
4275
+ and they cannot be undefined.
4276
+ - This feature can only be used in attribute entries -- configuration
4277
+ attributes cannot be set using the asciidoc(1) command `--attribute`
4278
+ option.
4279
+
4280
+ [[X62]]
4281
+ .Attribute entries promote clarity and eliminate repetition
4282
+ *********************************************************************
4283
+ URLs and file names in AsciiDoc macros are often quite long -- they
4284
+ break paragraph flow and readability suffers. The problem is
4285
+ compounded by redundancy if the same name is used repeatedly.
4286
+ Attribute entries can be used to make your documents easier to read
4287
+ and write, here are some examples:
4288
+
4289
+ :1: http://freshmeat.net/projects/asciidoc/
4290
+ :homepage: http://methods.co.nz/asciidoc/[AsciiDoc home page]
4291
+ :new: image:./images/smallnew.png[]
4292
+ :footnote1: footnote:[A meaningless latin term]
4293
+
4294
+ Using previously defined attributes: See the {1}[Freshmeat summary]
4295
+ or the {homepage} for something new {new}. Lorem ispum {footnote1}.
4296
+
4297
+ .Note
4298
+ - The attribute entry definition must precede it's usage.
4299
+ - You are not limited to URLs or file names, entire macro calls or
4300
+ arbitrary lines of text can be abbreviated.
4301
+ - Shared attributes entries could be grouped into a separate file and
4302
+ <<X63,included>> in multiple documents.
4303
+ *********************************************************************
4304
+
4305
+
4306
+ [[X21]]
4307
+ Attribute Lists
4308
+ ---------------
4309
+ - An attribute list is a comma separated list of attribute values.
4310
+ - The entire list is enclosed in square brackets.
4311
+ - Attribute lists are used to pass parameters to macros, blocks (using
4312
+ the <<X79,AttributeList element>>) and inline quotes.
4313
+
4314
+ The list consists of zero or more positional attribute values followed
4315
+ by zero or more named attribute values. Here are three examples: a
4316
+ single unquoted positional attribute; three unquoted positional
4317
+ attribute values; one positional attribute followed by two named
4318
+ attributes; the unquoted attribute value in the final example contains
4319
+ comma (`&#44;`) and double-quote (`&#34;`) character entities:
4320
+
4321
+ [Hello]
4322
+ [quote, Bertrand Russell, The World of Mathematics (1956)]
4323
+ ["22 times", backcolor="#0e0e0e", options="noborders,wide"]
4324
+ [A footnote&#44; &#34;with an image&#34; image:smallnew.png[]]
4325
+
4326
+ .Attribute list behavior
4327
+ - If one or more attribute values contains a comma the all string
4328
+ values must be quoted (enclosed in double quotation mark
4329
+ characters).
4330
+ - If the list contains any named or quoted attributes then all string
4331
+ attribute values must be quoted.
4332
+ - To include a double quotation mark (") character in a quoted
4333
+ attribute value the the quotation mark must be escaped with a
4334
+ backslash.
4335
+ - List attributes take precedence over existing attributes.
4336
+ - List attributes can only be referenced in configuration file markup
4337
+ templates and tags, they are not available elsewhere in the
4338
+ document.
4339
+ - Setting a named attribute to `None` undefines the attribute.
4340
+ - Positional attributes are referred to as `{1}`,`{2}`,`{3}`,...
4341
+ - Attribute `{0}` refers to the entire list (excluding the enclosing
4342
+ square brackets).
4343
+ - Named attribute names cannot contain dash characters.
4344
+
4345
+ [[X75]]
4346
+ Options attribute
4347
+ ~~~~~~~~~~~~~~~~~
4348
+ If the attribute list contains an attribute named `options` it is
4349
+ processed as a comma separated list of option names:
4350
+
4351
+ - Each name generates an attribute named like `<option>-option` (where
4352
+ `<option>` is the option name) with an empty string value. For
4353
+ example `[options="opt1,opt2,opt3"]` is equivalent to setting the
4354
+ following three attributes
4355
+ `[opt1-option="",opt2-option="",opt2-option=""]`.
4356
+ - If you define a an option attribute globally (for example with an
4357
+ <<X18,attribute entry>>) then it will apply to all elements in the
4358
+ document.
4359
+ - AsciiDoc implements a number of predefined options which are listed
4360
+ in the <<X74,Attribute Options appendix>>.
4361
+
4362
+ Macro Attribute lists
4363
+ ~~~~~~~~~~~~~~~~~~~~~
4364
+ Macros calls are suffixed with an attribute list. The list may be
4365
+ empty but it cannot be omitted. List entries are used to pass
4366
+ attribute values to macro markup templates.
4367
+
4368
+
4369
+ Attribute References
4370
+ --------------------
4371
+ An attribute reference is an attribute name (possibly followed by an
4372
+ additional parameters) enclosed in curly braces. When an attribute
4373
+ reference is encountered it is evaluated and replaced by its
4374
+ corresponding text value. If the attribute is undefined the line
4375
+ containing the attribute is dropped.
4376
+
4377
+ There are three types of attribute reference: 'Simple', 'Conditional'
4378
+ and 'System'.
4379
+
4380
+ .Attribute reference evaluation
4381
+ - You can suppress attribute reference expansion by placing a
4382
+ backslash character immediately in front of the opening brace
4383
+ character.
4384
+ - By default attribute references are not expanded in
4385
+ 'LiteralParagraphs', 'ListingBlocks' or 'LiteralBlocks'.
4386
+ - Attribute substitution proceeds line by line in reverse line order.
4387
+ - Attribute reference evaluation is performed in the following order:
4388
+ 'Simple' then 'Conditional' and finally 'System'.
4389
+
4390
+ Simple Attributes References
4391
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4392
+ Simple attribute references take the form `{<name>}`. If the
4393
+ attribute name is defined its text value is substituted otherwise the
4394
+ line containing the reference is dropped from the output.
4395
+
4396
+ Conditional Attribute References
4397
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4398
+ Additional parameters are used in conjunction with attribute names to
4399
+ calculate a substitution value. Conditional attribute references take
4400
+ the following forms:
4401
+
4402
+ `{<names>=<value>}`::
4403
+ `<value>` is substituted if the attribute `<names>` is
4404
+ undefined otherwise its value is substituted. `<value>` can
4405
+ contain simple attribute references.
4406
+
4407
+ `{<names>?<value>}`::
4408
+ `<value>` is substituted if the attribute `<names>` is defined
4409
+ otherwise an empty string is substituted. `<value>` can
4410
+ contain simple attribute references.
4411
+
4412
+ `{<names>!<value>}`::
4413
+ `<value>` is substituted if the attribute `<names>` is
4414
+ undefined otherwise an empty string is substituted. `<value>`
4415
+ can contain simple attribute references.
4416
+
4417
+ `{<names>#<value>}`::
4418
+ `<value>` is substituted if the attribute `<names>` is defined
4419
+ otherwise the undefined attribute entry causes the containing
4420
+ line to be dropped. `<value>` can contain simple attribute
4421
+ references.
4422
+
4423
+ `{<names>%<value>}`::
4424
+ `<value>` is substituted if the attribute `<names>` is not
4425
+ defined otherwise the containing line is dropped. `<value>`
4426
+ can contain simple attribute references.
4427
+
4428
+ `{<names>@<regexp>:<value1>[:<value2>]}`::
4429
+ `<value1>` is substituted if the value of attribute `<names>`
4430
+ matches the regular expression `<regexp>` otherwise `<value2>`
4431
+ is substituted. If attribute `<names>` is not defined the
4432
+ containing line is dropped. If `<value2>` is omitted an empty
4433
+ string is assumed. The values and the regular expression can
4434
+ contain simple attribute references. To embed colons in the
4435
+ values or the regular expression escape them with backslashes.
4436
+
4437
+ `{<names>$<regexp>:<value1>[:<value2>]}`::
4438
+ Same behavior as the previous ternary attribute except for
4439
+ the following cases:
4440
+
4441
+ `{<names>$<regexp>:<value>}`;;
4442
+ Substitutes `<value>` if `<names>` matches `<regexp>`
4443
+ otherwise the result is undefined and the containing
4444
+ line is dropped.
4445
+
4446
+ `{<names>$<regexp>::<value>}`;;
4447
+ Substitutes `<value>` if `<names>` does not match
4448
+ `<regexp>` otherwise the result is undefined and the
4449
+ containing line is dropped.
4450
+
4451
+ The attribute `<names>` parameter normally consists of a single
4452
+ attribute name but it can be any one of the following:
4453
+
4454
+ - A single attribute name which evaluates to the attributes value.
4455
+ - Multiple ',' separated attribute names which evaluates to an empty
4456
+ string if one or more of the attributes is defined, otherwise it's
4457
+ value is undefined.
4458
+ - Multiple '+' separated attribute names which evaluates to an empty
4459
+ string if all of the attributes are defined, otherwise it's value is
4460
+ undefined.
4461
+
4462
+ Conditional attributes with single attribute names are evaluated first
4463
+ so they can be used inside the multi-attribute conditional `<value>`.
4464
+
4465
+ Conditional attribute examples
4466
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4467
+ Conditional attributes are mainly used in AsciiDoc configuration
4468
+ files -- see the distribution `.conf` files for examples.
4469
+
4470
+ Attribute equality test::
4471
+ If `{backend}` is 'docbook45' or 'xhtml11' the example evaluates to
4472
+ ``DocBook 4.5 or XHTML 1.1 backend'' otherwise it evaluates to
4473
+ ``some other backend'':
4474
+
4475
+ {backend@docbook45|xhtml11:DocBook 4.5 or XHTML 1.1 backend:some other backend}
4476
+
4477
+ Attribute value map::
4478
+ This example maps the `frame` attribute values [`topbot`, `all`,
4479
+ `none`, `sides`] to [`hsides`, `border`, `void`, `vsides`]:
4480
+
4481
+ {frame@topbot:hsides}{frame@all:border}{frame@none:void}{frame@sides:vsides}
4482
+
4483
+
4484
+ [[X24]]
4485
+ System Attribute References
4486
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4487
+ System attribute references generate the attribute text value by
4488
+ executing a predefined action that is parametrized by one or more
4489
+ arguments. The syntax is `{<action>:<arguments>}`.
4490
+
4491
+ `{counter:<attrname>[:<seed>]}`::
4492
+ Increments the document attribute (if the attribute is
4493
+ undefined it is set to `1`). Returns the new attribute value.
4494
+
4495
+ - Counters generate global (document wide) attributes.
4496
+ - The optional `<seed>` specifies the counter's initial value;
4497
+ it can be a number or a single letter; defaults to '1'.
4498
+ - `<seed>` can contain simple and conditional attribute
4499
+ references.
4500
+ - The 'counter' system attribute will not be executed if the
4501
+ containing line is dropped by the prior evaluation of an
4502
+ undefined attribute.
4503
+
4504
+ `{counter2:<attrname>[:<seed>]}`::
4505
+ Same as `counter` except the it always returns a blank string.
4506
+
4507
+ `{eval:<expression>}`::
4508
+ Substitutes the result of the Python `<expression>`.
4509
+
4510
+ - If `<expression>` evaluates to `None` or `False` the
4511
+ reference is deemed undefined and the line containing the
4512
+ reference is dropped from the output.
4513
+ - If the expression evaluates to `True` the attribute
4514
+ evaluates to an empty string.
4515
+ - `<expression>` can contain simple and conditional attribute
4516
+ references.
4517
+ - The 'eval' system attribute can be nested inside other
4518
+ system attributes.
4519
+
4520
+ `{eval3:<command>}`::
4521
+ Passthrough version of `{eval:<expression>}` -- the generated
4522
+ output is written directly to the output without any further
4523
+ substitutions.
4524
+
4525
+ `{include:<filename>}`::
4526
+ Substitutes contents of the file named `<filename>`.
4527
+
4528
+ - The included file is read at the time of attribute
4529
+ substitution.
4530
+ - If the file does not exist a warning is emitted and the line
4531
+ containing the reference is dropped from the output file.
4532
+ - Tabs are expanded based on the current 'tabsize' attribute
4533
+ value.
4534
+
4535
+ `{set:<attrname>[!][:<value>]}`::
4536
+ Sets or unsets document attribute. Normally only used in
4537
+ configuration file markup templates (use
4538
+ <<X18,AttributeEntries>> in AsciiDoc documents).
4539
+
4540
+ - If the attribute name is followed by an exclamation mark
4541
+ the attribute becomes undefined.
4542
+ - If `<value>` is omitted the attribute is set to a blank
4543
+ string.
4544
+ - `<value>` can contain simple and conditional attribute
4545
+ references.
4546
+ - Returns a blank string unless the attribute is undefined in
4547
+ which case the return value is undefined and the enclosing
4548
+ line will be dropped.
4549
+
4550
+ `{set2:<attrname>[!][:<value>]}`::
4551
+ Same as `set` except that the attribute scope is local to the
4552
+ template.
4553
+
4554
+ `{sys:<command>}`::
4555
+ Substitutes the stdout generated by the execution of the shell
4556
+ `<command>`.
4557
+
4558
+ `{sys2:<command>}`::
4559
+ Substitutes the stdout and stderr generated by the execution
4560
+ of the shell `<command>`.
4561
+
4562
+ `{sys3:<command>}`::
4563
+ Passthrough version of `{sys:<command>}` -- the generated
4564
+ output is written directly to the output without any further
4565
+ substitutions.
4566
+
4567
+ `{template:<template>}`::
4568
+ Substitutes the contents of the configuration file section
4569
+ named `<template>`. Attribute references contained in the
4570
+ template are substituted.
4571
+
4572
+ .System reference behavior
4573
+ - System attribute arguments can contain non-system attribute
4574
+ references.
4575
+ - Closing brace characters inside system attribute arguments must be
4576
+ escaped with a backslash.
4577
+
4578
+ [[X60]]
4579
+ Intrinsic Attributes
4580
+ --------------------
4581
+ Intrinsic attributes are simple attributes that are created
4582
+ automatically from: AsciiDoc document header parameters; asciidoc(1)
4583
+ command-line arguments; attributes defined in the default
4584
+ configuration files; the execution context. Here's the list of
4585
+ predefined intrinsic attributes:
4586
+
4587
+ {amp} ampersand (&) character entity
4588
+ {asciidoc-args} used to pass inherited arguments to asciidoc filters
4589
+ {asciidoc-confdir} the asciidoc(1) global configuration directory
4590
+ {asciidoc-dir} the asciidoc(1) application directory
4591
+ {asciidoc-file} the full path name of the asciidoc(1) script
4592
+ {asciidoc-version} the version of asciidoc(1)
4593
+ {author} author's full name
4594
+ {authored} empty string '' if {author} or {email} defined,
4595
+ {authorinitials} author initials (from document header)
4596
+ {backend-<backend>} empty string ''
4597
+ {<backend>-<doctype>} empty string ''
4598
+ {backend} document backend specified by `-b` option
4599
+ {backend-confdir} the directory containing the <backend>.conf file
4600
+ {backslash} backslash character
4601
+ {basebackend-<base>} empty string ''
4602
+ {basebackend} html or docbook
4603
+ {blockname} current block name (note 8).
4604
+ {brvbar} broken vertical bar (|) character
4605
+ {docdate} document last modified date
4606
+ {docdir} document input directory name (note 5)
4607
+ {docfile} document file name (note 5)
4608
+ {docname} document file name without extension (note 6)
4609
+ {doctime} document last modified time
4610
+ {doctitle} document title (from document header)
4611
+ {doctype-<doctype>} empty string ''
4612
+ {doctype} document type specified by `-d` option
4613
+ {email} author's email address (from document header)
4614
+ {empty} empty string ''
4615
+ {encoding} specifies input and output encoding
4616
+ {filetype-<fileext>} empty string ''
4617
+ {filetype} output file name file extension
4618
+ {firstname} author first name (from document header)
4619
+ {gt} greater than (>) character entity
4620
+ {id} running block id generated by BlockId elements
4621
+ {indir} input file directory name (note 2,5)
4622
+ {infile} input file name (note 2,5)
4623
+ {lastname} author last name (from document header)
4624
+ {ldquo} Left double quote character (note 7)
4625
+ {level} title level 1..4 (in section titles)
4626
+ {listindex} the list index (1..) of the most recent list item
4627
+ {localdate} the current date
4628
+ {localtime} the current time
4629
+ {lsquo} Left single quote character (note 7)
4630
+ {lt} less than (<) character entity
4631
+ {manname} manpage name (defined in NAME section)
4632
+ {manpurpose} manpage (defined in NAME section)
4633
+ {mantitle} document title minus the manpage volume number
4634
+ {manvolnum} manpage volume number (1..8) (from document header)
4635
+ {middlename} author middle name (from document header)
4636
+ {nbsp} non-breaking space character entity
4637
+ {notitle} do not display the document title
4638
+ {outdir} document output directory name (note 2)
4639
+ {outfile} output file name (note 2)
4640
+ {python} the full path name of the Python interpreter executable
4641
+ {rdquo} Right double quote character (note 7)
4642
+ {reftext} running block xreflabel generated by BlockId elements
4643
+ {revdate} document revision date (from document header)
4644
+ {revnumber} document revision number (from document header)
4645
+ {rsquo} Right single quote character (note 7)
4646
+ {sectnum} formatted section number (in section titles)
4647
+ {sp} space character
4648
+ {showcomments} send comment lines to the output
4649
+ {title} section title (in titled elements)
4650
+ {two-colons} Two colon characters
4651
+ {two-semicolons} Two semicolon characters
4652
+ {user-dir} the ~/.asciidoc directory (if it exists)
4653
+ {verbose} defined as '' if --verbose command option specified
4654
+ {wj} Word-joiner
4655
+ {zwsp} Zero-width space character entity
4656
+
4657
+ [NOTE]
4658
+ ======
4659
+ 1. Intrinsic attributes are global so avoid defining custom attributes
4660
+ with the same names.
4661
+ 2. `{outfile}`, `{outdir}`, `{infile}`, `{indir}` attributes are
4662
+ effectively read-only (you can set them but it won't affect the
4663
+ input or output file paths).
4664
+ 3. See also the <<X88,Backend Attributes>> section for attributes
4665
+ that relate to AsciiDoc XHTML file generation.
4666
+ 4. The entries that translate to blank strings are designed to be used
4667
+ for conditional text inclusion. You can also use the `ifdef`,
4668
+ `ifndef` and `endif` System macros for conditional inclusion.
4669
+ footnote:[Conditional inclusion using `ifdef` and `ifndef` macros
4670
+ differs from attribute conditional inclusion in that the former
4671
+ occurs when the file is read while the latter occurs when the
4672
+ contents are written.]
4673
+ 5. `{docfile}` and `{docdir}` refer to root document specified on the
4674
+ asciidoc(1) command-line; `{infile}` and `{indir}` refer to the
4675
+ current input file which may be the root document or an included
4676
+ file. When the input is being read from the standard input
4677
+ (`stdin`) these attributes are undefined.
4678
+ 6. If the input file is the standard input and the output file is not
4679
+ the standard output then `{docname}` is the output file name sans
4680
+ file extension.
4681
+ 7. See
4682
+ http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks[non-English
4683
+ usage of quotation marks].
4684
+ 8. The `{blockname}` attribute identifies the style of the current
4685
+ block. It applies to delimited blocks, lists and tables. Here is a
4686
+ list of `{blockname}` values (does not include filters or custom
4687
+ block and style names):
4688
+
4689
+ delimited blocks:: comment, sidebar, open, pass, literal, verse,
4690
+ listing, quote, example, note, tip, important, caution, warning,
4691
+ abstract, partintro
4692
+
4693
+ lists:: arabic, loweralpha, upperalpha, lowerroman, upperroman,
4694
+ labeled, labeled3, labeled4, qanda, horizontal, bibliography,
4695
+ glossary
4696
+
4697
+ tables:: table
4698
+
4699
+ ======
4700
+
4701
+
4702
+ [[X73]]
4703
+ Block Element Definitions
4704
+ -------------------------
4705
+ The syntax and behavior of Paragraph, DelimitedBlock, List and Table
4706
+ block elements is determined by block definitions contained in
4707
+ <<X7,AsciiDoc configuration file>> sections.
4708
+
4709
+ Each definition consists of a section title followed by one or more
4710
+ section entries. Each entry defines a block parameter controlling some
4711
+ aspect of the block's behavior. Here's an example:
4712
+
4713
+ ---------------------------------------------------------------------
4714
+ [blockdef-listing]
4715
+ delimiter=^-{4,}$
4716
+ template=listingblock
4717
+ presubs=specialcharacters,callouts
4718
+ ---------------------------------------------------------------------
4719
+
4720
+ Configuration file block definition sections are processed
4721
+ incrementally after each configuration file is loaded. Block
4722
+ definition section entries are merged into the block definition, this
4723
+ allows block parameters to be overridden and extended by later
4724
+ <<X27,loading configuration files>>.
4725
+
4726
+ AsciiDoc Paragraph, DelimitedBlock, List and Table block elements
4727
+ share a common subset of configuration file parameters:
4728
+
4729
+ delimiter::
4730
+ A Python regular expression that matches the first line of a block
4731
+ element -- in the case of DelimitedBlocks and Tables it also matches
4732
+ the last line.
4733
+
4734
+ template::
4735
+ The name of the configuration file markup template section that will
4736
+ envelope the block contents. The pipe ('|') character is substituted
4737
+ for the block contents. List elements use a set of (list specific)
4738
+ tag parameters instead of a single template. The template name can
4739
+ contain attribute references allowing dynamic template selection a
4740
+ the time of template substitution.
4741
+
4742
+ options::
4743
+ A comma delimited list of element specific option names. In addition
4744
+ to being used internally, options are available during markup tag
4745
+ and template substitution as attributes with an empty string value
4746
+ named like `<option>-option` (where `<option>` is the option name).
4747
+ See <<X74,attribute options>> for a complete list of available
4748
+ options.
4749
+
4750
+ subs, presubs, postsubs::
4751
+ * 'presubs' and 'postsubs' are lists of comma separated substitutions that are
4752
+ performed on the block contents. 'presubs' is applied first,
4753
+ 'postsubs' (if specified) second.
4754
+
4755
+ * 'subs' is an alias for 'presubs'.
4756
+
4757
+ * If a 'filter' is allowed (Paragraphs, DelimitedBlocks and Tables)
4758
+ and has been specified then 'presubs' and 'postsubs' substitutions
4759
+ are performed before and after the filter is run respectively.
4760
+
4761
+ * Allowed values: 'specialcharacters', 'quotes', 'specialwords',
4762
+ 'replacements', 'macros', 'attributes', 'callouts'.
4763
+
4764
+ * [[X102]]The following composite values are also allowed:
4765
+
4766
+ 'none';;
4767
+ No substitutions.
4768
+ 'normal';;
4769
+ The following substitutions in the following order:
4770
+ 'specialcharacters', 'quotes', 'attributes', 'specialwords',
4771
+ 'replacements', 'macros', 'replacements2'.
4772
+ 'verbatim';;
4773
+ The following substitutions in the following order:
4774
+ 'specialcharacters' and 'callouts'.
4775
+
4776
+ * 'normal' and 'verbatim' substitutions can be redefined by with
4777
+ `subsnormal` and `subsverbatim` entries in a configuration file
4778
+ `[miscellaneous]` section.
4779
+
4780
+ * The substitutions are processed in the order in which they are
4781
+ listed and can appear more than once.
4782
+
4783
+ filter::
4784
+ This optional entry specifies an executable shell command for
4785
+ processing block content (Paragraphs, DelimitedBlocks and Tables).
4786
+ The filter command can contain attribute references.
4787
+
4788
+ posattrs::
4789
+ Optional comma separated list of positional attribute names. This
4790
+ list maps positional attributes (in the block's <<X21,attribute
4791
+ list>>) to named block attributes. The following example, from the
4792
+ QuoteBlock definition, maps the first and section positional
4793
+ attributes:
4794
+
4795
+ posattrs=attribution,citetitle
4796
+
4797
+ style::
4798
+ This optional parameter specifies the default style name.
4799
+
4800
+
4801
+ <stylename>-style::
4802
+ Optional style definition (see <<X23,Styles>> below).
4803
+
4804
+ The following block parameters behave like document attributes and can
4805
+ be set in block attribute lists and style definitions: 'template',
4806
+ 'options', 'subs', 'presubs', 'postsubs', 'filter'.
4807
+
4808
+ [[X23]]
4809
+ Styles
4810
+ ~~~~~~
4811
+ A style is a set of block parameter bundled as a single named
4812
+ parameter. The following example defines a style named 'verbatim':
4813
+
4814
+ verbatim-style=template="literalblock",subs="verbatim"
4815
+
4816
+ If a block's <<X21,attribute list>> contains a 'style' attribute then
4817
+ the corresponding style parameters are be merged into the default
4818
+ block definition parameters.
4819
+
4820
+ - All style parameter names must be suffixed with `-style` and the
4821
+ style parameter value is in the form of a list of <<X21,named
4822
+ attributes>>.
4823
+ - The 'template' style parameter is mandatory, other parameters can be
4824
+ omitted in which case they inherit their values from the default
4825
+ block definition parameters.
4826
+ - Multi-item style parameters ('subs','presubs','postsubs','posattrs')
4827
+ must be specified using Python tuple syntax (rather than a simple
4828
+ list of values as they in separate entries) e.g.
4829
+ `postsubs=("callouts",)` not `postsubs="callouts"`.
4830
+
4831
+ Paragraphs
4832
+ ~~~~~~~~~~
4833
+ Paragraph translation is controlled by `[paradef-*]` configuration
4834
+ file section entries. Users can define new types of paragraphs and
4835
+ modify the behavior of existing types by editing AsciiDoc
4836
+ configuration files.
4837
+
4838
+ Here is the shipped Default paragraph definition:
4839
+
4840
+ --------------------------------------------------------------------
4841
+ [paradef-default]
4842
+ delimiter=(?P<text>\S.*)
4843
+ template=paragraph
4844
+ --------------------------------------------------------------------
4845
+
4846
+ The normal paragraph definition has a couple of special properties:
4847
+
4848
+ 1. It must exist and be defined in a configuration file section named
4849
+ `[paradef-default]`.
4850
+ 2. Irrespective of its position in the configuration files default
4851
+ paragraph document matches are attempted only after trying all
4852
+ other paragraph types.
4853
+
4854
+ Paragraph specific block parameter notes:
4855
+
4856
+ delimiter::
4857
+ This regular expression must contain the named group 'text' which
4858
+ matches the text on the first line. Paragraphs are terminated by a
4859
+ blank line, the end of file, or the start of a DelimitedBlock.
4860
+
4861
+ options::
4862
+ The 'listelement' option specifies that paragraphs of this type will
4863
+ automatically be considered part of immediately preceding list
4864
+ items. The 'skip' option causes the paragraph to be treated as a
4865
+ comment (see <<X26,CommentBlocks>>).
4866
+
4867
+ .Paragraph processing proceeds as follows:
4868
+ 1. The paragraph text is aligned to the left margin.
4869
+ 2. Optional 'presubs' inline substitutions are performed on the
4870
+ paragraph text.
4871
+ 3. If a filter command is specified it is executed and the paragraph
4872
+ text piped to its standard input; the filter output replaces the
4873
+ paragraph text.
4874
+ 4. Optional 'postsubs' inline substitutions are performed on the
4875
+ paragraph text.
4876
+ 5. The paragraph text is enveloped by the paragraph's markup template
4877
+ and written to the output file.
4878
+
4879
+ Delimited Blocks
4880
+ ~~~~~~~~~~~~~~~~
4881
+ DelimitedBlock 'options' values are:
4882
+
4883
+ sectionbody::
4884
+ The block contents are processed as a SectionBody.
4885
+
4886
+ skip::
4887
+ The block is treated as a comment (see <<X26,CommentBlocks>>).
4888
+ Preceding <<X21,attribute lists>> and <<X42,block titles>> are not
4889
+ consumed.
4890
+
4891
+ 'presubs', 'postsubs' and 'filter' entries are ignored when
4892
+ 'sectionbody' or 'skip' options are set.
4893
+
4894
+ DelimitedBlock processing proceeds as follows:
4895
+
4896
+ 1. Optional 'presubs' substitutions are performed on the block
4897
+ contents.
4898
+ 2. If a filter is specified it is executed and the block's contents
4899
+ piped to its standard input. The filter output replaces the block
4900
+ contents.
4901
+ 3. Optional 'postsubs' substitutions are performed on the block
4902
+ contents.
4903
+ 4. The block contents is enveloped by the block's markup template and
4904
+ written to the output file.
4905
+
4906
+ TIP: Attribute expansion is performed on the block filter command
4907
+ before it is executed, this is useful for passing arguments to the
4908
+ filter.
4909
+
4910
+ Lists
4911
+ ~~~~~
4912
+ List behavior and syntax is determined by `[listdef-*]` configuration
4913
+ file sections. The user can change existing list behavior and add new
4914
+ list types by editing configuration files.
4915
+
4916
+ List specific block definition notes:
4917
+
4918
+ type::
4919
+ This is either 'bulleted','numbered','labeled' or 'callout'.
4920
+
4921
+ delimiter::
4922
+ A Python regular expression that matches the first line of a
4923
+ list element entry. This expression can contain the named groups
4924
+ 'text' (bulleted groups), 'index' and 'text' (numbered lists),
4925
+ 'label' and 'text' (labeled lists).
4926
+
4927
+ tags::
4928
+ The `<name>` of the `[listtags-<name>]` configuration file section
4929
+ containing list markup tag definitions. The tag entries ('list',
4930
+ 'entry', 'label', 'term', 'text') map the AsciiDoc list structure to
4931
+ backend markup; see the 'listtags' sections in the AsciiDoc
4932
+ distributed backend `.conf` configuration files for examples.
4933
+
4934
+ Tables
4935
+ ~~~~~~
4936
+ Table behavior and syntax is determined by `[tabledef-*]` and
4937
+ `[tabletags-*]` configuration file sections. The user can change
4938
+ existing table behavior and add new table types by editing
4939
+ configuration files. The following `[tabledef-*]` section entries
4940
+ generate table output markup elements:
4941
+
4942
+ colspec::
4943
+ The table 'colspec' tag definition.
4944
+
4945
+ headrow, footrow, bodyrow::
4946
+ Table header, footer and body row tag definitions. 'headrow' and
4947
+ 'footrow' table definition entries default to 'bodyrow' if
4948
+ they are undefined.
4949
+
4950
+ headdata, footdata, bodydata::
4951
+ Table header, footer and body data tag definitions. 'headdata' and
4952
+ 'footdata' table definition entries default to 'bodydata' if they
4953
+ are undefined.
4954
+
4955
+ paragraph::
4956
+ If the 'paragraph' tag is specified then blank lines in the cell
4957
+ data are treated as paragraph delimiters and marked up using this
4958
+ tag.
4959
+
4960
+ [[X4]]
4961
+ Table behavior is also influenced by the following `[miscellaneous]`
4962
+ configuration file entries:
4963
+
4964
+ pagewidth::
4965
+ This integer value is the printable width of the output media. See
4966
+ <<X69,table attributes>>.
4967
+
4968
+ pageunits::
4969
+ The units of width in output markup width attribute values.
4970
+
4971
+ .Table definition behavior
4972
+ - The output markup generation is specifically designed to work with
4973
+ the HTML and CALS (DocBook) table models, but should be adaptable to
4974
+ most XML table schema.
4975
+ - Table definitions can be ``mixed in'' from multiple cascading
4976
+ configuration files.
4977
+ - New table definitions inherit the default table and table tags
4978
+ definitions (`[tabledef-default]` and `[tabletags-default]`) so you
4979
+ only need to override those conf file entries that require
4980
+ modification.
4981
+
4982
+
4983
+ [[X59]]
4984
+ Filters
4985
+ -------
4986
+ AsciiDoc filters allow external commands to process AsciiDoc
4987
+ 'Paragraphs', 'DelimitedBlocks' and 'Table' content. Filters are
4988
+ primarily an extension mechanism for generating specialized outputs.
4989
+ Filters are implemented using external commands which are specified in
4990
+ configuration file definitions.
4991
+
4992
+ There's nothing special about the filters, they're just standard UNIX
4993
+ filters: they read text from the standard input, process it, and write
4994
+ to the standard output.
4995
+
4996
+ The asciidoc(1) command `--filter` option can be used to install and
4997
+ remove filters. The same option is used to unconditionally load a
4998
+ filter.
4999
+
5000
+ Attribute substitution is performed on the filter command prior to
5001
+ execution -- attributes can be used to pass parameters from the
5002
+ AsciiDoc source document to the filter.
5003
+
5004
+ WARNING: Filters sometimes included executable code. Before installing
5005
+ a filter you should verify that it is from a trusted source.
5006
+
5007
+ Filter Search Paths
5008
+ ~~~~~~~~~~~~~~~~~~~
5009
+ If the filter command does not specify a directory path then
5010
+ asciidoc(1) recursively searches for the executable filter command:
5011
+
5012
+ - First it looks in the user's `$HOME/.asciidoc/filters` directory.
5013
+ - Next the global filters directory (usually `/etc/asciidoc/filters`
5014
+ or `/usr/local/etc/asciidoc`) directory is searched.
5015
+ - Then it looks in the asciidoc(1) `./filters` directory.
5016
+ - Finally it relies on the executing shell to search the environment
5017
+ search path (`$PATH`).
5018
+
5019
+ Standard practice is to install each filter in it's own sub-directory
5020
+ with the same name as the filter's style definition. For example the
5021
+ music filter's style name is 'music' so it's configuration and filter
5022
+ files are stored in the `filters/music` directory.
5023
+
5024
+ Filter Configuration Files
5025
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
5026
+ Filters are normally accompanied by a configuration file containing a
5027
+ Paragraph or DelimitedBlock definition along with corresponding markup
5028
+ templates.
5029
+
5030
+ While it is possible to create new 'Paragraph' or 'DelimitedBlock'
5031
+ definitions the preferred way to implement a filter is to add a
5032
+ <<X23,style>> to the existing Paragraph and ListingBlock definitions
5033
+ (all filters shipped with AsciiDoc use this technique). The filter is
5034
+ applied to the paragraph or delimited block by preceding it with an
5035
+ attribute list: the first positional attribute is the style name,
5036
+ remaining attributes are normally filter specific parameters.
5037
+
5038
+ asciidoc(1) auto-loads all `.conf` files found in the filter search
5039
+ paths unless the container directory also contains a file named
5040
+ `__noautoload__` (see previous section). The `__noautoload__` feature
5041
+ is used for filters that will be loaded manually using the `--filter`
5042
+ option.
5043
+
5044
+ [[X56]]
5045
+ Example Filter
5046
+ ~~~~~~~~~~~~~~
5047
+ AsciiDoc comes with a toy filter for highlighting source code keywords
5048
+ and comments. See also the `./filters/code/code-filter-readme.txt`
5049
+ file.
5050
+
5051
+ NOTE: The purpose of this toy filter is to demonstrate how to write a
5052
+ filter -- it's much to simplistic to be passed off as a code syntax
5053
+ highlighter. If you want a full featured multi-language highlighter
5054
+ use the {website}source-highlight-filter.html[source code highlighter
5055
+ filter].
5056
+
5057
+ Built-in filters
5058
+ ~~~~~~~~~~~~~~~~
5059
+ The AsciiDoc distribution includes 'source', 'music', 'latex' and
5060
+ 'graphviz' filters, details are on the
5061
+ {website}index.html#_filters[AsciiDoc website].
5062
+
5063
+ [cols="1e,5",frame="topbot",options="header"]
5064
+ .Built-in filters list
5065
+ |====================================================================
5066
+ |Filter name |Description
5067
+
5068
+ |music
5069
+ |A {website}music-filter.html[music filter] is included in the
5070
+ distribution `./filters/` directory. It translates music in
5071
+ http://lilypond.org/[LilyPond] or http://abcnotation.org.uk/[ABC]
5072
+ notation to standard classical notation.
5073
+
5074
+ |source
5075
+ |A {website}source-highlight-filter.html[source code highlight filter]
5076
+ is included in the distribution `./filters/` directory.
5077
+
5078
+ |latex
5079
+ |The {website}latex-filter.html[AsciiDoc LaTeX filter] translates
5080
+ LaTeX source to a PNG image that is automatically inserted into the
5081
+ AsciiDoc output documents.
5082
+
5083
+ |graphviz
5084
+ |Gouichi Iisaka has written a http://www.graphviz.org/[Graphviz]
5085
+ filter for AsciiDoc. Graphviz generates diagrams from a textual
5086
+ specification. Gouichi Iisaka's Graphviz filter is included in the
5087
+ AsciiDoc distribution. Here are some
5088
+ {website}asciidoc-graphviz-sample.html[AsciiDoc Graphviz examples].
5089
+
5090
+ |====================================================================
5091
+
5092
+ [[X58]]
5093
+ Filter plugins
5094
+ ~~~~~~~~~~~~~~
5095
+ Filter <<X101,plugins>> are a mechanism for distributing AsciiDoc
5096
+ filters. A filter plugin is a Zip file containing the files that
5097
+ constitute a filter. The asciidoc(1) `--filter` option is used to
5098
+ load and manage filer <<X101,plugins>>.
5099
+
5100
+ - Filter plugins <<X27,take precedence>> over built-in filters with
5101
+ the same name.
5102
+ - By default filter plugins are installed in
5103
+ `$HOME/.asciidoc/filters/<filter>` where `<filter>` is the filter
5104
+ name.
5105
+
5106
+
5107
+ [[X101]]
5108
+ Plugins
5109
+ -------
5110
+ The AsciiDoc plugin architecture is an extension mechanism that allows
5111
+ additional <<X100,backends>>, <<X58,filters>> and <<X99,themes>> to be
5112
+ added to AsciiDoc.
5113
+
5114
+ - A plugin is a Zip file containing an AsciiDoc backend, filter or
5115
+ theme (configuration files, stylesheets, scripts, images).
5116
+ - The asciidoc(1) `--backend`, `--filter` and `--theme` command-line
5117
+ options are used to load and manage plugins. Each of these options
5118
+ responds to the plugin management 'install', 'list', 'remove' and
5119
+ 'build' commands.
5120
+ - The plugin management command names are reserved and cannot be used
5121
+ for filter, backend or theme names.
5122
+ - The plugin Zip file name always begins with the backend, filter or
5123
+ theme name.
5124
+
5125
+ Plugin commands and conventions are documented in the asciidoc(1) man
5126
+ page. You can find lists of plugins on the
5127
+ {website}plugins.html[AsciiDoc website].
5128
+
5129
+
5130
+ [[X36]]
5131
+ Help Commands
5132
+ -------------
5133
+ The asciidoc(1) command has a `--help` option which prints help topics
5134
+ to stdout. The default topic summarizes asciidoc(1) usage:
5135
+
5136
+ $ asciidoc --help
5137
+
5138
+ To print a help topic specify the topic name as a command argument.
5139
+ Help topic names can be shortened so long as they are not ambiguous.
5140
+ Examples:
5141
+
5142
+ $ asciidoc --help manpage
5143
+ $ asciidoc -h m # Short version of previous example.
5144
+ $ asciidoc --help syntax
5145
+ $ asciidoc -h s # Short version of previous example.
5146
+
5147
+ Customizing Help
5148
+ ~~~~~~~~~~~~~~~~
5149
+ To change, delete or add your own help topics edit a help
5150
+ configuration file. The help file name `help-<lang>.conf` is based on
5151
+ the setting of the `lang` attribute, it defaults to `help.conf`
5152
+ (English). The <<X27,help file location>> will depend on whether you
5153
+ want the topics to apply to all users or just the current user.
5154
+
5155
+ The help topic files have the same named section format as other
5156
+ <<X7,configuration files>>. The `help.conf` files are stored in the
5157
+ same locations and loaded in the same order as other configuration
5158
+ files.
5159
+
5160
+ When the `--help` command-line option is specified AsciiDoc loads the
5161
+ appropriate help files and then prints the contents of the section
5162
+ whose name matches the help topic name. If a topic name is not
5163
+ specified `default` is used. You don't need to specify the whole help
5164
+ topic name on the command-line, just enough letters to ensure it's not
5165
+ ambiguous. If a matching help file section is not found a list of
5166
+ available topics is printed.
5167
+
5168
+
5169
+ Tips and Tricks
5170
+ ---------------
5171
+
5172
+ Know Your Editor
5173
+ ~~~~~~~~~~~~~~~~
5174
+ Writing AsciiDoc documents will be a whole lot more pleasant if you
5175
+ know your favorite text editor. Learn how to indent and reformat text
5176
+ blocks, paragraphs, lists and sentences. <<X20,Tips for 'vim' users>>
5177
+ follow.
5178
+
5179
+ [[X20]]
5180
+ Vim Commands for Formatting AsciiDoc
5181
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5182
+ Text Wrap Paragraphs
5183
+ ^^^^^^^^^^^^^^^^^^^^
5184
+ Use the vim `:gq` command to reformat paragraphs. Setting the
5185
+ 'textwidth' sets the right text wrap margin; for example:
5186
+
5187
+ :set textwidth=70
5188
+
5189
+ To reformat a paragraph:
5190
+
5191
+ 1. Position the cursor at the start of the paragraph.
5192
+ 2. Type `gq}`.
5193
+
5194
+ Execute `:help gq` command to read about the vim gq command.
5195
+
5196
+ [TIP]
5197
+ =====================================================================
5198
+ - Assign the `gq}` command to the Q key with the `nnoremap Q gq}`
5199
+ command or put it in your `~/.vimrc` file to so it's always
5200
+ available (see the <<X61, Example `~/.vimrc` file>>).
5201
+ - Put `set` commands in your `~/.vimrc` file so you don't have to
5202
+ enter them manually.
5203
+ - The Vim website (http://www.vim.org) has a wealth of resources,
5204
+ including scripts for automated spell checking and ASCII Art
5205
+ drawing.
5206
+ =====================================================================
5207
+
5208
+ Format Lists
5209
+ ^^^^^^^^^^^^
5210
+ The `gq` command can also be used to format bulleted, numbered and
5211
+ callout lists. First you need to set the `comments`, `formatoptions`
5212
+ and `formatlistpat` (see the <<X61, Example `~/.vimrc` file>>).
5213
+
5214
+ Now you can format simple lists that use dash, asterisk, period and
5215
+ plus bullets along with numbered ordered lists:
5216
+
5217
+ 1. Position the cursor at the start of the list.
5218
+ 2. Type `gq}`.
5219
+
5220
+ Indent Paragraphs
5221
+ ^^^^^^^^^^^^^^^^^
5222
+ Indent whole paragraphs by indenting the fist line with the desired
5223
+ indent and then executing the `gq}` command.
5224
+
5225
+ [[X61]]
5226
+ Example `~/.vimrc` File
5227
+ ^^^^^^^^^^^^^^^^^^^^^^^
5228
+ ---------------------------------------------------------------------
5229
+ " Use bold bright fonts.
5230
+ set background=dark
5231
+
5232
+ " Show tabs and trailing characters.
5233
+ set listchars=tab:��,trail:�
5234
+ set list
5235
+
5236
+ " Don't highlight searched text.
5237
+ highlight clear Search
5238
+
5239
+ " Don't move to matched text while search pattern is being entered.
5240
+ set noincsearch
5241
+
5242
+ " Reformat paragraphs and list.
5243
+ nnoremap R gq}
5244
+
5245
+ " Delete trailing white space and Dos-returns and to expand tabs to spaces.
5246
+ nnoremap S :set et<CR>:retab!<CR>:%s/[\r \t]\+$//<CR>
5247
+
5248
+ autocmd BufRead,BufNewFile *.txt,README,TODO,CHANGELOG,NOTES
5249
+ \ setlocal autoindent expandtab tabstop=8 softtabstop=2 shiftwidth=2 filetype=asciidoc
5250
+ \ textwidth=70 wrap formatoptions=tcqn
5251
+ \ formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\\|^\\s*<\\d\\+>\\s\\+\\\\|^\\s*[a-zA-Z.]\\.\\s\\+\\\\|^\\s*[ivxIVX]\\+\\.\\s\\+
5252
+ \ comments=s1:/*,ex:*/,://,b:#,:%,:XCOMM,fb:-,fb:*,fb:+,fb:.,fb:>
5253
+ ---------------------------------------------------------------------
5254
+
5255
+ Troubleshooting
5256
+ ~~~~~~~~~~~~~~~
5257
+ AsciiDoc diagnostic features are detailed in the <<X82,Diagnostics
5258
+ appendix>>.
5259
+
5260
+ Gotchas
5261
+ ~~~~~~~
5262
+ Incorrect character encoding::
5263
+ If you get an error message like `'UTF-8' codec can't decode ...`
5264
+ then you source file contains invalid UTF-8 characters -- set the
5265
+ AsciiDoc <<X54,encoding attribute>> for the correct character set
5266
+ (typically ISO-8859-1 (Latin-1) for European languages).
5267
+
5268
+ Invalid output::
5269
+ AsciiDoc attempts to validate the input AsciiDoc source but makes
5270
+ no attempt to validate the output markup, it leaves that to
5271
+ external tools such as `xmllint(1)` (integrated into `a2x(1)`).
5272
+ Backend validation cannot be hardcoded into AsciiDoc because
5273
+ backends are dynamically configured. The following example
5274
+ generates valid HTML but invalid DocBook (the DocBook `literal`
5275
+ element cannot contain an `emphasis` element):
5276
+
5277
+ +monospaced text with an _emphasized_ word+
5278
+
5279
+ Misinterpreted text formatting::
5280
+ You can suppress markup expansion by placing a backslash character
5281
+ immediately in front of the element. The following example
5282
+ suppresses inline monospaced formatting:
5283
+
5284
+ \+1 for C++.
5285
+
5286
+ Overlapping text formatting::
5287
+ Overlapping text formatting will generate illegal overlapping
5288
+ markup tags which will result in downstream XML parsing errors.
5289
+ Here's an example:
5290
+
5291
+ Some *strong markup _that overlaps* emphasized markup_.
5292
+
5293
+ Ambiguous underlines::
5294
+ A DelimitedBlock can immediately follow a paragraph without an
5295
+ intervening blank line, but be careful, a single line paragraph
5296
+ underline may be misinterpreted as a section title underline
5297
+ resulting in a ``closing block delimiter expected'' error.
5298
+
5299
+ Ambiguous ordered list items::
5300
+ Lines beginning with numbers at the end of sentences will be
5301
+ interpreted as ordered list items. The following example
5302
+ (incorrectly) begins a new list with item number 1999:
5303
+
5304
+ He was last sighted in
5305
+ 1999. Since then things have moved on.
5306
+ +
5307
+ The 'list item out of sequence' warning makes it unlikely that this
5308
+ problem will go unnoticed.
5309
+
5310
+ Special characters in attribute values::
5311
+ Special character substitution precedes attribute substitution so
5312
+ if attribute values contain special characters you may, depending
5313
+ on the substitution context, need to escape the special characters
5314
+ yourself. For example:
5315
+
5316
+ $ asciidoc -a 'orgname=Bill &amp; Ben Inc.' mydoc.txt
5317
+
5318
+ Attribute lists::
5319
+ If any named attribute entries are present then all string
5320
+ attribute values must be quoted. For example:
5321
+
5322
+ ["Desktop screenshot",width=32]
5323
+
5324
+ [[X90]]
5325
+ Combining separate documents
5326
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5327
+ You have a number of stand-alone AsciiDoc documents that you want to
5328
+ process as a single document. Simply processing them with a series of
5329
+ `include` macros won't work because the documents contain (level 0)
5330
+ document titles. The solution is to create a top level wrapper
5331
+ document and use the `leveloffset` attribute to push them all down one
5332
+ level. For example:
5333
+
5334
+ [listing]
5335
+ .....................................................................
5336
+ Combined Document Title
5337
+ =======================
5338
+
5339
+ // Push titles down one level.
5340
+ :leveloffset: 1
5341
+
5342
+ \include::document1.txt[]
5343
+
5344
+ // Return to normal title levels.
5345
+ :leveloffset: 0
5346
+
5347
+ A Top Level Section
5348
+ -------------------
5349
+ Lorum ipsum.
5350
+
5351
+ // Push titles down one level.
5352
+ :leveloffset: 1
5353
+
5354
+ \include::document2.txt[]
5355
+
5356
+ \include::document3.txt[]
5357
+ .....................................................................
5358
+
5359
+ The document titles in the included documents will now be processed as
5360
+ level 1 section titles, level 1 sections as level 2 sections and so
5361
+ on.
5362
+
5363
+ - Put a blank line between the `include` macro lines to ensure the
5364
+ title of the included document is not seen as part of the last
5365
+ paragraph of the previous document.
5366
+ - You won't want non-title document header lines (for example, Author
5367
+ and Revision lines) in the included files -- conditionally exclude
5368
+ them if they are necessary for stand-alone processing.
5369
+
5370
+ Processing document sections separately
5371
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5372
+ You have divided your AsciiDoc document into separate files (one per
5373
+ top level section) which are combined and processed with the following
5374
+ top level document:
5375
+
5376
+ ---------------------------------------------------------------------
5377
+ Combined Document Title
5378
+ =======================
5379
+ Joe Bloggs
5380
+ v1.0, 12-Aug-03
5381
+
5382
+ \include::section1.txt[]
5383
+
5384
+ \include::section2.txt[]
5385
+
5386
+ \include::section3.txt[]
5387
+ ---------------------------------------------------------------------
5388
+
5389
+ You also want to process the section files as separate documents.
5390
+ This is easy because asciidoc(1) will quite happily process
5391
+ `section1.txt`, `section2.txt` and `section3.txt` separately -- the
5392
+ resulting output documents contain the section but have no document
5393
+ title.
5394
+
5395
+ Processing document snippets
5396
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5397
+ Use the `-s` (`--no-header-footer`) command-line option to suppress
5398
+ header and footer output, this is useful if the processed output is to
5399
+ be included in another file. For example:
5400
+
5401
+ $ asciidoc -sb docbook section1.txt
5402
+
5403
+ asciidoc(1) can be used as a filter, so you can pipe chunks of text
5404
+ through it. For example:
5405
+
5406
+ $ echo 'Hello *World!*' | asciidoc -s -
5407
+ <div class="paragraph"><p>Hello <strong>World!</strong></p></div>
5408
+
5409
+ Badges in HTML page footers
5410
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5411
+ See the `[footer]` section in the AsciiDoc distribution `xhtml11.conf`
5412
+ configuration file.
5413
+
5414
+ Pretty printing AsciiDoc output
5415
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5416
+ If the indentation and layout of the asciidoc(1) output is not to your
5417
+ liking you can:
5418
+
5419
+ 1. Change the indentation and layout of configuration file markup
5420
+ template sections. The `{empty}` attribute is useful for outputting
5421
+ trailing blank lines in markup templates.
5422
+
5423
+ 2. Use Dave Raggett's http://tidy.sourceforge.net/[HTML Tidy] program
5424
+ to tidy asciidoc(1) output. Example:
5425
+
5426
+ $ asciidoc -b docbook -o - mydoc.txt | tidy -indent -xml >mydoc.xml
5427
+
5428
+ 3. Use the `xmllint(1)` format option. Example:
5429
+
5430
+ $ xmllint --format mydoc.xml
5431
+
5432
+ Supporting minor DocBook DTD variations
5433
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5434
+ The conditional inclusion of DocBook SGML markup at the end of the
5435
+ distribution `docbook45.conf` file illustrates how to support minor
5436
+ DTD variations. The included sections override corresponding entries
5437
+ from preceding sections.
5438
+
5439
+ Creating stand-alone HTML documents
5440
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5441
+ If you've ever tried to send someone an HTML document that includes
5442
+ stylesheets and images you'll know that it's not as straight-forward
5443
+ as exchanging a single file. AsciiDoc has options to create
5444
+ stand-alone documents containing embedded images, stylesheets and
5445
+ scripts. The following AsciiDoc command creates a single file
5446
+ containing <<X66,embedded images>>, CSS stylesheets, and JavaScript
5447
+ (for table of contents and footnotes):
5448
+
5449
+ $ asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt
5450
+
5451
+ You can view the HTML file here: {website}article-standalone.html[]
5452
+
5453
+ Shipping stand-alone AsciiDoc source
5454
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5455
+ Reproducing presentation documents from someone else's source has one
5456
+ major problem: unless your configuration files are the same as the
5457
+ creator's you won't get the same output.
5458
+
5459
+ The solution is to create a single backend specific configuration file
5460
+ using the asciidoc(1) `-c` (`--dump-conf`) command-line option. You
5461
+ then ship this file along with the AsciiDoc source document plus the
5462
+ `asciidoc.py` script. The only end user requirement is that they have
5463
+ Python installed (and that they consider you a trusted source). This
5464
+ example creates a composite HTML configuration file for `mydoc.txt`:
5465
+
5466
+ $ asciidoc -cb xhtml11 mydoc.txt > mydoc-xhtml11.conf
5467
+
5468
+ Ship `mydoc.txt`, `mydoc-html.conf`, and `asciidoc.py`. With
5469
+ these three files (and a Python interpreter) the recipient can
5470
+ regenerate the HMTL output:
5471
+
5472
+ $ ./asciidoc.py -eb xhtml11 mydoc.txt
5473
+
5474
+ The `-e` (`--no-conf`) option excludes the use of implicit
5475
+ configuration files, ensuring that only entries from the
5476
+ `mydoc-html.conf` configuration are used.
5477
+
5478
+ Inserting blank space
5479
+ ~~~~~~~~~~~~~~~~~~~~~
5480
+ Adjust your style sheets to add the correct separation between block
5481
+ elements. Inserting blank paragraphs containing a single non-breaking
5482
+ space character `{nbsp}` works but is an ad hoc solution compared
5483
+ to using style sheets.
5484
+
5485
+ Closing open sections
5486
+ ~~~~~~~~~~~~~~~~~~~~~
5487
+ You can close off section tags up to level `N` by calling the
5488
+ `eval::[Section.setlevel(N)]` system macro. This is useful if you
5489
+ want to include a section composed of raw markup. The following
5490
+ example includes a DocBook glossary division at the top section level
5491
+ (level 0):
5492
+
5493
+ ---------------------------------------------------------------------
5494
+ \ifdef::basebackend-docbook[]
5495
+
5496
+ \eval::[Section.setlevel(0)]
5497
+
5498
+ +++++++++++++++++++++++++++++++
5499
+ <glossary>
5500
+ <title>Glossary</title>
5501
+ <glossdiv>
5502
+ ...
5503
+ </glossdiv>
5504
+ </glossary>
5505
+ +++++++++++++++++++++++++++++++
5506
+ \endif::basebackend-docbook[]
5507
+ ---------------------------------------------------------------------
5508
+
5509
+ Validating output files
5510
+ ~~~~~~~~~~~~~~~~~~~~~~~
5511
+ Use `xmllint(1)` to check the AsciiDoc generated markup is both well
5512
+ formed and valid. Here are some examples:
5513
+
5514
+ $ xmllint --nonet --noout --valid docbook-file.xml
5515
+ $ xmllint --nonet --noout --valid xhtml11-file.html
5516
+ $ xmllint --nonet --noout --valid --html html4-file.html
5517
+
5518
+ The `--valid` option checks the file is valid against the document
5519
+ type's DTD, if the DTD is not installed in your system's catalog then
5520
+ it will be fetched from its Internet location. If you omit the
5521
+ `--valid` option the document will only be checked that it is well
5522
+ formed.
5523
+
5524
+ The online http://validator.w3.org/#validate_by_uri+with_options[W3C
5525
+ Markup Validation Service] is the defacto standard when it comes to
5526
+ validating HTML (it validates all HTML standards including HTML5).
5527
+
5528
+
5529
+ :numbered!:
5530
+
5531
+ [glossary]
5532
+ Glossary
5533
+ --------
5534
+ [glossary]
5535
+ [[X8]] Block element::
5536
+ An AsciiDoc block element is a document entity composed of one or
5537
+ more whole lines of text.
5538
+
5539
+ [[X34]] Inline element::
5540
+ AsciiDoc inline elements occur within block element textual
5541
+ content, they perform formatting and substitution tasks.
5542
+
5543
+ Formal element::
5544
+ An AsciiDoc block element that has a BlockTitle. Formal elements
5545
+ are normally listed in front or back matter, for example lists of
5546
+ tables, examples and figures.
5547
+
5548
+ Verbatim element::
5549
+ The word verbatim indicates that white space and line breaks in
5550
+ the source document are to be preserved in the output document.
5551
+
5552
+
5553
+ [appendix]
5554
+ Migration Notes
5555
+ ---------------
5556
+ [[X53]]
5557
+ Version 7 to version 8
5558
+ ~~~~~~~~~~~~~~~~~~~~~~
5559
+ - A new set of quotes has been introduced which may match inline text
5560
+ in existing documents -- if they do you'll need to escape the
5561
+ matched text with backslashes.
5562
+ - The index entry inline macro syntax has changed -- if your documents
5563
+ include indexes you may need to edit them.
5564
+ - Replaced a2x(1) `--no-icons` and `--no-copy` options with their
5565
+ negated equivalents: `--icons` and `--copy` respectively. The
5566
+ default behavior has also changed -- the use of icons and copying of
5567
+ icon and CSS files must be specified explicitly with the `--icons`
5568
+ and `--copy` options.
5569
+
5570
+ The rationale for the changes can be found in the AsciiDoc
5571
+ `CHANGELOG`.
5572
+
5573
+ NOTE: If you want to disable unconstrained quotes, the new alternative
5574
+ constrained quotes syntax and the new index entry syntax then you can
5575
+ define the attribute `asciidoc7compatible` (for example by using the
5576
+ `-a asciidoc7compatible` command-line option).
5577
+
5578
+ [[X38]]
5579
+ [appendix]
5580
+ Packager Notes
5581
+ --------------
5582
+ Read the `README` and `INSTALL` files (in the distribution root
5583
+ directory) for install prerequisites and procedures. The distribution
5584
+ `Makefile.in` (used by `configure` to generate the `Makefile`) is the
5585
+ canonical installation procedure.
5586
+
5587
+
5588
+ [[X39]]
5589
+ [appendix]
5590
+ AsciiDoc Safe Mode
5591
+ -------------------
5592
+ AsciiDoc 'safe mode' skips potentially dangerous scripted sections in
5593
+ AsciiDoc source files by inhibiting the execution of arbitrary code or
5594
+ the inclusion of arbitrary files.
5595
+
5596
+ The safe mode is disabled by default, it can be enabled with the
5597
+ asciidoc(1) `--safe` command-line option.
5598
+
5599
+ .Safe mode constraints
5600
+ - `eval`, `sys` and `sys2` executable attributes and block macros are
5601
+ not executed.
5602
+ - `include::<filename>[]` and `include1::<filename>[]` block macro
5603
+ files must reside inside the parent file's directory.
5604
+ - `{include:<filename>}` executable attribute files must reside
5605
+ inside the source document directory.
5606
+ - Passthrough Blocks are dropped.
5607
+
5608
+ [WARNING]
5609
+ =====================================================================
5610
+ The safe mode is not designed to protect against unsafe AsciiDoc
5611
+ configuration files. Be especially careful when:
5612
+
5613
+ 1. Implementing filters.
5614
+ 2. Implementing elements that don't escape special characters.
5615
+ 3. Accepting configuration files from untrusted sources.
5616
+ =====================================================================
5617
+
5618
+
5619
+ [appendix]
5620
+ Using AsciiDoc with non-English Languages
5621
+ -----------------------------------------
5622
+ AsciiDoc can process UTF-8 character sets but there are some things
5623
+ you need to be aware of:
5624
+
5625
+ - If you are generating output documents using a DocBook toolchain
5626
+ then you should set the AsciiDoc `lang` attribute to the appropriate
5627
+ language (it defaults to `en` (English)). This will ensure things
5628
+ like table of contents, figure and table captions and admonition
5629
+ captions are output in the specified language. For example:
5630
+
5631
+ $ a2x -a lang=es doc/article.txt
5632
+
5633
+ - If you are outputting HTML directly from asciidoc(1) you'll
5634
+ need to set the various `*_caption` attributes to match your target
5635
+ language (see the list of captions and titles in the `[attributes]`
5636
+ section of the distribution `lang-*.conf` files). The easiest way is
5637
+ to create a language `.conf` file (see the AsciiDoc's `lang-en.conf`
5638
+ file).
5639
+ +
5640
+ NOTE: You still use the 'NOTE', 'CAUTION', 'TIP', 'WARNING',
5641
+ 'IMPORTANT' captions in the AsciiDoc source, they get translated in
5642
+ the HTML output file.
5643
+
5644
+ - asciidoc(1) automatically loads configuration files named like
5645
+ `lang-<lang>.conf` where `<lang>` is a two letter language code that
5646
+ matches the current AsciiDoc `lang` attribute. See also
5647
+ <<X27,Configuration File Names and Locations>>.
5648
+
5649
+
5650
+ [appendix]
5651
+ Vim Syntax Highlighter
5652
+ ----------------------
5653
+ Syntax highlighting is incredibly useful, in addition to making
5654
+ reading AsciiDoc documents much easier syntax highlighting also helps
5655
+ you catch AsciiDoc syntax errors as you write your documents.
5656
+
5657
+ The AsciiDoc `./vim/` distribution directory contains Vim syntax
5658
+ highlighter and filetype detection scripts for AsciiDoc. Syntax
5659
+ highlighting makes it much easier to spot AsciiDoc syntax errors.
5660
+
5661
+ If Vim is installed on your system the AsciiDoc installer
5662
+ (`install.sh`) will automatically install the vim scripts in the Vim
5663
+ global configuration directory (`/etc/vim`).
5664
+
5665
+ You can also turn on syntax highlighting by adding the following line
5666
+ to the end of you AsciiDoc source files:
5667
+
5668
+ // vim: set syntax=asciidoc:
5669
+
5670
+ TIP: Bold fonts are often easier to read, use the Vim `:set
5671
+ background=dark` command to set bold bright fonts.
5672
+
5673
+ NOTE: There are a number of alternative syntax highlighters for
5674
+ various editors listed on the {website}[AsciiDoc website].
5675
+
5676
+ Limitations
5677
+ ~~~~~~~~~~~
5678
+ The current implementation does a reasonable job but on occasions gets
5679
+ things wrong:
5680
+
5681
+ - Nested quoted text formatting is highlighted according to the outer
5682
+ format.
5683
+ - If a closing Example Block delimiter is sometimes mistaken for a
5684
+ title underline. A workaround is to insert a blank line before the
5685
+ closing delimiter.
5686
+ - Lines within a paragraph starting with equals characters may be
5687
+ highlighted as single-line titles.
5688
+ - Lines within a paragraph beginning with a period may be highlighted
5689
+ as block titles.
5690
+
5691
+
5692
+ [[X74]]
5693
+ [appendix]
5694
+ Attribute Options
5695
+ -----------------
5696
+ Here is the list of predefined <<X75,attribute list options>>:
5697
+
5698
+
5699
+ [cols="2e,2,2,5",frame="topbot",options="header"]
5700
+ |====================================================================
5701
+ |Option|Backends|AsciiDoc Elements|Description
5702
+
5703
+ |autowidth |xhtml11, html5, html4 |table|
5704
+ The column widths are determined by the browser, not the AsciiDoc
5705
+ 'cols' attribute. If there is no 'width' attribute the table width is
5706
+ also left up to the browser.
5707
+
5708
+ |unbreakable |xhtml11, html5 |block elements|
5709
+ 'unbreakable' attempts to keep the block element together on a single
5710
+ printed page c.f. the 'breakable' and 'unbreakable' docbook (XSL/FO)
5711
+ options below.
5712
+
5713
+ |breakable, unbreakable |docbook (XSL/FO) |table, example, block image|
5714
+ The 'breakable' options allows block elements to break across page
5715
+ boundaries; 'unbreakable' attempts to keep the block element together
5716
+ on a single page. If neither option is specified the default XSL
5717
+ stylesheet behavior prevails.
5718
+
5719
+ |compact |docbook, xhtml11, html5 |bulleted list, numbered list|
5720
+ Minimizes vertical space in the list
5721
+
5722
+ |footer |docbook, xhtml11, html5, html4 |table|
5723
+ The last row of the table is rendered as a footer.
5724
+
5725
+ |header |docbook, xhtml11, html5, html4 |table|
5726
+ The first row of the table is rendered as a header.
5727
+
5728
+ |pgwide |docbook (XSL/FO) |table, block image, horizontal labeled list|
5729
+ Specifies that the element should be rendered across the full text
5730
+ width of the page irrespective of the current indentation.
5731
+
5732
+ |strong |xhtml11, html5, html4 |labeled lists|
5733
+ Emboldens label text.
5734
+ |====================================================================
5735
+
5736
+
5737
+ [[X82]]
5738
+ [appendix]
5739
+ Diagnostics
5740
+ -----------
5741
+ The `asciidoc(1)` `--verbose` command-line option prints additional
5742
+ information to stderr: files processed, filters processed, warnings,
5743
+ system attribute evaluation.
5744
+
5745
+ A special attribute named 'trace' enables the output of
5746
+ element-by-element diagnostic messages detailing output markup
5747
+ generation to stderr. The 'trace' attribute can be set on the
5748
+ command-line or from within the document using <<X18,Attribute
5749
+ Entries>> (the latter allows tracing to be confined to specific
5750
+ portions of the document).
5751
+
5752
+ - Trace messages print the source file name and line number and the
5753
+ trace name followed by related markup.
5754
+ - 'trace names' are normally the names of AsciiDoc elements (see the
5755
+ list below).
5756
+ - The trace message is only printed if the 'trace' attribute value
5757
+ matches the start of a 'trace name'. The 'trace' attribute value can
5758
+ be any Python regular expression. If a trace value is not specified
5759
+ all trace messages will be printed (this can result in large amounts
5760
+ of output if applied to the whole document).
5761
+
5762
+ - In the case of inline substitutions:
5763
+ * The text before and after the substitution is printed; the before
5764
+ text is preceded by a line containing `<<<` and the after text by
5765
+ a line containing `>>>`.
5766
+ * The 'subs' trace value is an alias for all inline substitutions.
5767
+
5768
+ .Trace names
5769
+ .....................................................................
5770
+ <blockname> block close
5771
+ <blockname> block open
5772
+ <subs>
5773
+ dropped line (a line containing an undefined attribute reference).
5774
+ floating title
5775
+ footer
5776
+ header
5777
+ list close
5778
+ list entry close
5779
+ list entry open
5780
+ list item close
5781
+ list item open
5782
+ list label close
5783
+ list label open
5784
+ list open
5785
+ macro block (a block macro)
5786
+ name (man page NAME section)
5787
+ paragraph
5788
+ preamble close
5789
+ preamble open
5790
+ push blockname
5791
+ pop blockname
5792
+ section close
5793
+ section open: level <level>
5794
+ subs (all inline substitutions)
5795
+ table
5796
+ .....................................................................
5797
+
5798
+ Where:
5799
+
5800
+ - `<level>` is section level number '0...4'.
5801
+ - `<blockname>` is a delimited block name: 'comment', 'sidebar',
5802
+ 'open', 'pass', 'listing', 'literal', 'quote', 'example'.
5803
+ - `<subs>` is an inline substitution type:
5804
+ 'specialcharacters','quotes','specialwords', 'replacements',
5805
+ 'attributes','macros','callouts', 'replacements2', 'replacements3'.
5806
+
5807
+ Command-line examples:
5808
+
5809
+ . Trace the entire document.
5810
+
5811
+ $ asciidoc -a trace mydoc.txt
5812
+
5813
+ . Trace messages whose names start with `quotes` or `macros`:
5814
+
5815
+ $ asciidoc -a 'trace=quotes|macros' mydoc.txt
5816
+
5817
+ . Print the first line of each trace message:
5818
+
5819
+ $ asciidoc -a trace mydoc.txt 2>&1 | grep ^TRACE:
5820
+
5821
+ Attribute Entry examples:
5822
+
5823
+ . Begin printing all trace messages:
5824
+
5825
+ :trace:
5826
+
5827
+ . Print only matched trace messages:
5828
+
5829
+ :trace: quotes|macros
5830
+
5831
+ . Turn trace messages off:
5832
+
5833
+ :trace!:
5834
+
5835
+
5836
+ [[X88]]
5837
+ [appendix]
5838
+ Backend Attributes
5839
+ ------------------
5840
+ This table contains a list of optional attributes that influence the
5841
+ generated outputs.
5842
+
5843
+ [cols="1e,1,5a",frame="topbot",options="header"]
5844
+ |====================================================================
5845
+ |Name |Backends |Description
5846
+
5847
+ |badges |xhtml11, html5 |
5848
+ Link badges ('XHTML 1.1' and 'CSS') in document footers. By default
5849
+ badges are omitted ('badges' is undefined).
5850
+
5851
+ NOTE: The path names of images, icons and scripts are relative path
5852
+ names to the output document not the source document.
5853
+
5854
+ |data-uri |xhtml11, html5 |
5855
+ Embed images using the <<X66,data: uri scheme>>.
5856
+
5857
+ |css-signature |html5, xhtml11 |
5858
+ Set a 'CSS signature' for the document (sets the 'id' attribute of the
5859
+ HTML 'body' element). CSS signatures provide a mechanism that allows
5860
+ users to personalize the document appearance. The term 'CSS signature'
5861
+ was http://archivist.incutio.com/viewlist/css-discuss/13291[coined by
5862
+ Eric Meyer].
5863
+
5864
+
5865
+ |disable-javascript |xhtml11, html5 |
5866
+ If the `disable-javascript` attribute is defined the `asciidoc.js`
5867
+ JavaScript is not embedded or linked to the output document. By
5868
+ default AsciiDoc automatically embeds or links the `asciidoc.js`
5869
+ JavaScript to the output document. The script dynamically generates
5870
+ <<X91,table of contents>> and <<X92,footnotes>>.
5871
+
5872
+ |[[X97]] docinfo, docinfo1, docinfo2 |All backends |
5873
+ These three attributes control which <<X87,document information
5874
+ files>> will be included in the the header of the output file:
5875
+
5876
+ docinfo:: Include `<filename>-docinfo.<ext>`
5877
+ docinfo1:: Include `docinfo.<ext>`
5878
+ docinfo2:: Include `docinfo.<ext>` and `<filename>-docinfo.<ext>`
5879
+
5880
+ Where `<filename>` is the file name (sans extension) of the AsciiDoc
5881
+ input file and `<ext>` is `.html` for HTML outputs or `.xml` for
5882
+ DocBook outputs. If the input file is the standard input then the
5883
+ output file name is used. The following example will include the
5884
+ `mydoc-docinfo.xml` docinfo file in the DocBook `mydoc.xml` output
5885
+ file:
5886
+
5887
+ $ asciidoc -a docinfo -b docbook mydoc.txt
5888
+
5889
+ This next example will include `docinfo.html` and `mydoc-docinfo.html`
5890
+ docinfo files in the HTML output file:
5891
+
5892
+ $ asciidoc -a docinfo2 -b html4 mydoc.txt
5893
+
5894
+
5895
+ |[[X54]]encoding |html4, html5, xhtml11, docbook |
5896
+ Set the input and output document character set encoding. For example
5897
+ the `--attribute encoding=ISO-8859-1` command-line option will set the
5898
+ character set encoding to `ISO-8859-1`.
5899
+
5900
+ - The default encoding is UTF-8.
5901
+ - This attribute specifies the character set in the output document.
5902
+ - The encoding name must correspond to a Python codec name or alias.
5903
+ - The 'encoding' attribute can be set using an AttributeEntry inside
5904
+ the document header. For example:
5905
+
5906
+ :encoding: ISO-8859-1
5907
+
5908
+ |[[X45]]icons |xhtml11, html5 |
5909
+ Link admonition paragraph and admonition block icon images and badge
5910
+ images. By default 'icons' is undefined and text is used in place of
5911
+ icon images.
5912
+
5913
+ |[[X44]]iconsdir |html4, html5, xhtml11, docbook |
5914
+ The name of the directory containing linked admonition icons,
5915
+ navigation icons and the `callouts` sub-directory (the `callouts`
5916
+ sub-directory contains <<X105,callout>> number images). 'iconsdir'
5917
+ defaults to `./images/icons`.
5918
+
5919
+ |imagesdir |html4, html5, xhtml11, docbook |
5920
+ If this attribute is defined it is prepended to the target image file
5921
+ name paths in inline and block image macros.
5922
+
5923
+ |keywords, description, title |html4, html5, xhtml11 |
5924
+ The 'keywords' and 'description' attributes set the correspondingly
5925
+ named HTML meta tag contents; the 'title' attribute sets the HTML
5926
+ title tag contents. Their principle use is for SEO (Search Engine
5927
+ Optimisation). All three are optional, but if they are used they must
5928
+ appear in the document header (or on the command-line). If 'title' is
5929
+ not specified the AsciiDoc document title is used.
5930
+
5931
+ |linkcss |html5, xhtml11 |
5932
+ Link CSS stylesheets and JavaScripts. By default 'linkcss' is
5933
+ undefined in which case stylesheets and scripts are automatically
5934
+ embedded in the output document.
5935
+
5936
+ |[[X103]]max-width |html5, xhtml11 |
5937
+ Set the document maximum display width (sets the 'body' element CSS
5938
+ 'max-width' property).
5939
+
5940
+ |numbered |html4, html5, xhtml11, docbook (XSL Stylesheets) |
5941
+ Adds section numbers to section titles. The 'docbook' backend ignores
5942
+ 'numbered' attribute entries after the document header.
5943
+
5944
+ |plaintext | All backends |
5945
+ If this global attribute is defined all inline substitutions are
5946
+ suppressed and block indents are retained. This option is useful when
5947
+ dealing with large amounts of imported plain text.
5948
+
5949
+ |quirks |xhtml11 |
5950
+ Include the `xhtml11-quirks.conf` configuration file and
5951
+ `xhtml11-quirks.css` <<X35,stylesheet>> to work around IE6 browser
5952
+ incompatibilities. This feature is deprecated and its use is
5953
+ discouraged -- documents are still viewable in IE6 without it.
5954
+
5955
+ |revremark |docbook |
5956
+ A short summary of changes in this document revision. Must be defined
5957
+ prior to the first document section. The document also needs to be
5958
+ dated to output this attribute.
5959
+
5960
+ |scriptsdir |html5, xhtml11 |
5961
+ The name of the directory containing linked JavaScripts.
5962
+ See <<X35,HTML stylesheets and JavaScript locations>>.
5963
+
5964
+ |sgml |docbook45 |
5965
+ The `--backend=docbook45` command-line option produces DocBook 4.5
5966
+ XML. You can produce the older DocBook SGML format using the
5967
+ `--attribute sgml` command-line option.
5968
+
5969
+ |stylesdir |html5, xhtml11 |
5970
+ The name of the directory containing linked or embedded
5971
+ <<X35,stylesheets>>.
5972
+ See <<X35,HTML stylesheets and JavaScript locations>>.
5973
+
5974
+ |stylesheet |html5, xhtml11 |
5975
+ The file name of an optional additional CSS <<X35,stylesheet>>.
5976
+
5977
+ |theme |html5, xhtml11 |
5978
+ Use alternative stylesheet (see <<X35,Stylesheets>>).
5979
+
5980
+ |[[X91]]toc |html5, xhtml11, docbook (XSL Stylesheets) |
5981
+ Adds a table of contents to the start of an article or book document.
5982
+ The `toc` attribute can be specified using the `--attribute toc`
5983
+ command-line option or a `:toc:` attribute entry in the document
5984
+ header. The 'toc' attribute is defined by default when the 'docbook'
5985
+ backend is used. To disable table of contents generation undefine the
5986
+ 'toc' attribute by putting a `:toc!:` attribute entry in the document
5987
+ header or from the command-line with an `--attribute toc!` option.
5988
+
5989
+ *xhtml11 and html5 backends*
5990
+
5991
+ - JavaScript needs to be enabled in your browser.
5992
+ - The following example generates a numbered table of contents using a
5993
+ JavaScript embedded in the `mydoc.html` output document:
5994
+
5995
+ $ asciidoc -a toc -a numbered mydoc.txt
5996
+
5997
+ |toc2 |html5, xhtml11 |
5998
+ Adds a scrollable table of contents in the left hand margin of an
5999
+ article or book document. Use the 'max-width' attribute to change the
6000
+ content width. In all other respects behaves the same as the 'toc'
6001
+ attribute.
6002
+
6003
+ |toc-placement |html5, xhtml11 |
6004
+ When set to 'auto' (the default value) asciidoc(1) will place the
6005
+ table of contents in the document header. When 'toc-placement' is set
6006
+ to 'manual' the TOC can be positioned anywhere in the document by
6007
+ placing the `toc::[]` block macro at the point you want the TOC to
6008
+ appear.
6009
+
6010
+ NOTE: If you use 'toc-placement' then you also have to define the
6011
+ <<X91,toc>> attribute.
6012
+
6013
+ |toc-title |html5, xhtml11 |
6014
+ Sets the table of contents title (defaults to 'Table of Contents').
6015
+
6016
+ |toclevels |html5, xhtml11 |
6017
+ Sets the number of title levels (1..4) reported in the table of
6018
+ contents (see the 'toc' attribute above). Defaults to 2 and must be
6019
+ used with the 'toc' attribute. Example usage:
6020
+
6021
+ $ asciidoc -a toc -a toclevels=3 doc/asciidoc.txt
6022
+
6023
+ |====================================================================
6024
+
6025
+
6026
+ [appendix]
6027
+ License
6028
+ -------
6029
+ AsciiDoc is free software; you can redistribute it and/or modify it
6030
+ under the terms of the 'GNU General Public License version 2' (GPLv2)
6031
+ as published by the Free Software Foundation.
6032
+
6033
+ AsciiDoc is distributed in the hope that it will be useful, but
6034
+ WITHOUT ANY WARRANTY; without even the implied warranty of
6035
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6036
+ General Public License version 2 for more details.
6037
+
6038
+ AsciiDoc Highlighter sponsored by O'Reilly Media
6039
+
6040
+ Copyright (C) 2002-2011 Stuart Rackham.
ace-0.2.0/kitchen-sink/docs/AsciiDoc.html ADDED
@@ -0,0 +1,1544 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6
+ <meta name="generator" content="AsciiDoc 8.6.8" />
7
+ <title></title>
8
+ <style type="text/css">
9
+ /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
10
+
11
+ /* Default font. */
12
+ body {
13
+ font-family: Georgia,serif;
14
+ }
15
+
16
+ /* Title font. */
17
+ h1, h2, h3, h4, h5, h6,
18
+ div.title, caption.title,
19
+ thead, p.table.header,
20
+ #toctitle,
21
+ #author, #revnumber, #revdate, #revremark,
22
+ #footer {
23
+ font-family: Arial,Helvetica,sans-serif;
24
+ }
25
+
26
+ body {
27
+ margin: 1em 5% 1em 5%;
28
+ }
29
+
30
+ a {
31
+ color: blue;
32
+ text-decoration: underline;
33
+ }
34
+ a:visited {
35
+ color: fuchsia;
36
+ }
37
+
38
+ em {
39
+ font-style: italic;
40
+ color: navy;
41
+ }
42
+
43
+ strong {
44
+ font-weight: bold;
45
+ color: #083194;
46
+ }
47
+
48
+ h1, h2, h3, h4, h5, h6 {
49
+ color: #527bbd;
50
+ margin-top: 1.2em;
51
+ margin-bottom: 0.5em;
52
+ line-height: 1.3;
53
+ }
54
+
55
+ h1, h2, h3 {
56
+ border-bottom: 2px solid silver;
57
+ }
58
+ h2 {
59
+ padding-top: 0.5em;
60
+ }
61
+ h3 {
62
+ float: left;
63
+ }
64
+ h3 + * {
65
+ clear: left;
66
+ }
67
+ h5 {
68
+ font-size: 1.0em;
69
+ }
70
+
71
+ div.sectionbody {
72
+ margin-left: 0;
73
+ }
74
+
75
+ hr {
76
+ border: 1px solid silver;
77
+ }
78
+
79
+ p {
80
+ margin-top: 0.5em;
81
+ margin-bottom: 0.5em;
82
+ }
83
+
84
+ ul, ol, li > p {
85
+ margin-top: 0;
86
+ }
87
+ ul > li { color: #aaa; }
88
+ ul > li > * { color: black; }
89
+
90
+ .monospaced, code, pre {
91
+ font-family: "Courier New", Courier, monospace;
92
+ font-size: inherit;
93
+ color: navy;
94
+ padding: 0;
95
+ margin: 0;
96
+ }
97
+
98
+
99
+ #author {
100
+ color: #527bbd;
101
+ font-weight: bold;
102
+ font-size: 1.1em;
103
+ }
104
+ #email {
105
+ }
106
+ #revnumber, #revdate, #revremark {
107
+ }
108
+
109
+ #footer {
110
+ font-size: small;
111
+ border-top: 2px solid silver;
112
+ padding-top: 0.5em;
113
+ margin-top: 4.0em;
114
+ }
115
+ #footer-text {
116
+ float: left;
117
+ padding-bottom: 0.5em;
118
+ }
119
+ #footer-badges {
120
+ float: right;
121
+ padding-bottom: 0.5em;
122
+ }
123
+
124
+ #preamble {
125
+ margin-top: 1.5em;
126
+ margin-bottom: 1.5em;
127
+ }
128
+ div.imageblock, div.exampleblock, div.verseblock,
129
+ div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130
+ div.admonitionblock {
131
+ margin-top: 1.0em;
132
+ margin-bottom: 1.5em;
133
+ }
134
+ div.admonitionblock {
135
+ margin-top: 2.0em;
136
+ margin-bottom: 2.0em;
137
+ margin-right: 10%;
138
+ color: #606060;
139
+ }
140
+
141
+ div.content { /* Block element content. */
142
+ padding: 0;
143
+ }
144
+
145
+ /* Block element titles. */
146
+ div.title, caption.title {
147
+ color: #527bbd;
148
+ font-weight: bold;
149
+ text-align: left;
150
+ margin-top: 1.0em;
151
+ margin-bottom: 0.5em;
152
+ }
153
+ div.title + * {
154
+ margin-top: 0;
155
+ }
156
+
157
+ td div.title:first-child {
158
+ margin-top: 0.0em;
159
+ }
160
+ div.content div.title:first-child {
161
+ margin-top: 0.0em;
162
+ }
163
+ div.content + div.title {
164
+ margin-top: 0.0em;
165
+ }
166
+
167
+ div.sidebarblock > div.content {
168
+ background: #ffffee;
169
+ border: 1px solid #dddddd;
170
+ border-left: 4px solid #f0f0f0;
171
+ padding: 0.5em;
172
+ }
173
+
174
+ div.listingblock > div.content {
175
+ border: 1px solid #dddddd;
176
+ border-left: 5px solid #f0f0f0;
177
+ background: #f8f8f8;
178
+ padding: 0.5em;
179
+ }
180
+
181
+ div.quoteblock, div.verseblock {
182
+ padding-left: 1.0em;
183
+ margin-left: 1.0em;
184
+ margin-right: 10%;
185
+ border-left: 5px solid #f0f0f0;
186
+ color: #888;
187
+ }
188
+
189
+ div.quoteblock > div.attribution {
190
+ padding-top: 0.5em;
191
+ text-align: right;
192
+ }
193
+
194
+ div.verseblock > pre.content {
195
+ font-family: inherit;
196
+ font-size: inherit;
197
+ }
198
+ div.verseblock > div.attribution {
199
+ padding-top: 0.75em;
200
+ text-align: left;
201
+ }
202
+ /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
203
+ div.verseblock + div.attribution {
204
+ text-align: left;
205
+ }
206
+
207
+ div.admonitionblock .icon {
208
+ vertical-align: top;
209
+ font-size: 1.1em;
210
+ font-weight: bold;
211
+ text-decoration: underline;
212
+ color: #527bbd;
213
+ padding-right: 0.5em;
214
+ }
215
+ div.admonitionblock td.content {
216
+ padding-left: 0.5em;
217
+ border-left: 3px solid #dddddd;
218
+ }
219
+
220
+ div.exampleblock > div.content {
221
+ border-left: 3px solid #dddddd;
222
+ padding-left: 0.5em;
223
+ }
224
+
225
+ div.imageblock div.content { padding-left: 0; }
226
+ span.image img { border-style: none; }
227
+ a.image:visited { color: white; }
228
+
229
+ dl {
230
+ margin-top: 0.8em;
231
+ margin-bottom: 0.8em;
232
+ }
233
+ dt {
234
+ margin-top: 0.5em;
235
+ margin-bottom: 0;
236
+ font-style: normal;
237
+ color: navy;
238
+ }
239
+ dd > *:first-child {
240
+ margin-top: 0.1em;
241
+ }
242
+
243
+ ul, ol {
244
+ list-style-position: outside;
245
+ }
246
+ ol.arabic {
247
+ list-style-type: decimal;
248
+ }
249
+ ol.loweralpha {
250
+ list-style-type: lower-alpha;
251
+ }
252
+ ol.upperalpha {
253
+ list-style-type: upper-alpha;
254
+ }
255
+ ol.lowerroman {
256
+ list-style-type: lower-roman;
257
+ }
258
+ ol.upperroman {
259
+ list-style-type: upper-roman;
260
+ }
261
+
262
+ div.compact ul, div.compact ol,
263
+ div.compact p, div.compact p,
264
+ div.compact div, div.compact div {
265
+ margin-top: 0.1em;
266
+ margin-bottom: 0.1em;
267
+ }
268
+
269
+ tfoot {
270
+ font-weight: bold;
271
+ }
272
+ td > div.verse {
273
+ white-space: pre;
274
+ }
275
+
276
+ div.hdlist {
277
+ margin-top: 0.8em;
278
+ margin-bottom: 0.8em;
279
+ }
280
+ div.hdlist tr {
281
+ padding-bottom: 15px;
282
+ }
283
+ dt.hdlist1.strong, td.hdlist1.strong {
284
+ font-weight: bold;
285
+ }
286
+ td.hdlist1 {
287
+ vertical-align: top;
288
+ font-style: normal;
289
+ padding-right: 0.8em;
290
+ color: navy;
291
+ }
292
+ td.hdlist2 {
293
+ vertical-align: top;
294
+ }
295
+ div.hdlist.compact tr {
296
+ margin: 0;
297
+ padding-bottom: 0;
298
+ }
299
+
300
+ .comment {
301
+ background: yellow;
302
+ }
303
+
304
+ .footnote, .footnoteref {
305
+ font-size: 0.8em;
306
+ }
307
+
308
+ span.footnote, span.footnoteref {
309
+ vertical-align: super;
310
+ }
311
+
312
+ #footnotes {
313
+ margin: 20px 0 20px 0;
314
+ padding: 7px 0 0 0;
315
+ }
316
+
317
+ #footnotes div.footnote {
318
+ margin: 0 0 5px 0;
319
+ }
320
+
321
+ #footnotes hr {
322
+ border: none;
323
+ border-top: 1px solid silver;
324
+ height: 1px;
325
+ text-align: left;
326
+ margin-left: 0;
327
+ width: 20%;
328
+ min-width: 100px;
329
+ }
330
+
331
+ div.colist td {
332
+ padding-right: 0.5em;
333
+ padding-bottom: 0.3em;
334
+ vertical-align: top;
335
+ }
336
+ div.colist td img {
337
+ margin-top: 0.3em;
338
+ }
339
+
340
+ @media print {
341
+ #footer-badges { display: none; }
342
+ }
343
+
344
+ #toc {
345
+ margin-bottom: 2.5em;
346
+ }
347
+
348
+ #toctitle {
349
+ color: #527bbd;
350
+ font-size: 1.1em;
351
+ font-weight: bold;
352
+ margin-top: 1.0em;
353
+ margin-bottom: 0.1em;
354
+ }
355
+
356
+ div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
357
+ margin-top: 0;
358
+ margin-bottom: 0;
359
+ }
360
+ div.toclevel2 {
361
+ margin-left: 2em;
362
+ font-size: 0.9em;
363
+ }
364
+ div.toclevel3 {
365
+ margin-left: 4em;
366
+ font-size: 0.9em;
367
+ }
368
+ div.toclevel4 {
369
+ margin-left: 6em;
370
+ font-size: 0.9em;
371
+ }
372
+
373
+ span.aqua { color: aqua; }
374
+ span.black { color: black; }
375
+ span.blue { color: blue; }
376
+ span.fuchsia { color: fuchsia; }
377
+ span.gray { color: gray; }
378
+ span.green { color: green; }
379
+ span.lime { color: lime; }
380
+ span.maroon { color: maroon; }
381
+ span.navy { color: navy; }
382
+ span.olive { color: olive; }
383
+ span.purple { color: purple; }
384
+ span.red { color: red; }
385
+ span.silver { color: silver; }
386
+ span.teal { color: teal; }
387
+ span.white { color: white; }
388
+ span.yellow { color: yellow; }
389
+
390
+ span.aqua-background { background: aqua; }
391
+ span.black-background { background: black; }
392
+ span.blue-background { background: blue; }
393
+ span.fuchsia-background { background: fuchsia; }
394
+ span.gray-background { background: gray; }
395
+ span.green-background { background: green; }
396
+ span.lime-background { background: lime; }
397
+ span.maroon-background { background: maroon; }
398
+ span.navy-background { background: navy; }
399
+ span.olive-background { background: olive; }
400
+ span.purple-background { background: purple; }
401
+ span.red-background { background: red; }
402
+ span.silver-background { background: silver; }
403
+ span.teal-background { background: teal; }
404
+ span.white-background { background: white; }
405
+ span.yellow-background { background: yellow; }
406
+
407
+ span.big { font-size: 2em; }
408
+ span.small { font-size: 0.6em; }
409
+
410
+ span.underline { text-decoration: underline; }
411
+ span.overline { text-decoration: overline; }
412
+ span.line-through { text-decoration: line-through; }
413
+
414
+ div.unbreakable { page-break-inside: avoid; }
415
+
416
+
417
+ /*
418
+ * xhtml11 specific
419
+ *
420
+ * */
421
+
422
+ div.tableblock {
423
+ margin-top: 1.0em;
424
+ margin-bottom: 1.5em;
425
+ }
426
+ div.tableblock > table {
427
+ border: 3px solid #527bbd;
428
+ }
429
+ thead, p.table.header {
430
+ font-weight: bold;
431
+ color: #527bbd;
432
+ }
433
+ p.table {
434
+ margin-top: 0;
435
+ }
436
+ /* Because the table frame attribute is overriden by CSS in most browsers. */
437
+ div.tableblock > table[frame="void"] {
438
+ border-style: none;
439
+ }
440
+ div.tableblock > table[frame="hsides"] {
441
+ border-left-style: none;
442
+ border-right-style: none;
443
+ }
444
+ div.tableblock > table[frame="vsides"] {
445
+ border-top-style: none;
446
+ border-bottom-style: none;
447
+ }
448
+
449
+
450
+ /*
451
+ * html5 specific
452
+ *
453
+ * */
454
+
455
+ table.tableblock {
456
+ margin-top: 1.0em;
457
+ margin-bottom: 1.5em;
458
+ }
459
+ thead, p.tableblock.header {
460
+ font-weight: bold;
461
+ color: #527bbd;
462
+ }
463
+ p.tableblock {
464
+ margin-top: 0;
465
+ }
466
+ table.tableblock {
467
+ border-width: 3px;
468
+ border-spacing: 0px;
469
+ border-style: solid;
470
+ border-color: #527bbd;
471
+ border-collapse: collapse;
472
+ }
473
+ th.tableblock, td.tableblock {
474
+ border-width: 1px;
475
+ padding: 4px;
476
+ border-style: solid;
477
+ border-color: #527bbd;
478
+ }
479
+
480
+ table.tableblock.frame-topbot {
481
+ border-left-style: hidden;
482
+ border-right-style: hidden;
483
+ }
484
+ table.tableblock.frame-sides {
485
+ border-top-style: hidden;
486
+ border-bottom-style: hidden;
487
+ }
488
+ table.tableblock.frame-none {
489
+ border-style: hidden;
490
+ }
491
+
492
+ th.tableblock.halign-left, td.tableblock.halign-left {
493
+ text-align: left;
494
+ }
495
+ th.tableblock.halign-center, td.tableblock.halign-center {
496
+ text-align: center;
497
+ }
498
+ th.tableblock.halign-right, td.tableblock.halign-right {
499
+ text-align: right;
500
+ }
501
+
502
+ th.tableblock.valign-top, td.tableblock.valign-top {
503
+ vertical-align: top;
504
+ }
505
+ th.tableblock.valign-middle, td.tableblock.valign-middle {
506
+ vertical-align: middle;
507
+ }
508
+ th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509
+ vertical-align: bottom;
510
+ }
511
+
512
+
513
+ /*
514
+ * manpage specific
515
+ *
516
+ * */
517
+
518
+ body.manpage h1 {
519
+ padding-top: 0.5em;
520
+ padding-bottom: 0.5em;
521
+ border-top: 2px solid silver;
522
+ border-bottom: 2px solid silver;
523
+ }
524
+ body.manpage h2 {
525
+ border-style: none;
526
+ }
527
+ body.manpage div.sectionbody {
528
+ margin-left: 3em;
529
+ }
530
+
531
+ @media print {
532
+ body.manpage div#toc { display: none; }
533
+ }
534
+
535
+
536
+ </style>
537
+ <script type="text/javascript">
538
+ /*<![CDATA[*/
539
+ var asciidoc = { // Namespace.
540
+
541
+ /////////////////////////////////////////////////////////////////////
542
+ // Table Of Contents generator
543
+ /////////////////////////////////////////////////////////////////////
544
+
545
+ /* Author: Mihai Bazon, September 2002
546
+ * http://students.infoiasi.ro/~mishoo
547
+ *
548
+ * Table Of Content generator
549
+ * Version: 0.4
550
+ *
551
+ * Feel free to use this script under the terms of the GNU General Public
552
+ * License, as long as you do not remove or alter this notice.
553
+ */
554
+
555
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
556
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
557
+
558
+ // toclevels = 1..4.
559
+ toc: function (toclevels) {
560
+
561
+ function getText(el) {
562
+ var text = "";
563
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
564
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565
+ text += i.data;
566
+ else if (i.firstChild != null)
567
+ text += getText(i);
568
+ }
569
+ return text;
570
+ }
571
+
572
+ function TocEntry(el, text, toclevel) {
573
+ this.element = el;
574
+ this.text = text;
575
+ this.toclevel = toclevel;
576
+ }
577
+
578
+ function tocEntries(el, toclevels) {
579
+ var result = new Array;
580
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
581
+ // Function that scans the DOM tree for header elements (the DOM2
582
+ // nodeIterator API would be a better technique but not supported by all
583
+ // browsers).
584
+ var iterate = function (el) {
585
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
586
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587
+ var mo = re.exec(i.tagName);
588
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
590
+ }
591
+ iterate(i);
592
+ }
593
+ }
594
+ }
595
+ iterate(el);
596
+ return result;
597
+ }
598
+
599
+ var toc = document.getElementById("toc");
600
+ if (!toc) {
601
+ return;
602
+ }
603
+
604
+ // Delete existing TOC entries in case we're reloading the TOC.
605
+ var tocEntriesToRemove = [];
606
+ var i;
607
+ for (i = 0; i < toc.childNodes.length; i++) {
608
+ var entry = toc.childNodes[i];
609
+ if (entry.nodeName.toLowerCase() == 'div'
610
+ && entry.getAttribute("class")
611
+ && entry.getAttribute("class").match(/^toclevel/))
612
+ tocEntriesToRemove.push(entry);
613
+ }
614
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
615
+ toc.removeChild(tocEntriesToRemove[i]);
616
+ }
617
+
618
+ // Rebuild TOC entries.
619
+ var entries = tocEntries(document.getElementById("content"), toclevels);
620
+ for (var i = 0; i < entries.length; ++i) {
621
+ var entry = entries[i];
622
+ if (entry.element.id == "")
623
+ entry.element.id = "_toc_" + i;
624
+ var a = document.createElement("a");
625
+ a.href = "#" + entry.element.id;
626
+ a.appendChild(document.createTextNode(entry.text));
627
+ var div = document.createElement("div");
628
+ div.appendChild(a);
629
+ div.className = "toclevel" + entry.toclevel;
630
+ toc.appendChild(div);
631
+ }
632
+ if (entries.length == 0)
633
+ toc.parentNode.removeChild(toc);
634
+ },
635
+
636
+
637
+ /////////////////////////////////////////////////////////////////////
638
+ // Footnotes generator
639
+ /////////////////////////////////////////////////////////////////////
640
+
641
+ /* Based on footnote generation code from:
642
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
643
+ */
644
+
645
+ footnotes: function () {
646
+ // Delete existing footnote entries in case we're reloading the footnodes.
647
+ var i;
648
+ var noteholder = document.getElementById("footnotes");
649
+ if (!noteholder) {
650
+ return;
651
+ }
652
+ var entriesToRemove = [];
653
+ for (i = 0; i < noteholder.childNodes.length; i++) {
654
+ var entry = noteholder.childNodes[i];
655
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656
+ entriesToRemove.push(entry);
657
+ }
658
+ for (i = 0; i < entriesToRemove.length; i++) {
659
+ noteholder.removeChild(entriesToRemove[i]);
660
+ }
661
+
662
+ // Rebuild footnote entries.
663
+ var cont = document.getElementById("content");
664
+ var spans = cont.getElementsByTagName("span");
665
+ var refs = {};
666
+ var n = 0;
667
+ for (i=0; i<spans.length; i++) {
668
+ if (spans[i].className == "footnote") {
669
+ n++;
670
+ var note = spans[i].getAttribute("data-note");
671
+ if (!note) {
672
+ // Use [\s\S] in place of . so multi-line matches work.
673
+ // Because JavaScript has no s (dotall) regex flag.
674
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675
+ spans[i].innerHTML =
676
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
678
+ spans[i].setAttribute("data-note", note);
679
+ }
680
+ noteholder.innerHTML +=
681
+ "<div class='footnote' id='_footnote_" + n + "'>" +
682
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683
+ n + "</a>. " + note + "</div>";
684
+ var id =spans[i].getAttribute("id");
685
+ if (id != null) refs["#"+id] = n;
686
+ }
687
+ }
688
+ if (n == 0)
689
+ noteholder.parentNode.removeChild(noteholder);
690
+ else {
691
+ // Process footnoterefs.
692
+ for (i=0; i<spans.length; i++) {
693
+ if (spans[i].className == "footnoteref") {
694
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
696
+ n = refs[href];
697
+ spans[i].innerHTML =
698
+ "[<a href='#_footnote_" + n +
699
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
700
+ }
701
+ }
702
+ }
703
+ },
704
+
705
+ install: function(toclevels) {
706
+ var timerId;
707
+
708
+ function reinstall() {
709
+ asciidoc.footnotes();
710
+ if (toclevels) {
711
+ asciidoc.toc(toclevels);
712
+ }
713
+ }
714
+
715
+ function reinstallAndRemoveTimer() {
716
+ clearInterval(timerId);
717
+ reinstall();
718
+ }
719
+
720
+ timerId = setInterval(reinstall, 500);
721
+ if (document.addEventListener)
722
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723
+ else
724
+ window.onload = reinstallAndRemoveTimer;
725
+ }
726
+
727
+ }
728
+ asciidoc.install();
729
+ /*]]>*/
730
+ </script>
731
+ </head>
732
+ <body class="article">
733
+ <div id="header">
734
+ </div>
735
+ <div id="content">
736
+ <div class="dlist"><dl>
737
+ <dt class="hdlist1">
738
+ ddd dd <strong>bold</strong> yy
739
+ </dt>
740
+ <dd>
741
+ <p>
742
+ 77777
743
+ </p>
744
+ <div class="olist arabic"><ol class="arabic">
745
+ <li>
746
+ <p>
747
+ arabic (decimal) numbering
748
+ </p>
749
+ </li>
750
+ <li>
751
+ <p>
752
+ loweralpha <strong>numbering</strong> <a href="#ddd">ss</a>
753
+ </p>
754
+ </li>
755
+ <li>
756
+ <p>
757
+ lowerroman numbering
758
+ </p>
759
+ </li>
760
+ <li>
761
+ <p>
762
+ upperalpha numbering
763
+ </p>
764
+ </li>
765
+ <li>
766
+ <p>
767
+ upperroman numbering
768
+ </p>
769
+ </li>
770
+ </ol></div>
771
+ </dd>
772
+ </dl></div>
773
+ <div class="sect1">
774
+ <h2 id="_text_formatting">Text formatting</h2>
775
+ <div class="sectionbody">
776
+ <div class="literalblock">
777
+ <div class="content">
778
+ <pre><code>*bold text* (boldface font)
779
+ _emphasized text_ (normally italics)
780
+ 'emphasized text'
781
+ +monospaced text+ (proportional font)
782
+ `monospaced text` (inline literal passthrough)</code></pre>
783
+ </div></div>
784
+ </div>
785
+ </div>
786
+ <div class="sect1">
787
+ <h2 id="_document_links">Document links</h2>
788
+ <div class="sectionbody">
789
+ <div class="literalblock">
790
+ <div class="content">
791
+ <pre><code>[[id]] (define link target)
792
+ &lt;&lt;id,caption&gt;&gt; (link to target id)
793
+ link:filename#id[caption] (link to external HTML file)</code></pre>
794
+ </div></div>
795
+ </div>
796
+ </div>
797
+ <div class="sect1">
798
+ <h2 id="_urls">URLs</h2>
799
+ <div class="sectionbody">
800
+ <div class="literalblock">
801
+ <div class="content">
802
+ <pre><code>Use normal URL and email addess syntax or:</code></pre>
803
+ </div></div>
804
+ <div class="literalblock">
805
+ <div class="content">
806
+ <pre><code>http:address[caption] (link to web page)
807
+ mailto:address[caption] (link to mail recipient)</code></pre>
808
+ </div></div>
809
+ </div>
810
+ </div>
811
+ <div class="sect1">
812
+ <h2 id="_images">Images</h2>
813
+ <div class="sectionbody">
814
+ <div class="literalblock">
815
+ <div class="content">
816
+ <pre><code>image:filename[caption] (inline image)
817
+ image::filename[caption] (block image)</code></pre>
818
+ </div></div>
819
+ </div>
820
+ </div>
821
+ <div class="sect1">
822
+ <h2 id="_document_header">Document header</h2>
823
+ <div class="sectionbody">
824
+ <div class="literalblock">
825
+ <div class="content">
826
+ <pre><code>The Document Title
827
+ ==================
828
+ author &lt;email&gt;
829
+ revision, date</code></pre>
830
+ </div></div>
831
+ <div class="paragraph"><p>author, email, revision and date are optional.</p></div>
832
+ </div>
833
+ </div>
834
+ <div class="sect1">
835
+ <h2 id="_section_title_underlines">Section title underlines</h2>
836
+ <div class="sectionbody">
837
+ <div class="literalblock">
838
+ <div class="content">
839
+ <pre><code>Underlined:</code></pre>
840
+ </div></div>
841
+ <div class="literalblock">
842
+ <div class="content">
843
+ <pre><code>Level 0 (document title)
844
+ =======
845
+ Level 1
846
+ -------
847
+ Level 2
848
+ ~~~~~~~
849
+ Level 3
850
+ ^^^^^^^
851
+ Level 4 (bottom level)
852
+ +++++++</code></pre>
853
+ </div></div>
854
+ <div class="literalblock">
855
+ <div class="content">
856
+ <pre><code>Single line:</code></pre>
857
+ </div></div>
858
+ <div class="literalblock">
859
+ <div class="content">
860
+ <pre><code>= Level 0 = (document title)
861
+ == Level 1 ==
862
+ === Level 2 ===
863
+ ==== Level 3 ====
864
+ ===== Level 4 ===== (bottom level)</code></pre>
865
+ </div></div>
866
+ </div>
867
+ </div>
868
+ <div class="sect1">
869
+ <h2 id="_paragraphs">Paragraphs</h2>
870
+ <div class="sectionbody">
871
+ <div class="paragraph"><p>A normal paragraph. (styles: literal,verse,quote,listing,
872
+ NOTE,TIP,WARNING,IMPORTANT,CAUTION)
873
+ An indented literal
874
+ paragraph.</p></div>
875
+ </div>
876
+ </div>
877
+ <div class="sect1">
878
+ <h2 id="_delimited_blocks">Delimited blocks</h2>
879
+ <div class="sectionbody">
880
+ <div class="paragraph"><p>Delimiters must begin at left margin.</p></div>
881
+ <div class="literalblock">
882
+ <div class="content">
883
+ <pre><code>------------------- (styles: source,music,graphviz)
884
+ listing block
885
+ -------------------</code></pre>
886
+ </div></div>
887
+ <div class="literalblock">
888
+ <div class="content">
889
+ <pre><code>................... (styles: listing,verse)
890
+ literal block
891
+ ...................</code></pre>
892
+ </div></div>
893
+ <div class="literalblock">
894
+ <div class="content">
895
+ <pre><code>*******************
896
+ sidebar block
897
+ *******************</code></pre>
898
+ </div></div>
899
+ <div class="literalblock">
900
+ <div class="content">
901
+ <pre><code>[style, author, cite]
902
+ ___________________ (styles: quote,verse)
903
+ quote block
904
+ ___________________</code></pre>
905
+ </div></div>
906
+ <div class="literalblock">
907
+ <div class="content">
908
+ <pre><code>=================== (styles: NOTE,TIP,WARNING,
909
+ example block IMPORTANT,CAUTION)
910
+ ===================</code></pre>
911
+ </div></div>
912
+ <div class="literalblock">
913
+ <div class="content">
914
+ <pre><code>///////////////////
915
+ comment block
916
+ ///////////////////</code></pre>
917
+ </div></div>
918
+ <div class="literalblock">
919
+ <div class="content">
920
+ <pre><code>+++++++++++++++++++ (styles: pass,asciimath,latexmath)
921
+ passthrough block
922
+ +++++++++++++++++++</code></pre>
923
+ </div></div>
924
+ <div class="literalblock">
925
+ <div class="content">
926
+ <pre><code>[style] (styles: abstract,partintro)
927
+ --
928
+ open block
929
+ --</code></pre>
930
+ </div></div>
931
+ </div>
932
+ </div>
933
+ <div class="sect1">
934
+ <h2 id="_more_block_elements">More block elements</h2>
935
+ <div class="sectionbody">
936
+ <div class="literalblock">
937
+ <div class="content">
938
+ <pre><code>[attributes list]
939
+ .Block title
940
+ // Comment line
941
+ include::filename[]</code></pre>
942
+ </div></div>
943
+ </div>
944
+ </div>
945
+ <div class="sect1">
946
+ <h2 id="_tables">Tables</h2>
947
+ <div class="sectionbody">
948
+ <div class="literalblock">
949
+ <div class="content">
950
+ <pre><code>.An example table
951
+ [width="40%",cols="^,2m",frame="topbot",options="header,footer"]
952
+ |======================
953
+ |Column 1 |Column 2
954
+ |1 |Item 1
955
+ |2 |Item 2
956
+ |3 |Item 3
957
+ |6 |Three items
958
+ |======================</code></pre>
959
+ </div></div>
960
+ <div class="literalblock">
961
+ <div class="content">
962
+ <pre><code>Common attributes:</code></pre>
963
+ </div></div>
964
+ <div class="literalblock">
965
+ <div class="content">
966
+ <pre><code>grid: none,cols,rows,all
967
+ frame: topbot,none,sides,all
968
+ options: header,footer
969
+ format: psv,csv,dsv
970
+ valign: top,bottom,middle
971
+ width: 1%..100%
972
+ cols: colspec[,colspec,...]</code></pre>
973
+ </div></div>
974
+ <div class="literalblock">
975
+ <div class="content">
976
+ <pre><code>colspec: [multiplier*][align][width][style]
977
+ multiplier: 1...
978
+ width: 1... or 1%...100%
979
+ align: [horiz][.vert]
980
+ horiz: &lt; (left), ^ (center), &gt; (right)
981
+ vert: &lt; (top), ^ (middle), &gt; (bottom)
982
+ style: d[efault], e[mphasis], m[onospaced], a[sciidoc],
983
+ s[trong], l[iteral], v[erse], h[eader]
984
+ cell: [cellspec]|data
985
+ cellspec: [span*|+][align][style]
986
+ span: [colspan][.rowspan]
987
+ colspan: 1...
988
+ rowspan: 1...</code></pre>
989
+ </div></div>
990
+ </div>
991
+ </div>
992
+ <div class="sect1">
993
+ <h2 id="_bulleted_lists">Bulleted lists</h2>
994
+ <div class="sectionbody">
995
+ <div class="ulist"><ul>
996
+ <li>
997
+ <p>
998
+ item text
999
+ </p>
1000
+ <div class="ulist"><ul>
1001
+ <li>
1002
+ <p>
1003
+ item text
1004
+ </p>
1005
+ <div class="ulist"><ul>
1006
+ <li>
1007
+ <p>
1008
+ item text
1009
+ </p>
1010
+ <div class="ulist"><ul>
1011
+ <li>
1012
+ <p>
1013
+ item text
1014
+ </p>
1015
+ <div class="ulist"><ul>
1016
+ <li>
1017
+ <p>
1018
+ item text
1019
+ </p>
1020
+ <div class="ulist"><ul>
1021
+ <li>
1022
+ <p>
1023
+ item text
1024
+ </p>
1025
+ <div class="literalblock">
1026
+ <div class="content">
1027
+ <pre><code>(styles: callout,bibliography)</code></pre>
1028
+ </div></div>
1029
+ </li>
1030
+ </ul></div>
1031
+ </li>
1032
+ </ul></div>
1033
+ </li>
1034
+ </ul></div>
1035
+ </li>
1036
+ </ul></div>
1037
+ </li>
1038
+ </ul></div>
1039
+ </li>
1040
+ </ul></div>
1041
+ </div>
1042
+ </div>
1043
+ <div class="sect1">
1044
+ <h2 id="_numbered_lists">Numbered lists</h2>
1045
+ <div class="sectionbody">
1046
+ <div class="olist arabic"><ol class="arabic">
1047
+ <li>
1048
+ <p>
1049
+ arabic (decimal) numbering
1050
+ </p>
1051
+ <div class="olist loweralpha"><ol class="loweralpha">
1052
+ <li>
1053
+ <p>
1054
+ loweralpha numbering
1055
+ </p>
1056
+ <div class="olist upperalpha"><ol class="upperalpha">
1057
+ <li>
1058
+ <p>
1059
+ upperalpha numbering
1060
+ </p>
1061
+ <div class="olist lowerroman"><ol class="lowerroman">
1062
+ <li>
1063
+ <p>
1064
+ lowerroman numbering
1065
+ </p>
1066
+ <div class="olist upperroman"><ol class="upperroman">
1067
+ <li>
1068
+ <p>
1069
+ upperroman numbering
1070
+ </p>
1071
+ <div class="olist arabic"><ol class="arabic">
1072
+ <li>
1073
+ <p>
1074
+ arabic (decimal) numbering
1075
+ </p>
1076
+ <div class="olist loweralpha"><ol class="loweralpha">
1077
+ <li>
1078
+ <p>
1079
+ loweralpha numbering
1080
+ </p>
1081
+ <div class="olist lowerroman"><ol class="lowerroman">
1082
+ <li>
1083
+ <p>
1084
+ lowerroman numbering
1085
+ </p>
1086
+ <div class="olist upperalpha"><ol class="upperalpha">
1087
+ <li>
1088
+ <p>
1089
+ upperalpha numbering
1090
+ </p>
1091
+ <div class="olist upperroman"><ol class="upperroman">
1092
+ <li>
1093
+ <p>
1094
+ upperroman numbering
1095
+ </p>
1096
+ <div class="literalblock">
1097
+ <div class="content">
1098
+ <pre><code>(styles: arabic,loweralpha,upperalpha,lowerroman,upperroman)</code></pre>
1099
+ </div></div>
1100
+ </li>
1101
+ </ol></div>
1102
+ </li>
1103
+ </ol></div>
1104
+ </li>
1105
+ </ol></div>
1106
+ </li>
1107
+ </ol></div>
1108
+ </li>
1109
+ </ol></div>
1110
+ </li>
1111
+ </ol></div>
1112
+ </li>
1113
+ </ol></div>
1114
+ </li>
1115
+ </ol></div>
1116
+ </li>
1117
+ </ol></div>
1118
+ </li>
1119
+ </ol></div>
1120
+ </div>
1121
+ </div>
1122
+ <div class="sect1">
1123
+ <h2 id="_labeled_lists">Labeled lists</h2>
1124
+ <div class="sectionbody">
1125
+ <div class="dlist"><dl>
1126
+ <dt class="hdlist1">
1127
+ label
1128
+ </dt>
1129
+ <dd>
1130
+ <p>
1131
+ item text
1132
+ </p>
1133
+ <div class="dlist"><dl>
1134
+ <dt class="hdlist1">
1135
+ label
1136
+ </dt>
1137
+ <dd>
1138
+ <p>
1139
+ item text
1140
+ </p>
1141
+ <div class="dlist"><dl>
1142
+ <dt class="hdlist1">
1143
+ label
1144
+ </dt>
1145
+ <dd>
1146
+ <p>
1147
+ item text
1148
+ </p>
1149
+ <div class="dlist"><dl>
1150
+ <dt class="hdlist1">
1151
+ label
1152
+ </dt>
1153
+ <dd>
1154
+ <p>
1155
+ item text
1156
+ </p>
1157
+ <div class="literalblock">
1158
+ <div class="content">
1159
+ <pre><code>(styles: horizontal,vertical,glossary,qanda,bibliograpy)</code></pre>
1160
+ </div></div>
1161
+ </dd>
1162
+ </dl></div>
1163
+ </dd>
1164
+ </dl></div>
1165
+ </dd>
1166
+ </dl></div>
1167
+ </dd>
1168
+ </dl></div>
1169
+ </div>
1170
+ </div>
1171
+ <div class="sect1">
1172
+ <h2 id="_more_inline_elements">More inline elements</h2>
1173
+ <div class="sectionbody">
1174
+ <div class="literalblock">
1175
+ <div class="content">
1176
+ <pre><code>footnote:[footnote text] (document footnote)</code></pre>
1177
+ </div></div>
1178
+ <div class="paragraph"><p>F:\Python27\asciidoc-8.6.8&gt;</p></div>
1179
+ <div class="listingblock">
1180
+ <div class="title">MS-DOS directory listing</div>
1181
+ <div class="content">
1182
+ <pre><code> 10/17/97 9:04 &lt;DIR&gt; bin
1183
+ 10/16/97 14:11 &lt;DIR&gt; DOS <b>&lt;1&gt;</b>
1184
+ 10/16/97 14:40 &lt;DIR&gt; Program Files
1185
+ 10/16/97 14:46 &lt;DIR&gt; TEMP
1186
+ 10/17/97 9:04 &lt;DIR&gt; tmp
1187
+ 10/16/97 14:37 &lt;DIR&gt; WINNT
1188
+ 10/16/97 14:25 119 AUTOEXEC.BAT <b>&lt;2&gt;</b>
1189
+ 2/13/94 6:21 54,619 COMMAND.COM <b>&lt;2&gt;</b>
1190
+ 10/16/97 14:25 115 CONFIG.SYS <b>&lt;2&gt;</b>
1191
+ 11/16/97 17:17 61,865,984 pagefile.sys
1192
+ 2/13/94 6:21 9,349 WINA20.386 <b>&lt;3&gt;</b></code></pre>
1193
+ </div></div>
1194
+ <div class="colist arabic"><ol>
1195
+ <li>
1196
+ <p>
1197
+ This directory holds MS-DOS.
1198
+ </p>
1199
+ </li>
1200
+ <li>
1201
+ <p>
1202
+ System startup code for DOS.
1203
+ </p>
1204
+ </li>
1205
+ <li>
1206
+ <p>
1207
+ Some sort of Windows 3.1 hack.
1208
+ </p>
1209
+ <div class="olist arabic"><ol class="arabic">
1210
+ <li>
1211
+ <p>
1212
+ List item one.
1213
+ </p>
1214
+ <div class="paragraph"><p>List item one continued with a second paragraph followed by an
1215
+ Indented block.</p></div>
1216
+ <div class="literalblock">
1217
+ <div class="content">
1218
+ <pre><code>$ ls *.sh
1219
+ $ mv *.sh ~/tmp</code></pre>
1220
+ </div></div>
1221
+ <div class="paragraph"><p>List item continued with a third paragraph.</p></div>
1222
+ </li>
1223
+ <li>
1224
+ <p>
1225
+ List item two continued with an open block.
1226
+ </p>
1227
+ <div class="openblock">
1228
+ <div class="content">
1229
+ <div class="paragraph"><p>This paragraph is part of the preceding list item.</p></div>
1230
+ <div class="olist loweralpha"><ol class="loweralpha">
1231
+ <li>
1232
+ <p>
1233
+ This list is nested and does not require explicit item continuation.
1234
+ </p>
1235
+ <div class="paragraph"><p>This paragraph is part of the preceding list item.</p></div>
1236
+ </li>
1237
+ <li>
1238
+ <p>
1239
+ List item b.
1240
+ </p>
1241
+ </li>
1242
+ </ol></div>
1243
+ <div class="paragraph"><p>This paragraph belongs to item two of the outer list.</p></div>
1244
+ </div></div>
1245
+ </li>
1246
+ </ol></div>
1247
+ </li>
1248
+ </ol></div>
1249
+ </div>
1250
+ </div>
1251
+ <h1 id="_asciidoc_syntax_test_document">Asciidoc syntax test document</h1>
1252
+ <div class="ulist"><ul>
1253
+ <li>
1254
+ <p>
1255
+ Praesent eget purus quis magna eleifend eleifend.
1256
+ </p>
1257
+ <div class="olist arabic"><ol class="arabic">
1258
+ <li>
1259
+ <p>
1260
+ Fusce euismod commodo velit.
1261
+ </p>
1262
+ <div class="olist loweralpha"><ol class="loweralpha">
1263
+ <li>
1264
+ <p>
1265
+ Fusce euismod commodo velit.
1266
+ </p>
1267
+ </li>
1268
+ <li>
1269
+ <p>
1270
+ Vivamus fringilla mi eu lacus.
1271
+ </p>
1272
+ </li>
1273
+ <li>
1274
+ <p>
1275
+ Donec eget arcu bibendum nunc consequat lobortis.
1276
+ </p>
1277
+ </li>
1278
+ </ol></div>
1279
+ </li>
1280
+ <li>
1281
+ <p>
1282
+ Vivamus fringilla mi eu lacus.
1283
+ </p>
1284
+ <div class="olist lowerroman"><ol class="lowerroman">
1285
+ <li>
1286
+ <p>
1287
+ Fusce euismod commodo velit.
1288
+ </p>
1289
+ </li>
1290
+ <li>
1291
+ <p>
1292
+ Vivamus fringilla mi eu lacus.
1293
+ </p>
1294
+ </li>
1295
+ </ol></div>
1296
+ </li>
1297
+ <li>
1298
+ <p>
1299
+ Donec eget arcu bibendum nunc consequat lobortis.
1300
+ </p>
1301
+ </li>
1302
+ <li>
1303
+ <p>
1304
+ Nam fermentum mattis ante.
1305
+ </p>
1306
+ </li>
1307
+ </ol></div>
1308
+ </li>
1309
+ <li>
1310
+ <p>
1311
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
1312
+ </p>
1313
+ <div class="ulist"><ul>
1314
+ <li>
1315
+ <p>
1316
+ Fusce euismod commodo velit.
1317
+ </p>
1318
+ <div class="ulist"><ul>
1319
+ <li>
1320
+ <p>
1321
+ Qui in magna commodo, est labitur dolorum an. Est ne magna primis
1322
+ adolescens. Sit munere ponderum dignissim et. Minim luptatum et
1323
+ vel.
1324
+ </p>
1325
+ </li>
1326
+ <li>
1327
+ <p>
1328
+ Vivamus fringilla mi eu lacus.
1329
+ </p>
1330
+ </li>
1331
+ </ul></div>
1332
+ </li>
1333
+ <li>
1334
+ <p>
1335
+ Donec eget arcu bibendum nunc consequat lobortis.
1336
+ </p>
1337
+ </li>
1338
+ </ul></div>
1339
+ </li>
1340
+ <li>
1341
+ <p>
1342
+ Nulla porttitor vulputate libero.
1343
+ </p>
1344
+ <div class="olist arabic"><ol class="arabic">
1345
+ <li>
1346
+ <p>
1347
+ Fusce euismod commodo velit.
1348
+ </p>
1349
+ </li>
1350
+ <li>
1351
+ <p>
1352
+ Vivamus fringilla mi eu lacus.
1353
+ </p>
1354
+ <div class="olist upperroman"><ol class="upperroman">
1355
+ <li>
1356
+ <p>
1357
+ Fusce euismod commodo velit.
1358
+ &#8230;&#8230; Vivamus fringilla mi eu lacus.
1359
+ </p>
1360
+ </li>
1361
+ </ol></div>
1362
+ </li>
1363
+ <li>
1364
+ <p>
1365
+ Donec eget arcu bibendum nunc consequat loborti
1366
+ </p>
1367
+ </li>
1368
+ </ol></div>
1369
+ </li>
1370
+ </ul></div>
1371
+ <div class="sect1">
1372
+ <h2 id="_emphasizing_and_quoting">Emphasizing and quoting</h2>
1373
+ <div class="sectionbody">
1374
+ <div class="paragraph"><p>Emphasized, bold etc. text preceded or followed by dashes is handled
1375
+ correctly</p></div>
1376
+ <div class="ulist"><ul>
1377
+ <li>
1378
+ <p>
1379
+ bold- , --bold, bold&#8212;blanonbold.
1380
+ </p>
1381
+ </li>
1382
+ <li>
1383
+ <p>
1384
+ <em>emph</em>, --<em>emph</em>, <em>emph</em>--bla_nonemph_.
1385
+ </p>
1386
+ </li>
1387
+ <li>
1388
+ <p>
1389
+ <em>emph</em>, --<em>emph</em>, <em>emph</em>--bla_nonemph_.
1390
+ </p>
1391
+ </li>
1392
+ <li>
1393
+ <p>
1394
+ <code>mono</code>, --<code>mono</code>, <code>mono</code>--bla+nonmono+.
1395
+ </p>
1396
+ </li>
1397
+ <li>
1398
+ <p>
1399
+ <code>mono</code>, --<code>mono</code>, <code>mono</code>--bla`nonmono`.
1400
+ </p>
1401
+ </li>
1402
+ <li>
1403
+ <p>
1404
+ &#8220;quot&#8221;, --&#8220;quot&#8221;, &#8220;quot&#8221;--bla`&#8216;nonquot&#8217;'.
1405
+ </p>
1406
+ </li>
1407
+ </ul></div>
1408
+ <div class="paragraph"><p>Emphasizing a complete multi-line paragraph should be possible too ! And
1409
+ So it will be&#8230;</p></div>
1410
+ </div>
1411
+ </div>
1412
+ <div class="sect1">
1413
+ <h2 id="_lists">Lists</h2>
1414
+ <div class="sectionbody">
1415
+ <div class="paragraph"><p>Correct indentation simple numbers at the start of lines should not be
1416
+ confused with list items. These are numbered lists, so lines following a
1417
+ list item should be indented</p></div>
1418
+ <div class="olist loweralpha"><ol class="loweralpha">
1419
+ <li>
1420
+ <p>
1421
+ Integer numbered list item. Lorem ipsum dolor sit amet, consectetuer
1422
+ adipiscing elit.
1423
+ </p>
1424
+ <div class="olist arabic"><ol class="arabic">
1425
+ <li>
1426
+ <p>
1427
+ Integer numbered list item with optional numbering. Lorem ipsum dolor
1428
+ sit amet, consectetuer adipiscing elit.
1429
+ </p>
1430
+ </li>
1431
+ <li>
1432
+ <p>
1433
+ Integer numbered list item with optional numbering. Lorem ipsum dolor
1434
+ sit amet, consectetuer adipiscing elit.
1435
+ </p>
1436
+ <div class="olist lowerroman"><ol class="lowerroman">
1437
+ <li>
1438
+ <p>
1439
+ lower roman numbering
1440
+ </p>
1441
+ <div class="olist upperroman"><ol class="upperroman">
1442
+ <li>
1443
+ <p>
1444
+ upperroman numbering
1445
+ </p>
1446
+ </li>
1447
+ </ol></div>
1448
+ </li>
1449
+ </ol></div>
1450
+ </li>
1451
+ </ol></div>
1452
+ </li>
1453
+ <li>
1454
+ <p>
1455
+ loweralpha numbering
1456
+ </p>
1457
+ <div class="olist upperalpha"><ol class="upperalpha">
1458
+ <li>
1459
+ <p>
1460
+ upperalpha numbering
1461
+ </p>
1462
+ </li>
1463
+ </ol></div>
1464
+ </li>
1465
+ </ol></div>
1466
+ <div class="paragraph"><p>But these are just numbers that happen to occur at the start of a line and
1467
+ should not trigger indentation</p></div>
1468
+ <div class="paragraph"><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce euismod od
1469
+ 1 commodo velit. Qui in magna commodo, est labitur dolorum an. Est ne magna
1470
+ primis. Sit munere ponderum dignissim et. Minim luptatum et vel. Vivamus
1471
+ 12.5. mi eu lacus. Donec eget arcu bibendum nunc consequat lobortis. Lorem
1472
+ ipsum dolor sit amet, consectetuer adipiscing elit. Fusce euismod commodo</p></div>
1473
+ <div class="paragraph"><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce euismod od
1474
+ c. commodo velit. Qui in magna commodo, est labitur dolorum an. Est ne magna
1475
+ primis. Sit munere ponderum dignissim et. Minim luptatum et vel. (Vivamus
1476
+ xi) mi eu lacus. Donec eget arcu bibendum nunc consequat lobortis. Lorem
1477
+ ipsum dolor sit amet, consectetuer adipiscing elit. Fusce euismod commodo</p></div>
1478
+ <div class="literalblock">
1479
+ <div class="content">
1480
+ <pre><code> Comments are taken care off as well
1481
+ == Blocks
1482
+ Many ways to make $$blocks$$</code></pre>
1483
+ </div></div>
1484
+ <div class="paragraph"><p>And even comment blocks do well</p></div>
1485
+ </div>
1486
+ </div>
1487
+ <div class="sect1">
1488
+ <h2 id="_admonitions">Admonitions</h2>
1489
+ <div class="sectionbody">
1490
+ <div class="admonitionblock">
1491
+ <table><tr>
1492
+ <td class="icon">
1493
+ <div class="title">Warning</div>
1494
+ </td>
1495
+ <td class="content">Admonitions have a special meaning too.</td>
1496
+ </tr></table>
1497
+ </div>
1498
+ <div class="admonitionblock">
1499
+ <table><tr>
1500
+ <td class="icon">
1501
+ <div class="title">Note</div>
1502
+ </td>
1503
+ <td class="content">Also when used in block mode.</td>
1504
+ </tr></table>
1505
+ </div>
1506
+ </div>
1507
+ </div>
1508
+ <div class="sect1">
1509
+ <h2 id="_definitions">Definitions</h2>
1510
+ <div class="sectionbody">
1511
+ <div class="paragraph"><p>Definition 1
1512
+ This is it
1513
+ Definition 2
1514
+ This is it too</p></div>
1515
+ </div>
1516
+ </div>
1517
+ <div class="sect1">
1518
+ <h2 id="_inserting_quotes">Inserting quotes</h2>
1519
+ <div class="sectionbody">
1520
+ <div class="paragraph"><p>Typing inserts a pair of quotes (&#8216;`&#8217;') and places the cursor between
1521
+ them. Works in both insert and command mode (switching to insert mode).
1522
+ Typing a single works as usual (though with a slight delay).</p></div>
1523
+ </div>
1524
+ </div>
1525
+ <div class="sect1">
1526
+ <h2 id="_urls_and_email_addresses">URLs and email addresses</h2>
1527
+ <div class="sectionbody">
1528
+ <div class="paragraph"><p>So when using a URL like httpdag.wieers.com[Test] it needs to stand out,
1529
+ same is true for email addresses like <a href="mailto:dag@wieers.com">dag@wieers.com</a></p></div>
1530
+ <div class="literalblock">
1531
+ <div class="content">
1532
+ <pre><code>vim set syntax=asciidoc</code></pre>
1533
+ </div></div>
1534
+ </div>
1535
+ </div>
1536
+ </div>
1537
+ <div id="footnotes"><hr /></div>
1538
+ <div id="footer">
1539
+ <div id="footer-text">
1540
+ Last updated 2012-09-06 00:11:48 Caucasus Standard Time
1541
+ </div>
1542
+ </div>
1543
+ </body>
1544
+ </html>
ace-0.2.0/kitchen-sink/docs/Haxe.hx ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class Haxe
2
+ {
3
+ public static function main()
4
+ {
5
+ // Say Hello!
6
+ var greeting:String = "Hello World";
7
+ trace(greeting);
8
+
9
+ var targets:Array<String> = ["Flash","Javascript","PHP","Neko","C++","iOS","Android","webOS"];
10
+ trace("Haxe is a great language that can target:");
11
+ for (target in targets)
12
+ {
13
+ trace (" - " + target);
14
+ }
15
+ trace("And many more!");
16
+ }
17
+ }
ace-0.2.0/kitchen-sink/docs/Makefile ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .PHONY: apf ext worker mode theme package test
2
+
3
+ default: apf worker
4
+
5
+ update: worker
6
+
7
+ # packages apf
8
+
9
+ # This is the first line of a comment \
10
+ and this is still part of the comment \
11
+ as is this, since I keep ending each line \
12
+ with a backslash character
13
+
14
+ apf:
15
+ cd node_modules/packager; node package.js projects/apf_cloud9.apr
16
+ cd node_modules/packager; cat build/apf_release.js | sed 's/\(\/\*FILEHEAD(\).*//g' > ../../plugins-client/lib.apf/www/apf-packaged/apf_release.js
17
+
18
+ # package debug version of apf
19
+ apfdebug:
20
+ cd node_modules/packager/projects; cat apf_cloud9.apr | sed 's/<p:define name=\"__DEBUG\" value=\"0\" \/>/<p:define name=\"__DEBUG\" value=\"1\" \/>/g' > apf_cloud9_debug2.apr
21
+ cd node_modules/packager/projects; cat apf_cloud9_debug2.apr | sed 's/apf_release/apf_debug/g' > apf_cloud9_debug.apr; rm apf_cloud9_debug2.apr
22
+ cd node_modules/packager; node package.js projects/apf_cloud9_debug.apr
23
+ cd node_modules/packager; cat build/apf_debug.js | sed 's/\(\/\*FILEHEAD(\).*\/apf\/\(.*\)/\1\2/g' > ../../plugins-client/lib.apf/www/apf-packaged/apf_debug.js
24
+
25
+ # package_apf--temporary fix for non-workering infra
26
+ pack_apf:
27
+ mkdir -p build/src
28
+ mv plugins-client/lib.apf/www/apf-packaged/apf_release.js build/src/apf_release.js
29
+ node build/r.js -o name=./build/src/apf_release.js out=./plugins-client/lib.apf/www/apf-packaged/apf_release.js baseUrl=.
30
+
31
+ # makes ace; at the moment, requires dryice@0.4.2
32
+ ace:
33
+ cd node_modules/ace; make clean pre_build; ./Makefile.dryice.js minimal
34
+
35
+
36
+ # packages core
37
+ core: ace
38
+ mkdir -p build/src
39
+ node build/r.js -o build/core.build.js
40
+
41
+ # generates packed template
42
+ helper:
43
+ node build/packed_helper.js
44
+
45
+ helper_clean:
46
+ mkdir -p build/src
47
+ node build/packed_helper.js 1
48
+
49
+ # packages ext
50
+ ext:
51
+ node build/r.js -o build/app.build.js
52
+
53
+ # calls dryice on worker & packages it
54
+ worker: plugins-client/lib.ace/www/worker/worker-language.js
55
+
56
+ plugins-client/lib.ace/www/worker/worker-language.js plugins-client/lib.ace/www/worker/worker-javascript.js : \
57
+ $(wildcard node_modules/ace/*) $(wildcard node_modules/ace/*/*) $(wildcard node_modules/ace/*/*/mode/*) \
58
+ $(wildcard plugins-client/ext.language/*) \
59
+ $(wildcard plugins-client/ext.language/*/*) \
60
+ $(wildcard plugins-client/ext.linereport/*) \
61
+ $(wildcard plugins-client/ext.codecomplete/*) \
62
+ $(wildcard plugins-client/ext.codecomplete/*/*) \
63
+ $(wildcard plugins-client/ext.jslanguage/*) \
64
+ $(wildcard plugins-client/ext.jslanguage/*/*) \
65
+ $(wildcard plugins-client/ext.csslanguage/*) \
66
+ $(wildcard plugins-client/ext.csslanguage/*/*) \
67
+ $(wildcard plugins-client/ext.htmllanguage/*) \
68
+ $(wildcard plugins-client/ext.htmllanguage/*/*) \
69
+ $(wildcard plugins-client/ext.jsinfer/*) \
70
+ $(wildcard plugins-client/ext.jsinfer/*/*) \
71
+ $(wildcard node_modules/treehugger/lib/*) \
72
+ $(wildcard node_modules/treehugger/lib/*/*) \
73
+ $(wildcard node_modules/ace/lib/*) \
74
+ $(wildcard node_modules/ace/*/*) \
75
+ Makefile.dryice.js
76
+ mkdir -p plugins-client/lib.ace/www/worker
77
+ rm -rf /tmp/c9_worker_build
78
+ mkdir -p /tmp/c9_worker_build/ext
79
+ ln -s `pwd`/plugins-client/ext.language /tmp/c9_worker_build/ext/language
80
+ ln -s `pwd`/plugins-client/ext.codecomplete /tmp/c9_worker_build/ext/codecomplete
81
+ ln -s `pwd`/plugins-client/ext.jslanguage /tmp/c9_worker_build/ext/jslanguage
82
+ ln -s `pwd`/plugins-client/ext.csslanguage /tmp/c9_worker_build/ext/csslanguage
83
+ ln -s `pwd`/plugins-client/ext.htmllanguage /tmp/c9_worker_build/ext/htmllanguage
84
+ ln -s `pwd`/plugins-client/ext.linereport /tmp/c9_worker_build/ext/linereport
85
+ ln -s `pwd`/plugins-client/ext.linereport_php /tmp/c9_worker_build/ext/linereport_php
86
+ node Makefile.dryice.js worker
87
+ cp node_modules/ace/build/src/worker* plugins-client/lib.ace/www/worker
88
+
89
+ define
90
+
91
+ ifeq
92
+
93
+ override
94
+
95
+ # copies built ace modes
96
+ mode:
97
+ mkdir -p plugins-client/lib.ace/www/mode
98
+ cp `find node_modules/ace/build/src | grep -E "mode-[a-zA-Z_0-9]+.js"` plugins-client/lib.ace/www/mode
99
+
100
+ # copies built ace themes
101
+ theme:
102
+ mkdir -p plugins-client/lib.ace/www/theme
103
+ cp `find node_modules/ace/build/src | grep -E "theme-[a-zA-Z_0-9]+.js"` plugins-client/lib.ace/www/theme
104
+
105
+ gzip_safe:
106
+ for i in `ls ./plugins-client/lib.packed/www/*.js`; do \
107
+ gzip -9 -v -c -q -f $$i > $$i.gz ; \
108
+ done
109
+
110
+ gzip:
111
+ for i in `ls ./plugins-client/lib.packed/www/*.js`; do \
112
+ gzip -9 -v -q -f $$i ; \
113
+ done
114
+
115
+ c9core: apf ace core worker mode theme
116
+
117
+ package_clean: helper_clean c9core ext
118
+
119
+ package: helper c9core ext
120
+
121
+ test check:
122
+ test/run-tests.sh
ace-0.2.0/kitchen-sink/docs/OpenSCAD.scad ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // ace can highlight scad!
2
+ module Element(xpos, ypos, zpos){
3
+ translate([xpos,ypos,zpos]){
4
+ union(){
5
+ cube([10,10,4],true);
6
+ cylinder(10,15,5);
7
+ translate([0,0,10])sphere(5);
8
+ }
9
+ }
10
+ }
11
+
12
+ union(){
13
+ for(i=[0:30]){
14
+ # Element(0,0,0);
15
+ Element(15*i,0,0);
16
+ }
17
+ }
18
+
19
+ for (i = [3, 5, 7, 11]){
20
+ rotate([i*10,0,0])scale([1,1,i])cube(10);
21
+ }
ace-0.2.0/kitchen-sink/docs/c9search.c9search_results ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Searching for 'var' in /workspace/configs
2
+
3
+ configs/default.js:
4
+ 1: var fs = require("fs");
5
+ 2: var argv = require('optimist').argv;
6
+ 3: var path = require("path");
7
+ 5: var clientExtensions = {};
8
+ 6: var clientDirs = fs.readdirSync(__dirname + "/../plugins-client");
9
+ 7: for (var i = 0; i < clientDirs.length; i++) {
10
+ 8: var dir = clientDirs[i];
11
+ 12: var name = dir.split(".")[1];
12
+ 16: var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();
13
+ 17: var fsUrl = "/workspace";
14
+ 19: var port = argv.p || process.env.PORT || 3131;
15
+ 20: var host = argv.l || "localhost";
16
+ 22: var config = {
17
+
18
+ configs/local.js:
19
+ 2: var config = require("./default");
20
+
21
+ configs/packed.js:
22
+ 1: var config = require("./default");
23
+
24
+
25
+ Found 15 matches in 3 files
ace-0.2.0/kitchen-sink/docs/clojure.clj ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (defn parting
2
+ "returns a String parting in a given language"
3
+ ([] (parting "World"))
4
+ ([name] (parting name "en"))
5
+ ([name language]
6
+ ; condp is similar to a case statement in other languages.
7
+ ; It is described in more detail later.
8
+ ; It is used here to take different actions based on whether the
9
+ ; parameter "language" is set to "en", "es" or something else.
10
+ (condp = language
11
+ "en" (str "Goodbye, " name)
12
+ "es" (str "Adios, " name)
13
+ (throw (IllegalArgumentException.
14
+ (str "unsupported language " language))))))
15
+
16
+ (println (parting)) ; -> Goodbye, World
17
+ (println (parting "Mark")) ; -> Goodbye, Mark
18
+ (println (parting "Mark" "es")) ; -> Adios, Mark
19
+ (println (parting "Mark", "xy")) ; -> java.lang.IllegalArgumentException: unsupported language xy
ace-0.2.0/kitchen-sink/docs/coffeescript.coffee ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env coffee
2
+
3
+ try
4
+ throw URIError decodeURI(0xC0ffee * 123456.7e-8 / .9)
5
+ catch e
6
+ console.log 'qstring' + "qqstring" + '''
7
+ qdoc
8
+ ''' + """
9
+ qqdoc
10
+ """
11
+
12
+ do ->
13
+ ###
14
+ herecomment
15
+ ###
16
+ re = /regex/imgy.test ///
17
+ heregex # comment
18
+ ///imgy
19
+ this isnt: `just JavaScript`
20
+ undefined
21
+
22
+ sentence = "#{ 22 / 7 } is a decent approximation of π"
ace-0.2.0/kitchen-sink/docs/coldfusion.cfm ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <!--- hello world --->
2
+
3
+ <cfset welcome="Hello World!">
4
+
5
+ <cfoutput>#welcome#</cfoutput>
ace-0.2.0/kitchen-sink/docs/cpp.cpp ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // compound assignment operators
2
+
3
+ #include <iostream>
4
+ using namespace std;
5
+
6
+ int main ()
7
+ {
8
+ int a, b=3; /* foobar */
9
+ a = b;
10
+ a+=2; // equivalent to a=a+2
11
+ cout << a;
12
+ return 0;
13
+ }
ace-0.2.0/kitchen-sink/docs/csharp.cs ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ public void HelloWorld() {
2
+ //Say Hello!
3
+ Console.WriteLine("Hello World");
4
+ }
ace-0.2.0/kitchen-sink/docs/css.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .text-layer {
2
+ font-family: Monaco, "Courier New", monospace;
3
+ font-size: 12px;
4
+ cursor: text;
5
+ }
6
+
7
+ .blinker {
8
+ animation-duration: 1s;
9
+ animation-name: blink;
10
+ animation-iteration-count: infinite;
11
+ animation-direction: alternate;
12
+ animation-timing-function: linear;
13
+ }
14
+
15
+ @keyframes blink {
16
+ 0% {
17
+ opacity: 0;
18
+ }
19
+ 40% {
20
+ opacity: 0;
21
+ }
22
+ 40.5% {
23
+ opacity: 1
24
+ }
25
+ 100% {
26
+ opacity: 1
27
+ }
28
+ }
ace-0.2.0/kitchen-sink/docs/dart.dart ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ main() {
2
+ print('Hello World!');
3
+ }
4
+
5
+
6
+ int fib(int n) => (n > 1) ? (fib(n - 1) + fib(n - 2)) : n;
7
+ main() {
8
+ print('fib(20) = ${fib(20)}');
9
+ }
10
+ /*asd
11
+ asdad
12
+ */
13
+ 0.67
14
+ 77
15
+ .86
16
+
17
+ #import("http://dartwatch.com/myOtherLibrary.dart");
18
+ #import("myOtherLibrary.dart", prefix:"lib1");
19
+
20
+ """asdasdads
21
+ asdadsadsasd
22
+ asdasdasdad"""
23
+
24
+ '23424'
25
+
26
+ 0x234
27
+
28
+ foo is bar
29
+
30
+ int x = 4 << 10
31
+ // Create a class for Point.
32
+ class Point {
33
+
34
+ // Final variables cannot be changed once they are assigned.
35
+ // Create two instance variables.
36
+ final num x, y;
37
+
38
+ // A constructor, with syntactic sugar for setting instance variables.
39
+ Point(this.x, this.y);
40
+
41
+ // A named constructor with an initializer list.
42
+ Point.origin() : x = 0, y = 0;
43
+
44
+ // A method.
45
+ num distanceTo(Point other) {
46
+ var dx = x - other.x;
47
+ var dy = y - other.y;
48
+ return sqrt(dx * dx + dy * dy);
49
+ }
50
+ }
51
+
52
+ // Check for null.
53
+ var unicorn;
54
+ assert(unicorn == null);
55
+
56
+ // Check for NaN.
57
+ var iMeantToDoThis = 0/0;
58
+ assert(iMeantToDoThis.isNaN());
ace-0.2.0/kitchen-sink/docs/diff.diff ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js
2
+ index 23fc3fc..ed3b273 100644
3
+ --- a/lib/ace/edit_session.js
4
+ +++ b/lib/ace/edit_session.js
5
+ @@ -51,6 +51,7 @@ var TextMode = require("./mode/text").Mode;
6
+ var Range = require("./range").Range;
7
+ var Document = require("./document").Document;
8
+ var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
9
+ +var SearchHighlight = require("./search_highlight").SearchHighlight;
10
+
11
+ /**
12
+ * class EditSession
13
+ @@ -307,6 +308,13 @@ var EditSession = function(text, mode) {
14
+ return token;
15
+ };
16
+
17
+ + this.highlight = function(re) {
18
+ + if (!this.$searchHighlight) {
19
+ + var highlight = new SearchHighlight(null, "ace_selected-word", "text");
20
+ + this.$searchHighlight = this.addDynamicMarker(highlight);
21
+ + }
22
+ + this.$searchHighlight.setRegexp(re);
23
+ + }
24
+ /**
25
+ * EditSession.setUndoManager(undoManager)
26
+ * - undoManager (UndoManager): The new undo manager
27
+ @@ -556,7 +564,8 @@ var EditSession = function(text, mode) {
28
+ type : type || "line",
29
+ renderer: typeof type == "function" ? type : null,
30
+ clazz : clazz,
31
+ - inFront: !!inFront
32
+ + inFront: !!inFront,
33
+ + id: id
34
+ }
35
+
36
+ if (inFront) {
37
+ diff --git a/lib/ace/editor.js b/lib/ace/editor.js
38
+ index 834e603..b27ec73 100644
39
+ --- a/lib/ace/editor.js
40
+ +++ b/lib/ace/editor.js
41
+ @@ -494,7 +494,7 @@ var Editor = function(renderer, session) {
42
+ * Emitted when a selection has changed.
43
+ **/
44
+ this.onSelectionChange = function(e) {
45
+ - var session = this.getSession();
46
+ + var session = this.session;
47
+
48
+ if (session.$selectionMarker) {
49
+ session.removeMarker(session.$selectionMarker);
50
+ @@ -509,12 +509,40 @@ var Editor = function(renderer, session) {
51
+ this.$updateHighlightActiveLine();
52
+ }
53
+
54
+ - var self = this;
55
+ - if (this.$highlightSelectedWord && !this.$wordHighlightTimer)
56
+ - this.$wordHighlightTimer = setTimeout(function() {
57
+ - self.session.$mode.highlightSelection(self);
58
+ - self.$wordHighlightTimer = null;
59
+ - }, 30, this);
60
+ + var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp()
61
+ };
62
+ diff --git a/lib/ace/search_highlight.js b/lib/ace/search_highlight.js
63
+ new file mode 100644
64
+ index 0000000..b2df779
65
+ --- /dev/null
66
+ +++ b/lib/ace/search_highlight.js
67
+ @@ -0,0 +1,3 @@
68
+ +new
69
+ +empty file
ace-0.2.0/kitchen-sink/docs/dot.dot ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Original source: http://www.graphviz.org/content/lion_share
2
+ ##"A few people in the field of genetics are using dot to draw "marriage node diagram" pedigree drawings. Here is one I have done of a test pedigree from the FTREE pedigree drawing package (Lion Share was a racehorse)." Contributed by David Duffy.
3
+
4
+ ##Command to get the layout: "dot -Tpng thisfile > thisfile.png"
5
+
6
+ digraph Ped_Lion_Share {
7
+ # page = "8.2677165,11.692913" ;
8
+ ratio = "auto" ;
9
+ mincross = 2.0 ;
10
+ label = "Pedigree Lion_Share" ;
11
+
12
+ "001" [shape=box , regular=1,style=filled,fillcolor=white ] ;
13
+ "002" [shape=box , regular=1,style=filled,fillcolor=white ] ;
14
+ "003" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
15
+ "004" [shape=box , regular=1,style=filled,fillcolor=white ] ;
16
+ "005" [shape=box , regular=1,style=filled,fillcolor=white ] ;
17
+ "006" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
18
+ "007" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
19
+ "009" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
20
+ "014" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
21
+ "015" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
22
+ "016" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
23
+ "ZZ01" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
24
+ "ZZ02" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
25
+ "017" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
26
+ "012" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
27
+ "008" [shape=box , regular=1,style=filled,fillcolor=white ] ;
28
+ "011" [shape=box , regular=1,style=filled,fillcolor=white ] ;
29
+ "013" [shape=box , regular=1,style=filled,fillcolor=white ] ;
30
+ "010" [shape=box , regular=1,style=filled,fillcolor=white ] ;
31
+ "023" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
32
+ "020" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
33
+ "021" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
34
+ "018" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
35
+ "025" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
36
+ "019" [shape=box , regular=1,style=filled,fillcolor=white ] ;
37
+ "022" [shape=box , regular=1,style=filled,fillcolor=white ] ;
38
+ "024" [shape=box , regular=1,style=filled,fillcolor=white ] ;
39
+ "027" [shape=circle , regular=1,style=filled,fillcolor=white ] ;
40
+ "026" [shape=box , regular=1,style=filled,fillcolor=white ] ;
41
+ "028" [shape=box , regular=1,style=filled,fillcolor=grey ] ;
42
+ "marr0001" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
43
+ "001" -> "marr0001" [dir=none,weight=1] ;
44
+ "007" -> "marr0001" [dir=none,weight=1] ;
45
+ "marr0001" -> "017" [dir=none, weight=2] ;
46
+ "marr0002" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
47
+ "001" -> "marr0002" [dir=none,weight=1] ;
48
+ "ZZ02" -> "marr0002" [dir=none,weight=1] ;
49
+ "marr0002" -> "012" [dir=none, weight=2] ;
50
+ "marr0003" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
51
+ "002" -> "marr0003" [dir=none,weight=1] ;
52
+ "003" -> "marr0003" [dir=none,weight=1] ;
53
+ "marr0003" -> "008" [dir=none, weight=2] ;
54
+ "marr0004" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
55
+ "002" -> "marr0004" [dir=none,weight=1] ;
56
+ "006" -> "marr0004" [dir=none,weight=1] ;
57
+ "marr0004" -> "011" [dir=none, weight=2] ;
58
+ "marr0005" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
59
+ "002" -> "marr0005" [dir=none,weight=1] ;
60
+ "ZZ01" -> "marr0005" [dir=none,weight=1] ;
61
+ "marr0005" -> "013" [dir=none, weight=2] ;
62
+ "marr0006" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
63
+ "004" -> "marr0006" [dir=none,weight=1] ;
64
+ "009" -> "marr0006" [dir=none,weight=1] ;
65
+ "marr0006" -> "010" [dir=none, weight=2] ;
66
+ "marr0007" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
67
+ "005" -> "marr0007" [dir=none,weight=1] ;
68
+ "015" -> "marr0007" [dir=none,weight=1] ;
69
+ "marr0007" -> "023" [dir=none, weight=2] ;
70
+ "marr0008" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
71
+ "005" -> "marr0008" [dir=none,weight=1] ;
72
+ "016" -> "marr0008" [dir=none,weight=1] ;
73
+ "marr0008" -> "020" [dir=none, weight=2] ;
74
+ "marr0009" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
75
+ "005" -> "marr0009" [dir=none,weight=1] ;
76
+ "012" -> "marr0009" [dir=none,weight=1] ;
77
+ "marr0009" -> "021" [dir=none, weight=2] ;
78
+ "marr0010" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
79
+ "008" -> "marr0010" [dir=none,weight=1] ;
80
+ "017" -> "marr0010" [dir=none,weight=1] ;
81
+ "marr0010" -> "018" [dir=none, weight=2] ;
82
+ "marr0011" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
83
+ "011" -> "marr0011" [dir=none,weight=1] ;
84
+ "023" -> "marr0011" [dir=none,weight=1] ;
85
+ "marr0011" -> "025" [dir=none, weight=2] ;
86
+ "marr0012" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
87
+ "013" -> "marr0012" [dir=none,weight=1] ;
88
+ "014" -> "marr0012" [dir=none,weight=1] ;
89
+ "marr0012" -> "019" [dir=none, weight=2] ;
90
+ "marr0013" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
91
+ "010" -> "marr0013" [dir=none,weight=1] ;
92
+ "021" -> "marr0013" [dir=none,weight=1] ;
93
+ "marr0013" -> "022" [dir=none, weight=2] ;
94
+ "marr0014" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
95
+ "019" -> "marr0014" [dir=none,weight=1] ;
96
+ "020" -> "marr0014" [dir=none,weight=1] ;
97
+ "marr0014" -> "024" [dir=none, weight=2] ;
98
+ "marr0015" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
99
+ "022" -> "marr0015" [dir=none,weight=1] ;
100
+ "025" -> "marr0015" [dir=none,weight=1] ;
101
+ "marr0015" -> "027" [dir=none, weight=2] ;
102
+ "marr0016" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
103
+ "024" -> "marr0016" [dir=none,weight=1] ;
104
+ "018" -> "marr0016" [dir=none,weight=1] ;
105
+ "marr0016" -> "026" [dir=none, weight=2] ;
106
+ "marr0017" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
107
+ "026" -> "marr0017" [dir=none,weight=1] ;
108
+ "027" -> "marr0017" [dir=none,weight=1] ;
109
+ "marr0017" -> "028" [dir=none, weight=2] ;
110
+ }
ace-0.2.0/kitchen-sink/docs/glsl.glsl ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ uniform float amplitude;
2
+ attribute float displacement;
3
+ varying vec3 vNormal;
4
+
5
+ void main() {
6
+
7
+ vNormal = normal;
8
+
9
+ // multiply our displacement by the
10
+ // amplitude. The amp will get animated
11
+ // so we'll have animated displacement
12
+ vec3 newPosition = position +
13
+ normal *
14
+ vec3(displacement *
15
+ amplitude);
16
+
17
+ gl_Position = projectionMatrix *
18
+ modelViewMatrix *
19
+ vec4(newPosition,1.0);
20
+ }
ace-0.2.0/kitchen-sink/docs/golang.go ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Concurrent computation of pi.
2
+ // See http://goo.gl/ZuTZM.
3
+ //
4
+ // This demonstrates Go's ability to handle
5
+ // large numbers of concurrent processes.
6
+ // It is an unreasonable way to calculate pi.
7
+ package main
8
+
9
+ import (
10
+ "fmt"
11
+ "math"
12
+ )
13
+
14
+ func main() {
15
+ fmt.Println(pi(5000))
16
+ }
17
+
18
+ // pi launches n goroutines to compute an
19
+ // approximation of pi.
20
+ func pi(n int) float64 {
21
+ ch := make(chan float64)
22
+ for k := 0; k <= n; k++ {
23
+ go term(ch, float64(k))
24
+ }
25
+ f := 0.0
26
+ for k := 0; k <= n; k++ {
27
+ f += <-ch
28
+ }
29
+ return f
30
+ }
31
+
32
+ func term(ch chan float64, k float64) {
33
+ ch <- 4 * math.Pow(-1, k) / (2*k + 1)
34
+ }
ace-0.2.0/kitchen-sink/docs/groovy.groovy ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //http://groovy.codehaus.org/Martin+Fowler%27s+closure+examples+in+Groovy
2
+
3
+ class Employee {
4
+ def name, salary
5
+ boolean manager
6
+ String toString() { return name }
7
+ }
8
+
9
+ def emps = [new Employee(name:'Guillaume', manager:true, salary:200),
10
+ new Employee(name:'Graeme', manager:true, salary:200),
11
+ new Employee(name:'Dierk', manager:false, salary:151),
12
+ new Employee(name:'Bernd', manager:false, salary:50)]
13
+
14
+ def managers(emps) {
15
+ emps.findAll { e -> e.isManager() }
16
+ }
17
+
18
+ assert emps[0..1] == managers(emps) // [Guillaume, Graeme]
19
+
20
+ def highPaid(emps) {
21
+ threshold = 150
22
+ emps.findAll { e -> e.salary > threshold }
23
+ }
24
+
25
+ assert emps[0..2] == highPaid(emps) // [Guillaume, Graeme, Dierk]
26
+
27
+ def paidMore(amount) {
28
+ { e -> e.salary > amount}
29
+ }
30
+ def highPaid = paidMore(150)
31
+
32
+ assert highPaid(emps[0]) // true
33
+ assert emps[0..2] == emps.findAll(highPaid)
34
+
35
+ def filename = 'test.txt'
36
+ new File(filename).withReader{ reader -> doSomethingWith(reader) }
37
+
38
+ def readersText
39
+ def doSomethingWith(reader) { readersText = reader.text }
40
+
41
+ assert new File(filename).text == readersText
ace-0.2.0/kitchen-sink/docs/haml.haml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !!!5
2
+
3
+ # <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
4
+ # <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
5
+ # <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
6
+ # <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
7
+
8
+
9
+ /adasdasdad
10
+ %div{:id => "#{@item.type}_#{@item.number}", :class => '#{@item.type} #{@item.urgency}', :phoney => `asdasdasd`}
11
+ / file: app/views/movies/index.html.haml
12
+ \d
13
+ %ads:{:bleh => 33}
14
+ %p==ddd==
15
+ Date/Time:
16
+ - now = DateTime.now
17
+ %strong= now
18
+ = if now DateTime.parse("December 31, 2006")
19
+ = "Happy new " + "year!"
20
+ %sfd.dfdfg
21
+ #content
22
+ .title
23
+ %h1= @title
24
+ = link_to 'Home', home_url
25
+
26
+ #contents
27
+ %div#content
28
+ %div.articles
29
+ %div.article.title Blah
30
+ %div.article.date 2006-11-05
31
+ %div.article.entry
32
+ Neil Patrick Harris
33
+
34
+ %div[@user, :greeting]
35
+ %bar[290]/
36
+ ==Hello!==
ace-0.2.0/kitchen-sink/docs/html.html ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+
4
+ <style type="text/css">
5
+ .text-layer {
6
+ font-family: Monaco, "Courier New", monospace;
7
+ font-size: 12px;
8
+ cursor: text;
9
+ }
10
+ </style>
11
+
12
+ </head>
13
+ <body>
14
+ <h1 style="color:red">Juhu Kinners</h1>
15
+ </body>
16
+ </html>
ace-0.2.0/kitchen-sink/docs/jade.jade ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !!!doctype
2
+ !!!5
3
+ !!!
4
+
5
+ include something
6
+
7
+ include another_thing
8
+
9
+ // let's talk about it
10
+
11
+ //
12
+ here it is. a block comment!
13
+ and another row!
14
+ but not here.
15
+
16
+ //
17
+ a far spaced
18
+ should be lack of block
19
+
20
+ // also not a comment
21
+ div.attemptAtBlock
22
+
23
+ span#myName
24
+
25
+ #{implicit}
26
+ !{more_explicit}
27
+
28
+ #idDiv
29
+
30
+ .idDiv
31
+
32
+ test(id="tag")
33
+ header(id="tag", blah="foo", meh="aads")
34
+ mixin article(obj, parents)
35
+
36
+ mixin bleh()
37
+
38
+ mixin clever-name
39
+
40
+ -var x = "0";
41
+ - y each z
42
+
43
+ - var items = ["one", "two", "three"]
44
+ each item in items
45
+ li= item
ace-0.2.0/kitchen-sink/docs/java.java ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ public class InfiniteLoop {
2
+
3
+ /*
4
+ * This will cause the program to hang...
5
+ *
6
+ * Taken from:
7
+ * http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
8
+ */
9
+ public static void main(String[] args) {
10
+ double d = Double.parseDouble("2.2250738585072012e-308");
11
+
12
+ // unreachable code
13
+ System.out.println("Value: " + d);
14
+ }
15
+ }
ace-0.2.0/kitchen-sink/docs/javascript.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ function foo(items, nada) {
2
+ for (var i=0; i<items.length; i++) {
3
+ alert(items[i] + "juhu\n");
4
+ } // Real Tab.
5
+ }
ace-0.2.0/kitchen-sink/docs/json.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "query": {
3
+ "count": 10,
4
+ "created": "2011-06-21T08:10:46Z",
5
+ "lang": "en-US",
6
+ "results": {
7
+ "photo": [
8
+ {
9
+ "farm": "6",
10
+ "id": "5855620975",
11
+ "isfamily": "0",
12
+ "isfriend": "0",
13
+ "ispublic": "1",
14
+ "owner": "32021554@N04",
15
+ "secret": "f1f5e8515d",
16
+ "server": "5110",
17
+ "title": "7087 bandit cat"
18
+ },
19
+ {
20
+ "farm": "4",
21
+ "id": "5856170534",
22
+ "isfamily": "0",
23
+ "isfriend": "0",
24
+ "ispublic": "1",
25
+ "owner": "32021554@N04",
26
+ "secret": "ff1efb2a6f",
27
+ "server": "3217",
28
+ "title": "6975 rusty cat"
29
+ },
30
+ {
31
+ "farm": "6",
32
+ "id": "5856172972",
33
+ "isfamily": "0",
34
+ "isfriend": "0",
35
+ "ispublic": "1",
36
+ "owner": "51249875@N03",
37
+ "secret": "6c6887347c",
38
+ "server": "5192",
39
+ "title": "watermarked-cats"
40
+ },
41
+ {
42
+ "farm": "6",
43
+ "id": "5856168328",
44
+ "isfamily": "0",
45
+ "isfriend": "0",
46
+ "ispublic": "1",
47
+ "owner": "32021554@N04",
48
+ "secret": "0c1cfdf64c",
49
+ "server": "5078",
50
+ "title": "7020 mandy cat"
51
+ },
52
+ {
53
+ "farm": "3",
54
+ "id": "5856171774",
55
+ "isfamily": "0",
56
+ "isfriend": "0",
57
+ "ispublic": "1",
58
+ "owner": "32021554@N04",
59
+ "secret": "7f5a3180ab",
60
+ "server": "2696",
61
+ "title": "7448 bobby cat"
62
+ }
63
+ ]
64
+ }
65
+ }
66
+ }
ace-0.2.0/kitchen-sink/docs/jsp.jsp ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <body>
3
+ <script>
4
+ var x = "abc";
5
+ function y {
6
+ }
7
+ </script>
8
+ <style>
9
+ .class {
10
+ background: #124356;
11
+ }
12
+ </style>
13
+
14
+ <p>
15
+ Today's date: <%= (new java.util.Date()).toLocaleString()%>
16
+ </p>
17
+ <%! int i = 0; %>
18
+ <jsp:declaration>
19
+ int j = 10;
20
+ </jsp:declaration>
21
+
22
+ <%-- This is JSP comment --%>
23
+ <%@ directive attribute="value" %>
24
+
25
+ <h2>Select Languages:</h2>
26
+
27
+ <form ACTION="jspCheckBox.jsp">
28
+ <input type="checkbox" name="id" value="Java"> Java<BR>
29
+ <input type="checkbox" name="id" value=".NET"> .NET<BR>
30
+ <input type="checkbox" name="id" value="PHP"> PHP<BR>
31
+ <input type="checkbox" name="id" value="C/C++"> C/C++<BR>
32
+ <input type="checkbox" name="id" value="PERL"> PERL <BR>
33
+ <input type="submit" value="Submit">
34
+ </form>
35
+
36
+ <%
37
+ String select[] = request.getParameterValues("id");
38
+ if (select != null && select.length != 0) {
39
+ out.println("You have selected: ");
40
+ for (int i = 0; i < select.length; i++) {
41
+ out.println(select[i]);
42
+ }
43
+ }
44
+ %>
45
+ </body>
46
+ </html>
ace-0.2.0/kitchen-sink/docs/jsx.jsx ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /*EXPECTED
2
+ hello world!
3
+ */
4
+ class Test {
5
+ static function run() : void {
6
+ // console.log("hello world!");
7
+ log "hello world!";
8
+ }
9
+ }
ace-0.2.0/kitchen-sink/docs/latex.tex ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ \usepackage{amsmath}
2
+ \title{\LaTeX}
3
+ \date{}
4
+ \begin{document}
5
+ \maketitle
6
+ \LaTeX{} is a document preparation system for the \TeX{}
7
+ typesetting program. It offers programmable desktop publishing
8
+ features and extensive facilities for automating most aspects of
9
+ typesetting and desktop publishing, including numbering and
10
+ cross-referencing, tables and figures, page layout, bibliographies,
11
+ and much more. \LaTeX{} was originally written in 1984 by Leslie
12
+ Lamport and has become the dominant method for using \TeX; few
13
+ people write in plain \TeX{} anymore. The current version is
14
+ \LaTeXe.
15
+
16
+ % This is a comment; it will not be shown in the final output.
17
+ % The following shows a little of the typesetting power of LaTeX:
18
+ \begin{align}
19
+ E &= mc^2 \\
20
+ m &= \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
21
+ \end{align}
22
+ \end{document}
ace-0.2.0/kitchen-sink/docs/less.less ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* styles.less */
2
+
3
+ @base: #f938ab;
4
+
5
+ .box-shadow(@style, @c) when (iscolor(@c)) {
6
+ box-shadow: @style @c;
7
+ -webkit-box-shadow: @style @c;
8
+ -moz-box-shadow: @style @c;
9
+ }
10
+ .box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
11
+ .box-shadow(@style, rgba(0, 0, 0, @alpha));
12
+ }
13
+
14
+ // Box styles
15
+ .box {
16
+ color: saturate(@base, 5%);
17
+ border-color: lighten(@base, 30%);
18
+
19
+ div { .box-shadow(0 0 5px, 30%) }
20
+
21
+ a {
22
+ color: @base;
23
+
24
+ &:hover {
25
+ color: lighten(@base, 50%);
26
+ }
27
+ }
28
+ }
ace-0.2.0/kitchen-sink/docs/liquid.liquid ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The following examples can be found in full at http://liquidmarkup.org/
2
+
3
+ Liquid is an extraction from the e-commerce system Shopify.
4
+ Shopify powers many thousands of e-commerce stores which all call for unique designs.
5
+ For this we developed Liquid which allows our customers complete design freedom while
6
+ maintaining the integrity of our servers.
7
+
8
+ Liquid has been in production use since June 2006 and is now used by many other
9
+ hosted web applications.
10
+
11
+ It was developed for usage in Ruby on Rails web applications and integrates seamlessly
12
+ as a plugin but it also works excellently as a stand alone library.
13
+
14
+ Here's what it looks like:
15
+
16
+ <ul id="products">
17
+ {% for product in products %}
18
+ <li>
19
+ <h2>{{ product.title }}</h2>
20
+ Only {{ product.price | format_as_money }}
21
+
22
+ <p>{{ product.description | prettyprint | truncate: 200 }}</p>
23
+
24
+ </li>
25
+ {% endfor %}
26
+ </ul>
27
+
28
+
29
+ Some more features include:
30
+
31
+ <h2>Filters</h2>
32
+ <p> The word "tobi" in uppercase: {{ 'tobi' | upcase }} </p>
33
+ <p>The word "tobi" has {{ 'tobi' | size }} letters! </p>
34
+ <p>Change "Hello world" to "Hi world": {{ 'Hello world' | replace: 'Hello', 'Hi' }} </p>
35
+ <p>The date today is {{ 'now' | date: "%Y %b %d" }} </p>
36
+
37
+
38
+ <h2>If</h2>
39
+ <p>
40
+ {% if user.name == 'tobi' or user.name == 'marc' %}
41
+ hi marc or tobi
42
+ {% endif %}
43
+ </p>
44
+
45
+
46
+ <h2>Case</h2>
47
+ <p>
48
+ {% case template %}
49
+ {% when 'index' %}
50
+ Welcome
51
+ {% when 'product' %}
52
+ {{ product.vendor | link_to_vendor }} / {{ product.title }}
53
+ {% else %}
54
+ {{ page_title }}
55
+ {% endcase %}
56
+ </p>
57
+
58
+
59
+ <h2>For Loops</h2>
60
+ <p>
61
+ {% for item in array %}
62
+ {{ item }}
63
+ {% endfor %}
64
+ </p>
65
+
66
+
67
+ <h2>Tables</h2>
68
+ <p>
69
+ {% tablerow item in items cols: 3 %}
70
+ {% if tablerowloop.col_first %}
71
+ First column: {{ item.variable }}
72
+ {% else %}
73
+ Different column: {{ item.variable }}
74
+ {% endif %}
75
+ {% endtablerow %}
76
+ </p>
ace-0.2.0/kitchen-sink/docs/lisp.lisp ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (defun prompt-for-cd ()
2
+ "Prompts
3
+ for CD"
4
+ (prompt-read "Title" 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6))
5
+ (prompt-read "Artist" &rest)
6
+ (or (parse-integer (prompt-read "Rating") :junk-allowed t) 0)
7
+ (if x (format t "yes") (format t "no" nil) ;and here comment
8
+ ) 0xFFLL -23ull
9
+ ;; second line comment
10
+ '(+ 1 2)
11
+ (defvar *lines*) ; list of all lines
12
+ (position-if-not #'sys::whitespacep line :start beg))
13
+ (quote (privet 1 2 3))
14
+ '(hello world)
15
+ (* 5 7)
16
+ (1 2 34 5)
17
+ (:use "aaaa")
18
+ (let ((x 10) (y 20))
19
+ (print (+ x y))
20
+ ) LAmbDa
21
+
22
+ "asdad\0eqweqe"
ace-0.2.0/kitchen-sink/docs/lua.lua ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --[[--
2
+ num_args takes in 5.1 byte code and extracts the number of arguments
3
+ from its function header.
4
+ --]]--
5
+
6
+ function int(t)
7
+ return t:byte(1)+t:byte(2)*0x100+t:byte(3)*0x10000+t:byte(4)*0x1000000
8
+ end
9
+
10
+ function num_args(func)
11
+ local dump = string.dump(func)
12
+ local offset, cursor = int(dump:sub(13)), offset + 26
13
+ --Get the params and var flag (whether there's a ... in the param)
14
+ return dump:sub(cursor):byte(), dump:sub(cursor+1):byte()
15
+ end
16
+
17
+ -- Usage:
18
+ num_args(function(a,b,c,d, ...) end) -- return 4, 7
19
+
20
+ -- Python styled string format operator
21
+ local gm = debug.getmetatable("")
22
+
23
+ gm.__mod=function(self, other)
24
+ if type(other) ~= "table" then other = {other} end
25
+ for i,v in ipairs(other) do other[i] = tostring(v) end
26
+ return self:format(unpack(other))
27
+ end
28
+
29
+ print([===[
30
+ blah blah %s, (%d %d)
31
+ ]===]%{"blah", num_args(int)})
32
+
33
+ --[=[--
34
+ table.maxn is deprecated, use # instead.
35
+ --]=]--
36
+ print(table.maxn{1,2,[4]=4,[8]=8) -- outputs 8 instead of 2
ace-0.2.0/kitchen-sink/docs/luapage.lp ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html>
4
+ <% --[[--
5
+ index.lp from the Kepler Project's LuaDoc HTML doclet.
6
+ http://keplerproject.github.com/luadoc/
7
+ --]] %>
8
+ <head>
9
+ <title>Reference</title>
10
+ <link rel="stylesheet" href="<%=luadoc.doclet.html.link("luadoc.css")%>" type="text/css" />
11
+ <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
12
+ </head>
13
+
14
+ <body>
15
+ <div id="container">
16
+
17
+ <div id="product">
18
+ <div id="product_logo"></div>
19
+ <div id="product_name"><big><b></b></big></div>
20
+ <div id="product_description"></div>
21
+ </div> <!-- id="product" -->
22
+
23
+ <div id="main">
24
+
25
+ <div id="navigation">
26
+ <%=luadoc.doclet.html.include("menu.lp", { doc=doc })%>
27
+
28
+ </div> <!-- id="navigation" -->
29
+
30
+ <div id="content">
31
+
32
+
33
+ <%if not options.nomodules and #doc.modules > 0 then%>
34
+ <h2>Modules</h2>
35
+ <table class="module_list">
36
+ <!--<tr><td colspan="2">Modules</td></tr>-->
37
+ <%for _, modulename in ipairs(doc.modules) do%>
38
+ <tr>
39
+ <td class="name"><a href="<%=luadoc.doclet.html.module_link(modulename, doc)%>"><%=modulename%></a></td>
40
+ <td class="summary"><%=doc.modules[modulename].summary%></td>
41
+ </tr>
42
+ <%end%>
43
+ </table>
44
+ <%end%>
45
+
46
+
47
+
48
+ <%if not options.nofiles and #doc.files > 0 then%>
49
+ <h2>Files</h2>
50
+ <table class="file_list">
51
+ <!--<tr><td colspan="2">Files</td></tr>-->
52
+ <%for _, filepath in ipairs(doc.files) do%>
53
+ <tr>
54
+ <td class="name"><a href="<%=luadoc.doclet.html.file_link(filepath)%>"><%=filepath%></a></td>
55
+ <td class="summary"></td>
56
+ </tr>
57
+ <%end%>
58
+ </table>
59
+ <%end%>
60
+
61
+ </div> <!-- id="content" -->
62
+
63
+ </div> <!-- id="main" -->
64
+
65
+ <div id="about">
66
+ <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
67
+ </div> <!-- id="about" -->
68
+
69
+ </div> <!-- id="container" -->
70
+ </body>
71
+ </html>
ace-0.2.0/kitchen-sink/docs/lucene.lucene ADDED
@@ -0,0 +1 @@
 
1
+ (title:"foo bar" AND body:"quick fox") OR title:fox
ace-0.2.0/kitchen-sink/docs/markdown.md ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Ace (Ajax.org Cloud9 Editor)
2
+ ============================
3
+
4
+ Ace is a standalone code editor written in JavaScript. Our goal is to create a browser based editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page or JavaScript application. Ace is developed as the primary editor for [Cloud9 IDE](http://www.cloud9ide.com/) and the successor of the Mozilla Skywriter (Bespin) Project.
5
+
6
+ Features
7
+ --------
8
+
9
+ * Syntax highlighting
10
+ * Automatic indent and outdent
11
+ * An optional command line
12
+ * Handles huge documents (100,000 lines and more are no problem)
13
+ * Fully customizable key bindings including VI and Emacs modes
14
+ * Themes (TextMate themes can be imported)
15
+ * Search and replace with regular expressions
16
+ * Highlight matching parentheses
17
+ * Toggle between soft tabs and real tabs
18
+ * Displays hidden characters
19
+ * Drag and drop text using the mouse
20
+ * Line wrapping
21
+ * Unstructured / user code folding
22
+ * Live syntax checker (currently JavaScript/CoffeeScript)
23
+
24
+ Take Ace for a spin!
25
+ --------------------
26
+
27
+ Check out the Ace live [demo](http://ajaxorg.github.com/ace/) or get a [Cloud9 IDE account](http://run.cloud9ide.com) to experience Ace while editing one of your own GitHub projects.
28
+
29
+ If you want, you can use Ace as a textarea replacement thanks to the [Ace Bookmarklet](http://ajaxorg.github.com/ace/build/textarea/editor.html).
30
+
31
+ History
32
+ -------
33
+
34
+ Previously known as “Bespin” and “Skywriter” it’s now known as Ace (Ajax.org Cloud9 Editor)! Bespin and Ace started as two independent projects, both aiming to build a no-compromise code editor component for the web. Bespin started as part of Mozilla Labs and was based on the canvas tag, while Ace is the Editor component of the Cloud9 IDE and is using the DOM for rendering. After the release of Ace at JSConf.eu 2010 in Berlin the Skywriter team decided to merge Ace with a simplified version of Skywriter's plugin system and some of Skywriter's extensibility points. All these changes have been merged back to Ace. Both Ajax.org and Mozilla are actively developing and maintaining Ace.
35
+
36
+ Getting the code
37
+ ----------------
38
+
39
+ Ace is a community project. We actively encourage and support contributions. The Ace source code is hosted on GitHub. It is released under the BSD License. This license is very simple, and is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!
40
+
41
+ ```bash
42
+ git clone git://github.com/ajaxorg/ace.git
43
+ cd ace
44
+ git submodule update --init --recursive
45
+ ```
46
+
47
+ Embedding Ace
48
+ -------------
49
+
50
+ Ace can be easily embedded into any existing web page. The Ace git repository ships with a pre-packaged version of Ace inside of the `build` directory. The same packaged files are also available as a separate [download](https://github.com/ajaxorg/ace/downloads). Simply copy the contents of the `src` subdirectory somewhere into your project and take a look at the included demos of how to use Ace.
51
+
52
+ The easiest version is simply:
53
+
54
+ ```html
55
+ <div id="editor">some text</div>
56
+ <script src="src/ace.js" type="text/javascript" charset="utf-8"></script>
57
+ <script>
58
+ window.onload = function() {
59
+ var editor = ace.edit("editor");
60
+ };
61
+ </script>
62
+ ```
63
+
64
+ With "editor" being the id of the DOM element, which should be converted to an editor. Note that this element must be explicitly sized and positioned `absolute` or `relative` for Ace to work. e.g.
65
+
66
+ ```css
67
+ #editor {
68
+ position: absolute;
69
+ width: 500px;
70
+ height: 400px;
71
+ }
72
+ ```
73
+
74
+ To change the theme simply include the Theme's JavaScript file
75
+
76
+ ```html
77
+ <script src="src/theme-twilight.js" type="text/javascript" charset="utf-8"></script>
78
+ ```
79
+
80
+ and configure the editor to use the theme:
81
+
82
+ ```javascript
83
+ editor.setTheme("ace/theme/twilight");
84
+ ```
85
+
86
+ By default the editor only supports plain text mode; many other languages are available as separate modules. After including the mode's JavaScript file:
87
+
88
+ ```html
89
+ <script src="src/mode-javascript.js" type="text/javascript" charset="utf-8"></script>
90
+ ```
91
+
92
+ Then the mode can be used like this:
93
+
94
+ ```javascript
95
+ var JavaScriptMode = require("ace/mode/javascript").Mode;
96
+ editor.getSession().setMode(new JavaScriptMode());
97
+ ```
98
+
99
+ Documentation
100
+ -------------
101
+
102
+ You find a lot more sample code in the [demo app](https://github.com/ajaxorg/ace/blob/master/demo/demo.js).
103
+
104
+ There is also some documentation on the [wiki page](https://github.com/ajaxorg/ace/wiki).
105
+
106
+ If you still need help, feel free to drop a mail on the [ace mailing list](http://groups.google.com/group/ace-discuss).
107
+
108
+ Running Ace
109
+ -----------
110
+
111
+ After the checkout Ace works out of the box. No build step is required. Open 'editor.html' in any browser except Google Chrome. Google Chrome doesn't allow XMLHTTPRequests from files loaded from disc (i.e. with a file:/// URL). To open Ace in Chrome simply start the bundled mini HTTP server:
112
+
113
+ ```bash
114
+ ./static.py
115
+ ```
116
+
117
+ Or using Node.JS
118
+
119
+ ```bash
120
+ ./static.js
121
+ ```
122
+
123
+ The editor can then be opened at http://localhost:8888/index.html.
124
+
125
+ Package Ace
126
+ -----------
127
+
128
+ To package Ace we use the dryice build tool developed by the Mozilla Skywriter team. Before you can build you need to make sure that the submodules are up to date.
129
+
130
+ ```bash
131
+ git submodule update --init --recursive
132
+ ```
133
+
134
+ Afterwards Ace can be built by calling
135
+
136
+ ```bash
137
+ ./Makefile.dryice.js normal
138
+ ```
139
+
140
+ The packaged Ace will be put in the 'build' folder.
141
+
142
+ To build the bookmarklet version execute
143
+
144
+ ```bash
145
+ ./Makefile.dryice.js bm
146
+ ```
147
+
148
+ Running the Unit Tests
149
+ ----------------------
150
+
151
+ The Ace unit tests run on node.js. Before the first run a couple of node modules have to be installed. The easiest way to do this is by using the node package manager (npm). In the Ace base directory simply call
152
+
153
+ ```bash
154
+ npm link .
155
+ ```
156
+
157
+ To run the tests call:
158
+
159
+ ```bash
160
+ node lib/ace/test/all.js
161
+ ```
162
+
163
+ You can also run the tests in your browser by serving:
164
+
165
+ http://localhost:8888/lib/ace/test/tests.html
166
+
167
+ This makes debugging failing tests way more easier.
168
+
169
+ Contributing
170
+ ------------
171
+
172
+ Ace wouldn't be what it is without contributions! Feel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request. To protect the interests of the Ace contributors and users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is the simplest of agreements, requiring that the contributions you make to an ajax.org project are only those you're allowed to make. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes ten minutes, and only needs to be completed once. There are two versions of the agreement:
173
+
174
+ 1. [The Individual CLA](https://github.com/ajaxorg/ace/raw/master/doc/Contributor_License_Agreement-v2.pdf): use this version if you're working on an ajax.org in your spare time, or can clearly claim ownership of copyright in what you'll be submitting.
175
+ 2. [The Corporate CLA](https://github.com/ajaxorg/ace/raw/master/doc/Corporate_Contributor_License_Agreement-v2.pdf): have your corporate lawyer review and submit this if your company is going to be contributing to ajax.org projects
176
+
177
+ If you want to contribute to an ajax.org project please print the CLA and fill it out and sign it. Then either send it by snail mail or fax to us or send it back scanned (or as a photo) by email.
178
+
179
+ Email: fabian.jakobs@web.de
180
+
181
+ Fax: +31 (0) 206388953
182
+
183
+ Address: Ajax.org B.V.
184
+ Keizersgracht 241
185
+ 1016 EA, Amsterdam
186
+ the Netherlands
ace-0.2.0/kitchen-sink/docs/objectivec.m ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @protocol Printing: someParent
2
+ -(void) print;
3
+ @end
4
+
5
+ @interface Fraction: NSObject <Printing, NSCopying> {
6
+ int numerator;
7
+ int denominator;
8
+ }
9
+ @end
10
+
11
+ @"blah\8" @"a\222sd\d" @"\faw\"\? \' \4 n\\" @"\56"
12
+ @"\xSF42"
13
+
14
+ -(NSDecimalNumber*)addCount:(id)addObject{
15
+
16
+ return [count decimalNumberByAdding:addObject.count];
17
+
18
+ }
19
+
20
+ NS_DURING NS_HANDLER NS_ENDHANDLER
21
+
22
+ @try {
23
+ if (argc > 1) {
24
+ @throw [NSException exceptionWithName:@"Throwing a test exception" reason:@"Testing the @throw directive." userInfo:nil];
25
+ }
26
+ }
27
+ @catch (id theException) {
28
+ NSLog(@"%@", theException);
29
+ result = 1 ;
30
+ }
31
+ @finally {
32
+ NSLog(@"This always happens.");
33
+ result += 2 ;
34
+ }
35
+
36
+ @synchronized(lock) {
37
+ NSLog(@"Hello World");
38
+ }
39
+
40
+ struct { @defs( NSObject) }
41
+
42
+ char *enc1 = @encode(int);
43
+
44
+ IBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class
45
+
46
+
47
+ @class @protocol
48
+
49
+ @public
50
+ // instance variables
51
+ @package
52
+ // instance variables
53
+ @protected
54
+ // instance variables
55
+ @private
56
+ // instance variables
57
+
58
+ YES NO Nil nil
59
+ NSApp()
60
+ NSRectToCGRect (Protocol ProtocolFromString:"NSTableViewDelegate"))
61
+
62
+ [SPPoint pointFromCGPoint:self.position]
63
+
64
+ NSRoundDownToMultipleOfPageSize
65
+
66
+ #import <stdio.h>
67
+
68
+ int main( int argc, const char *argv[] ) {
69
+ printf( "hello world\n" );
70
+ return 0;
71
+ }
72
+
73
+ NSChangeSpelling
74
+
75
+ @"0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count"
76
+
77
+ @selector(lowercaseString) @selector(uppercaseString:)
78
+
79
+ NSFetchRequest *localRequest = [[NSFetchRequest alloc] init];
80
+ localRequest.entity = [NSEntityDescription entityForName:@"VNSource" inManagedObjectContext:context];
81
+ localRequest.sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"resolution" ascending:YES]];
82
+ NSPredicate *predicate = [NSPredicate predicateWithFormat:@"0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count"];
83
+ [NSPredicate predicateWithFormat:]
84
+ NSString *predicateString = [NSString stringWithFormat:@"SELF beginsWith[cd] %@", searchString];
85
+ NSPredicate *pred = [NSPredicate predicateWithFormat:predicateString];
86
+ NSArray *filteredKeys = [[myMutableDictionary allKeys] filteredArrayUsingPredicate:pred];
87
+
88
+ localRequest.predicate = [NSPredicate predicateWithFormat:@"whichChart = %@" argumentArray: listChartToDownload];
89
+ localRequest.fetchBatchSize = 100;
90
+ arrayRequest = [context executeFetchRequest:localRequest error:&error1];
91
+
92
+ [localRequest release];
93
+
94
+ #ifndef Nil
95
+ #define Nil __DARWIN_NULL /* id of Nil class */
96
+ #endif
97
+
98
+ @implementation MyObject
99
+ - (unsigned int)areaOfWidth:(unsigned int)width
100
+ height:(unsigned int)height
101
+ {
102
+ return width*height;
103
+ }
104
+ @end
ace-0.2.0/kitchen-sink/docs/ocaml.ml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (*
2
+ * Example of early return implementation taken from
3
+ * http://ocaml.janestreet.com/?q=node/91
4
+ *)
5
+
6
+ let with_return (type t) (f : _ -> t) =
7
+ let module M =
8
+ struct exception Return of t end
9
+ in
10
+ let return = { return = (fun x -> raise (M.Return x)); } in
11
+ try f return with M.Return x -> x
12
+
13
+
14
+ (* Function that uses the 'early return' functionality provided by `with_return` *)
15
+ let sum_until_first_negative list =
16
+ with_return (fun r ->
17
+ List.fold list ~init:0 ~f:(fun acc x ->
18
+ if x >= 0 then acc + x else r.return acc))
ace-0.2.0/kitchen-sink/docs/perl.pl ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/perl
2
+ use strict;
3
+ use warnings;
4
+ my $num_primes = 0;
5
+ my @primes;
6
+
7
+ # Put 2 as the first prime so we won't have an empty array
8
+ $primes[$num_primes] = 2;
9
+ $num_primes++;
10
+
11
+ MAIN_LOOP:
12
+ for my $number_to_check (3 .. 200)
13
+ {
14
+ for my $p (0 .. ($num_primes-1))
15
+ {
16
+ if ($number_to_check % $primes[$p] == 0)
17
+ {
18
+ next MAIN_LOOP;
19
+ }
20
+ }
21
+
22
+ # If we reached this point it means $number_to_check is not
23
+ # divisable by any prime number that came before it.
24
+ $primes[$num_primes] = $number_to_check;
25
+ $num_primes++;
26
+ }
27
+
28
+ for my $p (0 .. ($num_primes-1))
29
+ {
30
+ print $primes[$p], ", ";
31
+ }
32
+ print "\n";
ace-0.2.0/kitchen-sink/docs/pgsql.pgsql ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ BEGIN;
3
+
4
+ /**
5
+ * Samples from PostgreSQL src/tutorial/basics.source
6
+ */
7
+ CREATE TABLE weather (
8
+ city varchar(80),
9
+ temp_lo int, -- low temperature
10
+ temp_hi int, -- high temperature
11
+ prcp real, -- precipitation
12
+ "date" date
13
+ );
14
+
15
+ CREATE TABLE cities (
16
+ name varchar(80),
17
+ location point
18
+ );
19
+
20
+
21
+ INSERT INTO weather
22
+ VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');
23
+
24
+ INSERT INTO cities
25
+ VALUES ('San Francisco', '(-194.0, 53.0)');
26
+
27
+ INSERT INTO weather (city, temp_lo, temp_hi, prcp, "date")
28
+ VALUES ('San Francisco', 43, 57, 0.0, '1994-11-29');
29
+
30
+ INSERT INTO weather (date, city, temp_hi, temp_lo)
31
+ VALUES ('1994-11-29', 'Hayward', 54, 37);
32
+
33
+
34
+ SELECT city, (temp_hi+temp_lo)/2 AS temp_avg, "date" FROM weather;
35
+
36
+ SELECT city, temp_lo, temp_hi, prcp, "date", location
37
+ FROM weather, cities
38
+ WHERE city = name;
39
+
40
+
41
+
42
+ /**
43
+ * Dollar quotes starting at the end of the line are colored as SQL unless
44
+ * a special language tag is used. Pearl and Python are currently implemented
45
+ * but lots of others are possible.
46
+ */
47
+ create or replace function blob_content_chunked(
48
+ in p_data bytea,
49
+ in p_chunk integer)
50
+ returns setof bytea as $$
51
+ -- Still SQL comments
52
+ declare
53
+ v_size integer = octet_length(p_data);
54
+ begin
55
+ for i in 1..v_size by p_chunk loop
56
+ return next substring(p_data from i for p_chunk);
57
+ end loop;
58
+ end;
59
+ $$ language plpgsql stable;
60
+
61
+
62
+ -- pl/perl
63
+ CREATE FUNCTION perl_max (integer, integer) RETURNS integer AS $perl$
64
+ # perl comment...
65
+ my ($x,$y) = @_;
66
+ if (! defined $x) {
67
+ if (! defined $y) { return undef; }
68
+ return $y;
69
+ }
70
+ if (! defined $y) { return $x; }
71
+ if ($x > $y) { return $x; }
72
+ return $y;
73
+ $perl$ LANGUAGE plperl;
74
+
75
+ -- pl/python
76
+ CREATE FUNCTION usesavedplan() RETURNS trigger AS $python$
77
+ # python comment...
78
+ if SD.has_key("plan"):
79
+ plan = SD["plan"]
80
+ else:
81
+ plan = plpy.prepare("SELECT 1")
82
+ SD["plan"] = plan
83
+ $python$ LANGUAGE plpythonu;
84
+
85
+
86
+ -- psql commands
87
+ \df cash*
88
+
89
+
90
+ -- Some string samples.
91
+ select 'don''t do it now;' || 'maybe later';
92
+ select E'dont\'t do it';
93
+ select length('some other''s stuff' || $$cat in hat's stuff $$);
94
+
95
+ select $$ strings
96
+ over multiple
97
+ lines - use dollar quotes
98
+ $$;
99
+
100
+ END;
ace-0.2.0/kitchen-sink/docs/php.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function nfact($n) {
4
+ if ($n == 0) {
5
+ return 1;
6
+ }
7
+ else {
8
+ return $n * nfact($n - 1);
9
+ }
10
+ }
11
+
12
+ echo "\n\nPlease enter a whole number ... ";
13
+ $num = trim(fgets(STDIN));
14
+
15
+ // ===== PROCESS - Determing the factorial of the input number =====
16
+ $output = "\n\nFactorial " . $num . " = " . nfact($num) . "\n\n";
17
+ echo $output;
18
+
19
+ ?>
ace-0.2.0/kitchen-sink/docs/plaintext.txt ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
2
+
3
+ Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
4
+
5
+ Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
6
+
7
+ Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
8
+
9
+ Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.
10
+
11
+ At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
ace-0.2.0/kitchen-sink/docs/powershell.ps1 ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This is a simple comment
2
+ function Hello($name) {
3
+ Write-host "Hello $name"
4
+ }
5
+
6
+ function add($left, $right=4) {
7
+ if ($right -ne 4) {
8
+ return $left
9
+ } elseif ($left -eq $null -and $right -eq 2) {
10
+ return 3
11
+ } else {
12
+ return 2
13
+ }
14
+ }
15
+
16
+ $number = 1 + 2;
17
+ $number += 3
18
+
19
+ Write-Host Hello -name "World"
20
+
21
+ $an_array = @(1, 2, 3)
22
+ $a_hash = @{"something" = "something else"}
23
+
24
+ & notepad .\readme.md
ace-0.2.0/kitchen-sink/docs/python.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/local/bin/python
2
+
3
+ import string, sys
4
+
5
+ # If no arguments were given, print a helpful message
6
+ if len(sys.argv)==1:
7
+ print '''Usage:
8
+ celsius temp1 temp2 ...'''
9
+ sys.exit(0)
10
+
11
+ # Loop over the arguments
12
+ for i in sys.argv[1:]:
13
+ try:
14
+ fahrenheit=float(string.atoi(i))
15
+ except string.atoi_error:
16
+ print repr(i), "not a numeric value"
17
+ else:
18
+ celsius=(fahrenheit-32)*5.0/9.0
19
+ print '%i\260F = %i\260C' % (int(fahrenheit), int(celsius+.5))
ace-0.2.0/kitchen-sink/docs/r.r ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Call:
2
+ lm(formula = y ~ x)
3
+
4
+ Residuals:
5
+ 1 2 3 4 5 6
6
+ 3.3333 -0.6667 -2.6667 -2.6667 -0.6667 3.3333
7
+
8
+ Coefficients:
9
+ Estimate Std. Error t value Pr(>|t|)
10
+ (Intercept) -9.3333 2.8441 -3.282 0.030453 *
11
+ x 7.0000 0.7303 9.585 0.000662 ***
12
+ ---
13
+ Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
14
+
15
+ Residual standard error: 3.055 on 4 degrees of freedom
16
+ Multiple R-squared: 0.9583, Adjusted R-squared: 0.9478
17
+ F-statistic: 91.88 on 1 and 4 DF, p-value: 0.000662
18
+
19
+ > par(mfrow=c(2, 2)) # Request 2x2 plot layout
20
+ > plot(lm_1) # Diagnostic plot of regression model
ace-0.2.0/kitchen-sink/docs/rdoc.Rd ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ \name{picker}
2
+ \alias{picker}
3
+ \title{Create a picker control}
4
+ \description{
5
+ Create a picker control to enable manipulation of plot variables based on a set of fixed choices.
6
+ }
7
+
8
+ \usage{
9
+ picker(..., initial = NULL, label = NULL)
10
+ }
11
+
12
+
13
+ \arguments{
14
+ \item{\dots}{
15
+ Arguments containing objects to be presented as choices for the picker (or a list containing the choices). If an element is named then the name is used to display it within the picker. If an element is not named then it is displayed within the picker using \code{\link{as.character}}.
16
+ }
17
+ \item{initial}{
18
+ Initial value for picker. Value must be present in the list of choices specified. If not specified defaults to the first choice.
19
+ }
20
+ \item{label}{
21
+ Display label for picker. Defaults to the variable name if not specified.
22
+ }
23
+ }
24
+
25
+ \value{
26
+ An object of class "manipulator.picker" which can be passed to the \code{\link{manipulate}} function.
27
+ }
28
+
29
+ \seealso{
30
+ \code{\link{manipulate}}, \code{\link{slider}}, \code{\link{checkbox}}, \code{\link{button}}
31
+ }
32
+
33
+
34
+ \examples{
35
+ \dontrun{
36
+
37
+ ## Filtering data with a picker
38
+ manipulate(
39
+ barplot(as.matrix(longley[,factor]),
40
+ beside = TRUE, main = factor),
41
+ factor = picker("GNP", "Unemployed", "Employed"))
42
+
43
+ ## Create a picker with labels
44
+ manipulate(
45
+ plot(pressure, type = type),
46
+ type = picker("points" = "p", "line" = "l", "step" = "s"))
47
+
48
+ ## Picker with groups
49
+ manipulate(
50
+ barplot(as.matrix(mtcars[group,"mpg"]), beside=TRUE),
51
+ group = picker("Group 1" = 1:11,
52
+ "Group 2" = 12:22,
53
+ "Group 3" = 23:32))
54
+
55
+ ## Histogram w/ picker to select type
56
+ require(lattice)
57
+ require(stats)
58
+ manipulate(
59
+ histogram(~ height | voice.part,
60
+ data = singer, type = type),
61
+ type = picker("percent", "count", "density"))
62
+
63
+ }
64
+ }
ace-0.2.0/kitchen-sink/docs/rhtml.Rhtml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+
3
+ <head>
4
+ <title>Title</title>
5
+ </head>
6
+
7
+ <body>
8
+
9
+ <p>This is an R HTML document. When you click the <b>Knit HTML</b> button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:</p>
10
+
11
+ <!--begin.rcode
12
+ summary(cars)
13
+ end.rcode-->
14
+
15
+ <p>You can also embed plots, for example:</p>
16
+
17
+ <!--begin.rcode fig.width=7, fig.height=6
18
+ plot(cars)
19
+ end.rcode-->
20
+
21
+ </body>
22
+ </html>
ace-0.2.0/kitchen-sink/docs/ruby.rb ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/ruby
2
+
3
+ # Program to find the factorial of a number
4
+ def fact(n)
5
+ if n == 0
6
+ 1
7
+ else
8
+ n * fact(n-1)
9
+ end
10
+ end
11
+
12
+ puts fact(ARGV[0].to_i)
13
+
14
+ class Range
15
+ def to_json(*a)
16
+ {
17
+ 'json_class' => self.class.name, # = 'Range'
18
+ 'data' => [ first, last, exclude_end? ]
19
+ }.to_json(*a)
20
+ end
21
+ end
22
+
23
+ {:id => 34, :sdfasdfasdf => "asdasdads"}
ace-0.2.0/kitchen-sink/docs/scala.scala ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // http://www.scala-lang.org/node/54
2
+
3
+ package examples.actors
4
+
5
+ import scala.actors.Actor
6
+ import scala.actors.Actor._
7
+
8
+ abstract class PingMessage
9
+ case object Start extends PingMessage
10
+ case object SendPing extends PingMessage
11
+ case object Pong extends PingMessage
12
+
13
+ abstract class PongMessage
14
+ case object Ping extends PongMessage
15
+ case object Stop extends PongMessage
16
+
17
+ object pingpong extends Application {
18
+ val pong = new Pong
19
+ val ping = new Ping(100000, pong)
20
+ ping.start
21
+ pong.start
22
+ ping ! Start
23
+ }
24
+
25
+ class Ping(count: Int, pong: Actor) extends Actor {
26
+ def act() {
27
+ println("Ping: Initializing with count "+count+": "+pong)
28
+ var pingsLeft = count
29
+ loop {
30
+ react {
31
+ case Start =>
32
+ println("Ping: starting.")
33
+ pong ! Ping
34
+ pingsLeft = pingsLeft - 1
35
+ case SendPing =>
36
+ pong ! Ping
37
+ pingsLeft = pingsLeft - 1
38
+ case Pong =>
39
+ if (pingsLeft % 1000 == 0)
40
+ println("Ping: pong from: "+sender)
41
+ if (pingsLeft > 0)
42
+ self ! SendPing
43
+ else {
44
+ println("Ping: Stop.")
45
+ pong ! Stop
46
+ exit('stop)
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ class Pong extends Actor {
54
+ def act() {
55
+ var pongCount = 0
56
+ loop {
57
+ react {
58
+ case Ping =>
59
+ if (pongCount % 1000 == 0)
60
+ println("Pong: ping "+pongCount+" from "+sender)
61
+ sender ! Pong
62
+ pongCount = pongCount + 1
63
+ case Stop =>
64
+ println("Pong: Stop.")
65
+ exit('stop)
66
+ }
67
+ }
68
+ }
69
+ }
ace-0.2.0/kitchen-sink/docs/scss.scss ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* style.scss */
2
+
3
+ #navbar {
4
+ $navbar-width: 800px;
5
+ $items: 5;
6
+ $navbar-color: #ce4dd6;
7
+
8
+ width: $navbar-width;
9
+ border-bottom: 2px solid $navbar-color;
10
+
11
+ li {
12
+ float: left;
13
+ width: $navbar-width/$items - 10px;
14
+
15
+ background-color: lighten($navbar-color, 20%);
16
+ &:hover {
17
+ background-color: lighten($navbar-color, 10%);
18
+ }
19
+ }
20
+ }
ace-0.2.0/kitchen-sink/docs/sh.sh ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ # Script to open a browser to current branch
4
+ # Repo formats:
5
+ # ssh git@github.com:richoH/gh_pr.git
6
+ # http https://richoH@github.com/richoH/gh_pr.git
7
+ # git git://github.com/richoH/gh_pr.git
8
+
9
+ username=`git config --get github.user`
10
+
11
+ get_repo() {
12
+ git remote -v | grep ${@:-$username} | while read remote; do
13
+ if repo=`echo $remote | grep -E -o "git@github.com:[^ ]*"`; then
14
+ echo $repo | sed -e "s/^git@github\.com://" -e "s/\.git$//"
15
+ exit 1
16
+ fi
17
+ if repo=`echo $remote | grep -E -o "https?://([^@]*@)?github.com/[^ ]*\.git"`; then
18
+ echo $repo | sed -e "s|^https?://||" -e "s/^.*github\.com\///" -e "s/\.git$//"
19
+ exit 1
20
+ fi
21
+ if repo=`echo $remote | grep -E -o "git://github.com/[^ ]*\.git"`; then
22
+ echo $repo | sed -e "s|^git://github.com/||" -e "s/\.git$//"
23
+ exit 1
24
+ fi
25
+ done
26
+
27
+ if [ $? -eq 0 ]; then
28
+ echo "Couldn't find a valid remote" >&2
29
+ exit 1
30
+ fi
31
+ }
32
+
33
+ if repo=`get_repo $@`; then
34
+ branch=`git symbolic-ref HEAD 2>/dev/null`
35
+ echo "http://github.com/$repo/pull/new/${branch##refs/heads/}"
36
+ else
37
+ exit 1
38
+ fi
ace-0.2.0/kitchen-sink/docs/sql.sql ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ SELECT city, COUNT(id) AS users_count
2
+ FROM users
3
+ WHERE group_name = 'salesman'
4
+ AND created > '2011-05-21'
5
+ GROUP BY 1
6
+ ORDER BY 2 DESC
ace-0.2.0/kitchen-sink/docs/stylus.styl ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // I'm a comment!
2
+
3
+ /*
4
+ * Adds the given numbers together.
5
+ */
6
+
7
+
8
+ /*!
9
+ * Adds the given numbers together.
10
+ */
11
+
12
+
13
+ asdasdasdad(df, ad=23)
14
+
15
+ add(a, b = a)
16
+ a + b
17
+ green(#0c0)
18
+ add(10, 5)
19
+ // => 15
20
+
21
+ add(10)
22
+ add(a, b)
23
+
24
+ &asdasd
25
+
26
+ (arguments)
27
+
28
+ @sdfsdf
29
+ .signatures
30
+ background-color #e0e8e0
31
+ border 1px solid grayLighter
32
+ box-shadow 0 0 3px grayLightest
33
+ border-radius 3px
34
+ padding 3px 5px
35
+ "adsads"
36
+ margin-left 0
37
+ list-style none
38
+ .signature
39
+ list-style none
40
+ display: inline
41
+ margin-left 0
42
+ > li
43
+ display inline
44
+ is not
45
+ .signature-values
46
+ list-style none
47
+ display inline
48
+ margin-left 0
49
+ &:before
50
+ content '→'
51
+ margin 0 5px
52
+ > li
53
+ !important
54
+
55
+ unless
ace-0.2.0/kitchen-sink/docs/svg.svg ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg
2
+ width="800" height="600"
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ onload="StartAnimation(evt)">
5
+
6
+ <title>Test Tube Progress Bar</title>
7
+ <desc>Created for the Web Directions SVG competition</desc>
8
+
9
+ <script type="text/ecmascript"><![CDATA[
10
+ var timevalue = 0;
11
+ var timer_increment = 1;
12
+ var max_time = 100;
13
+ var hickory;
14
+ var dickory;
15
+ var dock;
16
+ var i;
17
+
18
+ function StartAnimation(evt) {
19
+ hickory = evt.target.ownerDocument.getElementById("hickory");
20
+ dickory = evt.target.ownerDocument.getElementById("dickory");
21
+ dock = evt.target.ownerDocument.getElementById("dock");
22
+
23
+ ShowAndGrowElement();
24
+ }
25
+ function ShowAndGrowElement() {
26
+ timevalue = timevalue + timer_increment;
27
+ if (timevalue > max_time)
28
+ return;
29
+ // Scale the text string gradually until it is 20 times larger
30
+ scalefactor = (timevalue * 650) / max_time;
31
+
32
+ if (timevalue < 30) {
33
+ hickory.setAttribute("display", "");
34
+ hickory.setAttribute("transform", "translate(" + (600+scalefactor*3*-1 ) + ", -144 )");
35
+ }
36
+
37
+ if (timevalue > 30 && timevalue < 66) {
38
+ dickory.setAttribute("display", "");
39
+ dickory.setAttribute("transform", "translate(" + (-795+scalefactor*2) + ", 0 )");
40
+ }
41
+ if (timevalue > 66) {
42
+ dock.setAttribute("display", "");
43
+ dock.setAttribute("transform", "translate(" + (1450+scalefactor*2*-1) + ", 144 )");
44
+ }
45
+
46
+ // Call ShowAndGrowElement again <timer_increment> milliseconds later.
47
+ setTimeout("ShowAndGrowElement()", timer_increment)
48
+ }
49
+ window.ShowAndGrowElement = ShowAndGrowElement
50
+ ]]></script>
51
+
52
+ <rect
53
+ fill="#2e3436"
54
+ fill-rule="nonzero"
55
+ stroke-width="3"
56
+ y="0"
57
+ x="0"
58
+ height="600"
59
+ width="800"
60
+ id="rect3590"/>
61
+
62
+ <text
63
+ style="font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold"
64
+ x="50"
65
+ y="350"
66
+ id="hickory"
67
+ display="none">
68
+ Hickory,</text>
69
+ <text
70
+ style="font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold"
71
+ x="50"
72
+ y="350"
73
+ id="dickory"
74
+ display="none">
75
+ dickory,</text>
76
+ <text
77
+ style="font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold"
78
+ x="50"
79
+ y="350"
80
+ id="dock"
81
+ display="none">
82
+ dock!</text>
83
+ </svg>
ace-0.2.0/kitchen-sink/docs/tcl.tcl ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ proc dijkstra {graph origin} {
3
+ # Initialize
4
+ dict for {vertex distmap} $graph {
5
+ dict set dist $vertex Inf
6
+ dict set path $vertex {}
7
+ }
8
+ dict set dist $origin 0
9
+ dict set path $origin [list $origin]
10
+
11
+ while {[dict size $graph]} {
12
+ # Find unhandled node with least weight
13
+ set d Inf
14
+ dict for {uu -} $graph {
15
+ if {$d > [set dd [dict get $dist $uu]]} {
16
+ set u $uu
17
+ set d $dd
18
+ }
19
+ }
20
+
21
+ # No such node; graph must be disconnected
22
+ if {$d == Inf} break
23
+
24
+ # Update the weights for nodes\
25
+ lead to by the node we've picked
26
+ dict for {v dd} [dict get $graph $u] {
27
+ if {[dict exists $graph $v]} {
28
+ set alt [expr {$d + $dd}]
29
+ if {$alt < [dict get $dist $v]} {
30
+ dict set dist $v $alt
31
+ dict set path $v [list {*}[dict get $path $u] $v]
32
+ }
33
+ }
34
+ }
35
+
36
+ # Remove chosen node from graph still to be handled
37
+ dict unset graph $u
38
+ }
39
+ return [list $dist $path]
40
+ }
ace-0.2.0/kitchen-sink/docs/tex.tex ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The quadratic formula is $$-b \pm \sqrt{b^2 - 4ac} \over 2a$$
2
+ \bye
3
+
4
+ \makeatletter
5
+ \newcommand{\be}{%
6
+ \begingroup
7
+ % \setlength{\arraycolsep}{2pt}
8
+ \eqnarray%
9
+ \@ifstar{\nonumber}{}%
10
+ }
11
+ \newcommand{\ee}{\endeqnarray\endgroup}
12
+ \makeatother
13
+
14
+ \begin{equation}
15
+ x=\left\{ \begin{array}{cl}
16
+ 0 & \textrm{if }A=\ldots\\
17
+ 1 & \textrm{if }B=\ldots\\
18
+ x & \textrm{this runs with as much text as you like, but without an raggeright text
19
+ .}\end{array}\right.
20
+ \end{equation}
ace-0.2.0/kitchen-sink/docs/textile.textile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ h1. Textile document
2
+
3
+ h2. Heading Two
4
+
5
+ h3. A two-line
6
+ header
7
+
8
+ h2. Another two-line
9
+ header
10
+
11
+ Paragraph:
12
+ one, two,
13
+ thee lines!
14
+
15
+ p(classone two three). This is a paragraph with classes
16
+
17
+ p(#id). (one with an id)
18
+
19
+ p(one two three#my_id). ..classes + id
20
+
21
+ * Unordered list
22
+ ** sublist
23
+ * back again!
24
+ ** sublist again..
25
+
26
+ # ordered
27
+
28
+ bg. Blockquote!
29
+ This is a two-list blockquote..!
ace-0.2.0/kitchen-sink/docs/typescript.ts ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class Greeter {
2
+ greeting: string;
3
+ constructor (message: string) {
4
+ this.greeting = message;
5
+ }
6
+ greet() {
7
+ return "Hello, " + this.greeting;
8
+ }
9
+ }
10
+
11
+ var greeter = new Greeter("world");
12
+
13
+ var button = document.createElement('button')
14
+ button.innerText = "Say Hello"
15
+ button.onclick = function() {
16
+ alert(greeter.greet())
17
+ }
18
+
19
+ document.body.appendChild(button)
20
+
21
+ class Snake extends Animal {
22
+ move() {
23
+ alert("Slithering...");
24
+ super(5);
25
+ }
26
+ }
27
+
28
+ class Horse extends Animal {
29
+ move() {
30
+ alert("Galloping...");
31
+ super.move(45);
32
+ }
33
+ }
34
+
35
+ module Sayings {
36
+ export class Greeter {
37
+ greeting: string;
38
+ constructor (message: string) {
39
+ this.greeting = message;
40
+ }
41
+ greet() {
42
+ return "Hello, " + this.greeting;
43
+ }
44
+ }
45
+ }
46
+ module Mankala {
47
+ export class Features {
48
+ public turnContinues = false;
49
+ public seedStoredCount = 0;
50
+ public capturedCount = 0;
51
+ public spaceCaptured = NoSpace;
52
+
53
+ public clear() {
54
+ this.turnContinues = false;
55
+ this.seedStoredCount = 0;
56
+ this.capturedCount = 0;
57
+ this.spaceCaptured = NoSpace;
58
+ }
59
+
60
+ public toString() {
61
+ var stringBuilder = "";
62
+ if (this.turnContinues) {
63
+ stringBuilder += " turn continues,";
64
+ }
65
+ stringBuilder += " stores " + this.seedStoredCount;
66
+ if (this.capturedCount > 0) {
67
+ stringBuilder += " captures " + this.capturedCount + " from space " + this.spaceCaptured;
68
+ }
69
+ return stringBuilder;
70
+ }
71
+ }
72
+ }
ace-0.2.0/kitchen-sink/docs/xml.xml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
3
+ yahoo:count="7" yahoo:created="2011-10-11T08:40:23Z" yahoo:lang="en-US">
4
+ <diagnostics>
5
+ <publiclyCallable>true</publiclyCallable>
6
+ <url execution-start-time="0" execution-stop-time="25" execution-time="25"><![CDATA[http://where.yahooapis.com/v1/continents;start=0;count=10]]></url>
7
+ <user-time>26</user-time>
8
+ <service-time>25</service-time>
9
+ <build-version>21978</build-version>
10
+ </diagnostics>
11
+ <results>
12
+ <place xmlns="http://where.yahooapis.com/v1/schema.rng"
13
+ xml:lang="en-US" yahoo:uri="http://where.yahooapis.com/v1/place/24865670">
14
+ <woeid>24865670</woeid>
15
+ <placeTypeName code="29">Continent</placeTypeName>
16
+ <name>Africa</name>
17
+ </place>
18
+ <place xmlns="http://where.yahooapis.com/v1/schema.rng"
19
+ xml:lang="en-US" yahoo:uri="http://where.yahooapis.com/v1/place/24865675">
20
+ <woeid>24865675</woeid>
21
+ <placeTypeName code="29">Continent</placeTypeName>
22
+ <name>Europe</name>
23
+ </place>
24
+ <place xmlns="http://where.yahooapis.com/v1/schema.rng"
25
+ xml:lang="en-US" yahoo:uri="http://where.yahooapis.com/v1/place/24865673">
26
+ <woeid>24865673</woeid>
27
+ <placeTypeName code="29">Continent</placeTypeName>
28
+ <name>South America</name>
29
+ </place>
30
+ <place xmlns="http://where.yahooapis.com/v1/schema.rng"
31
+ xml:lang="en-US" yahoo:uri="http://where.yahooapis.com/v1/place/28289421">
32
+ <woeid>28289421</woeid>
33
+ <placeTypeName code="29">Continent</placeTypeName>
34
+ <name>Antarctic</name>
35
+ </place>
36
+ <place xmlns="http://where.yahooapis.com/v1/schema.rng"
37
+ xml:lang="en-US" yahoo:uri="http://where.yahooapis.com/v1/place/24865671">
38
+ <woeid>24865671</woeid>
39
+ <placeTypeName code="29">Continent</placeTypeName>
40
+ <name>Asia</name>
41
+ </place>
42
+ <place xmlns="http://where.yahooapis.com/v1/schema.rng"
43
+ xml:lang="en-US" yahoo:uri="http://where.yahooapis.com/v1/place/24865672">
44
+ <woeid>24865672</woeid>
45
+ <placeTypeName code="29">Continent</placeTypeName>
46
+ <name>North America</name>
47
+ </place>
48
+ <place xmlns="http://where.yahooapis.com/v1/schema.rng"
49
+ xml:lang="en-US" yahoo:uri="http://where.yahooapis.com/v1/place/55949070">
50
+ <woeid>55949070</woeid>
51
+ <placeTypeName code="29">Continent</placeTypeName>
52
+ <name>Australia</name>
53
+ </place>
54
+ </results>
55
+ </query>
ace-0.2.0/kitchen-sink/docs/xquery.xq ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ xquery version "1.0";
2
+
3
+ let $message := "Hello World!"
4
+ return <results>
5
+ <message>{$message}</message>
6
+ </results>
ace-0.2.0/kitchen-sink/docs/yaml.yaml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This sample document was taken from wikipedia:
2
+ # http://en.wikipedia.org/wiki/YAML#Sample_document
3
+ ---
4
+ receipt: Oz-Ware Purchase Invoice
5
+ date: 2007-08-06
6
+ customer:
7
+ given: Dorothy
8
+ family: Gale
9
+
10
+ items:
11
+ - part_no: 'A4786'
12
+ descrip: Water Bucket (Filled)
13
+ price: 1.47
14
+ quantity: 4
15
+
16
+ - part_no: 'E1628'
17
+ descrip: High Heeled "Ruby" Slippers
18
+ size: 8
19
+ price: 100.27
20
+ quantity: 1
21
+
22
+ bill-to: &id001
23
+ street: |
24
+ 123 Tornado Alley
25
+ Suite 16
26
+ city: East Centerville
27
+ state: KS
28
+
29
+ ship-to: *id001
30
+
31
+ specialDelivery: >
32
+ Follow the Yellow Brick
33
+ Road to the Emerald City.
34
+ Pay no attention to the
35
+ man behind the curtain.
ace-0.2.0/kitchen-sink/logo.png ADDED
Binary file
ace-0.2.0/kitchen-sink/styles.css ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ height: 100%;
3
+ width: 100%;
4
+ overflow: hidden;
5
+ }
6
+
7
+ body {
8
+ overflow: hidden;
9
+ margin: 0;
10
+ padding: 0;
11
+ height: 100%;
12
+ width: 100%;
13
+ font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;
14
+ font-size: 12px;
15
+ background: rgb(14, 98, 165);
16
+ color: white;
17
+ }
18
+
19
+ #logo {
20
+ padding: 15px;
21
+ margin-left: 70px;
22
+ }
23
+
24
+ #editor-container {
25
+ position: absolute;
26
+ top: 0px;
27
+ left: 280px;
28
+ bottom: 0px;
29
+ right: 0px;
30
+ background: white;
31
+ }
32
+
33
+ #controls {
34
+ padding: 5px;
35
+ }
36
+
37
+ #controls td {
38
+ text-align: right;
39
+ }
40
+
41
+ #controls td + td {
42
+ text-align: left;
43
+ }
ace-0.2.0/scrollable-page.html ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
+ <title>Editor</title>
7
+ <style type="text/css" media="screen">
8
+
9
+ .ace_editor {
10
+ position: relative !important;
11
+ border: 1px solid lightgray;
12
+ margin: auto;
13
+ height: 200px;
14
+ width: 80%;
15
+ }
16
+
17
+ .ace_editor.fullScreen {
18
+ height: auto;
19
+ width: auto;
20
+ border: 0;
21
+ margin: 0;
22
+ position: fixed !important;
23
+ top: 0;
24
+ bottom: 0;
25
+ left: 0;
26
+ right: 0;
27
+ z-index: 10;
28
+ background: white;
29
+ }
30
+
31
+ .fullScreen {
32
+ overflow: hidden
33
+ }
34
+
35
+ .scrollmargin {
36
+ height: 500px;
37
+ text-align: center;
38
+ }
39
+
40
+ .large-button {
41
+ color: lightblue;
42
+ cursor: pointer;
43
+ font: 30px arial;
44
+ padding: 20px;
45
+ text-align: center;
46
+ border: medium solid transparent;
47
+ display: inline-block;
48
+ }
49
+ .large-button:hover {
50
+ border: medium solid lightgray;
51
+ border-radius: 10px 10px 10px 10px;
52
+ box-shadow: 0 0 12px 0 lightblue;
53
+ }
54
+ </style>
55
+ </head>
56
+ <body>
57
+ <div class="scrollmargin">
58
+ <span onclick="scroll()" class="large-button">
59
+ scroll down &dArr;
60
+ </span>
61
+ </div>
62
+ <pre id="editor">function foo(items) {
63
+ var i;
64
+ for (i = 0; i &lt; items.length; i++) {
65
+ alert("Ace Rocks " + items[i]);
66
+ }
67
+
68
+ }</pre>
69
+ <div class="scrollmargin">
70
+ <div style="padding:20px">
71
+ press F11 to switch to fullscreen mode
72
+ </div>
73
+ <span onclick="add()" class="large-button" title="Shift+Enter">+</span>
74
+ </div>
75
+
76
+ <script src="./src/ace.js" type="text/javascript" charset="utf-8"></script>
77
+ <script>
78
+ var $ = document.getElementById.bind(document);
79
+ var dom = require("ace/lib/dom");
80
+
81
+ //add command to all new editor instaces
82
+ require("ace/commands/default_commands").commands.push({
83
+ name: "Toggle Fullscreen",
84
+ bindKey: "F11",
85
+ exec: function(editor) {
86
+ dom.toggleCssClass(document.body, "fullScreen")
87
+ dom.toggleCssClass(editor.container, "fullScreen")
88
+ editor.resize()
89
+ }
90
+ }, {
91
+ name: "add",
92
+ bindKey: "Shift-Return",
93
+ exec: add
94
+ })
95
+
96
+ // create first editor
97
+ var editor = ace.edit("editor");
98
+ editor.setTheme("ace/theme/twilight");
99
+ editor.session.setMode("ace/mode/javascript");
100
+
101
+
102
+ var count = 1;
103
+ function add() {
104
+ var oldEl = editor.container
105
+ var pad = document.createElement("div")
106
+ pad.style.padding = "40px"
107
+ oldEl.parentNode.insertBefore(pad, oldEl.nextSibling)
108
+
109
+ var el = document.createElement("div")
110
+ oldEl.parentNode.insertBefore(el, pad.nextSibling)
111
+
112
+ count++
113
+ var theme = "ace/theme/" + themes[Math.floor(themes.length * Math.random() - 1e-5)]
114
+ editor = ace.edit(el)
115
+ editor.setTheme(theme)
116
+ editor.session.setMode("ace/mode/javascript")
117
+
118
+ editor.setValue([
119
+ "this is editor number: ", count, "\n",
120
+ "using theme \"", theme, "\"\n",
121
+ ":)"
122
+ ].join(""), -1)
123
+
124
+ scroll()
125
+ }
126
+
127
+
128
+ function scroll(speed) {
129
+ var top = editor.container.getBoundingClientRect().top
130
+ speed = speed || 10
131
+ if (top > 60 && speed < 500) {
132
+ if (speed > top - speed - 50)
133
+ speed = top - speed - 50
134
+ else
135
+ setTimeout(scroll, 10, speed + 10)
136
+ window.scrollBy(0, speed)
137
+ }
138
+ }
139
+
140
+ var themes = {
141
+ bright: [ "chrome", "clouds", "crimson_editor", "dawn", "dreamweaver", "eclipse", "github",
142
+ "solarized_light", "textmate", "tomorrow"],
143
+ dark: [ "clouds_midnight", "cobalt", "idle_fingers", "kr_theme", "merbivore", "merbivore_soft",
144
+ "mono_industrial", "monokai", "pastel_on_dark", "solarized_dark", "tomorrow_night",
145
+ "tomorrow_night_blue", "tomorrow_night_bright", "tomorrow_night_eighties", "twilight", "vibrant_ink"]
146
+ }
147
+ themes = [].concat(themes.bright, themes.dark)
148
+ setTimeout(function(){ window.scrollTo(0,0) }, 10)
149
+ </script>
150
+
151
+ </body>
152
+ </html>
ace-0.2.0/src-min-noconflict/ace.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(){function o(e){var i=function(e,t){return r("",e,t)},s=t;e&&(t[e]||(t[e]={}),s=t[e]);if(!s.define||!s.define.packaged)n.original=s.define,s.define=n,s.define.packaged=!0;if(!s.require||!s.require.packaged)r.original=s.require,s.require=i,s.require.packaged=!0}var e="ace",t=function(){return this}();if(!e&&typeof requirejs!="undefined")return;var n=function(e,t,r){if(typeof e!="string"){n.original?n.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=t),n.modules||(n.modules={}),n.modules[e]=r},r=function(e,t,n){if(Object.prototype.toString.call(t)==="[object Array]"){var i=[];for(var o=0,u=t.length;o<u;++o){var a=s(e,t[o]);if(!a&&r.original)return r.original.apply(window,arguments);i.push(a)}n&&n.apply(null,i)}else{if(typeof t=="string"){var f=s(e,t);return!f&&r.original?r.original.apply(window,arguments):(n&&n(),f)}if(r.original)return r.original.apply(window,arguments)}},i=function(e,t){if(t.indexOf("!")!==-1){var n=t.split("!");return i(e,n[0])+"!"+i(e,n[1])}if(t.charAt(0)=="."){var r=e.split("/").slice(0,-1).join("/");t=r+"/"+t;while(t.indexOf(".")!==-1&&s!=t){var s=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},s=function(e,t){t=i(e,t);var s=n.modules[t];if(!s)return null;if(typeof s=="function"){var o={},u={id:t,uri:"",exports:o,packaged:!0},a=function(e,n){return r(t,e,n)},f=s(a,o,u);return o=f||u.exports,n.modules[t]=o,o}return s};o(e)})(),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/multi_select","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/mode/folding/fold_mode","ace/config"],function(e,t,n){e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),s=e("./editor").Editor,o=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer,f=e("./multi_select").MultiSelect;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./mode/folding/fold_mode"),t.config=e("./config"),t.require=e,t.edit=function(e){if(typeof e=="string"){var n=e,e=document.getElementById(n);if(!e)throw"ace.edit can't find div #"+n}if(e.env&&e.env.editor instanceof s)return e.env.editor;var o=t.createEditSession(r.getInnerText(e));e.innerHTML="";var u=new s(new a(e));new f(u),u.setSession(o);var l={document:o,editor:u,onResize:u.resize.bind(u)};return i.addListener(window,"resize",l.onResize),e.env=u.env=l,u},t.createEditSession=function(e,t){var n=new o(e,n);return n.setUndoManager(new u),n},t.EditSession=o,t.UndoManager=u}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){function o(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function u(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=r.exec.call(/()??/,"")[1]===undefined,s=function(){var e=/^/g;return r.test.call(e,""),!e.lastIndex}();if(s&&i)return;RegExp.prototype.exec=function(e){var t=r.exec.apply(this,arguments),n,a;if(typeof e=="string"&&t){!i&&t.length>1&&u(t,"")>-1&&(a=RegExp(this.source,r.replace.call(o(this),"g","")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(t[e]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var f=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return t},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t})}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function m(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError;var r=o.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,u=n.apply(s,r.concat(o.call(arguments)));return u!==null&&Object(u)===u?u:s}return n.apply(t,r.concat(o.call(arguments)))};return i});var r=Function.prototype.call,i=Array.prototype,s=Object.prototype,o=i.slice,u=r.bind(s.toString),a=r.bind(s.hasOwnProperty),f,l,c,h,p;if(p=a(s,"__defineGetter__"))f=r.bind(s.__defineGetter__),l=r.bind(s.__defineSetter__),c=r.bind(s.__lookupGetter__),h=r.bind(s.__lookupSetter__);Array.isArray||(Array.isArray=function(t){return u(t)=="[object Array]"}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=D(this),r=arguments[1],i=0,s=n.length>>>0;if(u(t)!="[object Function]")throw new TypeError;while(i<s)i in n&&t.call(r,n[i],i,n),i++}),Array.prototype.map||(Array.prototype.map=function(t){var n=D(this),r=n.length>>>0,i=Array(r),s=arguments[1];if(u(t)!="[object Function]")throw new TypeError;for(var o=0;o<r;o++)o in n&&(i[o]=t.call(s,n[o],o,n));return i}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=D(this),r=n.length>>>0,i=[],s=arguments[1];if(u(t)!="[object Function]")throw new TypeError;for(var o=0;o<r;o++)o in n&&t.call(s,n[o],o,n)&&i.push(n[o]);return i}),Array.prototype.every||(Array.prototype.every=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!="[object Function]")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&!t.call(i,n[s],s,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=D(this),r=n.length>>>0,i=arguments[1];if(u(t)!="[object Function]")throw new TypeError;for(var s=0;s<r;s++)if(s in n&&t.call(i,n[s],s,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=D(this),r=n.length>>>0;if(u(t)!="[object Function]")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError}while(!0);for(;i<r;i++)i in n&&(s=t.call(void 0,s,n[i],i,n));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=D(this),r=n.length>>>0;if(u(t)!="[object Function]")throw new TypeError;if(!r&&arguments.length==1)throw new TypeError;var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError}while(!0);do s in this&&(i=t.call(void 0,i,n[s],s,n));while(s--);return i}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=M(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(t){var n=D(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,M(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:s)});if(!Object.getOwnPropertyDescriptor){var d="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(d+t);if(!a(t,n))return;var r,i,o;r={enumerable:!0,configurable:!0};if(p){var u=t.__proto__;t.__proto__=s;var i=c(t,n),o=h(t,n);t.__proto__=u;if(i||o)return i&&(r.get=i),o&&(r.set=o),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var v;Object.prototype.__proto__===null?v=function(){return{__proto__:null}}:v=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=v();else{if(typeof t!="object")throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var g=m({}),y=typeof document=="undefined"||m(document.createElement("div"));if(!g||!y)var b=Object.defineProperty}if(!Object.defineProperty||b){var w="Property description must be an object: ",E="Object.defineProperty called on non-object: ",S="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(E+t);if(typeof r!="object"&&typeof r!="function"||r===null)throw new TypeError(w+r);if(b)try{return b.call(Object,t,n,r)}catch(i){}if(a(r,"value"))if(p&&(c(t,n)||h(t,n))){var o=t.__proto__;t.__proto__=s,delete t[n],t[n]=r.value,t.__proto__=o}else t[n]=r.value;else{if(!p)throw new TypeError(S);a(r,"get")&&f(t,n,r.get),a(r,"set")&&l(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)a(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(x){Object.freeze=function(t){return function(n){return typeof n=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n="";while(a(t,n))n+="?";t[n]=!0;var r=a(t,n);return delete t[n],r});if(!Object.keys){var T=!0,N=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],C=N.length;for(var k in{toString:null})T=!1;Object.keys=function P(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var P=[];for(var t in e)a(e,t)&&P.push(t);if(T)for(var n=0,r=C;n<r;n++){var i=N[n];a(e,i)&&P.push(i)}return P}}if(!Date.prototype.toISOString||(new Date(-621987552e5)).toISOString().indexOf("-000001")===-1)Date.prototype.toISOString=function(){var t,n,r,i;if(!isFinite(this))throw new RangeError;t=[this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],i=this.getUTCFullYear(),i=(i<0?"-":i>9999?"+":"")+("00000"+Math.abs(i)).slice(0<=i&&i<=9999?-4:-6),n=t.length;while(n--)r=t[n],r<10&&(t[n]="0"+r);return i+"-"+t.slice(0,2).join("-")+"T"+t.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};Date.now||(Date.now=function(){return(new Date).getTime()}),Date.prototype.toJSON||(Date.prototype.toJSON=function(t){if(typeof this.toISOString!="function")throw new TypeError;return this.toISOString()}),Date.parse("+275760-09-13T00:00:00.000Z")!==864e13&&(Date=function(e){var t=function i(t,n,r,s,o,u,a){var f=arguments.length;if(this instanceof e){var l=f==1&&String(t)===t?new e(i.parse(t)):f>=7?new e(t,n,r,s,o,u,a):f>=6?new e(t,n,r,s,o,u):f>=5?new e(t,n,r,s,o):f>=4?new e(t,n,r,s):f>=3?new e(t,n,r):f>=2?new e(t,n):f>=1?new e(t):new e;return l.constructor=i,l}return e.apply(this,arguments)},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(?:Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$");for(var r in e)t[r]=e[r];return t.now=e.now,t.UTC=e.UTC,t.prototype=e.prototype,t.prototype.constructor=t,t.parse=function(r){var i=n.exec(r);if(i){i.shift();for(var s=1;s<7;s++)i[s]=+(i[s]||(s<3?1:0)),s==1&&i[s]--;var o=+i.pop(),u=+i.pop(),a=i.pop(),f=0;if(a){if(u>23||o>59)return NaN;f=(u*60+o)*6e4*(a=="+"?-1:1)}var l=+i[0];return 0<=l&&l<=99?(i[0]=l+400,e.UTC.apply(this,i)+f-126227808e5):e.UTC.apply(this,i)+f}return e.parse.apply(this,arguments)},t}(Date));var L=" \n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||L.trim()){L="["+L+"]";var A=new RegExp("^"+L+L+"*"),O=new RegExp(L+L+"*$");String.prototype.trim=function(){return String(this).replace(A,"").replace(O,"")}}var M=function(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e},_="a"[0]!="a",D=function(e){if(e==null)throw new TypeError;return _&&typeof e=="string"&&e?e.split(""):Object(e)}}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){var r="http://www.w3.org/1999/xhtml";t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||r,e):document.createElement(e)},t.setText=function(e,t){e.innerText!==undefined&&(e.innerText=t),e.textContent!==undefined&&(e.textContent=t)},t.hasCssClass=function(e,t){var n=e.className.split(/\s+/g);return n.indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){var n=e.className.split(/\s+/g);for(;;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){var n=e.className.split(/\s+/g),r=!0;for(;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;t=t||document;if(t.createStyleSheet&&(r=t.styleSheets)){while(n<r.length)if(r[n++].owningElement.id===e)return!0}else if(r=t.getElementsByTagName("style"))while(n<r.length)if(r[n++].id===e)return!0;return!1},t.importCssString=function(n,i,s){s=s||document;if(i&&t.hasCssString(i,s))return null;var o;if(s.createStyleSheet)o=s.createStyleSheet(),o.cssText=n,i&&(o.owningElement.id=i);else{o=s.createElementNS?s.createElementNS(r,"style"):s.createElement("style"),o.appendChild(s.createTextNode(n)),i&&(o.id=i);var u=s.getElementsByTagName("head")[0]||s.documentElement;u.appendChild(o)}},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var r=t.createElement("link");r.rel="stylesheet",r.href=e;var i=n.getElementsByTagName("head")[0]||n.documentElement;i.appendChild(r)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},window.pageYOffset!==undefined?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.scrollbarWidth=function(e){var n=t.createElement("p");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px";var r=t.createElement("div"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",r.appendChild(n);var s=e.body||e.documentElement;s.appendChild(r);var o=n.offsetWidth;i.overflow="scroll";var u=n.offsetWidth;return o==u&&(u=r.clientWidth),s.removeChild(r),o-u},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},t.setInnerText=function(e,t){var n=e.ownerDocument;n.body&&"textContent"in n.body?e.textContent=t:e.innerText=t},t.getInnerText=function(e){var t=e.ownerDocument;return t.body&&"textContent"in t.body?e.textContent:e.innerText||e.textContent||""},t.getParentWindow=function(e){return e.defaultView||e.parentWindow}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent","ace/lib/dom"],function(e,t,n){function o(e,t,n){var s=0;!i.isOpera||"KeyboardEvent"in window||!i.isMac?s=0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0):s=0|(t.metaKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.ctrlKey?8:0);if(n in r.MODIFIER_KEYS){switch(r.MODIFIER_KEYS[n]){case"Alt":s=2;break;case"Shift":s=4;break;case"Ctrl":s=1;break;default:s=8}n=0}return s&8&&(n==91||n==93)&&(n=0),!!s||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS?e(t,s,n):!1}var r=e("./keys"),i=e("./useragent"),s=e("./dom");t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n(window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return e.type=="dblclick"?0:e.type=="contextmenu"||e.ctrlKey&&i.isMac?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},document.documentElement.setCapture?t.capture=function(e,n,r){function s(o){n(o),i||(i=!0,r(o)),t.removeListener(e,"mousemove",n),t.removeListener(e,"mouseup",s),t.removeListener(e,"losecapture",s),e.releaseCapture()}var i=!1;t.addListener(e,"mousemove",n),t.addListener(e,"mouseup",s),t.addListener(e,"losecapture",s),e.setCapture()}:t.capture=function(e,t,n){function r(e){t&&t(e),n&&n(e),document.removeEventListener("mousemove",t,!0),document.removeEventListener("mouseup",r,!0),e.stopPropagation()}document.addEventListener("mousemove",t,!0),document.addEventListener("mouseup",r,!0)},t.addMouseWheelListener=function(e,n){var r=8,i=function(e){e.wheelDelta!==undefined?e.wheelDeltaX!==undefined?(e.wheelX=-e.wheelDeltaX/r,e.wheelY=-e.wheelDeltaY/r):(e.wheelX=0,e.wheelY=-e.wheelDelta/r):e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=(e.detail||0)*5,e.wheelY=0):(e.wheelX=0,e.wheelY=(e.detail||0)*5),n(e)};t.addListener(e,"DOMMouseScroll",i),t.addListener(e,"mousewheel",i)},t.addMultiMouseDownListener=function(e,n,r,s){var o=0,u,a,f,l={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){if(t.getButton(e)!=0)o=0;else{var i=Math.abs(e.clientX-u)>5||Math.abs(e.clientY-a)>5;if(!f||i)o=0;o+=1,f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600)}o==1&&(u=e.clientX,a=e.clientY),r[s]("mousedown",e);if(o>4)o=0;else if(o>1)return r[s](l[o],e)}),i.isOldIE&&t.addListener(e,"dblclick",function(e){o=2,f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600),r[s]("mousedown",e),r[s](l[o],e)})},t.addCommandKeyListener=function(e,n){var r=t.addListener;if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var s=null;r(e,"keydown",function(e){s=e.keyCode}),r(e,"keypress",function(e){return o(n,e,s)})}else{var u=null;r(e,"keydown",function(e){return u=e.keyIdentifier||e.keyCode,o(n,e,e.keyCode)})}};if(window.postMessage&&!i.isOldIE){var u=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+u;t.addListener(n,"message",function i(s){s.data==r&&(t.stopPropagation(s),t.removeListener(n,"message",i),e())}),n.postMessage(r,"*")}}t.nextFrame=window.requestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame,t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){var r=e("./oop"),i=function(){var e={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}};for(var t in e.FUNCTION_KEYS){var n=e.FUNCTION_KEYS[t].toLowerCase();e[n]=parseInt(t,10)}return r.mixin(e,e.MODIFIER_KEYS),r.mixin(e,e.PRINTABLE_KEYS),r.mixin(e,e.FUNCTION_KEYS),e.enter=e["return"],e.escape=e.esc,e.del=e["delete"],e[173]="-",e}();r.mixin(t,i),t.keyCodeToString=function(e){return(i[e]||String.fromCharCode(e)).toLowerCase()}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(){var e=function(){};return function(t,n){e.prototype=n.prototype,t.super_=n.prototype,t.prototype=new e,t.prototype.constructor=t}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n]},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};if(typeof navigator!="object")return;var r=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),i=navigator.userAgent;t.isWin=r=="win",t.isMac=r=="mac",t.isLinux=r=="linux",t.isIE=navigator.appName=="Microsoft Internet Explorer"&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=window.controllers&&window.navigator.product==="Gecko",t.isOldGecko=t.isGecko&&parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]",t.isWebKit=parseFloat(i.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(i.split(" Chrome/")[1])||undefined,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isIPad=i.indexOf("iPad")>=0,t.isTouchPad=i.indexOf("TouchPad")>=0}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands"],function(e,t,n){e("./lib/fixoldbrowsers");var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/useragent"),o=e("./keyboard/textinput").TextInput,u=e("./mouse/mouse_handler").MouseHandler,a=e("./mouse/fold_handler").FoldHandler,f=e("./keyboard/keybinding").KeyBinding,l=e("./edit_session").EditSession,c=e("./search").Search,h=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,d=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,m=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.commands=new d(s.isMac?"mac":"win",v),this.textInput=new o(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new f(this),this.$mouseHandler=new u(this),new a(this),this.$blockScrolling=0,this.$search=(new c).set({wrap:!0}),this.setSession(t||new l(""))};(function(){r.implement(this,p),this.setKeyboardHandler=function(e){this.keyBinding.setKeyboardHandler(e)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session==e)return;if(this.session){var t=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeLeftTop",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener("changeCursor",this.$onCursorChange),n.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit("changeSession",{session:e,oldSession:t})},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e){this.renderer.setTheme(e)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.setFontSize=function(e){this.container.style.fontSize=e,this.renderer.updateFontSize()},this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(this.$highlightPending)return;var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session.findMatchingBracket(e.getCursorPosition());if(t){var n=new h(t.row,t.column,t.row,t.column+1);e.session.$bracketHighlight=e.session.addMarker(n,"ace_bracket","text")}},50)},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){if(this.$isFocused)return;this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus")},this.onBlur=function(){if(!this.$isFocused)return;this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur")},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=e.data,n=t.range,r;n.start.row==n.end.row&&t.action!="insertLines"&&t.action!="removeLines"?r=n.end.row:r=Infinity,this.renderer.updateLines(n.start.row,r),this._emit("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$updateHighlightActiveLine(),this._emit("changeSelection")},this.$updateHighlightActiveLine=function(){var e=this.getSession(),t;this.$highlightActiveLine&&(this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(t=this.getCursorPosition()),e.$highlightLineMarker&&!t?(e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null):!e.$highlightLineMarker&&t?e.$highlightLineMarker=e.highlightLines(t.row,t.row,"ace_active-line"):t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e._emit("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null;if(!this.selection.isEmpty()){var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}else this.$updateHighlightActiveLine();var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._emit("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(t.isEmpty()||t.isMultiLine())return;var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),s=i.length,o=i.substring(Math.max(n,0),Math.min(r,s));if(n>=0&&/^[\w\d]/.test(o)||r<=s&&/[\w\d]$/.test(o))return;o=i.substring(t.start.column,t.end.column);if(!/^[\w\d]+$/.test(o))return;var u=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o});return u},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(){this.renderer.updateText()},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getCopyText=function(){var e="";return this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange())),this._emit("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e){if(this.$readOnly)return;this._emit("paste",e),this.insert(e)},this.execCommand=function(e,t){this.commands.exec(e,this,t)},this.insert=function(e){var t=this.session,n=t.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()){var i=n.transformAction(t.getState(r.row),"insertion",this,t,e);i&&(e=i.text)}e=e.replace(" ",this.session.getTabString());if(!this.selection.isEmpty())r=this.session.remove(this.getSelectionRange()),this.clearSelection();else if(this.session.getOverwrite()){var s=new h.fromPoints(r,r);s.end.column+=e.length,this.session.remove(s)}this.clearSelection();var o=r.column,u=t.getState(r.row),a=t.getLine(r.row),f=n.checkOutdent(u,a,e),l=t.insert(r,e);i&&i.selection&&(i.selection.length==2?this.selection.setSelectionRange(new h(r.row,o+i.selection[0],r.row,o+i.selection[1])):this.selection.setSelectionRange(new h(r.row+i.selection[0],i.selection[1],r.row+i.selection[2],i.selection[3])));if(t.getDocument().isNewLine(e)){var c=n.getNextLineIndent(u,a.slice(0,r.column),t.getTabString());this.moveCursorTo(r.row+1,0);var p=t.getTabSize(),d=Number.MAX_VALUE;for(var v=r.row+1;v<=l.row;++v){var m=0;a=t.getLine(v);for(var g=0;g<a.length;++g)if(a.charAt(g)==" ")m+=p;else{if(a.charAt(g)!=" ")break;m+=1}/[^\s]/.test(a)&&(d=Math.min(m,d))}for(var v=r.row+1;v<=l.row;++v){var y=d;a=t.getLine(v);for(var g=0;g<a.length&&y>0;++g)a.charAt(g)==" "?y-=p:a.charAt(g)==" "&&(y-=1);t.remove(new h(v,0,v,g))}t.indentRows(r.row+1,l.row,c)}f&&n.autoOutdent(u,t,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.$mouseHandler.setScrollSpeed(e)},this.getScrollSpeed=function(){return this.$mouseHandler.getScrollSpeed()},this.setDragDelay=function(e){this.$mouseHandler.setDragDelay(e)},this.getDragDelay=function(){return this.$mouseHandler.getDragDelay()},this.$selectionStyle="line",this.setSelectionStyle=function(e){if(this.$selectionStyle==e)return;this.$selectionStyle=e,this.onSelectionChange(),this._emit("changeSelectionStyle",{data:e})},this.getSelectionStyle=function(){return this.$selectionStyle},this.$highlightActiveLine=!0,this.setHighlightActiveLine=function(e){if(this.$highlightActiveLine==e)return;this.$highlightActiveLine=e,this.$updateHighlightActiveLine()},this.getHighlightActiveLine=function(){return this.$highlightActiveLine},this.$highlightGutterLine=!0,this.setHighlightGutterLine=function(e){if(this.$highlightGutterLine==e)return;this.renderer.setHighlightGutterLine(e),this.$highlightGutterLine=e},this.getHighlightGutterLine=function(){return this.$highlightGutterLine},this.$highlightSelectedWord=!0,this.setHighlightSelectedWord=function(e){if(this.$highlightSelectedWord==e)return;this.$highlightSelectedWord=e,this.$onSelectionChange()},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.$readOnly=!1,this.setReadOnly=function(e){this.$readOnly=e},this.getReadOnly=function(){return this.$readOnly},this.$modeBehaviours=!0,this.setBehavioursEnabled=function(e){this.$modeBehaviours=e},this.getBehavioursEnabled=function(){return this.$modeBehaviours},this.$modeWrapBehaviours=!0,this.setWrapBehavioursEnabled=function(e){this.$modeWrapBehaviours=e},this.getWrapBehavioursEnabled=function(){return this.$modeWrapBehaviours},this.setShowFoldWidgets=function(e){var t=this.renderer.$gutterLayer;if(t.getShowFoldWidgets()==e)return;this.renderer.$gutterLayer.setShowFoldWidgets(e),this.$showFoldWidgets=e,this.renderer.updateFull()},this.getShowFoldWidgets=function(){return this.renderer.$gutterLayer.getShowFoldWidgets()},this.setFadeFoldWidgets=function(e){this.renderer.setFadeFoldWidgets(e)},this.getFadeFoldWidgets=function(){return this.renderer.getFadeFoldWidgets()},this.remove=function(e){this.selection.isEmpty()&&(e=="left"?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(!this.selection.isEmpty())return;var e=this.getCursorPosition(),t=e.column;if(t===0)return;var n=this.session.getLine(e.row),r,i;t<n.length?(r=n.charAt(t)+n.charAt(t-1),i=new h(e.row,t-1,e.row,t+1)):(r=n.charAt(t-1)+n.charAt(t-2),i=new h(e.row,t-2,e.row,t)),this.session.replace(i,r)},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row||t.start.column<t.end.column)){var r;if(this.session.getUseSoftTabs()){var s=e.getTabSize(),o=this.getCursorPosition(),u=e.documentToScreenColumn(o.row,o.column),a=s-u%s;r=i.stringRepeat(" ",a)}else r=" ";return this.insert(r)}var n=this.$getSelectedRows();e.indentRows(n.first,n.last," ")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,n=[];for(i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var r=new h(0,0,0,0);for(var i=e.first;i<=e.last;i++){var s=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var r=this.session.getLine(e);while(n.lastIndex<t-1){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t){var s={value:i[0],start:i.index,end:i.index+i[0].length};return s}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new h(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,u=s.start+s.value.length-o,a=parseFloat(s.value);a*=Math.pow(10,u),o!==s.end&&n<o?e*=Math.pow(10,s.end-n-1):e*=Math.pow(10,s.end-n),a+=e,a/=Math.pow(10,u);var f=a.toFixed(u),l=new h(t,s.start,t,s.end);this.session.replace(l,f),this.moveCursorTo(t,Math.max(s.start+1,n+f.length-s.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows(),t;e.first===0||e.last+1<this.session.getLength()?t=new h(e.first,0,e.last+1,0):t=new h(e.first-1,this.session.getLine(e.first-1).length,e.last,this.session.getLine(e.last).length),this.session.remove(t),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var i=e.isBackwards(),s=e.isBackwards()?n.start:n.end,o=t.insert(s,t.getTextRange(n),!1);n.start=s,n.end=o,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(function(e,t){return this.session.moveLinesDown(e,t)})},this.moveLinesUp=function(){this.$moveLines(function(e,t){return this.session.moveLinesUp(e,t)})},this.moveText=function(e,t){return this.$readOnly?null:this.session.moveText(e,t)},this.copyLinesUp=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t),0})},this.copyLinesDown=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t)})},this.$moveLines=function(e){var t=this.$getSelectedRows(),n=this.selection;if(!n.isMultiLine())var r=n.getRange(),i=n.isBackwards();var s=e.call(this,t.first,t.last);r?(r.start.row+=s,r.end.row+=s,n.setSelectionRange(r,i)):(n.setSelectionAnchor(t.last+s+1,0),n.$moveSelection(function(){n.moveCursorTo(t.first+s,0)}))},this.$getSelectedRows=function(){var e=this.getSelectionRange().collapseRows();return{first:e.start.row,last:e.end.row}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,t==1?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t==0&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var s=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e){var t=this.getCursorPosition(),n=this.session.getBracketRange(t);if(!n){n=this.find({needle:/[{}()\[\]]/g,preventScroll:!0,start:{row:t.row,column:t.column-1}});if(!n)return;var r=n.start;r.row==t.row&&Math.abs(r.column-t.column)<2&&(n=this.session.getBracketRange(r))}r=n&&n.cursor||r,r&&(e?n&&n.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(r.row,r.column):(this.clearSelection(),this.moveCursorTo(r.row,r.column)))},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.navigateUp=function(e){this.selection.clearSelection(),e=e||1,this.selection.moveCursorBy(-e,0)},this.navigateDown=function(e){this.selection.clearSelection(),e=e||1,this.selection.moveCursorBy(e,0)},this.navigateLeft=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorLeft()}this.clearSelection()},this.navigateRight=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorRight()}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){var e=this.renderer.scrollTop;this.selection.moveCursorFileEnd(),this.clearSelection(),this.renderer.animateScrolling(e)},this.navigateFileStart=function(){var e=this.renderer.scrollTop;this.selection.moveCursorFileStart(),this.clearSelection(),this.renderer.animateScrolling(e)},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),n!==null&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;this.$blockScrolling+=1;var i=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0);for(var s=n.length-1;s>=0;--s)this.$tryReplace(n[s],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t!==null?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),typeof e=="string"||e instanceof RegExp?t.needle=e:typeof e=="object"&&r.mixin(t,e);var i=this.selection.getRange();t.needle==null&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var s=this.$search.find(this.session);if(t.preventScroll)return s;if(s)return this.revealRange(s,n),s;t.backwards?i.start=i.end:i.end=i.start,this.selection.setRange(i)},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!=0&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy()}}).call(m.prototype),t.Editor=m}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){return(new Array(t+1)).join(e)};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object")return e;var t=e.constructor();for(var n in e)typeof e[n]=="object"?t[n]=this.deepCopy(e[n]):t[n]=e[n];return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)};return i.delay=i,i.schedule=function(e){n==null&&(n=setTimeout(r,e||0))},i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/dom"),o=e("../lib/lang"),u=function(e,t){function g(e){if(c)return;var t=e?2:1,r=2;try{n.setSelectionRange(t,r)}catch(i){}}function y(){if(c)return;n.value=u,i.isWebKit&&m.schedule()}function D(){setTimeout(function(){h&&(n.style.cssText=h,h=""),t.renderer.$keepTextAreaAtCursor==null&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}var n=s.createElement("textarea");n.className="ace_text-input",i.isTouchPad&&n.setAttribute("x-palm-disable-auto-cap",!0),n.wrap="off",n.autocorrect="off",n.autocapitalize="off",n.spellcheck=!1,n.style.top="-2em",e.insertBefore(n,e.firstChild);var u="",a=!1,f=!1,l=!1,c=!1,h="",p=!0,d=document.activeElement===n;r.addListener(n,"blur",function(){t.onBlur(),d=!1}),r.addListener(n,"focus",function(){d=!0,t.onFocus(),g()}),this.focus=function(){n.focus()},this.blur=function(){n.blur()},this.isFocused=function(){return d};var v=o.delayedCall(function(){d&&g(p)}),m=o.delayedCall(function(){c||(n.value=u,d&&g())});i.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=p&&(p=!p,v.schedule())}),y(),d&&t.onFocus();var b=function(e){return e.selectionStart===0&&e.selectionEnd===e.value.length};!n.setSelectionRange&&n.createTextRange&&(n.setSelectionRange=function(e,t){var n=this.createTextRange();n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select()},b=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.text==e.value});if(i.isOldIE){var w=!1,E=function(e){if(w)return;var t=n.value;if(c||!t||t==u)return;if(e&&t==u[0])return S.schedule();N(t),w=!0,y(),w=!1},S=o.delayedCall(E);r.addListener(n,"propertychange",E);var x={13:1,27:1};r.addListener(n,"keyup",function(e){c&&(!n.value||x[e.keyCode])&&setTimeout(_,0);if((n.value.charCodeAt(0)||0)<129)return;c?M():O()})}var T=function(e){if(a){a=!1;return}if(f){f=!1;return}b(n)&&(t.selectAll(),g())},N=function(e){l?(g(),e&&t.onPaste(e),l=!1):e==u[0]?t.execCommand("del",{source:"ace"}):(e.substring(0,2)==u?e=e.substr(2):e[0]==u[0]?e=e.substr(1):e[e.length-1]==u[0]&&(e=e.slice(0,-1)),e[e.length-1]==u[0]&&(e=e.slice(0,-1)),e&&t.onTextInput(e))},C=function(e){if(c)return;var t=n.value;y(),N(t)},k=function(e){var i=t.getCopyText();if(!i){r.preventDefault(e);return}var s=e.clipboardData||window.clipboardData;if(s){var o=s.setData("Text",i);o&&(t.onCut(),r.preventDefault(e))}o||(a=!0,n.value=i,n.select(),setTimeout(function(){a=!1,y(),g(),t.onCut()}))},L=function(e){var i=t.getCopyText();if(!i){r.preventDefault(e);return}var s=e.clipboardData||window.clipboardData;if(s){var o=s.setData("Text",i);o&&(t.onCopy(),r.preventDefault(e))}o||(f=!0,n.value=i,n.select(),setTimeout(function(){f=!1,y(),g(),t.onCopy()}))},A=function(e){var s=e.clipboardData||window.clipboardData;if(s){var o=s.getData("Text");o&&t.onPaste(o),i.isIE&&setTimeout(g),r.preventDefault(e)}else n.value="",l=!0};r.addCommandKeyListener(n,t.onCommandKey.bind(t)),r.addListener(n,"select",T),r.addListener(n,"input",C),r.addListener(n,"cut",k),r.addListener(n,"copy",L),r.addListener(n,"paste",A),(!("oncut"in n)||!("oncopy"in n)||!("onpaste"in n))&&r.addListener(e,"keydown",function(e){if(i.isMac&&!e.metaKey||!e.ctrlKey)return;switch(e.keyCode){case 67:L(e);break;case 86:A(e);break;case 88:k(e)}});var O=function(e){c=!0,t.onCompositionStart(),setTimeout(M,0)},M=function(){if(!c)return;t.onCompositionUpdate(n.value)},_=function(e){c=!1,t.onCompositionEnd()};r.addListener(n,"compositionstart",O),i.isGecko?r.addListener(n,"text",M):r.addListener(n,"keyup",M),r.addListener(n,"compositionend",_),this.getElement=function(){return n},this.onContextMenu=function(e){h||(h=n.style.cssText),n.style.cssText="z-index:100000;"+(i.isIE?"opacity:0.1;":""),g(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t});var s=t.container.getBoundingClientRect(),o=function(e){n.style.left=e.clientX-s.left-2+"px",n.style.top=e.clientY-s.top-2+"px"};o(e);if(e.type!="mousedown")return;t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),i.isWin&&r.capture(t.container,o,D)},this.onContextMenuClose=D,i.isGecko||r.addListener(n,"contextmenu",function(e){t.textInput.onContextMenu(e),D()})};t.TextInput=u}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,u=e("./mouse_event").MouseEvent,a=e("./dragdrop").DragdropHandler,f=function(e){this.editor=e,new s(this),new o(this),new a(this),r.addListener(e.container,"mousedown",function(t){return e.focus(),r.preventDefault(t)});var t=e.renderer.getMouseEventTarget();r.addListener(t,"click",this.onMouseEvent.bind(this,"click")),r.addListener(t,"mousemove",this.onMouseMove.bind(this,"mousemove")),r.addMultiMouseDownListener(t,[300,300,250],this,"onMouseEvent"),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"));var n=e.renderer.$gutter;r.addListener(n,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),r.addListener(n,"click",this.onMouseEvent.bind(this,"gutterclick")),r.addListener(n,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),r.addListener(n,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"))};(function(){this.$scrollSpeed=1,this.setScrollSpeed=function(e){this.$scrollSpeed=e},this.getScrollSpeed=function(){return this.$scrollSpeed},this.onMouseEvent=function(e,t){this.editor._emit(e,new u(t,this.editor))},this.$dragDelay=250,this.setDragDelay=function(e){this.$dragDelay=e},this.getDragDelay=function(){return this.$dragDelay},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;if(!n||!n.length)return;this.editor._emit(e,new u(t,this.editor))},this.onMouseWheel=function(e,t){var n=new u(t,this.editor);n.speed=this.$scrollSpeed*2,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){t&&this.setState(t),this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var s=this,o=function(e){s.x=e.clientX,s.y=e.clientY},u=function(e){clearInterval(f),s[s.state+"End"]&&s[s.state+"End"](e),s.$clickSelection=null,n.$keepTextAreaAtCursor==null&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),s.isMousePressed=!1},a=function(){s[s.state]&&s[s.state]()};if(i.isOldIE&&e.domEvent.type=="dblclick"){setTimeout(function(){a(),u(e.domEvent)});return}r.capture(this.editor.container,o,u);var f=setInterval(a,20)}}).call(f.prototype),t.MouseHandler=f}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/useragent"],function(e,t,n){function o(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var n=["select","startSelect","drag","dragEnd","dragWait","dragWaitEnd","startDrag","focusWait"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange"),e.$focusWaitTimout=250}function u(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function a(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else var n=2*t.row-e.start.row-e.end.row;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/dom"),i=e("../lib/useragent"),s=5;(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();if(i!==0){var s=r.getSelectionRange(),o=s.isEmpty();o&&(r.moveCursorToPosition(n),r.selection.clearSelection()),r.textInput.onContextMenu(e.domEvent);return}if(t&&!r.isFocused()){r.focus();if(this.$focusWaitTimout&&!this.$clickSelection)return this.setState("focusWait"),this.captureMouse(e),e.preventDefault()}return!t||this.$clickSelection||e.getShiftKey()?this.startSelect(n):t&&(this.mousedownEvent.time=(new Date).getTime(),this.setState("dragWait")),this.captureMouse(e),e.preventDefault()},this.startSelect=function(e){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y),this.mousedownEvent.getShiftKey()?this.editor.selection.selectToPosition(e):this.$clickSelection||(this.editor.moveCursorToPosition(e),this.editor.selection.clearSelection()),this.setState("select")},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=a(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(s==-1&&o<=0){t=this.$clickSelection.end;if(i.end.row!=r.row||i.end.column!=r.column)r=i.start}else if(o==1&&s>=0){t=this.$clickSelection.start;if(i.start.row!=r.row||i.start.column!=r.column)r=i.end}else if(s==-1&&o==1)r=i.end,t=i.start;else{var u=a(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.startDrag=function(){var e=this.editor;this.setState("drag"),this.dragRange=e.getSelectionRange();var t=e.getSelectionStyle();this.dragSelectionMarker=e.session.addMarker(this.dragRange,"ace_selection",t),e.clearSelection(),r.addCssClass(e.container,"ace_dragging"),this.$dragKeybinding||(this.$dragKeybinding={handleKeyboard:function(e,t,n,r){if(n=="esc")return{command:this.command}},command:{exec:function(e){var t=e.$mouseHandler;t.dragCursor=null,t.dragEnd(),t.startSelect()}}}),e.keyBinding.addKeyboardHandler(this.$dragKeybinding)},this.focusWait=function(){var e=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=(new Date).getTime();(e>s||t-this.mousedownEvent.time>this.$focusWaitTimout)&&this.startSelect()},this.dragWait=function(e){var t=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),n=(new Date).getTime(),r=this.editor;t>s?this.startSelect(this.mousedownEvent.getDocumentPosition()):n-this.mousedownEvent.time>r.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(e){this.mousedownEvent.domEvent=e,this.startSelect()},this.drag=function(){var e=this.editor;this.dragCursor=e.renderer.screenToTextCoordinates(this.x,this.y),e.moveCursorToPosition(this.dragCursor),e.renderer.scrollCursorIntoView()},this.dragEnd=function(e){var t=this.editor,n=this.dragCursor,i=this.dragRange;r.removeCssClass(t.container,"ace_dragging"),t.session.removeMarker(this.dragSelectionMarker),t.keyBinding.removeKeyboardHandler(this.$dragKeybinding);if(!n)return;t.clearSelection();if(e&&(e.ctrlKey||e.altKey)){var s=t.session,o=i;o.end=s.insert(n,s.getTextRange(i)),o.start=n}else{if(i.contains(n.row,n.column))return;var o=t.moveText(i,n)}if(!o)return;t.selection.setSelectionRange(o)},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);if(i){i.isEmpty()&&(i.start.column--,i.end.column++),this.$clickSelection=i,this.setState("select");return}this.$clickSelection=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines"),this.$clickSelection=n.selection.getLineRange(t.row)},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("null")},this.onMouseWheel=function(e){if(e.getShiftKey()||e.getAccelKey())return;var t=this.editor,n=t.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);if(n)this.$passScrollEvent=!1;else{if(this.$passScrollEvent)return;if(!this.$scrollStopTimeout){var r=this;this.$scrollStopTimeout=setTimeout(function(){r.$passScrollEvent=!0,r.$scrollStopTimeout=null},200)}}return t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.preventDefault()}}).call(o.prototype),t.DefaultHandlers=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event"],function(e,t,n){function s(e){function f(){u=r.createElement("div"),u.className="ace_gutter-tooltip",u.style.maxWidth="500px",u.style.display="none",t.container.appendChild(u)}function l(){u||f();var e=o.getDocumentPosition().row,r=n.$annotations[e];if(!r)return c();var i=t.session.getLength();if(e==i){var s=t.renderer.pixelToScreenCoordinates(0,o.y).row,l=o.$pos;if(s>t.session.documentToScreenRow(l.row,l.column))return c()}if(a==r)return;a=r.text.join("<br/>"),u.style.display="block",u.innerHTML=a,t.on("mousewheel",c),h(o)}function c(){s&&(s=clearTimeout(s)),a&&(u.style.display="none",a=null,t.removeEventListener("mousewheel",c))}function h(e){var n=t.renderer.$gutter.getBoundingClientRect();u.style.left=e.x-n.left+15+"px",e.y+3*t.renderer.lineHeight+15<n.bottom?(u.style.bottom="",u.style.top=e.y-n.top+15+"px"):(u.style.top="",u.style.bottom=n.bottom-e.y+5+"px")}var t=e.editor,n=t.renderer.$gutterLayer;e.editor.setDefaultHandler("guttermousedown",function(r){if(!t.isFocused())return;var i=n.getRegion(r);if(i)return;var s=r.getDocumentPosition().row,o=t.session.selection;if(r.getShiftKey())o.selectTo(s,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.captureMouse(r,"selectByLines"),r.preventDefault()});var s,o,u,a;e.editor.setDefaultHandler("guttermousemove",function(t){var n=t.domEvent.target||t.domEvent.srcElement;if(r.hasCssClass(n,"ace_fold-widget"))return c();a&&h(t),o=t;if(s)return;s=setTimeout(function(){s=null,o&&!e.isMousePressed?l():c()},50)}),i.addListener(t.renderer.$gutter,"mouseout",function(e){o=null;if(!a||s)return;s=setTimeout(function(){s=null,c()},50)})}var r=e("../lib/dom"),i=e("../lib/event");t.GutterHandler=s}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),s=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var e=this.editor;if(e.getReadOnly())this.$inSelection=!1;else{var t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)}),ace.define("ace/mouse/dragdrop",["require","exports","module","ace/lib/event"],function(e,t,n){var r=e("../lib/event"),i=function(e){var t=e.editor,n,i,s,o,u,a,f,l=0,c=t.container;r.addListener(c,"dragenter",function(e){l++;if(!n){u=t.getSelectionRange(),a=t.selection.isBackwards();var i=t.getSelectionStyle();n=t.session.addMarker(u,"ace_selection",i),t.clearSelection(),clearInterval(o),o=setInterval(h,20)}return r.preventDefault(e)}),r.addListener(c,"dragover",function(e){return i=e.clientX,s=e.clientY,r.preventDefault(e)});var h=function(){f=t.renderer.screenToTextCoordinates(i,s),t.moveCursorToPosition(f),t.renderer.scrollCursorIntoView()};r.addListener(c,"dragleave",function(e){l--;if(l>0)return;return console.log(e.type,l,e.target),clearInterval(o),t.session.removeMarker(n),n=null,t.selection.setSelectionRange(u,a),r.preventDefault(e)}),r.addListener(c,"drop",function(e){return console.log(e.type,l,e.target),l=0,clearInterval(o),t.session.removeMarker(n),n=null,u.end=t.session.insert(f,e.dataTransfer.getData("Text")),u.start=f,t.focus(),t.selection.setSelectionRange(u),r.preventDefault(e)})};t.DragdropHandler=i}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){function r(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on("guttermousedown",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[r]&&e.session.onFoldWidgetClick(r,t),t.stop()}}),e.on("gutterdblclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session,s=i.foldWidgets;if(!s||s[r])return;var o=r-1,u;while(o>=0){var a=s[o];a==null&&(a=s[o]=i.getFoldWidget());if(a=="start"){var f=i.getFoldWidgetRange(o);u||(u=f);if(f&&f.end.row>=r)break}o--}o==-1&&(f=u);if(f){var r=f.start.row,l=i.getFoldAt(r,i.getLine(r).length,1);l?i.removeFold(l):(i.addFold("...",f),e.renderer.scrollCursorIntoView({row:f.start.row,column:0}))}t.stop()}})}t.FoldHandler=r}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){var r=e("../lib/keys"),i=e("../lib/event"),s=function(e){this.$editor=e,this.$data={},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0),this.$data={editor:this.$editor}},this.setKeyboardHandler=function(e){if(this.$handlers[this.$handlers.length-1]==e)return;while(this.$handlers[1])this.removeKeyboardHandler(this.$handlers[1]);this.addKeyboardHandler(e,1)},this.addKeyboardHandler=function(e,t){if(!e)return;var n=this.$handlers.indexOf(e);n!=-1&&this.$handlers.splice(n,1),t==undefined?this.$handlers.push(e):this.$handlers.splice(t,0,e),n==-1&&e.attach&&e.attach(this.$editor)},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t==-1?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(e,t,n,r){var s;for(var o=this.$handlers.length;o--;){s=this.$handlers[o].handleKeyboard(this.$data,e,t,n,r);if(s&&s.command)break}if(!s||!s.command)return!1;var u=!1,a=this.$editor.commands;return s.command!="null"?u=a.exec(s.command,this.$editor,s.args,r):u=s.passEvent!=1,u&&r&&e!=-1&&i.stopEvent(r),u},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){var t=this.$callKeyboardHandlers(-1,e);t||this.$editor.commands.exec("insertstring",this.$editor,e)}}).call(s.prototype),t.KeyBinding=s}),ace.define("ace/edit_session",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/lib/net","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){var r=e("./config"),i=e("./lib/oop"),s=e("./lib/lang"),o=e("./lib/net"),u=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,f=e("./mode/text").Mode,l=e("./range").Range,c=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,d=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){var e="";return this.forEach(function(t){e+="\n"+t.toString()}),e},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this);if(typeof e!="object"||!e.getLine)e=new c(e);this.setDocument(e),this.selection=new a(this),this.setMode(t)};(function(){function y(e){return e<4352?!1:e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}i.implement(this,u),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$getRowCacheIndex(this.$docRowCache,e)+1,n=this.$docRowCache.length;this.$docRowCache.splice(t,n),this.$screenRowCache.splice(t,n)},this.$getRowCacheIndex=function(e,t){var n=0,r=e.length-1;while(n<=r){var i=n+r>>1,s=e[i];if(t>s)n=i+1;else{if(!(t<s))return i;r=i-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){var t=e.data;this.$modified=!0,this.$resetRowCache(t.range.start.row);var n=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&!t.ignore&&(this.$deltasDoc.push(t),n&&n.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:n}),this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(t),this._emit("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),r,i=0;if(t==null)s=n.length-1,i=this.getLine(e).length;else for(var s=0;s<n.length;s++){i+=n[s].value.length;if(i>=t)break}return r=n[s],r?(r.index=s,r.start=i-r.value.length,r):null},this.setUndoManager=function(e){this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel();if(e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t]}),t.$deltas=[]},this.$informUndoManager=s.deferredCall(this.$syncInformUndoManager)}},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},this.$useSoftTabs=!0,this.setUseSoftTabs=function(e){if(this.$useSoftTabs===e)return;this.$useSoftTabs=e},this.getUseSoftTabs=function(){return this.$useSoftTabs},this.$tabSize=4,this.setTabSize=function(e){if(isNaN(e)||this.$tabSize===e)return;this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._emit("changeTabSize")},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(e){if(this.$overwrite==e)return;this.$overwrite=e,this._emit("changeOverwrite")},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._emit("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._emit("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._emit("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit("changeBreakpoint",{})},this.setBreakpoint=function(e,t){t===undefined&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._emit("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._emit("changeBreakpoint",{})},this.addMarker=function(e,t,n,r){var i=this.$markerId++,s={range:e,type:n||"line",renderer:typeof n=="function"?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=s,this._emit("changeFrontMarker")):(this.$backMarkers[i]=s,this._emit("changeBackMarker")),i},this.addDynamicMarker=function(e,t){if(!e.update)return;var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._emit("changeFrontMarker")):(this.$backMarkers[n]=e,this._emit("changeBackMarker")),e},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(!t)return;var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._emit(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,r){typeof t!="number"&&(n=t,t=e),n||(n="ace_step");var i=new l(e,0,t,Infinity),s=this.addMarker(i,n,"fullLine",r);return i.id=s,i},this.setAnnotations=function(e){this.$annotations=e,this._emit("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.$annotations={},this._emit("changeAnnotation",{})},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine="\n"},this.getWordRange=function(e,t){var n=this.getLine(e),r=!1;t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe));if(r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var s=t;if(s>0){do s--;while(s>=0&&n.charAt(s).match(i));s++}var o=t;while(o<n.length&&n.charAt(o).match(i))o++;return new l(e,s,e,o)},this.getAWordRange=function(e,t){var n=this.getWordRange(e,t),r=this.getLine(n.end.row);while(r.charAt(n.end.column).match(/[ \t]/))n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.$useWorker=!0,this.setUseWorker=function(e){if(this.$useWorker==e)return;this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._emit("tokenizerUpdate",e)},this.$modes={},this._loadMode=function(t,n){function a(e){if(i.$modes[t])return n(i.$modes[t]);i.$modes[t]=new e.Mode,i.$modes[t].$id=t,i._emit("loadmode",{name:t,mode:i.$modes[t]}),n(i.$modes[t])}function l(e,t){if(!r.get("packaged"))return t();o.loadScript(r.moduleUrl(e,"mode"),t)}this.$modes["null"]||(this.$modes["null"]=this.$modes["ace/mode/text"]=new f);if(this.$modes[t])return n(this.$modes[t]);var i=this,s;try{s=e(t)}catch(u){}if(s&&s.Mode)return a(s);this.$mode||this.$setModePlaceholder(),l(t,function(){e([t],a)})},this.$setModePlaceholder=function(){this.$mode=this.$modes["null"];var e=this.$mode.getTokenizer();if(!this.bgTokenizer){this.bgTokenizer=new h(e);var t=this;this.bgTokenizer.addEventListener("update",function(e){t._emit("tokenizerUpdate",e)})}else this.bgTokenizer.setTokenizer(e);this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=this.$mode.tokenRe,this.nonTokenRe=this.$mode.nonTokenRe},this.$mode=null,this.$modeId=null,this.setMode=function(e){e=e||"null";if(typeof e=="string"){if(this.$modeId==e)return;this.$modeId=e;var t=this;this._loadMode(e,function(n){if(t.$modeId!==e)return;t.setMode(n)});return}if(this.$mode===e)return;this.$mode=e,this.$modeId=e.$id,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(n.addEventListener!==undefined){var r=this.onReloadTokenizer.bind(this);n.addEventListener("update",r)}if(!this.bgTokenizer){this.bgTokenizer=new h(n);var t=this;this.bgTokenizer.addEventListener("update",function(e){t._emit("tokenizerUpdate",e)})}else this.bgTokenizer.setTokenizer(n);this.bgTokenizer.setDocument(this.getDocument()),this.bgTokenizer.start(0),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,this.$setFolding(e.foldingRules),this._emit("changeMode")},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if(typeof Worker!="undefined"&&!e.noWorker)try{this.$worker=this.$mode.createWorker(this)}catch(t){console.log("Could not load worker"),console.log(t),this.$worker=null}else this.$worker=null},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){e=Math.round(Math.max(0,e));if(this.$scrollTop===e)return;this.$scrollTop=e,this._emit("changeScrollTop",e)},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){e=Math.round(Math.max(0,e));if(this.$scrollLeft===e)return;this.$scrollLeft=e,this._emit("changeScrollLeft",e)},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.screenWidth},this.$computeWidth=function(e){if(this.$modified||e){this.$modified=!1;if(this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:Infinity,u=t.length;for(var a=0;a<u;a++){if(a>o){a=s.end.row+1;if(a>=u)break;s=this.$foldData[i++],o=s?s.start.row:Infinity}n[a]==null&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.undoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=e.length-1;r!=-1;r--){var i=e[r];i.group=="doc"?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.redoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=0;r<e.length;r++){var i=e[r];i.group=="doc"&&(this.doc.applyDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function r(e){var n=e.action=="insertText"||e.action=="insertLines";return t?!n:n}var i=e[0],s,o,u=!1;r(i)?(s=i.range.clone(),u=!0):(s=l.fromPoints(i.range.start,i.range.start),u=!1);for(var a=1;a<e.length;a++)i=e[a],r(i)?(o=i.range.start,s.compare(o.row,o.column)==-1&&s.setStart(i.range.start),o=i.range.end,s.compare(o.row,o.column)==1&&s.setEnd(i.range.end),u=!0):(o=i.range.start,s.compare(o.row,o.column)==-1&&(s=l.fromPoints(i.range.start,i.range.start)),u=!1);if(n!=null){var f=n.compareRange(s);f==1?s.setStart(n.start):f==-1&&s.setEnd(n.end)}return s},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t){var n=this.getTextRange(e);this.remove(e);var r=t.row,i=t.column;!e.isMultiLine()&&e.start.row==r&&e.end.column<i&&(i-=n.length);if(e.isMultiLine()&&e.end.row<r){var s=this.doc.$split(n);r-=s.length-1}var o=r+e.end.row-e.start.row,u=e.isMultiLine()?e.end.column:i+e.end.column-e.start.column,a=new l(r,i,o,u);return this.insert(a.start,n),a},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.insert({row:r,column:0},n)},this.outdentRows=function(e){var t=e.collapseRows(),n=new l(0,0,0,0),r=this.getTabSize();for(var i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o<r;++o)if(s.charAt(o)!=" ")break;o<r&&s.charAt(o)==" "?(n.start.column=o,n.end.column=o+1):(n.start.column=0,n.end.column=o),this.remove(n)}},this.moveLinesUp=function(e,t){if(e<=0)return 0;var n=this.doc.removeLines(e,t);return this.doc.insertLines(e-1,n),-1},this.moveLinesDown=function(e,t){if(t>=this.doc.getLength()-1)return 0;var n=this.doc.removeLines(e,t);return this.doc.insertLines(e+1,n),1},this.duplicateLines=function(e,t){var e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t),n=this.getLines(e,t);this.doc.insertLines(e,n);var r=t-e+1;return r},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){t=Math.max(0,t);if(e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0);if(e){var t=this.getLength();this.$wrapData=[];for(var n=0;n<t;n++)this.$wrapData.push([]);this.$updateWrapData(0,t-1)}this._emit("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){if(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)this.$wrapLimitRange.min=e,this.$wrapLimitRange.max=t,this.$modified=!0,this._emit("changeWrapMode")},this.adjustWrapLimit=function(e){var t=this.$constrainWrapLimit(e);return t!=this.$wrapLimit&&t>0?(this.$wrapLimit=t,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(e){var t=this.$wrapLimitRange.min;t&&(e=Math.max(t,e));var n=this.$wrapLimitRange.max;return n&&(e=Math.min(n,e)),Math.max(1,e)},this.getWrapLimit=function(){return this.$wrapLimit},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n,r=e.data.action,i=e.data.range.start.row,s=e.data.range.end.row,o=e.data.range.start,u=e.data.range.end,a=null;r.indexOf("Lines")!=-1?(r=="insertLines"?s=i+e.data.lines.length:s=i,n=e.data.lines?e.data.lines.length:s-i):n=s-i;if(n!=0)if(r.indexOf("remove")!=-1){this[t?"$wrapData":"$rowLengthCache"].splice(i,n);var f=this.$foldData;a=this.getFoldsInRange(e.data.range),this.removeFolds(a);var l=this.getFoldLine(u.row),c=0;if(l){l.addRemoveChars(u.row,u.column,o.column-u.column),l.shiftRow(-n);var h=this.getFoldLine(i);h&&h!==l&&(h.merge(l),l=h),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=u.row&&l.shiftRow(-n)}s=i}else{var p;if(t){p=[i,0];for(var d=0;d<n;d++)p.push([]);this.$wrapData.splice.apply(this.$wrapData,p)}else p=Array(n),p.unshift(i,0),this.$rowLengthCache.splice.apply(this.$rowLengthCache,p);var f=this.$foldData,l=this.getFoldLine(i),c=0;if(l){var v=l.range.compareInside(o.row,o.column);v==0?(l=l.split(o.row,o.column),l.shiftRow(n),l.addRemoveChars(s,0,u.column-o.column)):v==-1&&(l.addRemoveChars(i,0,u.column-o.column),l.shiftRow(n)),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=i&&l.shiftRow(n)}}else{n=Math.abs(e.data.range.start.column-e.data.range.end.column),r.indexOf("remove")!=-1&&(a=this.getFoldsInRange(e.data.range),this.removeFolds(a),n=-n);var l=this.getFoldLine(i);l&&l.addRemoveChars(i,o.column,n)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),t?this.$updateWrapData(i,s):this.$updateRowLengthCache(i,s),a},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var n=this.doc.getAllLines(),r=this.getTabSize(),i=this.$wrapData,o=this.$wrapLimit,u,f,l=e;t=Math.min(t,n.length-1);while(l<=t){f=this.getFoldLine(l,f);if(!f)u=this.$getDisplayTokens(s.stringTrimRight(n[l])),i[l]=this.$computeWrapSplits(u,o,r),l++;else{u=[],f.walk(function(e,t,r,i){var s;if(e!=null){s=this.$getDisplayTokens(e,u.length),s[0]=a;for(var o=1;o<s.length;o++)s[o]=c}else s=this.$getDisplayTokens(n[t].substring(i,r),u.length);u=u.concat(s)}.bind(this),f.end.row,n[f.end.row].length+1);while(u.length!=0&&u[u.length-1]>=v)u.pop();i[f.start.row]=this.$computeWrapSplits(u,o,r),l=f.end.row+1}}};var t=1,n=2,a=3,c=4,d=9,v=10,m=11,g=12;this.$computeWrapSplits=function(e,t){function o(t){var r=e.slice(i,t),o=r.length;r.join("").replace(/12/g,function(){o-=1}).replace(/2/g,function(){o-=1}),s+=o,n.push(s),i=t}if(e.length==0)return[];var n=[],r=e.length,i=0,s=0;while(r-i>t){var u=i+t;if(e[u]>=v){while(e[u]>=v)u++;o(u);continue}if(e[u]==a||e[u]==c){for(u;u!=i-1;u--)if(e[u]==a)break;if(u>i){o(u);continue}u=i+t;for(u;u<e.length;u++)if(e[u]!=c)break;if(u==e.length)break;o(u);continue}var f=Math.max(u-10,i-1);while(u>f&&e[u]<a)u--;while(u>f&&e[u]==d)u--;if(u>f){o(++u);continue}u=i+t,o(u)}return n},this.$getDisplayTokens=function(e,r){var i=[],s;r=r||0;for(var o=0;o<e.length;o++){var u=e.charCodeAt(o);if(u==9){s=this.getScreenTabSize(i.length+r),i.push(m);for(var a=1;a<s;a++)i.push(g)}else u==32?i.push(v):u>39&&u<48||u>57&&u<64?i.push(d):u>=4352&&y(u)?i.push(t,n):i.push(t)}return i},this.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t==null&&(t=Infinity),n=n||0;var r,i;for(i=0;i<e.length;i++){r=e.charCodeAt(i),r==9?n+=this.getScreenTabSize(n):r>=4352&&y(r)?n+=2:n+=1;if(n>t)break}return[n,i]},this.getRowLength=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:undefined},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var n,r=0,i=0,s,o=0,u=0,a=this.$screenRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var o=a[f],r=this.$docRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getLength()-1,p=this.getNextFoldLine(r),d=p?p.start.row:Infinity;while(o<=e){u=this.getRowLength(r);if(o+u-1>=e||r>=h)break;o+=u,r++,r>d&&(r=p.end.row+1,p=this.getNextFoldLine(r,p),d=p?p.start.row:Infinity),c&&(this.$docRowCache.push(r),this.$screenRowCache.push(o))}if(p&&p.start.row<=r)n=this.getFoldDisplayLine(p),r=p.start.row;else{if(o+u<=e||r>h)return{row:h,column:this.getLine(h).length};n=this.getLine(r),p=null}if(this.$useWrapMode){var v=this.$wrapData[r];v&&(s=v[e-o],e>o&&v.length&&(i=v[e-o-1]||v[v.length-1],n=n.substring(i)))}return i+=this.$getStringScreenWidth(n,t)[1],this.$useWrapMode&&i>=s&&(i=s-1),p?p.idxToPosition(i):{row:r,column:i}},this.documentToScreenPosition=function(e,t){if(typeof t=="undefined")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,s=null;s=this.getFoldAt(e,t,1),s&&(e=s.start.row,t=s.start.column);var o,u=0,a=this.$docRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var u=a[f],r=this.$screenRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getNextFoldLine(u),p=h?h.start.row:Infinity;while(u<e){if(u>=p){o=h.end.row+1;if(o>e)break;h=this.getNextFoldLine(o,h),p=h?h.start.row:Infinity}else o=u+1;r+=this.getRowLength(u),u=o,c&&(this.$docRowCache.push(u),this.$screenRowCache.push(r))}var d="";h&&u>=p?(d=this.getFoldDisplayLine(h,e,t),i=h.start.row):(d=this.getLine(e).substring(0,t),i=e);if(this.$useWrapMode){var v=this.$wrapData[i],m=0;while(d.length>=v[m])r++,m++;d=d.substring(v[m-1]||0,d.length)}return{row:r,column:this.$getStringScreenWidth(d)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(!this.$useWrapMode){e=this.getLength();var n=this.$foldData;for(var r=0;r<n.length;r++)t=n[r],e-=t.end.row-t.start.row}else{var i=this.$wrapData.length,s=0,r=0,t=this.$foldData[r++],o=t?t.start.row:Infinity;while(s<i)e+=this.$wrapData[s].length+1,s++,s>o&&(s=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}return e}}).call(d.prototype),e("./edit_session/folding").Folding.call(d.prototype),e("./edit_session/bracket_match").BracketMatch.call(d.prototype),t.EditSession=d}),ace.define("ace/config",["require","exports","module","ace/lib/lang"],function(e,t,n){"no use strict";function o(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var r=e("./lib/lang"),i=function(){return this}(),s={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!s.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return s[e]},t.set=function(e,t){if(!s.hasOwnProperty(e))throw new Error("Unknown config key: "+e);s[e]=t},t.all=function(){return r.copyObject(s)},t.moduleUrl=function(e,t){if(s.$moduleUrls[e])return s.$moduleUrls[e];var n=e.split("/");t=t||n[n.length-2]||"";var r=n[n.length-1].replace(t,"").replace(/(^[\-_])|([\-_]$)/,"");!r&&n.length>1&&(r=n[n.length-2]);var i=s[t+"Path"];return i==null&&(i=s.basePath),i&&i.slice(-1)!="/"&&(i+="/"),i+t+"-"+r+this.get("suffix")},t.setModuleUrl=function(e,t){return s.$moduleUrls[e]=t},t.init=function(){s.packaged=e.packaged||n.packaged||i.define&&define.packaged;if(!i.document)return"";var r={},u="",a=document.getElementsByTagName("script");for(var f=0;f<a.length;f++){var l=a[f],c=l.src||l.getAttribute("src");if(!c)continue;var h=l.attributes;for(var p=0,d=h.length;p<d;p++){var v=h[p];v.name.indexOf("data-ace-")===0&&(r[o(v.name.replace(/^data-ace-/,""))]=v.value)}var m=c.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);m&&(u=m[1])}u&&(r.base=r.base||u,r.packaged=!0),r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var g in r)typeof r[g]!="undefined"&&t.set(g,r[g])}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/useragent"],function(e,t,n){var r=e("./useragent");t.get=function(e,n){var r=t.createXhr();r.open("GET",e,!0),r.onreadystatechange=function(e){r.readyState===4&&n(r.responseText)},r.send(null)};var i=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];t.createXhr=function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;for(t=0;t<3;t++){n=i[t];try{e=new ActiveXObject(n)}catch(r){}if(e){i=[n];break}}if(!e)throw new Error("createXhr(): XMLHttpRequest not available");return e},t.loadScript=function(e,t){var n=document.getElementsByTagName("head")[0],i=document.createElement("script");i.src=e,n.appendChild(i),r.isOldIE?i.onreadystatechange=function(){this.readyState=="loaded"&&t()}:i.onload=t}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry=this._eventRegistry||{},this._defaultHandlers=this._defaultHandlers||{};var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=function(){this.propagationStopped=!0}),t.preventDefault||(t.preventDefault=function(){this.defaultPrevented=!0});for(var i=0;i<n.length;i++){n[i](t);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t)},r.setDefaultHandler=function(e,t){this._defaultHandlers=this._defaultHandlers||{};if(this._defaultHandlers[e])throw new Error("The default handler for '"+e+"' is already set");this._defaultHandlers[e]=t},r.on=r.addEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];n||(n=this._eventRegistry[e]=[]),n.indexOf(t)==-1&&n.push(t)},r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){r.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty){this.moveCursorTo(this.lead.row,this.lead.column+e);return}var t=this.getSelectionAnchor(),n=this.getSelectionLead(),r=this.isBackwards();(!r||t.column!==0)&&this.setSelectionAnchor(t.row,t.column+e),(r||n.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(typeof t=="undefined"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n=typeof e=="number"?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column==0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column-n,e.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),e=this.lead;this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column,e.column+n).split(" ").length-1==n?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column),s=i.match(/^\s*/);s[0].length==t?this.moveCursorTo(r.row,r.column):this.moveCursorTo(r.row,r.column+s[0].length)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(i=this.session.nonTokenRe.exec(r))t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t);if(t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight();return}if(i=this.session.tokenRe.exec(r))t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1)){this.moveCursorTo(n.start.row,n.start.column);return}var r=this.session.getFoldStringAt(e,t,-1);r==null&&(r=this.doc.getLine(e).substring(0,t));var s=i.stringReverse(r),o;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;if(o=this.session.nonTokenRe.exec(s))t-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0;if(t<=0){this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft();return}if(o=this.session.tokenRe.exec(s))t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.$shortWordEndIndex=function(e){var t,n=0,r,i=/\s/,s=this.session.tokenRe;s.lastIndex=0;if(t=this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{while((r=e[n])&&i.test(r))n++;if(n<=1){s.lastIndex=0;while((r=e[n])&&!s.test(r)){s.lastIndex=0,n++;if(i.test(r)){if(n>2){n--;break}while((r=e[n])&&i.test(r))n++;if(n>2)break}}}}return s.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e<s&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var o=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+o)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(n.start.row,n.start.column);var r=this.session.getLine(e).substring(0,t);if(t==0){do e--,r=this.doc.getLine(e);while(e>0&&/^\s*$/.test(r));t=r.length,/\s+$/.test(r)||(r="")}var s=i.stringReverse(r),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);t===0&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column);this.moveCursorTo(r.row,r.column+t,t===0)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e}}).call(u.prototype),t.Selection=u}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row==e.start.row&&this.end.row==e.end.row&&this.start.column==e.start.column&&this.end.column==e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};if(this.start.row>t)var i={row:t+1,column:0};if(this.start.row<e)var i={row:e,column:0};if(this.end.row<e)var n={row:e,column:0};return r.fromPoints(i||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var i={row:e,column:t};else var s={row:e,column:t};return r.fromPoints(i||this.start,s||this.end)},this.isEmpty=function(){return this.start.row==this.end.row&&this.start.column==this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new r(t.row,t.column,n.row,n.column)}}).call(r.prototype),r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},t.Range=r}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode"],function(e,t,n){var r=e("../tokenizer").Tokenizer,i=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour").Behaviour,o=e("../unicode"),u=function(){this.$tokenizer=new r((new i).getRules()),this.$behaviour=new s};(function(){this.tokenRe=new RegExp("^["+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]|s])+","g"),this.getTokenizer=function(){return this.$tokenizer},this.toggleCommentLines=function(e,t,n,r){},this.getNextLineIndent=function(e,t,n){return""},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""},this.createWorker=function(e){return null},this.createModeDelegates=function(e){if(!this.$embeds)return;this.$modes={};for(var t=0;t<this.$embeds.length;t++)e[this.$embeds[t]]&&(this.$modes[this.$embeds[t]]=new e[this.$embeds[t]]);var n=["toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction"];for(var t=0;t<n.length;t++)(function(e){var r=n[t],i=e[r];e[n[t]]=function(){return this.$delegator(r,arguments,i)}})(this)},this.$delegator=function(e,t,n){var r=t[0];for(var i=0;i<this.$embeds.length;i++){if(!this.$modes[this.$embeds[i]])continue;var s=r.split(this.$embeds[i]);if(!s[0]&&s[1]){t[0]=s[1];var o=this.$modes[this.$embeds[i]];return o[e].apply(o,t)}}var u=n.apply(this,t);return n?u:undefined},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var s=this.$behaviour.getBehaviours();for(var o in s)if(s[o][t]){var u=s[o][t].apply(this,arguments);if(u)return u}}}}).call(u.prototype),t.Mode=u}),ace.define("ace/tokenizer",["require","exports","module"],function(e,t,n){var r=function(e,t){t=t?"g"+t:"g",this.rules=e,this.regExps={},this.matchMappings={};for(var n in this.rules){var r=this.rules[n],i=r,s=[],o=0,u=this.matchMappings[n]={};for(var a=0;a<i.length;a++){i[a].regex instanceof RegExp&&(i[a].regex=i[a].regex.toString().slice(1,-1));var f=(new RegExp("(?:("+i[a].regex+")|(.))")).exec("a").length-2,l=i[a].regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+o+1)});if(f>1&&i[a].token.length!==f-1)throw new Error("For "+i[a].regex+" the matching groups ("+(f-1)+") and length of the token array ("+i[a].token.length+") don't match (rule #"+a+" of state "+n+")");u[o]={rule:a,len:f},o+=f,s.push(l)}this.regExps[n]=new RegExp("(?:("+s.join(")|(")+")|(.))",t)}};(function(){this.getLineTokens=function(e,t){var n=t||"start",r=this.rules[n],i=this.matchMappings[n],s=this.regExps[n];s.lastIndex=0;var o,u=[],a=0,f={type:null,value:""};while(o=s.exec(e)){var l="text",c=null,h=[o[0]];for(var p=0;p<o.length-2;p++){if(o[p+1]===undefined)continue;c=r[i[p].rule],i[p].len>1&&(h=o.slice(p+2,p+1+i[p].len)),typeof c.token=="function"?l=c.token.apply(this,h):l=c.token;if(c.next){n=c.next,r=this.rules[n],i=this.matchMappings[n],a=s.lastIndex,s=this.regExps[n];if(s===undefined)throw new Error("You indicated a state of "+c.next+" to go to, but it doesn't exist!");s.lastIndex=a}break}if(h[0]){typeof l=="string"&&(h=[h.join("")],l=[l]);for(var p=0;p<h.length;p++){if(!h[p])continue;(!c||c.merge||l[p]==="text")&&f.type===l[p]?f.value+=h[p]:(f.type&&u.push(f),f={type:l[p],value:h[p]})}}if(a==e.length)break;a=s.lastIndex}return f.type&&u.push(f),{tokens:u,state:n}}}).call(r.prototype),t.Tokenizer=r}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{token:"text",regex:".+"}]}};(function(){this.addRules=function(e,t){for(var n in e){var r=e[n];for(var i=0;i<r.length;i++){var s=r[i];s.next&&(s.next=t+s.next)}this.$rules[t+n]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,s){var o=(new e).getRules();if(i)for(var u=0;u<i.length;u++)i[u]=t+i[u];else{i=[];for(var a in o)i.push(t+a)}this.addRules(o,t);var f=Array.prototype[s?"push":"unshift"];for(var u=0;u<i.length;u++)f.apply(this.$rules[i[u]],r.deepCopy(n));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return Object.keys(e).forEach(function(t){var s=e[t];n&&(s=s.toLowerCase());var o=s.split(r||"|");for(var u=o.length;u--;)i[o[u]]=t}),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if(typeof e=="function")var n=(new e).getBehaviours(t);else var n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(!e)return this.$behaviours;var t={};for(var n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}}).call(r.prototype),t.Behaviour=r}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){function r(e){var n=/\w{4}/g;for(var r in e)t.packages[r]=e[r].replace(n,"\\u$&")}t.packages={},r({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[""]:Array.isArray(e)?this.insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length==0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine="\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";case"auto":return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.$lines[e.start.row].substring(e.start.column,e.end.column);var t=this.getLines(e.start.row+1,e.end.row-1);return t.unshift((this.$lines[e.start.row]||"").substring(e.start.column)),t.push((this.$lines[e.end.row]||"").substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t&&(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this.insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this.insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._emit("change",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._emit("change",{data:i}),r},this.remove=function(e){e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this.removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._emit("change",{data:a}),r.start},this.removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._emit("change",{data:o})},this.replace=function(e,t){if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this.removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this.insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}}}).call(u.prototype),t.Document=u}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.document=e,typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n),this.$onChange=this.onChange.bind(this),e.on("change",this.$onChange)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column;t.action==="insertText"?n.start.row===r&&n.start.column<=i?n.start.row===n.end.row?i+=n.end.column-n.start.column:(i-=n.start.column,r+=n.end.row-n.start.row):n.start.row!==n.end.row&&n.start.row<r&&(r+=n.end.row-n.start.row):t.action==="insertLines"?n.start.row<=r&&(r+=n.end.row-n.start.row):t.action=="removeText"?n.start.row==r&&n.start.column<i?n.end.column>=i?i=n.start.column:i=Math.max(0,i-(n.end.column-n.start.column)):n.start.row!==n.end.row&&n.start.row<r?(n.end.row==r&&(i=Math.max(0,i-n.end.column)+n.start.column),r-=n.end.row-n.start.row):n.end.row==r&&(r-=n.end.row-n.start.row,i=Math.max(0,i-n.end.column)+n.start.column):t.action=="removeLines"&&n.start.row<=r&&(n.end.row<=r?r-=n.end.row-n.start.row:(r=n.start.row,i=0)),this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=5e3,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(!n.running)return;var e=new Date,t=n.currentLine,r=n.doc,i=0,s=r.getLength();while(n.currentLine<s){n.$tokenizeRow(n.currentLine);while(n.lines[n.currentLine])n.currentLine++;i++;if(i%5==0&&new Date-e>20){n.fireUpdateEvent(t,n.currentLine-1),n.running=setTimeout(n.$worker,20);return}}n.running=!1,n.fireUpdateEvent(t,s-1)}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._emit("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.$updateOnChange=function(e){var t=e.range,n=t.start.row,r=t.end.row-n;if(r===0)this.lines[n]=null;else if(e.action=="removeText"||e.action=="removeLines")this.lines.splice(n,r+1,null),this.states.splice(n,r+1,null);else{var i=Array(r+1);i.unshift(n,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop(),this.running=setTimeout(this.$worker,700)},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1];if(t.length>s){var r={value:t.substr(s),type:"text"};t=t.slice(0,s)}var i=this.tokenizer.getLineTokens(t,n);return r&&(i.tokens.push(r),i.state="start"),this.states[e]!==i.state?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){if(this.regExp+""==e+"")return;this.regExp=e,this.cache=[]},this.update=function(e,t,n,i){if(!this.regExp)return;var o=i.firstRow,u=i.lastRow;for(var a=o;a<=u;a++){var f=this.cache[a];f==null&&(f=r.getMatchOffsets(n.getLine(a),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(e){return new s(a,e.offset,a,e.offset+e.length)}),this.cache[a]=f.length?f:"");for(var l=f.length;l--;)t.drawSingleLineMarker(e,f[l].toScreenRange(n),this.clazz,i,null,this.type)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){function u(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;var i=r.folds;for(var s=0;s<i.length;s++){var o=i[s];if(o.range.contains(e,t)){if(n==1&&o.range.isEnd(e,t))continue;if(n==-1&&o.range.isStart(e,t))continue;return o}}},this.getFoldsInRange=function(e){e=e.clone();var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var s=0;s<r.length;s++){var o=r[s].range.compareRange(e);if(o==2)continue;if(o==-2)break;var u=r[s].folds;for(var a=0;a<u.length;a++){var f=u[a];o=f.range.compareRange(e);if(o==-2)break;if(o==2)continue;if(o==42)break;i.push(f)}}return i},this.getAllFolds=function(){function n(t){e.push(t);if(!t.subFolds)return;for(var r=0;r<t.subFolds.length;r++)n(t.subFolds[r])}var e=[],t=this.$foldData;for(var r=0;r<t.length;r++)for(var i=0;i<t[r].folds.length;i++)n(t[r].folds[i]);return e},this.getFoldStringAt=function(e,t,n,r){r=r||this.getFoldLine(e);if(!r)return null;var i={end:{column:0}},s,o;for(var u=0;u<r.folds.length;u++){o=r.folds[u];var a=o.range.compareEnd(e,t);if(a==-1){s=this.getLine(o.start.row).substring(i.end.column,o.start.column);break}if(a===0)return null;i=o}return s||(s=this.getLine(o.start.row).substring(i.end.column)),n==-1?s.substring(0,t-i.end.column):n==1?s.substring(t-i.end.column):s},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){var n=this.$foldData,r=t-e+1;for(var i=0;i<n.length;i++){var s=n[i],o=s.end.row,u=s.start.row;if(o>=t){u<t&&(u>=e?r-=t-u:r=0);break}o>=e&&(u>=e?r-=o-u:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof s?o=e:o=new s(t,e),this.$clipRangeToDocument(o.range);var u=o.start.row,a=o.start.column,f=o.end.row,l=o.end.column;if(u==f&&l-a<2)throw"The range has to be at least 2 characters width";var c=this.getFoldAt(u,a,1),h=this.getFoldAt(f,l,-1);if(c&&h==c)return c.addSubFold(o);if(c&&!c.range.isStart(u,a)||h&&!h.range.isEnd(f,l))throw"A fold can't intersect already existing fold"+o.range+c.range;var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),o.subFolds=p);for(var d=0;d<n.length;d++){var v=n[d];if(f==v.start.row){v.addFold(o),r=!0;break}if(u==v.end.row){v.addFold(o),r=!0;if(!o.sameRow){var m=n[d+1];if(m&&m.start.row==f){v.merge(m);break}}break}if(f<=v.start.row)break}return r||(v=this.$addFoldLine(new i(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(v.start.row,v.start.row):this.$updateRowLengthCache(v.start.row,v.start.row),this.$modified=!0,this._emit("changeFold",{data:o}),o},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,s=t.folds;if(s.length==1)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column;else if(e.sameRow)s.splice(s.indexOf(e),1);else{var o=t.split(e.start.row,e.start.column);s=o.folds,s.shift(),o.start.row=s[0].start.row,o.start.column=s[0].start.column}this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r),this.$modified=!0,this._emit("changeFold",{data:e})},this.removeFolds=function(e){var t=[];for(var n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(e){this.addFold(e)},this),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;e==null?n=new r(0,0,this.getLength(),0):typeof e=="number"?n=new r(e,0,e,this.getLine(e).length):"row"in e?n=r.fromPoints(e,e):n=e,i=this.getFoldsInRange(n);if(t)this.removeFolds(i);else while(i.length)this.expandFolds(i),i=this.getFoldsInRange(n)},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r==null&&(r=e.start.row,i=0),t==null&&(t=e.end.row,n=this.getLine(t).length);var s=this.doc,o="";return e.walk(function(e,t,n,u){if(t<r)return;if(t==r){if(n<i)return;u=Math.max(i,u)}e!=null?o+=e:o+=s.getLine(t).substring(u,n)}.bind(this),t,n),o},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(!i){var s;return s=this.doc.getLine(e),s.substring(r||0,t||s.length)}return this.getFoldDisplayLine(i,e,t,n,r)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)}),e},this.toggleFold=function(e){var t=this.selection,n=t.getRange(),r,i;if(n.isEmpty()){var s=n.start;r=this.getFoldAt(s.row,s.column);if(r){this.expandFold(r);return}(i=this.findMatchingBracket(s))?n.comparePoint(i)==1?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:s.row,column:s.column+1}))?(n.comparePoint(i)==1?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(s.row,s.column)||n}else{var o=this.getFoldsInRange(n);if(e&&o.length){this.expandFolds(o);return}o.length==1&&(r=o[0])}r||(r=this.getFoldAt(n.start.row,n.start.column));if(r&&r.range.toString()==n.toString()){this.expandFold(r);return}var u="...";if(!n.isMultiLine()){u=this.getTextRange(n);if(u.length<4)return;u=u.trim().substring(0,2)+".."}this.addFold(u,n)},this.getCommentFoldRange=function(e,t,n){var i=new o(this,e,t),s=i.getCurrentToken();if(s&&/^comment|string/.test(s.type)){var u=new r,a=new RegExp(s.type.replace(/\..*/,"\\."));if(n!=1){do s=i.stepBackward();while(s&&a.test(s.type));i.stepForward()}u.start.row=i.getCurrentTokenRow(),u.start.column=i.getCurrentTokenColumn()+2,i=new o(this,e,t);if(n!=-1){do s=i.stepForward();while(s&&a.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return u.end.row=i.getCurrentTokenRow(),u.end.column=i.getCurrentTokenColumn()+s.value.length-2,u}},this.foldAll=function(e,t){var n=this.foldWidgets;t=t||this.getLength();for(var r=e||0;r<t;r++){n[r]==null&&(n[r]=this.getFoldWidget(r));if(n[r]!="start")continue;var i=this.getFoldWidgetRange(r);if(i&&i.end.row<=t)try{this.addFold("...",i)}catch(s){}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle==e)return;this.$foldStyle=e,e=="manual"&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)},this.$setFolding=function(e){if(this.$foldMode==e)return;this.$foldMode=e,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation");if(!e||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n=this.getFoldWidget(e),r=this.getLine(e),i=t.shiftKey,s=i||t.ctrlKey||t.altKey||t.metaKey,o;n=="end"?o=this.getFoldAt(e,0,-1):o=this.getFoldAt(e,r.length,1);if(o){s?this.removeFold(o):this.expandFold(o);return}var u=this.getFoldWidgetRange(e);if(u){if(!u.isMultiLine()){o=this.getFoldAt(u.start.row,u.start.column,1);if(o&&u.isEqual(o.range)){this.removeFold(o);return}}i||this.addFold("...",u),s&&this.foldAll(u.start.row+1,u.end.row)}else s&&this.foldAll(e+1,this.getLength()),(t.target||t.srcElement).className+=" ace_invalid"},this.updateFoldWidgets=function(e){var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i===0)this.foldWidgets[r]=null;else if(t.action=="removeText"||t.action=="removeLines")this.foldWidgets.splice(r,i+1,null);else{var s=Array(i+1);s.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}}}var r=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,o=e("../token_iterator").TokenIterator;t.Folding=u}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw"Can't add a fold to this FoldLine as it has no connection";this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw"Trying to add fold to FoldRow that doesn't have a matching row";this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r=0,i=this.folds,s,o,u,a=!0;t==null&&(t=this.end.row,n=this.end.column);for(var f=0;f<i.length;f++){s=i[f],o=s.range.compareStart(t,n);if(o==-1){e(null,t,n,r,a);return}u=e(null,s.start.row,s.start.column,r,a),u=!u&&e(s.placeholder,s.start.row,s.start.column,r);if(u||o==0)return;a=!s.sameRow,r=s.end.column}e(null,t,n,r,a)},this.getNextFoldTo=function(e,t){var n,r;for(var i=0;i<this.folds.length;i++){n=this.folds[i],r=n.range.compareEnd(e,t);if(r==-1)return{fold:n,kind:"after"};if(r==0)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var r=this.getNextFoldTo(e,t),i,s;if(r){i=r.fold;if(r.kind=="inside"&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){s=this.folds;var o=s.indexOf(i);o==0&&(this.start.column+=n);for(o;o<s.length;o++){i=s[o],i.start.column+=n;if(!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},this.split=function(e,t){var n=this.getNextFoldTo(e,t).fold,r=this.folds,s=this.foldData;if(!n)return null;var o=r.indexOf(n),u=r[o-1];this.end.row=u.end.row,this.end.column=u.end.column,r=r.splice(o,r.length-o);var a=new i(s,r);return s.splice(s.indexOf(this)+1,0,a),a},this.merge=function(e){var t=e.folds;for(var n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){var t=0,n;for(var r=0;r<this.folds.length;r++){var n=this.folds[r];e-=n.start.column-t;if(e<0)return{row:n.start.row,column:n.start.column+e};e-=n.placeholder.length;if(e<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i}),ace.define("ace/edit_session/fold",["require","exports","module"],function(e,t,n){var r=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=[]};(function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new r(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t},this.addSubFold=function(e){if(this.range.isEqual(e))return this;if(!this.range.containsRange(e))throw"A fold can't intersect already existing fold"+e.range+this.range;var t=e.range.start.row,n=e.range.start.column;for(var r=0,i=-1;r<this.subFolds.length;r++){i=this.subFolds[r].range.compare(t,n);if(i!=1)break}var s=this.subFolds[r];if(i==0)return s.addSubFold(e);var t=e.range.end.row,n=e.range.end.column;for(var o=r,i=-1;o<this.subFolds.length;o++){i=this.subFolds[o].range.compare(t,n);if(i!=1)break}var u=this.subFolds[o];if(i==0)throw"A fold can't intersect already existing fold"+e.range+this.range;var a=this.subFolds.splice(r,o-r,e);return e.setFoldLine(this.foldLine),e}}).call(r.prototype)}),ace.define("ace/token_iterator",["require","exports","module"],function(e,t,n){var r=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){this.$row-=1;if(this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e=this.$session.getLength();this.$tokenIndex+=1;while(this.$tokenIndex>=this.$rowTokens.length){this.$row+=1;if(this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n}}).call(r.prototype),t.TokenIterator=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){function s(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n=="")return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,s=t.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);o||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1);if(!o)return null;if(o[1]){var u=this.$findClosingBracket(o[1],e);if(!u)return null;r=i.fromPoints(e,u),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var u=this.$findOpeningBracket(o[2],e);if(!u)return null;r=i.fromPoints(u,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren")+")+"));var a=t.column-o.getCurrentTokenColumn()-2,f=u.value;for(;;){while(a>=0){var l=f.charAt(a);if(l==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else l==e&&(s+=1);a-=1}do u=o.stepBackward();while(u&&!n.test(u.type));if(u==null)break;f=u.value,a=f.length-1}return null},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren")+")+"));var a=t.column-o.getCurrentTokenColumn();for(;;){var f=u.value,l=f.length;while(a<l){var c=f.charAt(a);if(c==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else c==e&&(s+=1);a+=1}do u=o.stepForward();while(u&&!n.test(u.type));if(u==null)break;a=0}return null}}var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=s}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$matchIterator(e,this.$options);if(!t)return!1;var n=null;return t.forEach(function(e,t,r){if(!e.start){var i=e.offset+(r||0);n=new s(t,i,t,i+e.length)}else n=e;return!0}),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],u=t.re;if(t.$isMultiLine){var a=u.length,f=i.length-a;for(var l=u.offset||0;l<=f;l++){for(var c=0;c<a;c++)if(i[l+c].search(u[c])==-1)break;var h=i[l],p=i[l+a-1],d=h.match(u[0])[0].length,v=p.match(u[a-1])[0].length;o.push(new s(l,h.length-d,l+a-1,v))}}else for(var m=0;m<i.length;m++){var g=r.getMatchOffsets(i[m],u);for(var c=0;c<g.length;c++){var y=g[c];o.push(new s(m,y.offset,m,y.offset+y.length))}}if(n){var b=n.start.column,w=n.start.column,m=0,c=o.length-1;while(m<c&&o[m].start.column<b&&o[m].start.row==n.start.row)m++;while(m<c&&o[c].end.column>w&&o[c].end.row==n.end.row)c--;return o.slice(m,c+1)}return o},this.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(!r)return;var i=r.exec(e);if(!i||i[0].length!=e.length)return null;t=e.replace(r,t);if(n.preserveCase){t=t.split("");for(var s=Math.min(e.length,e.length);s--;){var o=e[s];o&&o.toLowerCase()!=o?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join("")}return t},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this,o,u=t.backwards;if(t.$isMultiLine)var a=n.length,f=function(t,r,i){var u=t.search(n[0]);if(u==-1)return;for(var f=1;f<a;f++){t=e.getLine(r+f);if(t.search(n[f])==-1)return}var l=t.match(n[a-1])[0].length,c=new s(r,u,r+a-1,l);n.offset==1?(c.start.row--,c.start.column=Number.MAX_VALUE):i&&(c.start.column+=i);if(o(c))return!0};else if(u)var f=function(e,t,i){var s=r.getMatchOffsets(e,n);for(var u=s.length-1;u>=0;u--)if(o(s[u],t,i))return!0};else var f=function(e,t,i){var s=r.getMatchOffsets(e,n);for(var u=0;u<s.length;u++)if(o(s[u],t,i))return!0};return{forEach:function(n){o=n,i.$lineIterator(e,t).forEach(f)}}},this.$assembleRegExp=function(e){if(e.needle instanceof RegExp)return e.re=e.needle;var t=e.needle;if(!e.needle)return e.re=!1;e.regExp||(t=r.escapeRegExp(t)),e.wholeWord&&(t="\\b"+t+"\\b");var n=e.caseSensitive?"g":"gi";e.$isMultiLine=/[\n\r]/.test(t);if(e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(t,n);try{var i=new RegExp(t,n)}catch(s){i=!1}return e.re=i},this.$assembleMultilineRegExp=function(e,t){var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[];for(var i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(s){return!1}return n[0]==""?(r.shift(),r.offset=1):r.offset=0,r},this.$lineIterator=function(e,t){var n=t.backwards==1,r=t.skipCurrent!=0,i=t.range,s=t.start;s||(s=i?i[n?"end":"start"]:e.selection.getRange()),s.start&&(s=s[r!=n?"end":"start"]);var o=i?i.start.row:0,u=i?i.end.row:e.getLength()-1,a=n?function(n){var r=s.row,i=e.getLine(r).substring(0,s.column);if(n(i,r))return;for(r--;r>=o;r--)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=u,o=s.row;r>=o;r--)if(n(e.getLine(r),r))return}:function(n){var r=s.row,i=e.getLine(r).substr(s.column);if(n(i,r,s.column))return;for(r+=1;r<=u;r++)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=o,u=s.row;r<=u;r++)if(n(e.getLine(r),r))return};return{forEach:a}}}).call(o.prototype),t.Search=o}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../keyboard/hash_handler").HashHandler,s=e("../lib/event_emitter").EventEmitter,o=function(e,t){this.platform=e,this.commands=this.byName={},this.commmandKeyBinding={},this.addCommands(t),this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};r.inherits(o,i),function(){r.implement(this,s),this.exec=function(e,t,n){typeof e=="string"&&(e=this.commands[e]);if(!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var r=this._emit("exec",{editor:t,command:e,args:n});return r===!1?!1:!0},this.toggleRecording=function(e){if(this.$inReplay)return;return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}},this.trimMacro=function(e){return e.map(function(e){return typeof e[0]!="string"&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(o.prototype),t.CommandManager=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys"],function(e,t,n){function i(e,t){this.platform=t,this.commands={},this.commmandKeyBinding={},this.addCommands(e)}var r=e("../lib/keys");(function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e){var t=typeof e=="string"?e:e.name;e=this.commands[t],delete this.commands[t];var n=this.commmandKeyBinding;for(var r in n)for(var i in n[r])n[r][i]==e&&delete n[r][i]},this.bindKey=function(e,t){if(!e)return;if(typeof t=="function"){this.addCommand({exec:t,bindKey:e,name:e});return}var n=this.commmandKeyBinding;e.split("|").forEach(function(e){var r=this.parseKeys(e,t),i=r.hashId;(n[i]||(n[i]={}))[r.key]=t},this)},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(typeof n=="string")return this.bindKey(n,t);typeof n=="function"&&(n={exec:n}),n.name||(n.name=t),this.addCommand(n)},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){var t=e.bindKey;if(!t)return;var n=typeof t=="string"?t:t[this.platform];this.bindKey(n,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(t.length==1&&t[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}var s=0;for(var o=t.length;o--;){var u=r.KEY_MODS[t[o]];if(u==null)throw"invalid modifier "+t[o]+" in "+e;s|=u}return{key:n,hashId:s}},this.findKeyCommand=function(t,n){var r=this.commmandKeyBinding;return r[t]&&r[t][n]},this.handleKeyboard=function(e,t,n,r){return{command:this.findKeyCommand(t,n)}}}).call(i.prototype),t.HashHandler=i}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang"],function(e,t,n){function i(e,t){return{win:e,mac:t}}var r=e("../lib/lang");t.commands=[{name:"selectall",bindKey:i("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:i(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:i("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:i("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},readOnly:!0},{name:"unfold",bindKey:i("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},readOnly:!0},{name:"foldall",bindKey:i("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll()},readOnly:!0},{name:"unfoldall",bindKey:i("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},readOnly:!0},{name:"findnext",bindKey:i("Ctrl-K","Command-G"),exec:function(e){e.findNext()},readOnly:!0},{name:"findprevious",bindKey:i("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},readOnly:!0},{name:"find",bindKey:i("Ctrl-F","Command-F"),exec:function(e){var t=prompt("Find:",e.getCopyText());e.find(t)},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:i("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0},{name:"gotostart",bindKey:i("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectup",bindKey:i("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:i("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:i("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoend",bindKey:i("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"selectdown",bindKey:i("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",readOnly:!0},{name:"golinedown",bindKey:i("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordleft",bindKey:i("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordleft",bindKey:i("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolinestart",bindKey:i("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolinestart",bindKey:i("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectleft",bindKey:i("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoleft",bindKey:i("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordright",bindKey:i("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordright",bindKey:i("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolineend",bindKey:i("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolineend",bindKey:i("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"selectright",bindKey:i("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoright",bindKey:i("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:i(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:i("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:i(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:i("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:i("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"togglerecording",bindKey:i("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:i("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:i("Ctrl-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:i("Ctrl-Shift-P",null),exec:function(e){e.jumpToMatching(!0)},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},multiSelectAction:"forEach"},{name:"removeline",bindKey:i("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},multiSelectAction:"forEach"},{name:"duplicateSelection",bindKey:i("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},multiSelectAction:"forEach"},{name:"sortlines",bindKey:i("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},multiSelectAction:"forEach"},{name:"togglecomment",bindKey:i("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEach"},{name:"modifyNumberUp",bindKey:i("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:i("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:i("Ctrl-R","Command-Option-F"),exec:function(e){var t=prompt("Find:",e.getCopyText());if(!t)return;var n=prompt("Replacement:");if(!n)return;e.replace(n,{needle:t})}},{name:"replaceall",bindKey:i("Ctrl-Shift-R","Command-Shift-Option-F"),exec:function(e){var t=prompt("Find:");if(!t)return;var n=prompt("Replacement:");if(!n)return;e.replaceAll(n,{needle:t})}},{name:"undo",bindKey:i("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:i("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:i("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()}},{name:"movelinesup",bindKey:i("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()}},{name:"copylinesdown",bindKey:i("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()}},{name:"movelinesdown",bindKey:i("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()}},{name:"del",bindKey:i("Delete","Delete|Ctrl-D"),exec:function(e){e.remove("right")},multiSelectAction:"forEach"},{name:"backspace",bindKey:i("Command-Backspace|Option-Backspace|Shift-Backspace|Backspace","Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach"},{name:"removetolinestart",bindKey:i("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach"},{name:"removetolineend",bindKey:i("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach"},{name:"removewordleft",bindKey:i("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach"},{name:"removewordright",bindKey:i("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach"},{name:"outdent",bindKey:i("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach"},{name:"indent",bindKey:i("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach"},{name:"splitline",bindKey:i(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach"},{name:"transposeletters",bindKey:i("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)}},{name:"touppercase",bindKey:i("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach"},{name:"tolowercase",bindKey:i("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach"}]}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){var r=function(){this.reset()};(function(){this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],this.$undoStack.push(t),this.$redoStack=[]},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t)),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(t,e),this.$undoStack.push(t)),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[]},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0}}).call(r.prototype),t.UndoManager=r}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/useragent","ace/config","ace/lib/net","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/event"),o=e("./lib/useragent"),u=e("./config"),a=e("./lib/net"),f=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,h=e("./layer/cursor").Cursor,p=e("./scrollbar").ScrollBar,d=e("./renderloop").RenderLoop,v=e("./lib/event_emitter").EventEmitter,m=".ace_editor {position: absolute;overflow: hidden;font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;font-size: 12px;}.ace_scroller {position: absolute;overflow: hidden;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;}.ace_gutter {position: absolute;overflow : hidden;height: 100%;width: auto;cursor: default;z-index: 4;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\");}.ace_scrollbar {position: absolute;overflow-x: hidden;overflow-y: scroll;right: 0;}.ace_scrollbar-inner {position: absolute;width: 1px;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;}.ace_text-input.ace_composition {background: #fff;color: #000;z-index: 1000;opacity: 1;border: solid lightgray 1px;margin: -1px}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: nowrap;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {color: black;font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_cursor[style*=\"opacity: 0\"]{-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_line {white-space: nowrap;}.ace_marker-layer .ace_step {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;}.ace_editor.ace_dragging .ace_content {cursor: move;}.ace_gutter-tooltip {background-color: #FFFFD5;border: 1px solid gray;box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);color: black;display: inline-block;padding: 4px;position: absolute;z-index: 300;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre-line;word-wrap: break-word;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: inline-block;width: 11px;vertical-align: top;background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;}.ace_fold-widget.ace_end {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget.ace_closed {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");}.ace_dark .ace_fold-widget.ace_end {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget.ace_closed {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}";i.importCssString(m,"ace_editor");var g=function(e,t){var n=this;this.container=e,this.$keepTextAreaAtCursor=!o.isIE,i.addCssClass(e,"ace_editor"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.setHighlightGutterLine(!0),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$horizScrollAlwaysVisible=!1,this.$animatedScroll=!1,this.scrollBar=new p(e),this.scrollBar.addEventListener("scroll",function(e){n.$inScrollAnimation||n.session.setScrollTop(e.data)}),this.scrollTop=0,this.scrollLeft=0,s.addListener(this.scroller,"scroll",function(){var e=n.scroller.scrollLeft;n.scrollLeft=e,n.session.setScrollLeft(e)}),this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){n.updateCharacterSize(),n.onResize(!0)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:1,characterWidth:1,minHeight:1,maxHeight:1,offset:0,height:1},this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4)};(function(){this.showGutter=!0,this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,v),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.characterWidth=this.$textLayer.getCharacterWidth(),this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session=e,this.scroller.className="ace_scroller",this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(e,t){t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t};if(this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow<this.layerConfig.firstRow)return;this.$loop.schedule(this.CHANGE_LINES)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.onResize=function(e,t,n,r){var s=this.CHANGE_SIZE,o=this.$size;if(this.resizing>2)return;this.resizing>1?this.resizing++:this.resizing=e?1:0,r||(r=i.getInnerHeight(this.container));if(e||o.height!=r)o.height=r,this.scroller.style.height=r+"px",o.scrollerHeight=this.scroller.clientHeight,this.scrollBar.setHeight(o.scrollerHeight),this.session&&(this.session.setScrollTop(this.getScrollTop()),s|=this.CHANGE_FULL);n||(n=i.getInnerWidth(this.container));if(e||this.resizing>1||o.width!=n){o.width=n;var t=this.showGutter?this.$gutter.offsetWidth:0;this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-this.scrollBar.getWidth()),this.scroller.style.right=this.scrollBar.getWidth()+"px";if(this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)s|=this.CHANGE_FULL}e?this.$renderChanges(s,!0):this.$loop.schedule(s),e&&delete this.resizing},this.onGutterResize=function(){var e=this.$size.width,t=this.showGutter?this.$gutter.offsetWidth:0;this.scroller.style.left=t+"px",this.$size.scrollerWidth=Math.max(0,e-t-this.scrollBar.getWidth()),this.session.getUseWrapMode()&&this.adjustWrapLimit()&&this.$loop.schedule(this.CHANGE_FULL)},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t)},this.setAnimatedScroll=function(e){this.$animatedScroll=e},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},this.getShowInvisibles=function(){return this.$textLayer.showInvisibles},this.getDisplayIndentGuides=function(){return this.$textLayer.displayIndentGuides},this.setDisplayIndentGuides=function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},this.$showPrintMargin=!0,this.setShowPrintMargin=function(e){this.$showPrintMargin=e,this.$updatePrintMargin()},this.getShowPrintMargin=function(){return this.$showPrintMargin},this.$printMarginColumn=80,this.setPrintMarginColumn=function(e){this.$printMarginColumn=e,this.$updatePrintMargin()},this.getPrintMarginColumn=function(){return this.$printMarginColumn},this.getShowGutter=function(){return this.showGutter},this.setShowGutter=function(e){if(this.showGutter===e)return;this.$gutter.style.display=e?"block":"none",this.showGutter=e,this.onResize(!0)},this.getFadeFoldWidgets=function(){return i.hasCssClass(this.$gutter,"ace_fade-fold-widgets")},this.setFadeFoldWidgets=function(e){e?i.addCssClass(this.$gutter,"ace_fade-fold-widgets"):i.removeCssClass(this.$gutter,"ace_fade-fold-widgets")},this.$highlightGutterLine=!1,this.setHighlightGutterLine=function(e){if(this.$highlightGutterLine==e)return;this.$highlightGutterLine=e;if(!this.$gutterLineHighlight){this.$gutterLineHighlight=i.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight);return}this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},this.getHighlightGutterLine=function(){return this.$highlightGutterLine},this.$updateGutterLineHighlight=function(){this.$gutterLineHighlight.style.top=this.$cursorLayer.$pixelPos.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=this.layerConfig.lineHeight+"px"},this.$updatePrintMargin=function(){if(!this.$showPrintMargin&&!this.$printMarginEl)return;if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden"},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$keepTextAreaAtCursor)return;var e=this.$cursorLayer.$pixelPos.top,t=this.$cursorLayer.$pixelPos.left;e-=this.layerConfig.offset;if(e<0||e>this.layerConfig.height-this.lineHeight)return;var n=this.characterWidth;this.$composition&&(n+=this.textarea.scrollWidth),t-=this.scrollLeft,t>this.$size.scrollerWidth-n&&(t=this.$size.scrollerWidth-n),this.showGutter&&(t+=this.$gutterLayer.gutterWidth),this.textarea.style.height=this.lineHeight+"px",this.textarea.style.width=n+"px",this.textarea.style.left=t+"px",this.textarea.style.top=e-1+"px"},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.getHScrollBarAlwaysVisible=function(){return this.$horizScrollAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.$horizScrollAlwaysVisible!=e&&(this.$horizScrollAlwaysVisible=e,(!this.$horizScrollAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL))},this.$updateScrollBar=function(){this.scrollBar.setInnerHeight(this.layerConfig.maxHeight),this.scrollBar.setScrollTop(this.scrollTop)},this.$renderChanges=function(e,t){if(!t&&(!e||!this.session||!this.container.offsetWidth))return;(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL)&&this.$computeLayerConfig();if(e&this.CHANGE_H_SCROLL){this.scroller.scrollLeft=this.scrollLeft;var n=this.scroller.scrollLeft;this.scrollLeft=n,this.session.setScrollLeft(n),this.scroller.className=this.scrollLeft==0?"ace_scroller":"ace_scroller ace_scroll-left"}if(e&this.CHANGE_FULL){this.$textLayer.checkForSizeChanges(),this.$updateScrollBar(),this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight();return}if(e&this.CHANGE_SCROLL){this.$updateScrollBar(),e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight();return}e&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.showGutter)&&this.$gutterLayer.update(this.layerConfig):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.showGutter&&this.$gutterLayer.update(this.layerConfig),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),e&this.CHANGE_SIZE&&this.$updateScrollBar()},this.$computeLayerConfig=function(){var e=this.session,t=this.scrollTop%this.lineHeight,n=this.$size.scrollerHeight+this.lineHeight,r=this.$getLongestLine(),i=this.$horizScrollAlwaysVisible||this.$size.scrollerWidth-r<0,s=this.$horizScroll!==i;this.$horizScroll=i,s&&(this.scroller.style.overflowX=i?"scroll":"hidden",i||this.session.setScrollLeft(0));var o=this.session.getScreenLength()*this.lineHeight;this.session.setScrollTop(Math.max(0,Math.min(this.scrollTop,o-this.$size.scrollerHeight)));var u=Math.ceil(n/this.lineHeight)-1,a=Math.max(0,Math.round((this.scrollTop-t)/this.lineHeight)),f=a+u,l,c,h=this.lineHeight;a=e.screenToDocumentRow(a,0);var p=e.getFoldLine(a);p&&(a=p.start.row),l=e.documentToScreenRow(a,0),c=e.getRowLength(a)*h,f=Math.min(e.screenToDocumentRow(f,0),e.getLength()-1),n=this.$size.scrollerHeight+e.getRowLength(f)*h+c,t=this.scrollTop-l*h,this.layerConfig={width:r,padding:this.$padding,firstRow:a,firstRowScreen:l,lastRow:f,lineHeight:h,characterWidth:this.characterWidth,minHeight:n,maxHeight:o,offset:t,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-t+"px",this.content.style.marginTop=-t+"px",this.content.style.width=r+2*this.$padding+"px",this.content.style.height=n+"px",s&&this.onResize(!0)},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(e>n.lastRow+1)return;if(t<n.firstRow)return;if(t===Infinity){this.showGutter&&this.$gutterLayer.update(n),this.$textLayer.update(n);return}return this.$textLayer.updateLines(n,e,t),!0},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.$textLayer.showInvisibles&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t){if(this.$size.scrollerHeight===0)return;var n=this.$cursorLayer.getPixelPosition(e),r=n.left,i=n.top;this.scrollTop>i?(t&&(i-=t*this.$size.scrollerHeight),this.session.setScrollTop(i)):this.scrollTop+this.$size.scrollerHeight<i+this.lineHeight&&(t&&(i+=t*this.$size.scrollerHeight),this.session.setScrollTop(i+this.lineHeight-this.$size.scrollerHeight));var s=this.scrollLeft;s>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=0),this.session.setScrollLeft(r)):s+this.$size.scrollerWidth<r+this.characterWidth&&this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth))},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){typeof e=="number"&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],s=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)i.push(s(n/this.STEPS,e,t-e));return i},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}),s=i.top;t&&(s-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(s),n!==!1&&this.animateScrolling(o,r)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll&&Math.abs(e-n)<1e5){var r=this,i=r.$calcSteps(e,n);this.$inScrollAnimation=!0,clearInterval(this.$timer),r.session.setScrollTop(i.shift()),this.$timer=setInterval(function(){i.length?(r.session.setScrollTop(i.shift()),r.session.$scrollTop=n):n!=null?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):(r.$timer=clearInterval(r.$timer),r.$inScrollAnimation=!1,t&&t())},10)}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){e<0&&(e=0),this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){if(t<0&&this.session.getScrollTop()>0)return!0;if(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight<this.layerConfig.maxHeight)return!0},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=Math.round(r);return{row:i,column:s,side:r-s>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(i,Math.max(r,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+Math.round(r.column*this.characterWidth),s=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){if(!this.$composition)return;i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null},this._loadTheme=function(e,t){if(!u.get("packaged"))return t();a.loadScript(u.moduleUrl(e,"theme"),t)},this.setTheme=function(t){function u(e){i.importCssString(e.cssText,e.cssClass,n.container.ownerDocument),n.theme&&i.removeCssClass(n.container,n.theme.cssClass),n.$theme=e.cssClass,n.theme=e,i.addCssClass(n.container,e.cssClass),i.setCssClass(n.container,"ace_dark",e.isDark);var t=e.padding||4;n.$padding&&t!=n.$padding&&n.setPadding(t),n.$size&&(n.$size.width=0,n.onResize()),n._dispatchEvent("themeLoaded",{theme:e})}var n=this;this.$themeValue=t,n._dispatchEvent("themeChange",{theme:t});if(!t||typeof t=="string"){var r=t||"ace/theme/textmate",s;try{s=e(r)}catch(o){}if(s)return u(s);n._loadTheme(r,function(){e([r],function(e){if(n.$themeValue!==t)return;u(e)})})}else u(t)},this.getTheme=function(){return this.$themeValue},this.setStyle=function(t,n){i.setCssClass(this.container,t,n!=0)},this.unsetStyle=function(t){i.removeCssClass(this.container,t)},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),t.VirtualRenderer=g}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,u=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this)};(function(){i.implement(this,o),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];var t,n;for(var r=0;r<e.length;r++){var i=e[r],n=i.row,t=this.$annotations[n];t||(t=this.$annotations[n]={text:[]});var o=i.text;o=o?s.escapeHTML(o):i.html||"",t.text.indexOf(o)===-1&&t.text.push(o);var u=i.type;u=="error"?t.className=" ace_error":u=="warning"&&t.className!=" ace_error"?t.className=" ace_warning":u=="info"&&!t.className&&(t.className=" ace_info")}},this.$updateAnnotations=function(e){if(!this.$annotations.length)return;var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i!==0)if(t.action=="removeText"||t.action=="removeLines")this.$annotations.splice(r,i+1,null);else{var s=Array(i+1);s.unshift(r,1),this.$annotations.splice.apply(this.$annotations,s)}},this.update=function(e){var t={className:""},n=[],i=e.firstRow,s=e.lastRow,o=this.session.getNextFoldLine(i),u=o?o.start.row:Infinity,a=this.$showFoldWidgets&&this.session.foldWidgets,f=this.session.$breakpoints,l=this.session.$decorations,c=0;for(;;){i>u&&(i=o.end.row+1,o=this.session.getNextFoldLine(i,o),u=o?o.start.row:Infinity);if(i>s)break;var h=this.$annotations[i]||t;n.push("<div class='ace_gutter-cell ",f[i]||"",l[i]||"",h.className,"' style='height:",this.session.getRowLength(i)*e.lineHeight,"px;'>",c=i+1);if(a){var p=a[i];p==null&&(p=a[i]=this.session.getFoldWidget(i)),p&&n.push("<span class='ace_fold-widget ace_",p,p=="start"&&i==u&&i<o.end.row?" ace_closed":" ace_open","' style='height:",e.lineHeight,"px","'></span>")}n.push("</div>"),i++}this.element=r.setInnerHtml(this.element,n.join("")),this.element.style.height=e.minHeight+"px",this.session.$useWrapMode&&(c=this.session.getLength());var d=(""+c).length*e.characterWidth,v=this.$padding||this.$computePadding();d+=v.left+v.right,d!==this.gutterWidth&&(this.gutterWidth=d,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",d))},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1,this.$padding.right=parseInt(e.paddingRight),this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(e.x<t.left+n.left)return"markers";if(this.$showFoldWidgets&&e.x>n.right-t.right)return"foldWidgets"}}).call(u.prototype),t.Gutter=u}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){var r=e("../range").Range,i=e("../lib/dom"),s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(!e)return;this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var s=r.range.clipRows(e.firstRow,e.lastRow);if(s.isEmpty())continue;s=s.toScreenRange(this.session);if(r.renderer){var o=this.$getTop(s.start.row,e),u=this.$padding+s.start.column*e.characterWidth;r.renderer(t,s,u,o,e)}else r.type=="fullLine"?this.drawFullLineMarker(t,s,r.clazz,e):s.isMultiLine()?r.type=="text"?this.drawTextMarker(t,s,r.clazz,e):this.drawMultiLineMarker(t,s,r.clazz,e):this.drawSingleLineMarker(t,s,r.clazz+" ace_start",e)}this.element=i.setInnerHtml(this.element,t.join(""))},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,i){var s=t.start.row,o=new r(s,t.start.column,s,this.session.getScreenLastRowColumn(s));this.drawSingleLineMarker(e,o,n+" ace_start",i,1,"text"),s=t.end.row,o=new r(s,0,s,t.end.column),this.drawSingleLineMarker(e,o,n,i,0,"text");for(s=t.start.row+1;s<t.end.row;s++)o.start.row=s,o.end.row=s,o.end.column=this.session.getScreenLastRowColumn(s),this.drawSingleLineMarker(e,o,n,i,1,"text")},this.drawMultiLineMarker=function(e,t,n,r,i){var s=this.$padding,o=r.lineHeight,u=this.$getTop(t.start.row,r),a=s+t.start.column*r.characterWidth;e.push("<div class='",n," ace_start' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",a,"px;'></div>"),u=this.$getTop(t.end.row,r);var f=t.end.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",o,"px;","width:",f,"px;","top:",u,"px;","left:",s,"px;'></div>"),o=(t.end.row-t.start.row-1)*r.lineHeight;if(o<0)return;u=this.$getTop(t.start.row+1,r),e.push("<div class='",n,"' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",s,"px;'></div>")},this.drawSingleLineMarker=function(e,t,n,r,i){var s=r.lineHeight,o=(t.end.column+(i||0)-t.start.column)*r.characterWidth,u=this.$getTop(t.start.row,r),a=this.$padding+t.start.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",s,"px;","width:",o,"px;","top:",u,"px;","left:",a,"px;'></div>")},this.drawFullLineMarker=function(e,t,n,r){var i=this.$getTop(t.start.row,r),s=r.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,r)-i),e.push("<div class='",n,"' style='","height:",s,"px;","top:",i,"px;","left:0;right:0;'></div>")}}).call(s.prototype),t.Marker=s}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/useragent"),u=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};(function(){r.implement(this,u),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$characterSize.height||1},this.getCharacterWidth=function(){return this.$characterSize.width||1},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){var e=this;this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=o.isIE||o.isOldGecko?function(){var e=1e3;if(!this.$measureNode){var t=this.$measureNode=i.createElement("div"),n=t.style;n.width=n.height="auto",n.left=n.top=-e*40+"px",n.visibility="hidden",n.position="fixed",n.overflow="visible",n.whiteSpace="nowrap",t.innerHTML=s.stringRepeat("Xy",e);if(this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(t);else{var r=this.element.parentNode;while(!i.hasCssClass(r,"ace_editor"))r=r.parentNode;r.appendChild(t)}}if(!this.element.offsetWidth)return null;var n=this.$measureNode.style,o=i.computedStyle(this.element);for(var u in this.$fontStyles)n[u]=o[u];var a={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(e*2)};return a.width==0||a.height==0?null:a}:function(){if(!this.$measureNode){var e=this.$measureNode=i.createElement("div"),t=e.style;t.width=t.height="auto",t.left=t.top="-100px",t.visibility="hidden",t.position="fixed",t.overflow="visible",t.whiteSpace="nowrap",e.innerHTML="X";var n=this.element.parentNode;while(n&&!i.hasCssClass(n,"ace_editor"))n=n.parentNode;if(!n)return this.$measureNode=null;n.appendChild(e)}var r=this.$measureNode.getBoundingClientRect(),s={height:r.height,width:r.width};return s.width==0||s.height==0?null:s},this.setSession=function(e){this.session=e,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;var t=this.$tabStrings=[0];for(var n=1;n<e+1;n++)this.showInvisibles?t.push("<span class='ace_invisible'>"+this.TAB_CHAR+Array(n).join("&#160;")+"</span>"):t.push((new Array(n+1)).join("&#160;"));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",i=Array(this.tabSize+1).join("&#160;"),s=i;this.showInvisibles&&(r+=" ace_invisible",s=this.TAB_CHAR+i.substr(6)),this.$tabStrings[" "]="<span class='"+r+"'>"+i+"</span>",this.$tabStrings[" "]="<span class='"+r+"'>"+s+"</span>"}},this.updateLines=function(e,t,n){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;var r=Math.max(t,e.firstRow),s=Math.min(n,e.lastRow),o=this.element.childNodes,u=0;for(var a=e.firstRow;a<r;a++){var f=this.session.getFoldLine(a);if(f){if(f.containsRow(r)){r=f.start.row;break}a=f.end.row}u++}var a=r,f=this.session.getNextFoldLine(a),l=f?f.start.row:Infinity;for(;;){a>l&&(a=f.end.row+1,f=this.session.getNextFoldLine(a,f),l=f?f.start.row:Infinity);if(a>s)break;var c=o[u++];if(c){var h=[];this.$renderLine(h,a,!this.$useLineGroups(),a==l?f:!1),i.setInnerHtml(c,h.join(""))}a++}},this.scrollLines=function(e){var t=this.config;this.config=e;if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var i=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}if(e.lastRow>t.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){var r=this.element.ownerDocument.createDocumentFragment(),s=t,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>n)break;var a=i.createElement("div"),f=[];this.$renderLine(f,s,!1,s==u?o:!1),a.innerHTML=f.join("");if(this.$useLineGroups())a.className="ace_line_group",r.appendChild(a);else{var l=a.childNodes;while(l.length)r.appendChild(l[0])}s++}return r},this.update=function(e){this.config=e;var t=[],n=e.firstRow,r=e.lastRow,s=n,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>r)break;this.$useLineGroups()&&t.push("<div class='ace_line_group'>"),this.$renderLine(t,s,!1,s==u?o:!1),this.$useLineGroups()&&t.push("</div>"),s++}this.element=i.setInnerHtml(this.element,t.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,s=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,o=function(e,n,r,s,o){if(n)return(new Array(e.length+1)).join("&#160;");if(e=="&")return"&#38;";if(e=="<")return"&#60;";if(e==" "){var u=i.session.getScreenTabSize(t+s);return t+=u-1,i.$tabStrings[u]}if(e==" "){var a=i.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",f=i.showInvisibles?i.SPACE_CHAR:"";return t+=1,"<span class='"+a+"' style='width:"+i.config.characterWidth*2+"px'>"+f+"</span>"}return r?"<span class='ace_invisible ace_invalid'>"+i.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+i.config.characterWidth*2+"px'>"+e+"</span>")},u=r.replace(s,o);if(!this.$textToken[n.type]){var a="ace_"+n.type.replace(/\./g," ace_"),f="";n.type=="fold"&&(f=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",a,"'",f,">",u,"</span>")}else e.push(u);return t+r.length},this.renderIndentGuide=function(e,t){var n=t.search(this.$indentGuideRe);return n<=0?t:t[0]==" "?(n-=n%this.tabSize,e.push(Array(n/this.tabSize+1).join(this.$tabStrings[" "])),t.substr(n)):t[0]==" "?(e.push(Array(n+1).join(this.$tabStrings[" "])),t.substr(n)):t},this.$renderWrappedLine=function(e,t,n,r){var i=0,s=0,o=n[0],u=0;for(var a=0;a<t.length;a++){var f=t[a],l=f.value;if(a==0&&this.displayIndentGuides){i=l.length,l=this.renderIndentGuide(e,l);if(!l)continue;i-=l.length}if(i+l.length<o)u=this.$renderToken(e,u,f,l),i+=l.length;else{while(i+l.length>=o)u=this.$renderToken(e,u,f,l.substring(0,o-i)),l=l.substring(o-i),i=o,r||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),s++,u=0,o=n[s]||Number.MAX_VALUE;l.length!=0&&(i+=l.length,u=this.$renderToken(e,u,f,l))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var s=1;s<t.length;s++)r=t[s],i=r.value,n=this.$renderToken(e,n,r,i)},this.$renderLine=function(e,t,n,r){!r&&r!=0&&(r=this.session.getFoldLine(t));if(r)var i=this.$getFoldLineTokens(t,r);else var i=this.session.getTokens(t);n||e.push("<div class='ace_line' style='height:",this.config.lineHeight,"px'>");if(i.length){var s=this.session.getRowSplitData(t);s&&s.length?this.$renderWrappedLine(e,i,s,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("<span class='ace_invisible'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){function i(e,t,n){var i=0,s=0;while(s+e[i].value.length<t){s+=e[i].value.length,i++;if(i==e.length)return}if(s!=t){var o=e[i].value.substring(t-s);o.length>n-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),s=t+o.length,i+=1}while(s<n&&i<e.length){var o=e[i].value;o.length+s>n?r.push({type:e[i].type,value:o.substring(0,n-s)}):r.push(e[i]),s+=o.length,i+=1}}var n=this.session,r=[],s=n.getTokens(e);return t.walk(function(e,t,o,u,a){e!=null?r.push({type:"fold",value:e}):(a&&(s=n.getTokens(t)),s.length&&i(s,u,o))},t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors")};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,e?r.addCssClass(this.element,"ace_smooth-blinking"):r.removeCssClass(this.element,"ace_smooth-blinking"),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking");for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";if(!this.isBlinking||!this.blinkInterval||!this.isVisible)return;this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";t()}.bind(this),this.blinkInterval),t()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+n.column*this.config.characterWidth,i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;if(t===undefined||t.length===0)t=[{cursor:null}];for(var n=t.length;n--;){var i=this.getPixelPosition(t[n].cursor,!0);if((i.top>e.height+e.offset||i.top<-e.offset)&&n>1)continue;var s=(this.cursors[r++]||this.addCursor()).style;s.left=i.left+"px",s.top=i.top+"px",s.width=e.characterWidth+"px",s.height=e.lineHeight+"px"}while(this.cursors.length>r)this.removeCursor();var o=this.session.getOverwrite();this.$setOverwrite(o),this.$pixelPos=i,this.restartTimer()},this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,u=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar",this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.width=i.scrollbarWidth(e.ownerDocument),this.element.style.width=(this.width||15)+5+"px",s.addListener(this.element,"scroll",this.onScroll.bind(this))};(function(){r.implement(this,o),this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}).call(u.prototype),t.ScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){this.changes=this.changes|e;if(!this.pending){this.pending=!0;var t=this;r.nextFrame(function(){t.pending=!1;var e;while(e=t.changes)t.changes=0,t.onRender(e)},this.window)}}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor"],function(e,t,n){function h(e,t,n){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=n==-1,c.find(e)}function v(e,t){return e.row==t.row&&e.column==t.column}function m(e){e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),t.onSessionChange.call(e,e),e.on("changeSession",t.onSessionChange.bind(e)),e.on("mousedown",o),e.commands.addCommands(f.defaultCommands),g(e)}function g(e){function i(){n&&(r.style.cursor="",n=!1)}var t=e.textInput.getElement(),n=!1,r=e.renderer.content;u.addListener(t,"keydown",function(e){e.keyCode==18&&!(e.ctrlKey||e.shiftKey||e.metaKey)?n||(r.style.cursor="crosshair",n=!0):n&&(r.style.cursor="")}),u.addListener(t,"keyup",i),u.addListener(t,"blur",i)}var r=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),a=e("./lib/lang"),f=e("./commands/multi_select_commands");t.commands=f.defaultCommands.concat(f.multiSelectCommands);var l=e("./search").Search,c=new l,p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(!e)return;if(!this.inMultiSelectMode&&this.rangeCount==0){var n=this.toOrientedRange();if(e.intersects(n))return t||this.fromOrientedRange(e);this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._emit("addRange",{range:e})},this.$onRemoveRange=function(e){this.rangeCount=this.rangeList.ranges.length;if(this.rangeCount==1&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._emit("removeRange",{ranges:e}),this.rangeCount==0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){if(this.rangeList)return;this.rangeList=new r,this.ranges=[],this.rangeCount=0},this.getAllRanges=function(){return this.rangeList.ranges.concat()},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),s=n.start.row,o=n.end.row;if(s==o){if(r)var u=n.end,a=n.start;else var u=n.start,a=n.end;this.addRange(i.fromPoints(a,a)),this.addRange(i.fromPoints(u,u));return}var f=[],l=this.getLineRange(s,!0);l.start.column=n.start.column,f.push(l);for(var c=s+1;c<o;c++)f.push(this.getLineRange(c,!0));l=this.getLineRange(o,!0),l.end.column=n.end.column,f.push(l),f.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),s=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(r,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],s=e.column<t.column;if(s)var o=e.column,u=t.column;else var o=t.column,u=e.column;var a=e.row<t.row;if(a)var f=e.row,l=t.row;else var f=t.row,l=e.row;o<0&&(o=0),f<0&&(f=0),f==l&&(n=!0);for(var c=f;c<=l;c++){var h=i.fromPoints(this.session.screenToDocumentPosition(c,o),this.session.screenToDocumentPosition(c,u));if(h.isEmpty()){if(p&&v(h.end,p))break;var p=h.end}h.cursor=s?h.start:h.end,r.push(h)}a&&r.reverse();if(!n){var d=r.length-1;while(r[d].isEmpty()&&d>0)d--;if(d>0){var m=0;while(r[m].isEmpty())m++}for(var g=d;g>=m;g--)r[g].isEmpty()&&r.splice(g,1)}return r}}.call(s.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(!e.marker)return;this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length},this.removeSelectionMarkers=function(e){var t=this.session.$selectionMarkers;for(var n=e.length;n--;){var r=e[n];if(!r.marker)continue;this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){if(this.inMultiSelectMode)return;this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(f.keyboardHandler),this.commands.on("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onSingleSelect=function(e){if(this.session.multiSelect.inVirtualMode)return;this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeEventListener("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(!n.multiSelect)return;t.multiSelectAction?t.multiSelectAction=="forEach"?n.forEachSelection(t,e.args):t.multiSelectAction=="single"?(n.exitMultiSelectMode(),t.exec(n,e.args||{})):t.multiSelectAction(n,e.args||{}):(t.exec(n,e.args||{}),n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()),e.preventDefault()},this.forEachSelection=function(e,t){if(this.inVirtualSelectionMode)return;var n=this.session,r=this.selection,i=r.rangeList,o=r._eventRegistry;r._eventRegistry={};var u=new s(n);this.inVirtualSelectionMode=!0;for(var a=i.ranges.length;a--;)u.fromOrientedRange(i.ranges[a]),this.selection=n.selection=u,e.exec(this,t||{}),u.toOrientedRange(i.ranges[a]);u.detach(),this.selection=n.selection=r,this.inVirtualSelectionMode=!1,r._eventRegistry=o,r.mergeOverlappingRanges(),this.onCursorChange(),this.onSelectionChange()},this.exitMultiSelectMode=function(){if(this.inVirtualSelectionMode)return;this.multiSelect.toSingleRange()},this.getCopyText=function(){var e="";if(this.inMultiSelectMode){var t=this.multiSelect.rangeList.ranges;e=[];for(var n=0;n<t.length;n++)e.push(this.session.getTextRange(t[n]));e=e.join(this.session.getDocument().getNewLineCharacter())}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.onPaste=function(e){if(this.$readOnly)return;this._emit("paste",e);if(!this.inMultiSelectMode)return this.insert(e);var t=e.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(t.length>n.length||t.length<=2||!t[1])return this.commands.exec("insertstring",this,e);for(var r=n.length;r--;){var i=n[r];i.isEmpty()||this.session.remove(i),this.session.insert(i.start,t[r])}},this.findAll=function(e,t,n){t=t||{},t.needle=e||t.needle,this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var i=this.multiSelect;n||i.toSingleRange(r[0]);for(var s=r.length;s--;)i.addRange(r[s],!0);return this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,s=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(s.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(s.row+e,s.column);if(!n.isEmpty())var u=this.session.documentToScreenPosition(r?n.end:n.start),a=this.session.screenToDocumentPosition(u.row+e,u.column);else var a=o;if(r){var f=i.fromPoints(o,a);f.cursor=f.start}else{var f=i.fromPoints(a,o);f.cursor=f.end}f.desiredColumn=s.column;if(!this.selection.inMultiSelectMode)this.selection.addRange(n);else if(t)var l=n.cursor;this.selection.addRange(f),l&&this.selection.substractPoint(l)},this.transposeSelections=function(e){var t=this.session,n=t.multiSelect,r=n.ranges;for(var i=r.length;i--;){var s=r[i];if(s.isEmpty()){var o=t.getWordRange(s.start.row,s.start.column);s.start.row=o.start.row,s.start.column=o.start.column,s.end.row=o.end.row,s.end.column=o.end.column}}n.mergeOverlappingRanges();var u=[];for(var i=r.length;i--;){var s=r[i];u.unshift(t.getTextRange(s))}e<0?u.unshift(u.pop()):u.push(u.shift());for(var i=r.length;i--;){var s=r[i],o=s.clone();t.replace(s,u[i]),s.start.row=o.start.row,s.start.column=o.start.column}},this.selectMore=function(e,t){var n=this.session,r=n.multiSelect,i=r.toOrientedRange();if(i.isEmpty()){var i=n.getWordRange(i.start.row,i.start.column);i.cursor=i.end,this.multiSelect.addRange(i)}var s=n.getTextRange(i),o=h(n,s,e);o&&(o.cursor=e==-1?o.start:o.end,this.multiSelect.addRange(o)),t&&this.multiSelect.substractPoint(i.cursor)},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges;if(!n.length){var r=this.selection.getRange(),s=r.start.row,o=r.end.row,u=this.session.doc.removeLines(s,o);u=this.$reAlignText(u),this.session.doc.insertLines(s,u),r.start.column=0,r.end.column=u[u.length-1].length,this.selection.setRange(r)}else{var f=-1,l=n.filter(function(e){if(e.cursor.row==f)return!0;f=e.cursor.row});t.$onRemoveRange(l);var c=0,h=Infinity,p=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\S/g);return i==-1&&(i=0),n.column>c&&(c=n.column),i<h&&(h=i),i});n.forEach(function(t,n){var r=t.cursor,s=c-r.column,o=p[n]-h;s>o?e.insert(r,a.stringRepeat(" ",s-o)):e.remove(new i(r.row,r.column,r.row,r.column-s+o)),t.start.column=t.end.column=c,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e){function o(e,t){return Array(e+1).join(t)}function u(e){return e[2]?o(r," ")+e[2]+o(i-e[2].length+s," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function a(e){return e[2]?o(r+i-e[2].length," ")+e[2]+o(s," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function f(e){return e[2]?o(r," ")+e[2]+o(s," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var t=!0,n=!0,r,i,s;return e.map(function(e){var o=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return o?r==null?(r=o[1].length,i=o[2].length,s=o[3].length,o):(r+i+s!=o[1].length+o[2].length+o[3].length&&(n=!1),r!=o[1].length&&(t=!1),r>o[1].length&&(r=o[1].length),i<o[2].length&&(i=o[2].length),s>o[3].length&&(s=o[3].length),o):[e]}).map(t?n?a:u:f)}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t.multiSelect||(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t.multiSelect;var n=e.oldSession;n&&(n.multiSelect&&n.multiSelect.editor==this&&(n.multiSelect.editor=null),t.multiSelect.removeEventListener("addRange",this.$onAddRange),t.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),t.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),t.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m}),ace.define("ace/range_list",["require","exports","module"],function(e,t,n){var r=function(){this.ranges=[]};(function(){this.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},this.pointIndex=function(e,t){var n=this.ranges;for(var r=t||0;r<n.length;r++){var i=n[r],s=this.comparePoints(e,i.end);if(s>0)continue;return s==0?r:(s=this.comparePoints(e,i.start),s>=0?r:-r-1)}return-r-1},this.add=function(e){var t=this.pointIndex(e.start);t<0&&(t=-t-1);var n=this.pointIndex(e.end,t);return n<0?n=-n-1:n++,this.ranges.splice(t,n-t,e)},this.addList=function(e){var t=[];for(var n=e.length;n--;)t.push.call(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges,n=t[0],r;for(var i=1;i<t.length;i++){r=n,n=t[i];var s=this.comparePoints(r.end,n.start);if(s<0)continue;if(s==0&&!r.isEmpty()&&!n.isEmpty())continue;this.comparePoints(r.end,n.end)<0&&(r.end.row=n.end.row,r.end.column=n.end.column),t.splice(i,1),e.push(n),n=r,i--}return e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);var s=[];for(var o=r;o<i;o++)s.push(n[o]);return s},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){if(!this.session)return;this.session.removeListener("change",this.onChange),this.session=null},this.$onChange=function(e){var t=e.data.range;if(e.data.action[0]=="i")var n=t.start,r=t.end;else var r=t.start,n=t.end;var i=n.row,s=r.row,o=s-i,u=-n.column+r.column,a=this.ranges;for(var f=0,l=a.length;f<l;f++){var c=a[f];if(c.end.row<i)continue;if(c.start.row>i)break;c.start.row==i&&c.start.column>=n.column&&(c.start.column+=u,c.start.row+=o),c.end.row==i&&c.end.column>=n.column&&(c.end.column+=u,c.end.row+=o)}if(o!=0&&f<l)for(;f<l;f++){var c=a[f];c.start.row+=o,c.end.row+=o}}}).call(r.prototype),t.RangeList=r}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event"],function(e,t,n){function i(e,t){return e.row==t.row&&e.column==t.column}function s(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,o=e.getAccelKey(),u=e.getButton();if(e.editor.inMultiSelectMode&&u==2){e.editor.textInput.onContextMenu(e.domEvent);return}if(!o&&!n){u==0&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode();return}var a=e.editor,f=a.selection,l=a.inMultiSelectMode,c=e.getDocumentPosition(),h=f.getCursor(),p=e.inSelection()||f.isEmpty()&&i(c,h),d=e.x,v=e.y,m=function(e){d=e.clientX,v=e.clientY},g=function(){var e=a.renderer.pixelToScreenCoordinates(d,v),t=y.screenToDocumentPosition(e.row,e.column);if(i(w,e)&&i(t,f.selectionLead))return;w=e,a.selection.moveCursorToPosition(t),a.selection.clearSelection(),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(x),x=f.rectangularRangeBlock(w,b),x.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers()},y=a.session,b=a.renderer.pixelToScreenCoordinates(d,v),w=b;if(o&&!s&&!n&&u==0){if(!l&&p)return;if(!l){var E=f.toOrientedRange();a.addSelectionMarker(E)}var S=f.rangeList.rangeAtPoint(c);r.capture(a.container,function(){},function(){var e=f.toOrientedRange();S&&e.isEmpty()&&i(S.cursor,e.cursor)?f.substractPoint(e.cursor):(E&&(a.removeSelectionMarker(E),f.addRange(E)),f.addRange(e))})}else if(!s&&n&&u==0){e.stop(),l&&!o?f.toSingleRange():!l&&o&&f.addRange(),f.moveCursorToPosition(c),f.clearSelection();var x=[],T=function(e){clearInterval(C),a.removeSelectionMarkers(x);for(var t=0;t<x.length;t++)f.addRange(x[t])},N=g;r.capture(a.container,m,T);var C=setInterval(function(){N()},20);return e.preventDefault()}}var r=e("../lib/event");t.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},readonly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/config"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/event_emitter").EventEmitter,s=e("../config"),o=function(t,n,r){this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this);var i;if(s.get("packaged"))i=s.moduleUrl(n,"worker");else{var o=this.$normalizePath;typeof e.supports!="undefined"&&e.supports.indexOf("ucjs2-pinf-0")>=0?i=e.nameToUrl("ace/worker/worker_sourcemint"):(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),i=o(e.toUrl("ace/worker/worker",null,"_")));var u={};t.forEach(function(t){u[t]=o(e.toUrl(t,null,"_").replace(/.js(\?.*)?$/,""))})}this.$worker=new Worker(i),this.$worker.postMessage({init:!0,tlns:u,module:n,classname:r}),this.callbackId=1,this.callbacks={},this.$worker.onerror=this.onError,this.$worker.onmessage=this.onMessage};(function(){r.implement(this,i),this.onError=function(e){throw window.console&&console.log&&console.log(e),e},this.onMessage=function(e){var t=e.data;switch(t.type){case"log":window.console&&console.log&&console.log.apply(console,t.data);break;case"event":this._emit(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id])}},this.$normalizePath=function(e){return location.host?(e=e.replace(/^[a-z]+:\/\/[^\/]+/,""),e=location.protocol+"//"+location.host+(e.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+e.replace(/^[\/]+/,""),e):e},this.terminate=function(){this._emit("terminate",{}),this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){e.range={start:e.data.range.start,end:e.data.range.end},this.emit("change",e)}}).call(o.prototype);var u=function(t,n,r){this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var s=null,o=Object.create(i),u=this;this.$worker={},this.$worker.postMessage=function(e){u.messageBuffer.push(e),s&&setTimeout(a)};var a=function(){var e=u.messageBuffer.shift();e.command?s[e.command].apply(s,e.args):e.event&&o._emit(e.event,e.data)};o.postMessage=function(e){u.onMessage({data:e})},o.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},o.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},e([n],function(e){s=new e[r](o);while(u.messageBuffer.length)a()})};u.prototype=o.prototype,t.UIWorkerClient=u,t.WorkerClient=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),o=function(e,t,n,r,i,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var u=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session,i=this.$pos;this.pos=t.createAnchor(i.row,i.column),this.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){n.removeMarker(e.markerId),e.markerId=n.addMarker(new r(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);e.others.push(r)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(this.othersActive)return;var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1),n.on("change",function(i){e.removeMarker(n.markerId),n.markerId=e.addMarker(new r(i.value.row,i.value.column,i.value.row,i.value.column+t.length),t.othersClass,null,!1)})})},this.hideOtherMarkers=function(){if(!this.othersActive)return;this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)},this.onUpdate=function(e){var t=e.data,n=t.range;if(n.start.row!==n.end.row)return;if(n.start.row!==this.pos.row)return;if(this.$updating)return;this.$updating=!0;var i=t.action==="insertText"?n.end.column-n.start.column:n.start.column-n.end.column;if(n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1){var s=n.start.column-this.pos.column;this.length+=i;if(!this.session.$fromUndo){if(t.action==="insertText")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.insert(a,t.text)}else if(t.action==="removeText")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.remove(new r(a.row,a.column,a.row,a.column-i))}n.start.column===this.pos.column&&t.action==="insertText"?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-i);for(var e=0;e<this.others.length;e++){var t=this.others[e],r={row:t.row,column:t.column-i};t.row===n.start.row&&n.start.column<t.column&&(r.column+=i),t.setPosition(r.row,r.column)}}.bind(this),0):n.start.column===this.pos.column&&t.action==="removeText"&&setTimeout(function(){for(var e=0;e<this.others.length;e++){var t=this.others[e];t.row===n.start.row&&n.start.column<t.column&&t.setPosition(t.row,t.column-i)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var o=0;o<this.others.length;o++)this.others[o]._emit("change",{value:this.others[o]})}this.$updating=!1},this.onCursorChange=function(e){if(this.$updating)return;var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;e<this.others.length;e++)this.others[e].detach();this.session.setUndoSelect(!0)},this.cancel=function(){if(this.$undoStackDepth===-1)throw Error("Canceling placeholders only supported with undo manager attached to session.");var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth;for(var n=0;n<t;n++)e.undo(!0)}}).call(o.prototype),t.PlaceHolder=o}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":t=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),o=s.search(i);if(o==-1)return;var u=n||s.length,a=e.getLength(),f=t,l=t;while(++t<a){var c=e.getLine(t).search(i);if(c==-1)continue;if(c<=o)break;l=t}if(l>f){var h=e.getLine(l).length;return new r(f,u,l,h)}},this.openingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i+1},u=e.$findClosingBracket(t,o,s);if(!u)return;var a=e.foldWidgets[u.row];return a==null&&(a=this.getFoldWidget(e,u.row)),a=="start"&&u.row>o.row&&(u.row--,u.column=e.getLine(u.row).length),r.fromPoints(o,u)},this.closingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i},u=e.$findOpeningBracket(t,o);if(!u)return;return u.column++,o.column--,r.fromPoints(u,o)}}).call(i.prototype)});
2
+ (function() {
3
+ ace.require(["ace/ace"], function(a) {
4
+ a && a.config.init();
5
+ if (!window.ace)
6
+ window.ace = {};
7
+ for (var key in a) if (a.hasOwnProperty(key))
8
+ ace[key] = a[key];
9
+ });
10
+ })();
11
+
ace-0.2.0/src-min-noconflict/ext-static_highlight.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text"],function(e,t,n){var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_editor {font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace;font-size: 12px;}.ace_editor .ace_gutter { width: 25px !important;display: block;float: left;text-align: right; padding: 0 3px 0 0; margin-right: 3px;}.ace_line { clear: both; }*.ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}";t.render=function(e,t,n,o,u){o=parseInt(o||1,10);var a=new r("");a.setMode(t),a.setUseWorker(!1);var f=new i(document.createElement("div"));f.setSession(a),f.config={characterWidth:10,lineHeight:20},a.setValue(e);var l=[],c=a.getLength();for(var h=0;h<c;h++)l.push("<div class='ace_line'>"),u||l.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>"+(h+o)+"</span>"),f.$renderLine(l,h,!0,!1),l.push("</div>");var p="<div class=':cssClass'> <div class='ace_editor ace_scroller ace_text-layer'> :code </div> </div>".replace(/:cssClass/,n.cssClass).replace(/:code/,l.join(""));return f.destroy(),{css:s+n.cssText,html:p}}})
ace-0.2.0/src-min-noconflict/ext-textarea.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate","ace/mode/text"],function(e,t,n){function a(e,t){for(var n in t)e.style[n]=t[n]}function f(e,t){if(e.type!="textarea")throw"Textarea required!";var n=e.parentNode,i=document.createElement("div"),s=function(){var t="position:relative;";["margin-top","margin-left","margin-right","margin-bottom"].forEach(function(n){t+=n+":"+u(e,i,n)+";"});var n=u(e,i,"width")||e.clientWidth+"px",r=u(e,i,"height")||e.clientHeight+"px";t+="height:"+r+";width:"+n+";",t+="display:inline-block;",i.setAttribute("style",t)};r.addListener(window,"resize",s),s(),e.nextSibling?n.insertBefore(i,e.nextSibling):n.appendChild(i);while(n!==document){if(n.tagName.toUpperCase()==="FORM"){var o=n.onsubmit;n.onsubmit=function(n){e.innerHTML=t(),e.value=t(),o&&o.call(this,n)};break}n=n.parentNode}return i}function l(t,n,r){s.loadScript(t,function(){e([n],r)})}function c(n,r,i,s,o,u){function c(e){return e=="true"}var a=n.getSession(),f=n.renderer;u=u||l,n.setDisplaySettings=function(e){e==null&&(e=i.style.display=="none"),i.style.display=e?"block":"none"},n.setOption=function(t,i){if(o[t]==i)return;switch(t){case"gutter":f.setShowGutter(c(i));break;case"mode":i!="text"?u("mode-"+i+".js","ace/mode/"+i,function(){var t=e("../mode/"+i).Mode;a.setMode(new t)}):a.setMode(new(e("../mode/text").Mode));break;case"theme":i!="textmate"?u("theme-"+i+".js","ace/theme/"+i,function(){n.setTheme("ace/theme/"+i)}):n.setTheme("ace/theme/textmate");break;case"fontSize":r.style.fontSize=i;break;case"softWrap":switch(i){case"off":a.setUseWrapMode(!1),f.setPrintMarginColumn(80);break;case"40":a.setUseWrapMode(!0),a.setWrapLimitRange(40,40),f.setPrintMarginColumn(40);break;case"80":a.setUseWrapMode(!0),a.setWrapLimitRange(80,80),f.setPrintMarginColumn(80);break;case"free":a.setUseWrapMode(!0),a.setWrapLimitRange(null,null),f.setPrintMarginColumn(80)}break;case"useSoftTabs":a.setUseSoftTabs(c(i));break;case"showPrintMargin":f.setShowPrintMargin(c(i));break;case"showInvisibles":n.setShowInvisibles(c(i))}o[t]=i},n.getOption=function(e){return o[e]},n.getOptions=function(){return o};for(var h in t.options)n.setOption(h,t.options[h]);return n}function h(e,t,n,i){function f(e,t,n,r){e.push("<select title='"+t+"'>");for(var i in n)e.push("<option value='"+i+"' "),r==i&&e.push(" selected "),e.push(">",n[i],"</option>");e.push("</select>")}var s={"true":!0,"false":!1},o={mode:"Mode:",gutter:"Display Gutter:",theme:"Theme:",fontSize:"Font Size:",softWrap:"Soft Wrap:",showPrintMargin:"Show Print Margin:",useSoftTabs:"Use Soft Tabs:",showInvisibles:"Show Invisibles"},u={mode:{text:"Plain",javascript:"JavaScript",xml:"XML",html:"HTML",css:"CSS",scss:"SCSS",python:"Python",php:"PHP",java:"Java",ruby:"Ruby",c_cpp:"C/C++",coffee:"CoffeeScript",json:"json",perl:"Perl",clojure:"Clojure",ocaml:"OCaml",csharp:"C#",haxe:"haXe",svg:"SVG",textile:"Textile",groovy:"Groovy",liquid:"Liquid",Scala:"Scala"},theme:{clouds:"Clouds",clouds_midnight:"Clouds Midnight",cobalt:"Cobalt",crimson_editor:"Crimson Editor",dawn:"Dawn",eclipse:"Eclipse",idle_fingers:"Idle Fingers",kr_theme:"Kr Theme",merbivore:"Merbivore",merbivore_soft:"Merbivore Soft",mono_industrial:"Mono Industrial",monokai:"Monokai",pastel_on_dark:"Pastel On Dark",solarized_dark:"Solarized Dark",solarized_light:"Solarized Light",textmate:"Textmate",twilight:"Twilight",vibrant_ink:"Vibrant Ink"},gutter:s,fontSize:{"10px":"10px","11px":"11px","12px":"12px","14px":"14px","16px":"16px"},softWrap:{off:"Off",40:"40",80:"80",free:"Free"},showPrintMargin:s,useSoftTabs:s,showInvisibles:s},a=[];a.push("<table><tr><th>Setting</th><th>Value</th></tr>");for(var l in i)a.push("<tr><td>",o[l],"</td>"),a.push("<td>"),f(a,l,u[l],i[l]),a.push("</td></tr>");a.push("</table>"),e.innerHTML=a.join("");var c=e.getElementsByTagName("select");for(var h=0;h<c.length;h++){var p=function(){var e=c[h];return function(){var t=e.title,r=e.value;n.setOption(t,r)}}();c[h].onchange=p}var d=document.createElement("input");d.type="button",d.value="Hide",r.addListener(d,"click",function(){n.setDisplaySettings(!1)}),e.appendChild(d)}var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/net"),o=e("../ace");e("../theme/textmate"),n.exports=t=o;var u=function(e,t,n){var r=e.style[n];r||(window.getComputedStyle?r=window.getComputedStyle(e,"").getPropertyValue(n):r=e.currentStyle[n]);if(!r||r=="auto"||r=="intrinsic")r=t.style[n];return r};t.transformTextarea=function(e,t){var n,s=f(e,function(){return n.getValue()});e.style.display="none",s.style.background="white";var u=document.createElement("div");a(u,{top:"0px",left:"0px",right:"0px",bottom:"0px",border:"1px solid gray"}),s.appendChild(u);var l=document.createElement("div");a(l,{position:"absolute",right:"0px",bottom:"0px",background:"red",cursor:"nw-resize",borderStyle:"solid",borderWidth:"9px 8px 10px 9px",width:"2px",borderColor:"lightblue gray gray lightblue",zIndex:101});var p=document.createElement("div"),d={top:"0px",left:"0px",right:"0px",bottom:"0px",position:"absolute",padding:"5px",zIndex:100,color:"white",display:"none",overflow:"auto",fontSize:"14px"};i.isOldIE?d.backgroundColor="#333":d.backgroundColor="rgba(0, 0, 0, 0.6)",a(p,d),s.appendChild(p);var v={},m=o.edit(u);n=m.getSession(),n.setValue(e.value||e.innerHTML),m.focus(),u.appendChild(l),c(m,u,p,o,v,t),h(p,l,m,v);var g="";return r.addListener(l,"mousemove",function(e){var t=this.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;n+r<(t.width+t.height)/2?(this.style.cursor="pointer",g="toggle"):(g="resize",this.style.cursor="nw-resize")}),r.addListener(l,"mousedown",function(e){if(g=="toggle"){m.setDisplaySettings();return}s.style.zIndex=1e5;var t=s.getBoundingClientRect(),n=t.width+t.left-e.clientX,i=t.height+t.top-e.clientY;r.capture(l,function(e){s.style.width=e.clientX-t.left+n+"px",s.style.height=e.clientY-t.top+i+"px",m.resize()},function(){})}),m},t.options={mode:"text",theme:"textmate",gutter:"false",fontSize:"12px",softWrap:"off",showPrintMargin:"false",useSoftTabs:"true",showInvisibles:"true"}}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm .ace_scroller {background-color: #FFFFFF;}.ace-tm .ace_cursor {border-left: 2px solid black;}.ace-tm .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_markup.ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)})
ace-0.2.0/src-min-noconflict/keybinding-emacs.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){var r=e("../lib/dom"),i=function(e,t){var n=this.scroller.getBoundingClientRect(),i=Math.floor((e+this.scrollLeft-n.left-this.$padding-r.getPageScrollLeft())/this.characterWidth),s=Math.floor((t+this.scrollTop-n.top-r.getPageScrollTop())/this.lineHeight);return this.session.screenToDocumentPosition(s,i)},s=e("./hash_handler").HashHandler;t.handler=new s;var o=!1;t.handler.attach=function(e){o||(o=!0,r.importCssString(" .emacs-mode .ace_cursor{ border: 2px rgba(50,250,50,0.8) solid!important; -moz-box-sizing: border-box!important; -webkit-box-sizing: border-box!important; box-sizing: border-box!important; background-color: rgba(0,250,0,0.9); opacity: 0.5; } .emacs-mode .ace_cursor.ace_hidden{ opacity: 1; background-color: transparent; } .emacs-mode .ace_overwrite-cursors .ace_cursor { opacity: 1; background-color: transparent; border-width: 0 0 2px 2px !important; } .emacs-mode .ace_text-layer { z-index: 4 } .emacs-mode .ace_cursor-layer { z-index: 2 }","emacsMode")),e.renderer.screenToTextCoordinates=i,e.setStyle("emacs-mode")},t.handler.detach=function(e){delete e.renderer.screenToTextCoordinates,e.unsetStyle("emacs-mode")};var u=e("../lib/keys").KEY_MODS,a={C:"ctrl",S:"shift",M:"alt"};["S-C-M","S-C","S-M","C-M","S","C","M"].forEach(function(e){var t=0;e.split("-").forEach(function(e){t|=u[a[e]]}),a[t]=e.toLowerCase()+"-"}),t.handler.bindKey=function(e,t){if(!e)return;var n=this.commmandKeyBinding;e.split("|").forEach(function(e){e=e.toLowerCase(),n[e]=t,e=e.split(" ")[0],n[e]||(n[e]="null")},this)},t.handler.handleKeyboard=function(e,t,n,r){if(t==-1&&e.count){var i=Array(e.count+1).join(n);return e.count=null,{command:"insertstring",args:i}}if(n=="\0")return;var s=a[t];if(s=="c-"||e.universalArgument){var o=parseInt(n[n.length-1]);if(o)return e.count=o,{command:"null"}}e.universalArgument=!1,s&&(n=s+n),e.keyChain&&(n=e.keyChain+=" "+n);var u=this.commmandKeyBinding[n];e.keyChain=u=="null"?n:"";if(!u)return;if(u=="null")return{command:"null"};if(u=="universalArgument")return e.universalArgument=!0,{command:"null"};if(typeof u!="string"){var f=u.args;u=u.command}typeof u=="string"&&(u=this.commands[u]||e.editor.commands.commands[u]),!u.readonly&&!u.isYank&&(e.lastCommand=null);if(e.count){var o=e.count;return e.count=0,{args:f,command:{exec:function(e,t){for(var n=0;n<o;n++)u.exec(e,t)}}}}return{command:u,args:f}},t.emacsKeys={"Up|C-p":"golineup","Down|C-n":"golinedown","Left|C-b":"gotoleft","Right|C-f":"gotoright","C-Left|M-b":"gotowordleft","C-Right|M-f":"gotowordright","Home|C-a":"gotolinestart","End|C-e":"gotolineend","C-Home|S-M-,":"gotostart","C-End|S-M-.":"gotoend","S-Up|S-C-p":"selectup","S-Down|S-C-n":"selectdown","S-Left|S-C-b":"selectleft","S-Right|S-C-f":"selectright","S-C-Left|S-M-b":"selectwordleft","S-C-Right|S-M-f":"selectwordright","S-Home|S-C-a":"selecttolinestart","S-End|S-C-e":"selecttolineend","S-C-Home":"selecttostart","S-C-End":"selecttoend","C-l":"recenterTopBottom","M-s":"centerselection","M-g":"gotoline","C-x C-p":"selectall","C-Down":"gotopagedown","C-Up":"gotopageup","PageDown|C-v":"gotopagedown","PageUp|M-v":"gotopageup","S-C-Down":"selectpagedown","S-C-Up":"selectpageup","C-s":"findnext","C-r":"findprevious","M-C-s":"findnext","M-C-r":"findprevious","S-M-5":"replace",Backspace:"backspace","Delete|C-d":"del","Return|C-m":{command:"insertstring",args:"\n"},"C-o":"splitline","M-d|C-Delete":{command:"killWord",args:"right"},"C-Backspace|M-Backspace|M-Delete":{command:"killWord",args:"left"},"C-k":"killLine","C-y|S-Delete":"yank","M-y":"yankRotate","C-g":"keyboardQuit","C-w":"killRegion","M-w":"killRingSave","C-Space":"setMark","C-x C-x":"exchangePointAndMark","C-t":"transposeletters","M-u":"touppercase","M-l":"tolowercase","M-/":"autocomplete","C-u":"universalArgument","M-;":"togglecomment","C-/|C-x u|S-C--|C-z":"undo","S-C-/|S-C-x u|C--|S-C-z":"redo","C-x r":"selectRectangularRegion"},t.handler.bindKeys(t.emacsKeys),t.handler.addCommands({recenterTopBottom:function(e){var t=e.renderer,n=t.$cursorLayer.getPixelPosition(),r=t.$size.scrollerHeight-t.lineHeight,i=t.scrollTop;Math.abs(n.top-i)<2?i=n.top-r:Math.abs(n.top-i-r*.5)<2?i=n.top:i=n.top-r*.5,e.session.setScrollTop(i)},selectRectangularRegion:function(e){e.multiSelect.toggleBlockSelection()},setMark:function(){},exchangePointAndMark:{exec:function(e){var t=e.selection.getRange();e.selection.setSelectionRange(t,!e.selection.isBackwards())},readonly:!0,multiselectAction:"forEach"},killWord:{exec:function(e,n){e.clearSelection(),n=="left"?e.selection.selectWordLeft():e.selection.selectWordRight();var r=e.getSelectionRange(),i=e.session.getTextRange(r);t.killRing.add(i),e.session.remove(r),e.clearSelection()},multiselectAction:"forEach"},killLine:function(e){e.selection.selectLine();var n=e.getSelectionRange(),r=e.session.getTextRange(n);t.killRing.add(r),e.session.remove(n),e.clearSelection()},yank:function(e){e.onPaste(t.killRing.get()),e.keyBinding.$data.lastCommand="yank"},yankRotate:function(e){if(e.keyBinding.$data.lastCommand!="yank")return;e.undo(),e.onPaste(t.killRing.rotate()),e.keyBinding.$data.lastCommand="yank"},killRegion:function(e){t.killRing.add(e.getCopyText()),e.commands.byName.cut.exec(e)},killRingSave:function(e){t.killRing.add(e.getCopyText())}});var f=t.handler.commands;f.yank.isYank=!0,f.yankRotate.isYank=!0,t.killRing={$data:[],add:function(e){e&&this.$data.push(e),this.$data.length>30&&this.$data.shift()},get:function(){return this.$data[this.$data.length-1]||""},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}})
ace-0.2.0/src-min-noconflict/keybinding-vim.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/keyboard/vim",["require","exports","module","ace/keyboard/vim/commands","ace/keyboard/vim/maps/util","ace/lib/useragent"],function(e,t,n){var r=e("./vim/commands"),i=r.coreCommands,s=e("./vim/maps/util"),o=e("../lib/useragent"),u={i:{command:i.start},I:{command:i.startBeginning},a:{command:i.append},A:{command:i.appendEnd},"ctrl-f":{command:"gotopagedown"},"ctrl-b":{command:"gotopageup"}};t.handler={handleMacRepeat:function(e,t,n){if(t==-1)e.inputChar=n,e.lastEvent="input";else if(e.inputChar&&e.$lastHash==t&&e.$lastKey==n){if(e.lastEvent=="input")e.lastEvent="input1";else if(e.lastEvent=="input1")return!0}else e.$lastHash=t,e.$lastKey=n,e.lastEvent="keypress"},handleKeyboard:function(e,t,n,s,a){if(t!=0&&(n==""||n=="\0"))return null;t==1&&(n="ctrl-"+n);if(n=="esc"&&t==0||n=="ctrl-[")return{command:i.stop};if(e.state=="start"){o.isMac&&this.handleMacRepeat(e,t,n)&&(t=-1,n=e.inputChar);if(t==-1||t==1)return r.inputBuffer.idle&&u[n]?u[n]:{command:{exec:function(e){r.inputBuffer.push(e,n)}}};if(n.length==1&&(t==0||t==4))return{command:"null",passEvent:!0};if(n=="esc"&&t==0)return{command:i.stop}}else if(n=="ctrl-w")return{command:"removewordleft"}},attach:function(e){e.on("click",t.onCursorMove),s.currentMode!=="insert"&&r.coreCommands.stop.exec(e),e.$vimModeHandler=this},detach:function(e){e.removeListener("click",t.onCursorMove),s.noMode(e),s.currentMode="normal"},actions:r.actions,getStatusText:function(){return s.currentMode=="insert"?"INSERT":s.onVisualMode?(s.onVisualLineMode?"VISUAL LINE ":"VISUAL ")+r.inputBuffer.status:r.inputBuffer.status}},t.onCursorMove=function(e){r.onCursorMove(e.editor,e),t.onCursorMove.scheduled=!1}}),ace.define("ace/keyboard/vim/commands",["require","exports","module","ace/keyboard/vim/maps/util","ace/keyboard/vim/maps/motions","ace/keyboard/vim/maps/operators","ace/keyboard/vim/maps/aliases","ace/keyboard/vim/registers"],function(e,t,n){"never use strict";function g(e){m.previous={action:{action:{fn:e}}}}var r=e("./maps/util"),i=e("./maps/motions"),s=e("./maps/operators"),o=e("./maps/aliases"),u=e("./registers"),a=1,f=2,l=3,c=4,h=8,p=function(t,n,r){while(0<n--)t.apply(this,r)},d=function(e){var t=e.renderer,n=t.$cursorLayer.getPixelPosition(),r=n.top,i=h*t.layerConfig.lineHeight;2*i>t.$size.scrollerHeight&&(i=t.$size.scrollerHeight/2),t.scrollTop>r-i&&t.session.setScrollTop(r-i),t.scrollTop+t.$size.scrollerHeight<r+i+t.lineHeight&&t.session.setScrollTop(r+i+t.lineHeight-t.$size.scrollerHeight)},v=t.actions={z:{param:!0,fn:function(e,t,n,r){switch(r){case"z":e.renderer.alignCursor(null,.5);break;case"t":e.renderer.alignCursor(null,0);break;case"b":e.renderer.alignCursor(null,1)}}},r:{param:!0,fn:function(e,t,n,r){r&&r.length&&(p(function(){e.insert(r)},n||1),e.navigateLeft())}},R:{fn:function(e,t,n,i){r.insertMode(e),e.setOverwrite(!0)}},"~":{fn:function(e,t,n){p(function(){var t=e.selection.getRange();t.isEmpty()&&t.end.column++;var n=e.session.getTextRange(t),r=n.toUpperCase();r==n?e.navigateRight():e.session.replace(t,r)},n||1)}},"*":{fn:function(e,t,n,r){e.selection.selectWord(),e.findNext(),d(e);var i=e.selection.getRange();e.selection.setSelectionRange(i,!0)}},"#":{fn:function(e,t,n,r){e.selection.selectWord(),e.findPrevious(),d(e);var i=e.selection.getRange();e.selection.setSelectionRange(i,!0)}},n:{fn:function(e,t,n,r){var i=e.getLastSearchOptions();i.backwards=!1,e.selection.moveCursorRight(),e.selection.clearSelection(),e.findNext(i),d(e);var s=e.selection.getRange();s.end.row=s.start.row,s.end.column=s.start.column,e.selection.setSelectionRange(s,!0)}},N:{fn:function(e,t,n,r){var i=e.getLastSearchOptions();i.backwards=!0,e.findPrevious(i),d(e);var s=e.selection.getRange();s.end.row=s.start.row,s.end.column=s.start.column,e.selection.setSelectionRange(s,!0)}},v:{fn:function(e,t,n,i){e.selection.selectRight(),r.visualMode(e,!1)},acceptsMotion:!0},V:{fn:function(e,t,n,i){var s=e.getCursorPosition().row;e.selection.clearSelection(),e.selection.moveCursorTo(s,0),e.selection.selectLineEnd(),e.selection.visualLineStart=s,r.visualMode(e,!0)},acceptsMotion:!0},Y:{fn:function(e,t,n,i){r.copyLine(e)}},p:{fn:function(e,t,n,r){var i=u._default;e.setOverwrite(!1);if(i.isLine){var s=e.getCursorPosition(),o=i.text.split("\n");e.session.getDocument().insertLines(s.row+1,o),e.moveCursorTo(s.row+1,0)}else e.navigateRight(),e.insert(i.text),e.navigateLeft();e.setOverwrite(!0),e.selection.clearSelection()}},P:{fn:function(e,t,n,r){var i=u._default;e.setOverwrite(!1);if(i.isLine){var s=e.getCursorPosition(),o=i.text.split("\n");e.session.getDocument().insertLines(s.row,o),e.moveCursorTo(s.row,0)}else e.insert(i.text);e.setOverwrite(!0),e.selection.clearSelection()}},J:{fn:function(e,t,n,r){var i=e.session;t=e.getSelectionRange();var s={row:t.start.row,column:t.start.column};n=n||t.end.row-t.start.row;var o=Math.min(s.row+(n||1),i.getLength()-1);t.start.column=i.getLine(s.row).length,t.end.column=i.getLine(o).length,t.end.row=o;var u="";for(var a=s.row;a<o;a++){var f=i.getLine(a+1);u+=" "+/^\s*(.*)$/.exec(f)[1]||""}i.replace(t,u),e.moveCursorTo(s.row,s.column)}},u:{fn:function(e,t,n,r){n=parseInt(n||1,10);for(var i=0;i<n;i++)e.undo();e.selection.clearSelection()}},"ctrl-r":{fn:function(e,t,n,r){n=parseInt(n||1,10);for(var i=0;i<n;i++)e.redo();e.selection.clearSelection()}},":":{fn:function(e,t,n,r){}},"/":{fn:function(e,t,n,r){}},"?":{fn:function(e,t,n,r){}},".":{fn:function(e,t,n,i){r.onInsertReplaySequence=m.lastInsertCommands;var s=m.previous;s&&m.exec(e,s.action,s.param)}}},m=t.inputBuffer={accepting:[a,f,l,c],currentCmd:null,currentCount:"",status:"",operator:null,motion:null,lastInsertCommands:[],push:function(e,t,n){this.idle=!1;var r=this.waitingForParam;if(r)this.exec(e,r,t);else if(t==="0"&&!this.currentCount.length||!t.match(/^\d+$/)||!this.isAccepting(a))if(!this.operator&&this.isAccepting(f)&&s[t])this.operator={ch:t,count:this.getCount()},this.currentCmd=f,this.accepting=[a,l,c],this.exec(e,{operator:this.operator});else if(i[t]&&this.isAccepting(l)){this.currentCmd=l;var u={operator:this.operator,motion:{ch:t,count:this.getCount()}};i[t].param?this.waitForParam(u):this.exec(e,u)}else if(o[t]&&this.isAccepting(l))o[t].operator.count=this.getCount(),this.exec(e,o[t]);else if(v[t]&&this.isAccepting(c)){var h={action:{fn:v[t].fn,count:this.getCount()}};v[t].param?this.waitForParam(h):this.exec(e,h),v[t].acceptsMotion&&(this.idle=!1)}else this.operator?this.exec(e,{operator:this.operator},t):this.reset();else this.currentCount+=t,this.currentCmd=a,this.accepting=[a,f,l,c];if(this.waitingForParam||this.motion||this.operator)this.status+=t;else if(this.currentCount)this.status=this.currentCount;else{if(!this.status)return;this.status=""}e._emit("changeStatus")},waitForParam:function(e){this.waitingForParam=e},getCount:function(){var e=this.currentCount;return this.currentCount="",e&&parseInt(e,10)},exec:function(e,t,n){var o=t.motion,u=t.operator,a=t.action;n||(n=t.param),u&&(this.previous={action:t,param:n});if(u&&!e.selection.isEmpty()){s[u.ch].selFn&&(s[u.ch].selFn(e,e.getSelectionRange(),u.count,n),this.reset());return}if(!o&&!a&&u&&n)s[u.ch].fn(e,null,u.count,n),this.reset();else if(o){var f=function(t){t&&typeof t=="function"&&(o.count&&!l.handlesCount?p(t,o.count,[e,null,o.count,n]):t(e,null,o.count,n))},l=i[o.ch],c=l.sel;u?c&&p(function(){f(l.sel),s[u.ch].fn(e,e.getSelectionRange(),u.count,n)},u.count||1):(r.onVisualMode||r.onVisualLineMode)&&c?f(l.sel):f(l.nav),this.reset()}else a&&(a.fn(e,e.getSelectionRange(),a.count,n),this.reset());y(e)},isAccepting:function(e){return this.accepting.indexOf(e)!==-1},reset:function(){this.operator=null,this.motion=null,this.currentCount="",this.status="",this.accepting=[a,f,l,c],this.idle=!0,this.waitingForParam=null}};t.coreCommands={start:{exec:function b(e){r.insertMode(e),g(b)}},startBeginning:{exec:function w(e){e.navigateLineStart(),r.insertMode(e),g(w)}},stop:{exec:function(t){m.reset(),r.onVisualMode=!1,r.onVisualLineMode=!1,m.lastInsertCommands=r.normalMode(t)}},append:{exec:function E(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row).length;n&&e.navigateRight(),r.insertMode(e),g(E)}},appendEnd:{exec:function S(e){e.navigateLineEnd(),r.insertMode(e),g(S)}}};var y=t.onCursorMove=function(e,t){if(r.currentMode==="insert"||y.running)return;if(!e.selection.isEmpty()){y.running=!0;if(r.onVisualLineMode){var n=e.selection.visualLineStart,i=e.getCursorPosition().row;if(n<=i){var s=e.session.getLine(i);e.selection.clearSelection(),e.selection.moveCursorTo(n,0),e.selection.selectTo(i,s.length)}else{var s=e.session.getLine(n);e.selection.clearSelection(),e.selection.moveCursorTo(n,s.length),e.selection.selectTo(i,0)}}y.running=!1;return}t&&(r.onVisualLineMode||r.onVisualMode)&&(e.selection.clearSelection(),r.normalMode(e)),y.running=!0;var o=e.getCursorPosition(),u=e.session.getLine(o.row).length;u&&o.column===u&&e.navigateLeft(),y.running=!1}}),ace.define("ace/keyboard/vim/maps/util",["require","exports","module","ace/keyboard/vim/registers","ace/lib/dom"],function(e,t,n){var r=e("../registers"),i=e("../../../lib/dom");i.importCssString(".insert-mode .ace_cursor{ border-left: 2px solid #333333;}.ace_dark.insert-mode .ace_cursor{ border-left: 2px solid #eeeeee;}.normal-mode .ace_cursor{ border: 0!important; background-color: red; opacity: 0.5;}","vimMode"),n.exports={onVisualMode:!1,onVisualLineMode:!1,currentMode:"normal",noMode:function(e){e.unsetStyle("insert-mode"),e.unsetStyle("normal-mode"),e.commands.recording&&e.commands.toggleRecording(e),e.setOverwrite(!1)},insertMode:function(e){this.currentMode="insert",e.setStyle("insert-mode"),e.unsetStyle("normal-mode"),e.setOverwrite(!1),e.keyBinding.$data.buffer="",e.keyBinding.$data.state="insertMode",this.onVisualMode=!1,this.onVisualLineMode=!1,this.onInsertReplaySequence?(e.commands.macro=this.onInsertReplaySequence,e.commands.replay(e),this.onInsertReplaySequence=null,this.normalMode(e)):(e._emit("changeStatus"),e.commands.recording||e.commands.toggleRecording(e))},normalMode:function(e){this.currentMode="normal",e.unsetStyle("insert-mode"),e.setStyle("normal-mode"),e.clearSelection();var t;return e.getOverwrite()||(t=e.getCursorPosition(),t.column>0&&e.navigateLeft()),e.setOverwrite(!0),e.keyBinding.$data.buffer="",e.keyBinding.$data.state="start",this.onVisualMode=!1,this.onVisualLineMode=!1,e._emit("changeStatus"),e.commands.recording?(e.commands.toggleRecording(e),e.commands.macro):[]},visualMode:function(e,t){if(this.onVisualLineMode&&t||this.onVisualMode&&!t){this.normalMode(e);return}e.setStyle("insert-mode"),e.unsetStyle("normal-mode"),e._emit("changeStatus"),t?this.onVisualLineMode=!0:(this.onVisualMode=!0,this.onVisualLineMode=!1)},getRightNthChar:function(e,t,n,r){var i=e.getSession().getLine(t.row),s=i.substr(t.column+1).split(n);return r<s.length?s.slice(0,r).join(n).length:null},getLeftNthChar:function(e,t,n,r){var i=e.getSession().getLine(t.row),s=i.substr(0,t.column).split(n);return r<s.length?s.slice(-1*r).join(n).length:null},toRealChar:function(e){return e.length===1?e:/^shift-./.test(e)?e[e.length-1].toUpperCase():""},copyLine:function(e){var t=e.getCursorPosition();e.selection.clearSelection(),e.moveCursorTo(t.row,t.column),e.selection.selectLine(),r._default.isLine=!0,r._default.text=e.getCopyText().replace(/\n$/,""),e.selection.clearSelection(),e.moveCursorTo(t.row,t.column)}}}),ace.define("ace/keyboard/vim/registers",["require","exports","module"],function(e,t,n){"never use strict";n.exports={_default:{text:"",isLine:!1}}}),ace.define("ace/keyboard/vim/maps/motions",["require","exports","module","ace/keyboard/vim/maps/util","ace/search","ace/range"],function(e,t,n){function s(e){if(typeof e=="function"){var t=e;e=this}else var t=e.getPos;return e.nav=function(e,n,r,i){var s=t(e,n,r,i,!1);if(!s)return;e.clearSelection(),e.moveCursorTo(s.row,s.column)},e.sel=function(e,n,r,i){var s=t(e,n,r,i,!0);if(!s)return;e.selection.selectTo(s.row,s.column)},e}function h(e,t,n){return c.$options.needle=t,c.$options.backwards=n==-1,c.find(e.session)}var r=e("./util"),i=function(e,t){var n=e.renderer.getScrollTopRow(),r=e.getCursorPosition().row,i=r-n;t&&t.call(e),e.renderer.scrollToRow(e.getCursorPosition().row-i)},o=/[\s.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/,u=/[.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/,a=/\s/,f=function(e,t){var n=e.selection;this.range=n.getRange(),t=t||n.selectionLead,this.row=t.row,this.col=t.column;var r=e.session.getLine(this.row),i=e.session.getLength();this.ch=r[this.col]||"\n",this.skippedLines=0,this.next=function(){return this.ch=r[++this.col]||this.handleNewLine(1),this.ch},this.prev=function(){return this.ch=r[--this.col]||this.handleNewLine(-1),this.ch},this.peek=function(t){var n=r[this.col+t];return n?n:t==-1?"\n":this.col==r.length-1?"\n":e.session.getLine(this.row+1)[0]||"\n"},this.handleNewLine=function(t){if(t==1)return this.col==r.length?"\n":this.row==i-1?"":(this.col=0,this.row++,r=e.session.getLine(this.row),this.skippedLines++,r[0]||"\n");if(t==-1)return this.row===0?"":(this.row--,r=e.session.getLine(this.row),this.col=r.length,this.skippedLines--,"\n")},this.debug=function(){console.log(r.substring(0,this.col)+"|"+this.ch+"'"+this.col+"'"+r.substr(this.col+1))}},l=e("../../../search").Search,c=new l,p=e("../../../range").Range;n.exports={w:new s(function(e){var t=new f(e);if(t.ch&&u.test(t.ch))while(t.ch&&u.test(t.ch))t.next();else while(t.ch&&!o.test(t.ch))t.next();while(t.ch&&a.test(t.ch)&&t.skippedLines<2)t.next();return t.skippedLines==2&&t.prev(),{column:t.col,row:t.row}}),W:new s(function(e){var t=new f(e);while(t.ch&&(!a.test(t.ch)||!!a.test(t.peek(1)))&&t.skippedLines<2)t.next();return t.skippedLines==2?t.prev():t.next(),{column:t.col,row:t.row}}),b:new s(function(e){var t=new f(e);t.prev();while(t.ch&&a.test(t.ch)&&t.skippedLines>-2)t.prev();if(t.ch&&u.test(t.ch))while(t.ch&&u.test(t.ch))t.prev();else while(t.ch&&!o.test(t.ch))t.prev();return t.ch&&t.next(),{column:t.col,row:t.row}}),B:new s(function(e){var t=new f(e);t.prev();while(t.ch&&(!!a.test(t.ch)||!a.test(t.peek(-1)))&&t.skippedLines>-2)t.prev();return t.skippedLines==-2&&t.next(),{column:t.col,row:t.row}}),e:new s(function(e){var t=new f(e);t.next();while(t.ch&&a.test(t.ch))t.next();if(t.ch&&u.test(t.ch))while(t.ch&&u.test(t.ch))t.next();else while(t.ch&&!o.test(t.ch))t.next();return t.ch&&t.prev(),{column:t.col,row:t.row}}),E:new s(function(e){var t=new f(e);t.next();while(t.ch&&(!!a.test(t.ch)||!a.test(t.peek(1))))t.next();return{column:t.col,row:t.row}}),l:{nav:function(e){e.navigateRight()},sel:function(e){var t=e.getCursorPosition(),n=t.column,r=e.session.getLine(t.row).length;r&&n!==r&&e.selection.selectRight()}},h:{nav:function(e){var t=e.getCursorPosition();t.column>0&&e.navigateLeft()},sel:function(e){var t=e.getCursorPosition();t.column>0&&e.selection.selectLeft()}},H:{nav:function(e){var t=e.renderer.getScrollTopRow();e.moveCursorTo(t)},sel:function(e){var t=e.renderer.getScrollTopRow();e.selection.selectTo(t)}},M:{nav:function(e){var t=e.renderer.getScrollTopRow(),n=e.renderer.getScrollBottomRow(),r=t+(n-t)/2;e.moveCursorTo(r)},sel:function(e){var t=e.renderer.getScrollTopRow(),n=e.renderer.getScrollBottomRow(),r=t+(n-t)/2;e.selection.selectTo(r)}},L:{nav:function(e){var t=e.renderer.getScrollBottomRow();e.moveCursorTo(t)},sel:function(e){var t=e.renderer.getScrollBottomRow();e.selection.selectTo(t)}},k:{nav:function(e){e.navigateUp()},sel:function(e){e.selection.selectUp()}},j:{nav:function(e){e.navigateDown()},sel:function(e){e.selection.selectDown()}},i:{param:!0,sel:function(e,t,n,r){switch(r){case"w":e.selection.selectWord();break;case"W":e.selection.selectAWord();break;case"(":case"{":case"[":var i=e.getCursorPosition(),s=e.session.$findClosingBracket(r,i,/paren/);if(!s)return;var o=e.session.$findOpeningBracket(e.session.$brackets[r],i,/paren/);if(!o)return;o.column++,e.selection.setSelectionRange(p.fromPoints(o,s));break;case"'":case'"':case"/":var s=h(e,r,1);if(!s)return;var o=h(e,r,-1);if(!o)return;e.selection.setSelectionRange(p.fromPoints(o.end,s.start))}}},a:{param:!0,sel:function(e,t,n,r){switch(r){case"w":e.selection.selectAWord();break;case"W":e.selection.selectAWord();break;case"(":case"{":case"[":var i=e.getCursorPosition(),s=e.session.$findClosingBracket(r,i,/paren/);if(!s)return;var o=e.session.$findOpeningBracket(e.session.$brackets[r],i,/paren/);if(!o)return;s.column++,e.selection.setSelectionRange(p.fromPoints(o,s));break;case"'":case'"':case"/":var s=h(e,r,1);if(!s)return;var o=h(e,r,-1);if(!o)return;s.column++,e.selection.setSelectionRange(p.fromPoints(o.start,s.end))}}},f:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s){var o=e.getCursorPosition(),u=r.getRightNthChar(e,o,i,n||1);if(typeof u=="number")return o.column+=u+(s?2:1),o}}),F:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s){var o=e.getCursorPosition(),u=r.getLeftNthChar(e,o,i,n||1);if(typeof u=="number")return o.column-=u+1,o}}),t:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s){var o=e.getCursorPosition(),u=r.getRightNthChar(e,o,i,n||1);if(typeof u=="number")return o.column+=u+(s?1:0),o}}),T:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s){var o=e.getCursorPosition(),u=r.getLeftNthChar(e,o,i,n||1);if(typeof u=="number")return o.column-=u,o}}),"^":{nav:function(e){e.navigateLineStart()},sel:function(e){e.selection.selectLineStart()}},$:{nav:function(e){e.navigateLineEnd()},sel:function(e){e.selection.selectLineEnd()}},0:new s(function(e){return{row:e.selection.lead.row,column:0}}),G:{nav:function(e,t,n,r){!n&&n!==0&&(n=e.session.getLength()),e.gotoLine(n)},sel:function(e,t,n,r){!n&&n!==0&&(n=e.session.getLength()),e.selection.selectTo(n,0)}},g:{param:!0,nav:function(e,t,n,r){switch(r){case"m":console.log("Middle line");break;case"e":console.log("End of prev word");break;case"g":e.gotoLine(n||0);case"u":e.gotoLine(n||0);case"U":e.gotoLine(n||0)}},sel:function(e,t,n,r){switch(r){case"m":console.log("Middle line");break;case"e":console.log("End of prev word");break;case"g":e.selection.selectTo(n||0,0)}}},o:{nav:function(e,t,n,i){n=n||1;var s="";while(0<n--)s+="\n";s.length&&(e.navigateLineEnd(),e.insert(s),r.insertMode(e))}},O:{nav:function(e,t,n,i){var s=e.getCursorPosition().row;n=n||1;var o="";while(0<n--)o+="\n";o.length&&(s>0?(e.navigateUp(),e.navigateLineEnd(),e.insert(o)):(e.session.insert({row:0,column:0},o),e.navigateUp()),r.insertMode(e))}},"%":new s(function(e){var t=/[\[\]{}()]/g,n=e.getCursorPosition(),r=e.session.getLine(n.row)[n.column];if(!t.test(r)){var i=h(e,t);if(!i)return;n=i.start}var s=e.session.findMatchingBracket({row:n.row,column:n.column+1});return s}),"{":new s(function(e){var t=e.session,n=t.selection.lead.row;while(n>0&&!/\S/.test(t.getLine(n)))n--;while(/\S/.test(t.getLine(n)))n--;return{column:0,row:n}}),"}":new s(function(e){var t=e.session,n=t.getLength(),r=t.selection.lead.row;while(r<n&&!/\S/.test(t.getLine(r)))r++;while(/\S/.test(t.getLine(r)))r++;return{column:0,row:r}}),"ctrl-d":{nav:function(e,t,n,r){e.selection.clearSelection(),i(e,e.gotoPageDown)},sel:function(e,t,n,r){i(e,e.selectPageDown)}},"ctrl-u":{nav:function(e,t,n,r){e.selection.clearSelection(),i(e,e.gotoPageUp)},sel:function(e,t,n,r){i(e,e.selectPageUp)}}},n.exports.backspace=n.exports.left=n.exports.h,n.exports.right=n.exports.l,n.exports.up=n.exports.k,n.exports.down=n.exports.j,n.exports.pagedown=n.exports["ctrl-d"],n.exports.pageup=n.exports["ctrl-u"]}),ace.define("ace/keyboard/vim/maps/operators",["require","exports","module","ace/keyboard/vim/maps/util","ace/keyboard/vim/registers"],function(e,t,n){"never use strict";var r=e("./util"),i=e("../registers");n.exports={d:{selFn:function(e,t,n,s){i._default.text=e.getCopyText(),i._default.isLine=r.onVisualLineMode,r.onVisualLineMode?e.removeLines():e.session.remove(t),r.normalMode(e)},fn:function(e,t,n,r){n=n||1;switch(r){case"d":i._default.text="",i._default.isLine=!0;for(var s=0;s<n;s++){e.selection.selectLine(),i._default.text+=e.getCopyText();var o=e.getSelectionRange();if(!o.isMultiLine()){lastLineReached=!0;var u=o.start.row-1,a=e.session.getLine(u).length;o.setStart(u,a),e.session.remove(o),e.selection.clearSelection();break}e.session.remove(o),e.selection.clearSelection()}i._default.text=i._default.text.replace(/\n$/,"");break;default:t&&(e.selection.setSelectionRange(t),i._default.text=e.getCopyText(),i._default.isLine=!1,e.session.remove(t),e.selection.clearSelection())}}},c:{selFn:function(e,t,n,i){e.session.remove(t),r.insertMode(e)},fn:function(e,t,n,i){n=n||1;switch(i){case"c":for(var s=0;s<n;s++)e.removeLines(),r.insertMode(e);break;default:t&&(e.session.remove(t),r.insertMode(e))}}},y:{selFn:function(e,t,n,s){i._default.text=e.getCopyText(),i._default.isLine=r.onVisualLineMode,e.selection.clearSelection(),r.normalMode(e)},fn:function(e,t,n,r){n=n||1;switch(r){case"y":var s=e.getCursorPosition();e.selection.selectLine();for(var o=0;o<n-1;o++)e.selection.moveCursorDown();i._default.text=e.getCopyText().replace(/\n$/,""),e.selection.clearSelection(),i._default.isLine=!0,e.moveCursorToPosition(s);break;default:if(t){var s=e.getCursorPosition();e.selection.setSelectionRange(t),i._default.text=e.getCopyText(),i._default.isLine=!1,e.selection.clearSelection(),e.moveCursorTo(s.row,s.column)}}}},">":{selFn:function(e,t,n,i){n=n||1;for(var s=0;s<n;s++)e.indent();r.normalMode(e)},fn:function(e,t,n,r){n=parseInt(n||1,10);switch(r){case">":var i=e.getCursorPosition();e.selection.selectLine();for(var s=0;s<n-1;s++)e.selection.moveCursorDown();e.indent(),e.selection.clearSelection(),e.moveCursorToPosition(i),e.navigateLineEnd(),e.navigateLineStart()}}},"<":{selFn:function(e,t,n,i){n=n||1;for(var s=0;s<n;s++)e.blockOutdent();r.normalMode(e)},fn:function(e,t,n,r){n=n||1;switch(r){case"<":var i=e.getCursorPosition();e.selection.selectLine();for(var s=0;s<n-1;s++)e.selection.moveCursorDown();e.blockOutdent(),e.selection.clearSelection(),e.moveCursorToPosition(i),e.navigateLineEnd(),e.navigateLineStart()}}}}}),"use strict",ace.define("ace/keyboard/vim/maps/aliases",["require","exports","module"],function(e,t,n){n.exports={x:{operator:{ch:"d",count:1},motion:{ch:"l",count:1}},X:{operator:{ch:"d",count:1},motion:{ch:"h",count:1}},D:{operator:{ch:"d",count:1},motion:{ch:"$",count:1}},C:{operator:{ch:"c",count:1},motion:{ch:"$",count:1}},s:{operator:{ch:"c",count:1},motion:{ch:"l",count:1}},S:{operator:{ch:"c",count:1},param:"c"}}})
ace-0.2.0/src-min-noconflict/mode-abap.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/abap",["require","exports","module","ace/tokenizer","ace/mode/abap_highlight_rules","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/lib/oop"],function(e,t,n){function f(){this.$tokenizer=new r((new i).getRules(),"i"),this.foldingRules=new s}var r=e("../tokenizer").Tokenizer,i=e("./abap_highlight_rules").AbapHighlightRules,s=e("./folding/coffee").FoldMode,o=e("../range").Range,u=e("./text").Mode,a=e("../lib/oop");a.inherits(f,u),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.toggleCommentLines=function(e,t,n,r){var i=new o(0,0,0,0);for(var s=n;s<=r;++s){var u=t.getLine(s);if(hereComment.test(u))continue;commentLine.test(u)?u=u.replace(commentLine,"$1"):u=u.replace(indentation,"$&#"),i.end.row=i.start.row=s,i.end.column=u.length+1,t.replace(i,u)}}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"variable.language":"this",keyword:"ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT BACK CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT FETCH FIELDS FORM FORMAT FREE FROM FUNCTION GENERATE GET HIDE IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION LEAVE LIKE LINE LOAD LOCAL LOOP MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY ON OVERLAY OPTIONAL OTHERS PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES UNASSIGN ULINE UNPACK UPDATE WHEN WHILE WINDOW WRITE OCCURS STRUCTURE OBJECT PROPERTY CASTING APPEND RAISING VALUE COLOR CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT ID NUMBER FOR TITLE OUTPUT WITH EXIT USING INTO WHERE GROUP BY HAVING ORDER BY SINGLE APPENDING CORRESPONDING FIELDS OF TABLE LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN","constant.language":"TRUE FALSE NULL SPACE","support.type":"c n i p f d t x string xstring decfloat16 decfloat34","keyword.operator":"abs sign ceil floor trunc frac acos asin atan cos sin tan abapOperator cosh sinh tanh exp log log10 sqrt strlen xstrlen charlen numofchar dbmaxlen lines"},"text",!0," "),t="WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)";this.$rules={start:[{token:"string",regex:"`",next:"string"},{token:"string",regex:"'",next:"qstring"},{token:"doc.comment",regex:/^\*.+/},{token:"comment",regex:/".+$/},{token:"invalid",regex:"\\.{2,}"},{token:"keyword.operator",regex:/\W[\-+\%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/},{token:"paren.lparen",regex:"[\\[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"constant.numeric",regex:"[+-]?\\d+\\b"},{token:"variable.parameter",regex:/sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/},{token:"keyword",regex:t},{token:"variable.parameter",regex:/\w+-\w+(?:-\w+)*/},{token:e,regex:"\\w+\\b"}],qstring:[{token:"constant.language.escape",regex:"''"},{token:"string",regex:"'",next:"start",merge:!0},{token:"string",regex:".|w+",merge:!0}],string:[{token:"constant.language.escape",regex:"``"},{token:"string",regex:"`",next:"start",merge:!0},{token:"string",regex:".|w+",merge:!0}]}};r.inherits(s,i),t.AbapHighlightRules=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-asciidoc.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./asciidoc_highlight_rules").AsciidocHighlightRules,u=e("./folding/asciidoc").FoldMode,a=function(){var e=new o;this.$tokenizer=new s(e.getRules()),this.foldingRules=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){if(e=="listblock"){var r=/^((?:.+)?)([-+*][ ]+)/.exec(t);return r?(new Array(r[1].length+1)).join(" ")+r[2]:""}return this.$getIndent(t)}}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){function t(e){var t=/\w/.test(e)?"\\b":"(?:\\B|^)";return t+e+"[^"+e+"].*?"+e+"(?![\\w*])"}var e="[a-zA-Z¡-]+\\b";this.$rules={start:[{token:"empty",regex:/$/},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"literal",regex:/^-{4,}\s*$/,next:"literalBlock"},{token:"string",regex:/^\+{4,}\s*$/,next:"passthroughBlock"},{token:"keyword",regex:/^={4,}\s*$/},{token:"text",regex:/^\s*$/},{token:"empty",regex:"",next:"dissallowDelimitedBlock"}],dissallowDelimitedBlock:[{include:"paragraphEnd"},{token:"comment",regex:"^//.+$"},{token:"keyword",regex:"^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},{include:"listStart"},{token:"literal",regex:/^\s+.+$/,next:"indentedBlock"},{token:"empty",regex:"",next:"text"}],paragraphEnd:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"commentBlock"},{token:"tableBlock",regex:/^\s*[|!]=+\s*$/,next:"tableBlock"},{token:"keyword",regex:/^(?:--|''')\s*$/,next:"start"},{token:"option",regex:/^\[.*\]\s*$/,next:"start"},{token:"pageBreak",regex:/^>{3,}$/,next:"start"},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"titleUnderline",regex:/^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/,next:"start"},{token:"singleLineTitle",regex:/^={1,5}\s+\S.*$/,next:"start"},{token:"otherBlock",regex:/^(?:\*{2,}|_{2,})\s*$/,next:"start"},{token:"optionalTitle",regex:/^\.[^.\s].+$/,next:"start"}],listStart:[{token:"keyword",regex:/^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/,next:"listText"},{token:"meta.tag",regex:/^.+(?::{2,4}|;;)(?: |$)/,next:"listText"},{token:"support.function.list.callout",regex:/^(?:<\d+>|\d+>|>) /,next:"text"},{token:"keyword",regex:/^\+\s*$/,next:"start"}],text:[{token:["link","variable.language"],regex:/((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},{token:"link",regex:/(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},{token:"link",regex:/\b[\w\.\/\-]+@[\w\.\/\-]+\b/},{include:"macros"},{include:"paragraphEnd"},{token:"literal",regex:/\+{3,}/,next:"smallPassthrough"},{token:"escape",regex:/\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},{token:"escape",regex:/\\[_*'`+#]|\\{2}[_*'`+#]{2}/},{token:"keyword",regex:/\s\+$/},{token:"text",regex:e},{token:["keyword","string","keyword"],regex:/(<<[\w\d\-$]+,)(.*?)(>>|$)/,merge:!0},{token:"keyword",regex:/<<[\w\d\-$]+,?|>>/,merge:!0},{token:"constant.character",regex:/\({2,3}.*?\){2,3}/,merge:!0},{token:"keyword",regex:/\[\[.+?\]\]/},{token:"support",regex:/^\[{3}[\w\d =\-]+\]{3}/},{include:"quotes"},{token:"empty",regex:/^\s*$/,next:"start"}],listText:[{include:"listStart"},{include:"text"}],indentedBlock:[{token:"literal",regex:/^[\s\w].+$/,next:"indentedBlock"},{token:"literal",regex:"",next:"start"}],listingBlock:[{token:"literal",regex:/^\.{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+",merge:!0},{token:"literal",regex:"<",merge:!0}],literalBlock:[{token:"literal",regex:/^-{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+",merge:!0},{token:"literal",regex:"<",merge:!0}],passthroughBlock:[{token:"literal",regex:/^\+{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:e+"|\\d+",merge:!0},{include:"macros"},{token:"literal",regex:".",merge:!0}],smallPassthrough:[{token:"literal",regex:/[+]{3,}/,next:"dissallowDelimitedBlock"},{token:"literal",regex:/^\s*$/,next:"dissallowDelimitedBlock",merge:!0},{token:"literal",regex:e+"|\\d+",merge:!0},{include:"macros"}],commentBlock:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"doc.comment",regex:"^.*$"}],tableBlock:[{token:"tableBlock",regex:/^\s*\|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"innerTableBlock"},{token:"tableBlock",regex:/\|/},{include:"text",noEscape:!0}],innerTableBlock:[{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"tableBlock"},{token:"tableBlock",regex:/^\s*|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/\!/}],macros:[{token:"macro",regex:/{[\w\-$]+}/},{token:["text","string","text","constant.character","text"],regex:/({)([\w\-$]+)(:)?(.+)?(})/},{token:["text","markup.list.macro","keyword","string"],regex:/(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},{token:["markup.list.macro","keyword","string"],regex:/([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},{token:["markup.list.macro","keyword"],regex:/([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},{token:"keyword",regex:/^:.+?:(?= |$)/}],quotes:[{token:"string.italic",regex:/__[^_\s].*?__/},{token:"string.italic",regex:t("_")},{token:"keyword.bold",regex:/\*\*[^*\s].*?\*\*/},{token:"keyword.bold",regex:t("\\*")},{token:"literal",regex:t("\\+")},{token:"literal",regex:/\+\+[^+\s].*?\+\+/},{token:"literal",regex:/\$\$.+?\$\$/},{token:"literal",regex:t("`")},{token:"keyword",regex:t("^")},{token:"keyword",regex:t("~")},{token:"keyword",regex:/##?/},{token:"keyword",regex:/(?:\B|^)``|\b''/}]};var n={macro:"constant.character",tableBlock:"doc.comment",titleUnderline:"markup.heading",singleLineTitle:"markup.heading",pageBreak:"string",option:"string.regexp",otherBlock:"markup.list",literal:"support.function",optionalTitle:"constant.numeric",escape:"constant.language.escape",link:"markup.underline.list"};for(var r in this.$rules){var i=this.$rules[r];for(var s=i.length;s--;){var o=i[s];if(o.include||typeof o=="string"){var u=[s,1].concat(this.$rules[o.include||o]);o.noEscape&&(u=u.filter(function(e){return!e.next})),i.splice.apply(i,u)}else o.token in n&&(o.token=n[o.token])}}};r.inherits(s,i),t.AsciidocHighlightRules=s}),ace.define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/,this.singleLineHeadingRe=/^={1,5}(?=\s+\S)/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="="?this.singleLineHeadingRe.test(r)?"start":e.getLine(n-1).length!=e.getLine(n).length?"":"start":e.bgTokenizer.getState(n)=="dissallowDelimitedBlock"?"end":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type}function d(){var t=f.value.match(p);if(t)return t[0].length;var r=c.indexOf(f.value[0])+1;return r==1&&e.getLine(n-1).length!=e.getLine(n).length?Infinity:r}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;var f,c=["=","-","~","^","+"],h="markup.heading",p=this.singleLineHeadingRe;if(l(n)==h){var v=d();while(++n<o){if(l(n)!=h)continue;var m=d();if(m<=v)break}var g=f&&f.value.match(this.singleLineHeadingRe);a=g?n-1:n-2;if(a>u)while(a>u&&(!l(a)||f.value[0]=="["))a--;if(a>u){var y=e.getLine(a).length;return new s(u,i,a,y)}}else{var b=e.bgTokenizer.getState(n);if(b=="dissallowDelimitedBlock"){while(n-->0)if(e.bgTokenizer.getState(n).lastIndexOf("Block")==-1)break;a=n+1;if(a<u){var y=e.getLine(n).length;return new s(a,5,u,i-5)}}else{while(++n<o)if(e.bgTokenizer.getState(n)=="dissallowDelimitedBlock")break;a=n;if(a>u){var y=e.getLine(n).length;return new s(u,5,a,y-5)}}}}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-c9search.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./c9search_highlight_rules").C9SearchHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./folding/c9search").FoldMode,f=function(){this.$tokenizer=new s((new o).getRules(),"i"),this.$outdent=new u,this.foldingRules=new a};r.inherits(f,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text"],regex:"(^\\s+[0-9]+)(:\\s*)(.+)"},{token:["string","text"],regex:"(.+)(:$)"}]}};r.inherits(s,i),t.C9SearchHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^(\S.*\:|Searching for.*)$/,this.foldingStopMarker=/^(\s+|Found.*)$/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getAllLines(n),s=r[n],o=/^(Found.*|Searching for.*)$/,u=/^(\S.*\:|\s*)$/,a=o.test(s)?o:u;if(this.foldingStartMarker.test(s)){for(var f=n+1,l=e.getLength();f<l;f++)if(a.test(r[f]))break;return new i(n,s.length,f,0)}if(this.foldingStopMarker.test(s)){for(var f=n-1;f>=0;f--){s=r[f];if(a.test(s))break}return new i(f,s.length,n,0)}}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-c_cpp.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./c_cpp_highlight_rules").c_cppHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)\/\//;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,"//")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.cFunctions="\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b",u=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",n="const|extern|register|restrict|static|volatile|inline|private:|protected:|public:|friend|explicit|virtual|export|mutable|typename",r="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",s="NULL|true|false|TRUE|FALSE",u=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"variable.language":"this","constant.language":s},"identifier"),a="[a-zA-Z\\$_¡-][a-zA-Zd\\$_¡-]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#import|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:"support.function.C99.c",regex:o},{token:u,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(u,s),t.c_cppHighlightRules=u}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=='"')return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-clojure.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./clojure_highlight_rules").ClojureHighlightRules,u=e("./matching_parens_outdent").MatchingParensOutdent,a=e("../range").Range,f=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u};r.inherits(f,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)#/;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,";")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/[\(\[]/);o&&(r+=" "),o=t.match(/[\)]/),o&&(r="")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - -> ->> .. / < <= = == > &gt; >= &gt;= accessor aclone add-classpath add-watch agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq zero? zipmap",t="throw try var def do fn if let loop monitor-enter monitor-exit new quote recur set!",n="true false nil",r=this.createKeywordMapper({keyword:t,"constant.language":n,"support.function":e},"identifier",!1," ");this.$rules={start:[{token:"comment",regex:";.*$"},{token:"comment",regex:"^=begin$",next:"comment"},{token:"keyword",regex:"[\\(|\\)]"},{token:"keyword",regex:"[\\'\\(]"},{token:"keyword",regex:"[\\[|\\]]"},{token:"keyword",regex:"[\\{|\\}|\\#\\{|\\#\\}]"},{token:"keyword",regex:"[\\&]"},{token:"keyword",regex:"[\\#\\^\\{]"},{token:"keyword",regex:"[\\%]"},{token:"keyword",regex:"[@]"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"string",regex:'"',next:"string"},{token:"string",regex:/:[\w*+!\-_?:\/]+/},{token:"string.regexp",regex:'/#"(?:\\.|(?:\\")|[^""\n])*"/g'}],comment:[{token:"comment",regex:"^=end$",next:"start"},{token:"comment",merge:!0,regex:".+"}],string:[{token:"constant.language.escape",merge:!0,regex:"\\\\.|\\\\$"},{token:"string",merge:!0,regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"}]}};r.inherits(s,i),t.ClojureHighlightRules=s}),ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\)/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\))/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingParensOutdent=i})
ace-0.2.0/src-min-noconflict/mode-coffee.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/coffee",["require","exports","module","ace/tokenizer","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"],function(e,t,n){function c(){this.$tokenizer=new r((new i).getRules()),this.$outdent=new s,this.foldingRules=new o}var r=e("../tokenizer").Tokenizer,i=e("./coffee_highlight_rules").CoffeeHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./folding/coffee").FoldMode,u=e("../range").Range,a=e("./text").Mode,f=e("../worker/worker_client").WorkerClient,l=e("../lib/oop");l.inherits(c,a),function(){var e=/(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/,t=/^(\s*)#/,n=/^\s*###(?!#)/,r=/^\s*/;this.getNextLineIndent=function(t,n,r){var i=this.$getIndent(n),s=this.$tokenizer.getLineTokens(n,t).tokens;return(!s.length||s[s.length-1].type!=="comment")&&t==="start"&&e.test(n)&&(i+=r),i},this.toggleCommentLines=function(e,i,s,o){console.log("toggle");var a=new u(0,0,0,0);for(var f=s;f<=o;++f){var l=i.getLine(f);if(n.test(l))continue;t.test(l)?l=l.replace(t,"$1"):l=l.replace(r,"$&#"),a.end.row=a.start.row=f,a.end.column=l.length+1,i.replace(a,l)}},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(t){e.clearAnnotations()}),t}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t={token:"string",merge:!0,regex:".+"},n="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes",r="true|false|null|undefined|NaN|Infinity",i="case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|slice|bind|indexOf",s="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",o="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",u="window|arguments|prototype|document",a=this.createKeywordMapper({keyword:n,"constant.language":r,"invalid.illegal":i,"language.support.class":s,"language.support.function":o,"variable.language":u},"identifier"),f={"({args})->":{token:["paren.lparen","text","paren.lparen","text","variable.parameter","text","paren.rparen","text","paren.rparen","text","storage.type"],regex:"(\\()(\\s*)(\\{)(\\s*)([$@A-Za-z_\\x7f-\\uffff][$@\\w\\s,\\x7f-\\uffff]*)(\\s*)(\\})(\\s*)(\\))(\\s*)([\\-=]>)"},"({})->":{token:["paren.lparen","text","paren.lparen","text","paren.rparen","text","paren.rparen","text","storage.type"],regex:"(\\()(\\s*)(\\{)(\\s*)(\\})(\\s*)(\\))(\\s*)([\\-=]>)"},"(args)->":{token:["paren.lparen","text","variable.parameter","text","paren.rparen","text","storage.type"],regex:"(\\()(\\s*)([$@A-Za-z_\\x7f-\\uffff][\\s\\x21-\\uffff]*)(\\s*)(\\))(\\s*)([\\-=]>)"},"()->":{token:["paren.lparen","text","paren.rparen","text","storage.type"],regex:"(\\()(\\s*)(\\))(\\s*)([\\-=]>)"}};this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{token:"string",merge:!0,regex:"'''",next:"qdoc"},{token:"string",merge:!0,regex:'"""',next:"qqdoc"},{token:"string",merge:!0,regex:"'",next:"qstring"},{token:"string",merge:!0,regex:'"',next:"qqstring"},{token:"string",merge:!0,regex:"`",next:"js"},{token:"string.regex",merge:!0,regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",merge:!0,regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","identifier"],regex:"(\\.)("+i+")"},{token:"punctuation.operator",regex:"\\."},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(\\s+)(extends)(\\s+)("+e+")"},{token:["keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")"},{token:["entity.name.function","text","keyword.operator","text"].concat(f["({args})->"].token),regex:"("+e+")(\\s*)(=)(\\s*)"+f["({args})->"].regex},{token:["entity.name.function","text","punctuation.operator","text"].concat(f["({args})->"].token),regex:"("+e+")(\\s*)(:)(\\s*)"+f["({args})->"].regex},{token:["entity.name.function","text","keyword.operator","text"].concat(f["({})->"].token),regex:"("+e+")(\\s*)(=)(\\s*)"+f["({})->"].regex},{token:["entity.name.function","text","punctuation.operator","text"].concat(f["({})->"].token),regex:"("+e+")(\\s*)(:)(\\s*)"+f["({})->"].regex},{token:["entity.name.function","text","keyword.operator","text"].concat(f["(args)->"].token),regex:"("+e+")(\\s*)(=)(\\s*)"+f["(args)->"].regex},{token:["entity.name.function","text","punctuation.operator","text"].concat(f["(args)->"].token),regex:"("+e+")(\\s*)(:)(\\s*)"+f["(args)->"].regex},{token:["entity.name.function","text","keyword.operator","text"].concat(f["()->"].token),regex:"("+e+")(\\s*)(=)(\\s*)"+f["()->"].regex},{token:["entity.name.function","text","punctuation.operator","text"].concat(f["()->"].token),regex:"("+e+")(\\s*)(:)(\\s*)"+f["()->"].regex},{token:["entity.name.function","text","keyword.operator","text","storage.type"],regex:"("+e+")(\\s*)(=)(\\s*)([\\-=]>)"},{token:["entity.name.function","text","punctuation.operator","text","storage.type"],regex:"("+e+")(\\s*)(:)(\\s*)([\\-=]>)"},f["({args})->"],f["({})->"],f["(args)->"],f["()->"],{token:"identifier",regex:"(?:(?:\\.|::)\\s*)"+e},{token:"variable",regex:"@(?:"+e+")?"},{token:a,regex:e},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],qdoc:[{token:"string",regex:".*?'''",next:"start"},t],qqdoc:[{token:"string",regex:'.*?"""',next:"start"},t],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",merge:!0,next:"start"},t],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',merge:!0,next:"start"},t],js:[{token:"string",merge:!0,regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"start"},t],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",merge:!0,regex:"\\S+"}],comment:[{token:"comment",regex:".*?###",next:"start"},{token:"comment",merge:!0,regex:".+"}]}}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-coldfusion.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/coldfusion",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/coldfusion_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./xml").Mode,s=e("./javascript").Mode,o=e("./css").Mode,u=e("../tokenizer").Tokenizer,a=e("./coldfusion_highlight_rules").ColdfusionHighlightRules,f=function(){i.call(this);var e=new a;this.$tokenizer=new u(e.getRules()),this.$embeds=e.getEmbeds(),this.createModeDelegates({"js-":s,"css-":o})};r.inherits(f,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./xml_highlight_rules").XmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,f=function(){this.$tokenizer=new s((new o).getRules()),this.$behaviour=new u,this.foldingRules=new a};r.inherits(f,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./xml_util"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml-pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"xml-pe",regex:"<\\!.*?>"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"constant.character.entity",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},i.tag(this.$rules,"tag","start")};r.inherits(o,s),t.XmlHighlightRules=o}),ace.define("ace/mode/xml_util",["require","exports","module"],function(e,t,n){function r(e){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:e+"_qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:e+"_qstring"}]}function i(e,t){return[{token:"string",merge:!0,regex:".*?"+e,next:t},{token:"string",merge:!0,regex:".+"}]}t.tag=function(e,t,n,s){e[t]=[{token:"text",regex:"\\s+"},{token:s?function(e){return s[e]?"meta.tag.tag-name."+s[e]:"meta.tag.tag-name"}:"meta.tag.tag-name",merge:!0,regex:"[-_a-zA-Z0-9:]+",next:t+"_embed_attribute_list"},{token:"empty",regex:"",next:t+"_embed_attribute_list"}],e[t+"_qstring"]=i("'",t+"_embed_attribute_list"),e[t+"_qqstring"]=i('"',t+"_embed_attribute_list"),e[t+"_embed_attribute_list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:n},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(r(t))}}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){function u(e,t){var n=!0,r=e.type.split("."),i=t.split(".");return i.forEach(function(e){if(r.indexOf(e)==-1)return n=!1,!1}),n}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,a=function(){this.inherit(s,["string_dquotes"]),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var s=n.getCursorPosition(),a=new o(r,s.row,s.column),f=a.getCurrentToken(),l=!1;if(!f||!u(f,"meta.tag")&&(!u(f,"text")||!f.value.match("/"))){do f=a.stepBackward();while(f&&(u(f,"string")||u(f,"keyword.operator")||u(f,"entity.attribute-name")||u(f,"text")))}else l=!0;if(!f||!u(f,"meta.tag-name")||a.stepBackward().value.match("/"))return;var c=f.value;if(l)var c=c.substring(0,s.column-f.start);return{text:"></"+c+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+2);if(u=="</"){var a=this.$getIndent(r.doc.getLine(s.row))+r.getTabString(),f=this.$getIndent(r.doc.getLine(s.row));return{text:"\n"+a+"\n"+f,selection:[1,a.length,1,a.length]}}}})};r.inherits(a,i),t.XmlBehaviour=a}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=='"')return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../lib/lang"),s=e("../../range").Range,o=e("./fold_mode").FoldMode,u=e("../../token_iterator").TokenIterator,a=t.FoldMode=function(e){o.call(this),this.voidElements=e||{}};r.inherits(a,o),function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r.closing?t=="markbeginend"?"end":"":!r.tagName||this.voidElements[r.tagName.toLowerCase()]?"":r.selfClosing?"":r.value.indexOf("/"+r.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(e,t){var n=e.getTokens(t),r="";for(var s=0;s<n.length;s++){var o=n[s];o.type.indexOf("meta.tag")===0?r+=o.value:r+=i.stringRepeat(" ",o.value.length)}return this._parseTag(r)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(e){var t=this.tagRe.exec(e),n=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:e,match:t?t[2]:"",closing:t?!!t[3]:!1,selfClosing:t?!!t[5]||t[2]=="/>":!1,tagName:t?t[4]:"",column:t[1]?n+t[1].length:n}},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n="",r;do if(t.type.indexOf("meta.tag")===0){if(!r)var r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()};n+=t.value;if(n.indexOf(">")!==-1){var i=this._parseTag(n);return i.start=r,i.end={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length},e.stepForward(),i}}while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n="",r;do if(t.type.indexOf("meta.tag")===0){r||(r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length}),n=t.value+n;if(n.indexOf("<")!==-1){var i=this._parseTag(n);return i.end=r,i.start={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()},e.stepBackward(),i}}while(t=e.stepBackward());return null},this._pop=function(e,t){while(e.length){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.voidElements[t.tagName])return;if(this.voidElements[n.tagName]){e.pop();continue}return null}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r.match)return null;var i=r.closing||r.selfClosing,o=[],a;if(!i){var f=new u(e,n,r.column),l={row:n,column:r.column+r.tagName.length+2};while(a=this._readTagForward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(a.closing){this._pop(o,a);if(o.length==0)return s.fromPoints(l,a.start)}else o.push(a)}}else{var f=new u(e,n,r.column+r.match.length),c={row:n,column:r.column};while(a=this._readTagBackward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(!a.closing){this._pop(o,a);if(o.length==0)return a.start.column+=a.tagName.length+2,s.fromPoints(a.start,c)}else o.push(a)}}}}.call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new l,this.foldingRules=new c};r.inherits(h,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)\/\//;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,"//")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="regex_allowed"){var u=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||e=="regex_allowed")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}}.call(h.prototype),t.Mode=h}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert"},"identifier"),t="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",n="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*\\b",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+n+")(\\.)(prototype)(\\.)("+n+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+n+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+t+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},{token:e,regex:n},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"invalid",regex:/\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/},{token:"string.regexp",regex:/{|[^{\[\/\\(|)$^+*?]+/,merge:!0},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex",merge:!0},{token:"constant.language.escape",regex:"-"},{token:"string.regexp.charachterclass",regex:/[^\]\-\\]+/,merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:n},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.JavaScriptHighlightRules=o}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./css_highlight_rules").CssHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,f=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.$tokenizer=new s((new o).getRules(),"i"),this.$outdent=new u,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",l=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0),t=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],n=i.copyArray(t);n.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var r=i.copyArray(t);r.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var s=[{token:"comment",merge:!0,regex:".+"}],d=i.copyArray(s);d.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var v=i.copyArray(s);v.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=i.copyArray(s);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:d,ruleset:n,ruleset_comment:m,media_ruleset:r,media_comment:v}};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules","ace/mode/xml_util"],function(e,t,n){var r=e("../lib/oop"),i=e("./css_highlight_rules").CssHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=e("./xml_util"),a=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml-pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=script)",next:"script"},{token:"meta.tag",regex:"<(?=style)",next:"style"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},u.tag(this.$rules,"tag","start"),u.tag(this.$rules,"style","css-start"),u.tag(this.$rules,"script","js-start"),this.embedRules(s,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(i,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};r.inherits(a,o),t.ColdfusionHighlightRules=a})
ace-0.2.0/src-min-noconflict/mode-csharp.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./csharp_highlight_rules").CSharpHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,f=e("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){return null}}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"variable.language":"this",keyword:"abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic","constant.language":"null|true|false"},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",merge:!0,next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.CSharpHighlightRules=o}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=='"')return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-css.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./css_highlight_rules").CssHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,f=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.$tokenizer=new s((new o).getRules(),"i"),this.$outdent=new u,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",l=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0),t=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],n=i.copyArray(t);n.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var r=i.copyArray(t);r.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var s=[{token:"comment",merge:!0,regex:".+"}],d=i.copyArray(s);d.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var v=i.copyArray(s);v.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=i.copyArray(s);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:d,ruleset:n,ruleset_comment:m,media_ruleset:r,media_comment:v}};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=='"')return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-dart.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./dart_highlight_rules").DartHighlightRules,u=e("./folding/cstyle").FoldMode,a=function(){var e=new o;this.foldingRules=new u,this.$tokenizer=new s(e.getRules())};r.inherits(a,i),function(){}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="true|false|null",t="this|super",n="try|catch|finally|throw|break|case|continue|default|do|else|for|if|in|return|switch|while|new",r="abstract|class|extends|external|factory|implements|interface|get|native|operator|set|typedef",i="static|final|const",s="void|bool|num|int|double|Dynamic|var|String",o=this.createKeywordMapper({"constant.language.dart":e,"variable.language.dart":t,"keyword.control.dart":n,"keyword.declaration.dart":r,"storage.modifier.dart":i,"storage.type.primitive.dart":s},"identifier"),u={token:"string",merge:!0,regex:".+"};this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:["meta.preprocessor.script.dart"],regex:"^(#!.*)$"},{token:["keyword.other.import.dart","meta.declaration.dart"],regex:"#(?:\\b)(?:library|import|source|resource)(?:\\b)"},{token:["keyword.other.import.dart","text"],regex:"(?:\\b)(prefix)(\\s*:)"},{regex:"\\bas\\b",token:"keyword.cast.dart"},{regex:"\\?|:",token:"keyword.control.ternary.dart"},{regex:"(?:\\b)(is\\!?)(?:\\b)",token:["keyword.operator.dart"]},{regex:"(<<|>>>?|~|\\^|\\||&)",token:["keyword.operator.bitwise.dart"]},{regex:"((?:&|\\^|\\||<<|>>>?)=)",token:["keyword.operator.assignment.bitwise.dart"]},{regex:"(===?|!==?|<=?|>=?)",token:["keyword.operator.comparison.dart"]},{regex:"((?:[+*/%-]|\\~)=)",token:["keyword.operator.assignment.arithmetic.dart"]},{regex:"=",token:"keyword.operator.assignment.dart"},{token:"string",merge:!0,regex:"'''",next:"qdoc"},{token:"string",merge:!0,regex:'"""',next:"qqdoc"},{token:"string",merge:!0,regex:"'",next:"qstring"},{token:"string",merge:!0,regex:'"',next:"qqstring"},{regex:"(\\-\\-|\\+\\+)",token:["keyword.operator.increment-decrement.dart"]},{regex:"(\\-|\\+|\\*|\\/|\\~\\/|%)",token:["keyword.operator.arithmetic.dart"]},{regex:"(!|&&|\\|\\|)",token:["keyword.operator.logical.dart"]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"start"},u],qqdoc:[{token:"string",regex:'.*?"""',next:"start"},u],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",merge:!0,next:"start"},u],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',merge:!0,next:"start"},u]}};r.inherits(s,i),t.DartHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-diff.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/diff_highlight_rules","ace/mode/folding/diff"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./diff_highlight_rules").DiffHighlightRules,u=e("./folding/diff").FoldMode,a=function(){this.$tokenizer=new s((new o).getRules(),"i"),this.foldingRules=new u(["diff","index","\\+{3}","@@|\\*{5}"],"i")};r.inherits(a,i),function(){}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(?:(\\-{3}|\\+{3}|\\*{3})( .+))$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^(.*?)(\\s*)$",token:["invisible","invalid"]}]}};r.inherits(s,i),t.DiffHighlightRules=s}),ace.define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n<f;){r=e.getLine(n);if(a.test(r))break}if(n==i.row+1)return;return s.fromPoints(i,{row:n-1,column:r.length})}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-dot.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./dot_highlight_rules").DotHighlightRules,a=e("./folding/cstyle").FoldMode,f=function(){var e=new u;this.$outdent=new o,this.foldingRules=new a,this.$tokenizer=new s(e.getRules())};r.inherits(f,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)\/\//;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new Range(0,0,0,0);for(var o=n;o<=r;o++){var a=t.getLine(o),f=a.match(s);u.start.row=o,u.end.row=o,u.end.column=f[0].length,t.replace(u,f[1])}}else t.indentRows(n,r,"//")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/dot_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,u=function(){var e=i.arrayToMap("strict|node|edge|graph|digraph|subgraph".split("|")),t=i.arrayToMap("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z".split("|"));this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/#.*$/},{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/},{token:"keyword.operator",regex:/\+|=|\->/},{token:"punctuation.operator",regex:/,|;/},{token:"paren.lparen",regex:/[\[{]/},{token:"paren.rparen",regex:/[\]}]/},{token:"comment",regex:/^#!.*$/},{token:function(n){return e.hasOwnProperty(n.toLowerCase())?"keyword":t.hasOwnProperty(n.toLowerCase())?"variable":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]}};r.inherits(u,s),t.DotHighlightRules=u}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-glsl.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/tokenizer","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./c_cpp").Mode,s=e("../tokenizer").Tokenizer,o=e("./glsl_highlight_rules").glslHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),t.Mode=c}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./c_cpp_highlight_rules").c_cppHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)\/\//;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,"//")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.cFunctions="\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b",u=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",n="const|extern|register|restrict|static|volatile|inline|private:|protected:|public:|friend|explicit|virtual|export|mutable|typename",r="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",s="NULL|true|false|TRUE|FALSE",u=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"variable.language":"this","constant.language":s},"identifier"),a="[a-zA-Z\\$_¡-][a-zA-Zd\\$_¡-]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#import|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:"support.function.C99.c",regex:o},{token:u,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(u,s),t.c_cppHighlightRules=u}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=='"')return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)}),ace.define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./c_cpp_highlight_rules").c_cppHighlightRules,s=function(){var e="attribute|const|uniform|varying|break|continue|do|for|while|if|else|in|out|inout|float|int|void|bool|true|false|lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|samplerCube|struct",t="radians|degrees|sin|cos|tan|asin|acos|atan|pow|exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|normalize|faceforward|reflect|refract|matrixCompMult|lessThan|lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|texture2DProjLod|textureCube|textureCubeLod|gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|gl_DepthRangeParameters|gl_DepthRange|gl_Position|gl_PointSize|gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t},"identifier");this.$rules=(new i).$rules,this.$rules.start.forEach(function(e){typeof e.token=="function"&&(e.token=n)})};r.inherits(s,i),t.glslHighlightRules=s})
ace-0.2.0/src-min-noconflict/mode-golang.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./golang_highlight_rules").GolangHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,f=e("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.foldingRules=new f};r.inherits(l,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)\/\//;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new Range(0,0,0,0);for(var o=n;o<=r;o++){var a=t.getLine(o),f=a.match(s);u.start.row=o,u.end.row=o,u.end.column=f[0].length,t.replace(u,f[1])}}else t.indentRows(n,r,"//")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="true|else|false|break|case|return|goto|if|const|continue|struct|default|switch|for|func|import|package|chan|defer|fallthrough|go|interface|map|rangeselect|type|var",t="nil|true|false|iota",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.GolangHighlightRules=o}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=='"')return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-groovy.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/groovy_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("../tokenizer").Tokenizer,o=e("./groovy_highlight_rules").GroovyHighlightRules,u=function(){i.call(this),this.$tokenizer=new s((new o).getRules())};r.inherits(u,i),function(){this.createWorker=function(e){return null}}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new l,this.foldingRules=new c};r.inherits(h,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)\/\//;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,"//")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="regex_allowed"){var u=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||e=="regex_allowed")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}}.call(h.prototype),t.Mode=h}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert"},"identifier"),t="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",n="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*\\b",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+n+")(\\.)(prototype)(\\.)("+n+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+n+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+t+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},{token:e,regex:n},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"invalid",regex:/\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/},{token:"string.regexp",regex:/{|[^{\[\/\\(|)$^+*?]+/,merge:!0},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex",merge:!0},{token:"constant.language.escape",regex:"-"},{token:"string.regexp.charachterclass",regex:/[^\]\-\\]+/,merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:n},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.JavaScriptHighlightRules=o}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=='"')return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)}),ace.define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="assert|with|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|def|float|native|super|while",t="null|Infinity|NaN|undefined",n="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"support.function":n,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'"""',next:"qqstring"},{token:"string",regex:"'''",next:"qstring"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:/\\(?:u[0-9A-Fa-f]{4}|.|$)/},{token:"constant.language.escape",regex:/\$[\w\d]+/},{token:"constant.language.escape",regex:/\$\{[^"\}]+\}?/},{token:"string",regex:'"{3,5}',next:"start"},{token:"string",regex:".+?"}],qstring:[{token:"constant.language.escape",regex:/\\(?:u[0-9A-Fa-f]{4}|.|$)/},{token:"string",regex:"'{3,5}",next:"start"},{token:"string",regex:".+?"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.GroovyHighlightRules=o})
ace-0.2.0/src-min-noconflict/mode-haml.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/haml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/haml_highlight_rules","ace/mode/folding/coffee"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./haml_highlight_rules").HamlHighlightRules,u=e("./folding/coffee").FoldMode,a=function(){var e=new o;this.foldingRules=new u,this.$tokenizer=new s(e.getRules())};r.inherits(a,i),function(){}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/ruby_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./ruby_highlight_rules"),o=s.RubyHighlightRules,u=function(){this.$rules={start:[{token:"punctuation.section.comment",regex:/^\s*\/.*/},{token:"punctuation.section.comment",regex:/^\s*#.*/},{token:"string.quoted.double",regex:"==.+?=="},{token:"keyword.other.doctype",regex:"^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},s.qString,s.qqString,s.tString,{token:["entity.name.tag.haml"],regex:/^\s*%[\w:]+/,next:"tag_single"},{token:["meta.escape.haml"],regex:"^\\s*\\\\."},s.constantNumericHex,s.constantNumericFloat,s.constantOtherSymbol,{token:"text",regex:"=|-|~",next:"embedded_ruby"}],tag_single:[{token:"entity.other.attribute-name.class.haml",regex:"\\.[\\w-]+"},{token:"entity.other.attribute-name.id.haml",regex:"#[\\w-]+"},{token:"punctuation.section",regex:"\\{",next:"section"},s.constantOtherSymbol,{token:"text",regex:/\s/,next:"start"},{token:["text","punctuation"],regex:"($)|((?!\\.|#|\\{|\\[|=|-|~|\\/))",next:"start"}],section:[s.constantOtherSymbol,s.qString,s.qqString,s.tString,s.constantNumericHex,s.constantNumericFloat,{token:"punctuation.section",regex:"\\}",next:"start"}],embedded_ruby:[s.constantNumericHex,s.constantNumericFloat,{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},{token:(new o).getKeywords(),regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:["keyword","text","text"],regex:"(?:do|\\{)(?: \\|[^|]+\\|)?$",next:"start"},{token:["text"],regex:"^$",next:"start"},{token:["text"],regex:"^(?!.*\\|\\s*$)",next:"start"}]}};r.inherits(u,i),t.HamlHighlightRules=u}),ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},o=t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},u=t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},a=t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},f=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},l=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},c=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier");this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",merge:!0,regex:"^=begin\\s",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},o,u,a,{token:"text",regex:"::"},{token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},s,f,l,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end\\s.*$",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};r.inherits(c,i),t.RubyHighlightRules=c}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-haxe.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/haxe_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./haxe_highlight_rules").HaxeHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,f=e("./folding/cstyle").FoldMode,l=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std",t="null|true|false",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",merge:!0,next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({<]"},{token:"paren.rparen",regex:"[\\])}>]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.HaxeHighlightRules=o}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=='"')return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})
ace-0.2.0/src-min-noconflict/mode-html.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/html_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript").Mode,o=e("./css").Mode,u=e("../tokenizer").Tokenizer,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/html").HtmlBehaviour,l=e("./folding/html").FoldMode,c=function(){var e=new a;this.$tokenizer=new u(e.getRules()),this.$behaviour=new f,this.$embeds=e.getEmbeds(),this.createModeDelegates({"js-":s,"css-":o}),this.foldingRules=new l};r.inherits(c,i),function(){this.toggleCommentLines=function(e,t,n,r){return 0},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.$behaviour=new l,this.foldingRules=new c};r.inherits(h,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)\/\//;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,"//")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="regex_allowed"){var u=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||e=="regex_allowed")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}}.call(h.prototype),t.Mode=h}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert"},"identifier"),t="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",n="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*\\b",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+n+")(\\.)(prototype)(\\.)("+n+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+n+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+t+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},{token:e,regex:n},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[i.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"invalid",regex:/\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/},{token:"string.regexp",regex:/{|[^{\[\/\\(|)$^+*?]+/,merge:!0},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex",merge:!0},{token:"constant.language.escape",regex:"-"},{token:"string.regexp.charachterclass",regex:/[^\]\-\\]+/,merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:n},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.JavaScriptHighlightRules=o}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=='"')return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./css_highlight_rules").CssHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,f=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.$tokenizer=new s((new o).getRules(),"i"),this.$outdent=new u,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",l=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0),t=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],n=i.copyArray(t);n.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var r=i.copyArray(t);r.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var s=[{token:"comment",merge:!0,regex:".+"}],d=i.copyArray(s);d.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var v=i.copyArray(s);v.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=i.copyArray(s);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:d,ruleset:n,ruleset_comment:m,media_ruleset:r,media_comment:v}};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_util"),a=e("./text_highlight_rules").TextHighlightRules,f=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),l=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml-pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"xml-pe",regex:"<\\!.*?>"},{token:"meta.tag",regex:"<(?=script\\b)",next:"script"},{token:"meta.tag",regex:"<(?=style\\b)",next:"style"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"constant.character.entity",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},u.tag(this.$rules,"tag","start",f),u.tag(this.$rules,"style","css-start",f),u.tag(this.$rules,"script","js-start",f),this.embedRules(o,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(s,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};r.inherits(l,a),t.HtmlHighlightRules=l}),ace.define("ace/mode/xml_util",["require","exports","module"],function(e,t,n){function r(e){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:e+"_qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:e+"_qstring"}]}function i(e,t){return[{token:"string",merge:!0,regex:".*?"+e,next:t},{token:"string",merge:!0,regex:".+"}]}t.tag=function(e,t,n,s){e[t]=[{token:"text",regex:"\\s+"},{token:s?function(e){return s[e]?"meta.tag.tag-name."+s[e]:"meta.tag.tag-name"}:"meta.tag.tag-name",merge:!0,regex:"[-_a-zA-Z0-9:]+",next:t+"_embed_attribute_list"},{token:"empty",regex:"",next:t+"_embed_attribute_list"}],e[t+"_qstring"]=i("'",t+"_embed_attribute_list"),e[t+"_qqstring"]=i('"',t+"_embed_attribute_list"),e[t+"_embed_attribute_list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:n},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(r(t))}}),ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){function a(e,t){var n=!0,r=e.type.split("."),i=t.split(".");return i.forEach(function(e){if(r.indexOf(e)==-1)return n=!1,!1}),n}var r=e("../../lib/oop"),i=e("../behaviour/xml").XmlBehaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],f=function(){this.inherit(i),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var s=n.getCursorPosition(),f=new o(r,s.row,s.column),l=f.getCurrentToken(),c=!1;if(!l||!a(l,"meta.tag")&&(!a(l,"text")||!l.value.match("/"))){do l=f.stepBackward();while(l&&(a(l,"string")||a(l,"keyword.operator")||a(l,"entity.attribute-name")||a(l,"text")))}else c=!0;if(!l||!a(l,"meta.tag-name")||f.stepBackward().value.match("/"))return;var h=l.value;if(c)var h=h.substring(0,s.column-l.start);if(u.indexOf(h)!==-1)return;return{text:"></"+h+">",selection:[1,1]}}})};r.inherits(f,i),t.HtmlBehaviour=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){function u(e,t){var n=!0,r=e.type.split("."),i=t.split(".");return i.forEach(function(e){if(r.indexOf(e)==-1)return n=!1,!1}),n}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,a=function(){this.inherit(s,["string_dquotes"]),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var s=n.getCursorPosition(),a=new o(r,s.row,s.column),f=a.getCurrentToken(),l=!1;if(!f||!u(f,"meta.tag")&&(!u(f,"text")||!f.value.match("/"))){do f=a.stepBackward();while(f&&(u(f,"string")||u(f,"keyword.operator")||u(f,"entity.attribute-name")||u(f,"text")))}else l=!0;if(!f||!u(f,"meta.tag-name")||a.stepBackward().value.match("/"))return;var c=f.value;if(l)var c=c.substring(0,s.column-f.start);return{text:"></"+c+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+2);if(u=="</"){var a=this.$getIndent(r.doc.getLine(s.row))+r.getTabString(),f=this.$getIndent(r.doc.getLine(s.row));return{text:"\n"+a+"\n"+f,selection:[1,a.length,1,a.length]}}}})};r.inherits(a,i),t.XmlBehaviour=a}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(){i.call(this,new s({area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,li:1,dt:1,dd:1,p:1,rt:1,rp:1,optgroup:1,option:1,colgroup:1,td:1,th:1}),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../lib/lang"),s=e("../../range").Range,o=e("./fold_mode").FoldMode,u=e("../../token_iterator").TokenIterator,a=t.FoldMode=function(e){o.call(this),this.voidElements=e||{}};r.inherits(a,o),function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r.closing?t=="markbeginend"?"end":"":!r.tagName||this.voidElements[r.tagName.toLowerCase()]?"":r.selfClosing?"":r.value.indexOf("/"+r.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(e,t){var n=e.getTokens(t),r="";for(var s=0;s<n.length;s++){var o=n[s];o.type.indexOf("meta.tag")===0?r+=o.value:r+=i.stringRepeat(" ",o.value.length)}return this._parseTag(r)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(e){var t=this.tagRe.exec(e),n=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:e,match:t?t[2]:"",closing:t?!!t[3]:!1,selfClosing:t?!!t[5]||t[2]=="/>":!1,tagName:t?t[4]:"",column:t[1]?n+t[1].length:n}},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n="",r;do if(t.type.indexOf("meta.tag")===0){if(!r)var r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()};n+=t.value;if(n.indexOf(">")!==-1){var i=this._parseTag(n);return i.start=r,i.end={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length},e.stepForward(),i}}while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n="",r;do if(t.type.indexOf("meta.tag")===0){r||(r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length}),n=t.value+n;if(n.indexOf("<")!==-1){var i=this._parseTag(n);return i.end=r,i.start={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()},e.stepBackward(),i}}while(t=e.stepBackward());return null},this._pop=function(e,t){while(e.length){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.voidElements[t.tagName])return;if(this.voidElements[n.tagName]){e.pop();continue}return null}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r.match)return null;var i=r.closing||r.selfClosing,o=[],a;if(!i){var f=new u(e,n,r.column),l={row:n,column:r.column+r.tagName.length+2};while(a=this._readTagForward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(a.closing){this._pop(o,a);if(o.length==0)return s.fromP