Esites_Editor - Version 0.5.0

Version Notes

Version 0.5.0 is a major release! As of now you can turn any textarea element (both in the admin panel as well as the front-end) into an advanced editor.

By simply passing a matching CSS selector (e.g. a class or an ID) in the configuration panel you can target textarea's and transform them into a full-fledged editor including all available IDE-like features.

Also, we have implemented a couple new features such as HTML linting, highlighting trailing whitespaces and custom scrollbars. Just like all features this new functionality can be enabled (or disabled) via the configuration panel.

The GitHub repo can be found at: https://github.com/e-sites/magento-advanced-code-editor

Download this release

Release Info

Developer Boye Oomens
Extension Esites_Editor
Version 0.5.0
Comparing to
See all releases


Code changes from version 0.4.1 to 0.5.0

Files changed (148) hide show
  1. app/code/community/Esites/Editor/Block/Adminhtml/System/Email/Template/Edit/Form.php +0 -221
  2. app/code/community/Esites/Editor/Block/Standalone.php +56 -0
  3. app/code/community/Esites/Editor/Model/Config.php +50 -23
  4. app/code/community/Esites/Editor/Model/System/Config/Source/Scrollbars/Values.php +42 -0
  5. app/code/community/Esites/Editor/etc/config.xml +26 -6
  6. app/code/community/Esites/Editor/etc/system.xml +63 -15
  7. app/design/adminhtml/default/default/layout/esites_editor.xml +42 -0
  8. app/design/adminhtml/default/default/template/esites_editor/standalone.phtml +43 -0
  9. app/design/frontend/base/default/layout/esites_editor.xml +41 -0
  10. app/design/frontend/base/default/template/esites_editor/standalone.phtml +43 -0
  11. js/esites_editor/dist/css/styles.css +1 -0
  12. js/esites_editor/dist/js/app.js +1 -0
  13. js/esites_editor/dist/js/app/main.js +1 -0
  14. js/esites_editor/dist/js/app/module/code.js +1 -0
  15. js/esites_editor/dist/js/app/module/dialog.js +1 -0
  16. js/esites_editor/dist/js/app/module/editor.js +1 -0
  17. js/esites_editor/dist/js/app/module/setup.js +1 -0
  18. js/esites_editor/dist/js/app/module/standalone.js +1 -0
  19. js/esites_editor/dist/js/app/module/util.js +1 -0
  20. js/esites_editor/dist/js/app/var/addons.js +1 -0
  21. js/esites_editor/dist/js/app/var/cmOptions.js +1 -0
  22. js/esites_editor/dist/js/app/var/deps.js +1 -0
  23. js/esites_editor/dist/js/app/var/plugin.js +1 -0
  24. js/esites_editor/dist/js/app/var/targets.js +1 -0
  25. js/esites_editor/dist/js/app/var/tinymcePopup.js +1 -0
  26. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/comment/comment.js +20 -7
  27. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/comment/continuecomment.js +0 -0
  28. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/dialog/dialog.css +0 -0
  29. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/dialog/dialog.js +0 -0
  30. js/esites_editor/dist/js/vendor/codemirror/addon/display/autorefresh.js +47 -0
  31. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/fullscreen.css +0 -0
  32. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/fullscreen.js +0 -0
  33. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/panel.js +0 -0
  34. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/placeholder.js +3 -1
  35. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/rulers.js +0 -0
  36. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/closebrackets.js +10 -0
  37. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/closetag.js +6 -3
  38. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/continuelist.js +0 -0
  39. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/matchbrackets.js +0 -0
  40. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/matchtags.js +0 -0
  41. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/trailingspace.js +0 -0
  42. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/brace-fold.js +0 -0
  43. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/comment-fold.js +0 -0
  44. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/foldcode.js +0 -0
  45. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/foldgutter.css +0 -0
  46. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/foldgutter.js +0 -0
  47. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/indent-fold.js +0 -0
  48. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/markdown-fold.js +0 -0
  49. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/xml-fold.js +0 -0
  50. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/anyword-hint.js +1 -1
  51. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/css-hint.js +0 -0
  52. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/html-hint.js +0 -0
  53. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/javascript-hint.js +0 -0
  54. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/show-hint.css +0 -0
  55. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/show-hint.js +87 -30
  56. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/sql-hint.js +0 -0
  57. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/xml-hint.js +0 -0
  58. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/coffeescript-lint.js +0 -0
  59. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/css-lint.js +0 -0
  60. js/esites_editor/dist/js/vendor/codemirror/addon/lint/html-lint.js +46 -0
  61. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/javascript-lint.js +0 -0
  62. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/json-lint.js +0 -0
  63. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/lint.css +0 -0
  64. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/lint.js +29 -5
  65. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/yaml-lint.js +0 -0
  66. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/merge/merge.css +0 -0
  67. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/merge/merge.js +5 -8
  68. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/loadmode.js +0 -0
  69. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/multiplex.js +3 -3
  70. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/multiplex_test.js +1 -1
  71. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/overlay.js +0 -0
  72. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/simple.js +0 -0
  73. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/runmode/colorize.js +0 -0
  74. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/runmode/runmode-standalone.js +0 -0
  75. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/runmode/runmode.js +0 -0
  76. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/runmode/runmode.node.js +0 -0
  77. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/scroll/annotatescrollbar.js +0 -0
  78. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/scroll/scrollpastend.js +0 -0
  79. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/scroll/simplescrollbars.css +0 -0
  80. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/scroll/simplescrollbars.js +0 -0
  81. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/match-highlighter.js +0 -0
  82. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/matchesonscrollbar.css +0 -0
  83. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/matchesonscrollbar.js +0 -0
  84. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/search.js +91 -30
  85. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/searchcursor.js +0 -0
  86. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/selection/active-line.js +0 -0
  87. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/selection/mark-selection.js +0 -0
  88. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/selection/selection-pointer.js +0 -0
  89. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/tern/tern.css +1 -0
  90. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/tern/tern.js +7 -6
  91. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/tern/worker.js +0 -0
  92. js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/wrap/hardwrap.js +9 -6
  93. js/esites_editor/dist/js/vendor/codemirror/keymap/emacs.js +1 -0
  94. js/esites_editor/dist/js/vendor/codemirror/keymap/sublime.js +1 -0
  95. js/esites_editor/dist/js/vendor/codemirror/keymap/vim.js +4 -0
  96. js/esites_editor/dist/js/vendor/codemirror/lib/codemirror.css +1 -0
  97. js/esites_editor/dist/js/vendor/codemirror/lib/codemirror.js +7 -0
  98. js/esites_editor/dist/js/vendor/codemirror/mode/css/css.js +1 -0
  99. js/esites_editor/dist/js/vendor/codemirror/mode/handlebars/handlebars.js +1 -0
  100. js/esites_editor/dist/js/vendor/codemirror/mode/htmlmixed/htmlmixed.js +1 -0
  101. js/esites_editor/dist/js/vendor/codemirror/mode/javascript/javascript.js +1 -0
  102. js/esites_editor/dist/js/vendor/codemirror/mode/xml/xml.js +1 -0
  103. js/esites_editor/dist/js/vendor/codemirror/theme/3024-day.css +1 -0
  104. js/esites_editor/dist/js/vendor/codemirror/theme/3024-night.css +1 -0
  105. js/esites_editor/dist/js/vendor/codemirror/theme/abcdef.css +1 -0
  106. js/esites_editor/dist/js/vendor/codemirror/theme/ambiance-mobile.css +1 -0
  107. js/esites_editor/dist/js/vendor/codemirror/theme/ambiance.css +1 -0
  108. js/esites_editor/dist/js/vendor/codemirror/theme/base16-dark.css +1 -0
  109. js/esites_editor/dist/js/vendor/codemirror/theme/base16-light.css +1 -0
  110. js/esites_editor/dist/js/vendor/codemirror/theme/bespin.css +1 -0
  111. js/esites_editor/dist/js/vendor/codemirror/theme/blackboard.css +1 -0
  112. js/esites_editor/dist/js/vendor/codemirror/theme/cobalt.css +1 -0
  113. js/esites_editor/dist/js/vendor/codemirror/theme/colorforth.css +1 -0
  114. js/esites_editor/dist/js/vendor/codemirror/theme/dracula.css +1 -0
  115. js/esites_editor/dist/js/vendor/codemirror/theme/eclipse.css +1 -0
  116. js/esites_editor/dist/js/vendor/codemirror/theme/elegant.css +1 -0
  117. js/esites_editor/dist/js/vendor/codemirror/theme/erlang-dark.css +1 -0
  118. js/esites_editor/dist/js/vendor/codemirror/theme/hopscotch.css +1 -0
  119. js/esites_editor/dist/js/vendor/codemirror/theme/icecoder.css +1 -0
  120. js/esites_editor/dist/js/vendor/codemirror/theme/isotope.css +1 -0
  121. js/esites_editor/dist/js/vendor/codemirror/theme/lesser-dark.css +1 -0
  122. js/esites_editor/dist/js/vendor/codemirror/theme/liquibyte.css +1 -0
  123. js/esites_editor/dist/js/vendor/codemirror/theme/material.css +1 -0
  124. js/esites_editor/dist/js/vendor/codemirror/theme/mbo.css +1 -0
  125. js/esites_editor/dist/js/vendor/codemirror/theme/mdn-like.css +1 -0
  126. js/esites_editor/dist/js/vendor/codemirror/theme/midnight.css +1 -0
  127. js/esites_editor/dist/js/vendor/codemirror/theme/monokai.css +1 -0
  128. js/esites_editor/dist/js/vendor/codemirror/theme/neat.css +1 -0
  129. js/esites_editor/dist/js/vendor/codemirror/theme/neo.css +1 -0
  130. js/esites_editor/dist/js/vendor/codemirror/theme/night.css +1 -0
  131. js/esites_editor/dist/js/vendor/codemirror/theme/paraiso-dark.css +1 -0
  132. js/esites_editor/dist/js/vendor/codemirror/theme/paraiso-light.css +1 -0
  133. js/esites_editor/dist/js/vendor/codemirror/theme/pastel-on-dark.css +1 -0
  134. js/esites_editor/dist/js/vendor/codemirror/theme/railscasts.css +1 -0
  135. js/esites_editor/dist/js/vendor/codemirror/theme/rubyblue.css +1 -0
  136. js/esites_editor/dist/js/vendor/codemirror/theme/seti.css +1 -0
  137. js/esites_editor/dist/js/vendor/codemirror/theme/solarized.css +1 -0
  138. js/esites_editor/dist/js/vendor/codemirror/theme/the-matrix.css +1 -0
  139. js/esites_editor/dist/js/vendor/codemirror/theme/tomorrow-night-bright.css +1 -0
  140. js/esites_editor/dist/js/vendor/codemirror/theme/tomorrow-night-eighties.css +1 -0
  141. js/esites_editor/dist/js/vendor/codemirror/theme/ttcn.css +1 -0
  142. js/esites_editor/dist/js/vendor/codemirror/theme/twilight.css +1 -0
  143. js/esites_editor/dist/js/vendor/codemirror/theme/vibrant-ink.css +1 -0
  144. js/esites_editor/dist/js/vendor/codemirror/theme/xq-dark.css +1 -0
  145. js/esites_editor/dist/js/vendor/codemirror/theme/xq-light.css +1 -0
  146. js/esites_editor/dist/js/vendor/codemirror/theme/yeti.css +1 -0
  147. js/esites_editor/dist/js/vendor/codemirror/theme/zenburn.css +1 -0
  148. js/esites_editor/dist/js/vendor/emmet-codemirror/dist/emmet.js +14 -0
app/code/community/Esites/Editor/Block/Adminhtml/System/Email/Template/Edit/Form.php DELETED
@@ -1,221 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @category Esites
16
- * @package Esites_Editor
17
- * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
18
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- */
20
-
21
- /**
22
- * Adminhtml system template edit form
23
- *
24
- * @category Esites
25
- * @package Esites_Editor
26
- */
27
- class Esites_Editor_Block_Adminhtml_System_Email_Template_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
28
- {
29
- /**
30
- * Prepare layout.
31
- * Add files to use dialog windows
32
- *
33
- * @return Mage_Adminhtml_Block_System_Email_Template_Edit_Form
34
- */
35
- protected function _prepareLayout()
36
- {
37
- if ($head = $this->getLayout()->getBlock('head')) {
38
- $head->addItem('js', 'prototype/window.js')
39
- ->addItem('js_css', 'prototype/windows/themes/default.css')
40
- ->addCss('lib/prototype/windows/themes/magento.css')
41
- ->addItem('js_css', 'tiny_mce/plugins/esites_editor/js/vendor/codemirror/lib/codemirror.css')
42
- ->addItem('js_css', 'tiny_mce/plugins/esites_editor/css/styles.css')
43
- ->addItem('js', 'tiny_mce/tiny_mce.js')
44
- ->addItem('js', 'tiny_mce/plugins/esites_editor/js/vendor/requirejs/require.min.js')
45
- ->addItem('js', 'mage/adminhtml/variables.js');
46
- }
47
- return parent::_prepareLayout();
48
- }
49
-
50
- /**
51
- * Add additional settings to wysiwyg config
52
- *
53
- * @param Varien_Event_Observer $observer
54
- *
55
- * @return array
56
- */
57
- protected function getEditorConfig()
58
- {
59
-
60
- if (Mage::getStoreConfig('editor/general/enabled', Mage::app()->getStore())) {
61
- $settings = Mage::getModel('editor/config')->getPluginSettings();
62
- }
63
-
64
- return $settings['plugins'][0]['config'];
65
- }
66
-
67
- /**
68
- * Whether the email template sections are selected via the admin panel
69
- *
70
- * @return bool
71
- */
72
- protected function hasEmailTemplateSection()
73
- {
74
- $editorConf = $this->getEditorConfig();
75
- $sections = explode(',', $editorConf['sections']);
76
-
77
- return in_array('wysiwygtemplate_text', $sections);
78
- }
79
-
80
- /**
81
- * Add fields to form and create template info form
82
- *
83
- * @return Mage_Adminhtml_Block_Widget_Form
84
- */
85
- protected function _prepareForm()
86
- {
87
- $form = new Varien_Data_Form();
88
- $editorConf = $this->getEditorConfig();
89
-
90
- $fieldset = $form->addFieldset('base_fieldset', array(
91
- 'legend' => Mage::helper('adminhtml')->__('Template Information'),
92
- 'class' => 'fieldset-wide'
93
- ));
94
-
95
- $templateId = $this->getEmailTemplate()->getId();
96
- if ($templateId) {
97
- $fieldset->addField('used_currently_for', 'label', array(
98
- 'label' => Mage::helper('adminhtml')->__('Used Currently For'),
99
- 'container_id' => 'used_currently_for',
100
- 'after_element_html' =>
101
- '<script type="text/javascript">' .
102
- (!$this->getEmailTemplate()->getSystemConfigPathsWhereUsedCurrently()
103
- ? '$(\'' . 'used_currently_for' . '\').hide(); ' : '') .
104
- '</script>',
105
- ));
106
- }
107
-
108
- if (!$templateId) {
109
- $fieldset->addField('used_default_for', 'label', array(
110
- 'label' => Mage::helper('adminhtml')->__('Used as Default For'),
111
- 'container_id' => 'used_default_for',
112
- 'after_element_html' =>
113
- '<script type="text/javascript">' .
114
- (!(bool)$this->getEmailTemplate()->getOrigTemplateCode()
115
- ? '$(\'' . 'used_default_for' . '\').hide(); ' : '') .
116
- '</script>',
117
- ));
118
- }
119
-
120
- $fieldset->addField('template_code', 'text', array(
121
- 'name'=>'template_code',
122
- 'label' => Mage::helper('adminhtml')->__('Template Name'),
123
- 'required' => true,
124
- 'after_element_html' => ($this->hasEmailTemplateSection() ? '<script type="text/javascript">' .
125
- 'var esites_editor = {settings: ' . json_encode($editorConf) . '};' .
126
- 'requirejs(["/js/tiny_mce/plugins/esites_editor/js/app.js"]);' .
127
- '</script>' : ''),
128
- ));
129
-
130
- $fieldset->addField('template_subject', 'text', array(
131
- 'name'=>'template_subject',
132
- 'label' => Mage::helper('adminhtml')->__('Template Subject'),
133
- 'required' => true
134
- ));
135
-
136
- $fieldset->addField('orig_template_variables', 'hidden', array(
137
- 'name' => 'orig_template_variables',
138
- ));
139
-
140
- $fieldset->addField('variables', 'hidden', array(
141
- 'name' => 'variables',
142
- 'value' => Zend_Json::encode($this->getVariables())
143
- ));
144
-
145
- $fieldset->addField('template_variables', 'hidden', array(
146
- 'name' => 'template_variables',
147
- ));
148
-
149
- $insertVariableButton = $this->getLayout()
150
- ->createBlock('adminhtml/widget_button', '', array(
151
- 'type' => 'button',
152
- 'label' => Mage::helper('adminhtml')->__('Insert Variable...'),
153
- 'onclick' => 'templateControl.openVariableChooser();return false;'
154
- ));
155
-
156
- $fieldset->addField('insert_variable', 'note', array(
157
- 'text' => $insertVariableButton->toHtml()
158
- ));
159
-
160
- $fieldset->addField('template_text', 'textarea', array(
161
- 'name'=>'template_text',
162
- 'label' => Mage::helper('adminhtml')->__('Template Content'),
163
- 'title' => Mage::helper('adminhtml')->__('Template Content'),
164
- 'required' => true,
165
- 'style' => 'height:24em;',
166
- ));
167
-
168
- if (!$this->getEmailTemplate()->isPlain()) {
169
- $fieldset->addField('template_styles', 'textarea', array(
170
- 'name'=>'template_styles',
171
- 'label' => Mage::helper('adminhtml')->__('Template Styles'),
172
- 'container_id' => 'field_template_styles'
173
- ));
174
- }
175
-
176
- if ($templateId) {
177
- $form->addValues($this->getEmailTemplate()->getData());
178
- }
179
-
180
- if ($values = Mage::getSingleton('adminhtml/session')->getData('email_template_form_data', true)) {
181
- $form->setValues($values);
182
- }
183
-
184
- $this->setForm($form);
185
-
186
- return parent::_prepareForm();
187
- }
188
-
189
- /**
190
- * Return current email template model
191
- *
192
- * @return Mage_Core_Model_Email_Template
193
- */
194
- public function getEmailTemplate()
195
- {
196
- return Mage::registry('current_email_template');
197
- }
198
-
199
- /**
200
- * Retrieve variables to insert into email
201
- *
202
- * @return array
203
- */
204
- public function getVariables()
205
- {
206
- $variables = array();
207
- $variables[] = Mage::getModel('core/source_email_variables')
208
- ->toOptionArray(true);
209
- $customVariables = Mage::getModel('core/variable')
210
- ->getVariablesOptionArray(true);
211
- if ($customVariables) {
212
- $variables[] = $customVariables;
213
- }
214
- /* @var $template Mage_Core_Model_Email_Template */
215
- $template = Mage::registry('current_email_template');
216
- if ($template->getId() && $templateVariables = $template->getVariablesOptionArray(true)) {
217
- $variables[] = $templateVariables;
218
- }
219
- return $variables;
220
- }
221
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Esites/Editor/Block/Standalone.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Esites
16
+ * @package Esites_Editor
17
+ * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class Esites_Editor_Block_Standalone extends Mage_Core_Block_Template
22
+ {
23
+
24
+ /**
25
+ * Editor config
26
+ *
27
+ * @var array
28
+ */
29
+ protected $_config = array();
30
+
31
+ /**
32
+ * Retrieves the editor config
33
+ *
34
+ * @return array
35
+ */
36
+ public function getEditorConfig()
37
+ {
38
+
39
+ if (Mage::getStoreConfig('editor/general/enabled', Mage::app()->getStore())) {
40
+ $this->_config = Mage::getModel('editor/config')->getPluginSettings();
41
+ $this->_config = $this->_config['plugins'][0]['config'];
42
+ }
43
+
44
+ return $this->_config;
45
+ }
46
+
47
+ /**
48
+ * Returns the current extension version
49
+ *
50
+ * @return string
51
+ */
52
+ public function getExtensionVersion()
53
+ {
54
+ return (string) Mage::getConfig()->getNode()->modules->Esites_Editor->version;
55
+ }
56
+ }
app/code/community/Esites/Editor/Model/Config.php CHANGED
@@ -26,6 +26,35 @@
26
  */
27
  class Esites_Editor_Model_Config extends Varien_Object
28
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  /**
30
  * Return config settings for widgets insertion plugin based on editor element config
31
  *
@@ -35,33 +64,31 @@ class Esites_Editor_Model_Config extends Varien_Object
35
  */
36
  public function getPluginSettings($config=array())
37
  {
 
38
  $store = Mage::app()->getStore();
39
  $configPlugins = (is_object($config) ? $config->getData('plugins') : array());
40
- $EsitesEditorPlugin = array(
41
- array(
42
- 'name' => 'esites_editor',
43
- 'src' => Mage::getBaseUrl('js') . 'tiny_mce/plugins/esites_editor/esites_editor_plugin.js',
44
- 'config' => array(
45
- 'theme' => (string) Mage::getStoreConfig('editor/appearance/theme', $store),
46
- 'emmet' => (bool) Mage::getStoreConfig('editor/prefs/emmet', $store),
47
- 'activeLine' => (bool) Mage::getStoreConfig('editor/prefs/activeLine', $store),
48
- 'codeFolding' => (bool) Mage::getStoreConfig('editor/prefs/codeFolding', $store),
49
- 'indentUnit' => (int) Mage::getStoreConfig('editor/appearance/indentUnit', $store),
50
- 'lineWrapping' => (bool) Mage::getStoreConfig('editor/prefs/lineWrapping', $store),
51
- 'lineLength' => (int) Mage::getStoreConfig('editor/appearance/lineLength', $store),
52
- 'autoFormat' => (bool) Mage::getStoreConfig('editor/appearance/autoFormat', $store),
53
- 'matchTags' => (bool) Mage::getStoreConfig('editor/prefs/matchTags', $store),
54
- 'matchHighlight' => (bool) Mage::getStoreConfig('editor/prefs/matchHighlight', $store),
55
- 'closeTags' => (bool) Mage::getStoreConfig('editor/prefs/closeTags', $store),
56
- 'search' => (bool) Mage::getStoreConfig('editor/prefs/search', $store),
57
- 'completion' => (bool) Mage::getStoreConfig('editor/prefs/completion', $store),
58
- 'fontSize' => (string) Mage::getStoreConfig('editor/appearance/fontSize', $store),
59
- 'keymap' => (string) Mage::getStoreConfig('editor/prefs/keymap', $store),
60
- 'sections' => (string) Mage::getStoreConfig('editor/general/sections', $store)
61
- )
62
- )
63
  );
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  $variableConfig['plugins'] = array_merge($EsitesEditorPlugin, $configPlugins);
66
 
67
  return $variableConfig;
26
  */
27
  class Esites_Editor_Model_Config extends Varien_Object
28
  {
29
+ /**
30
+ * All available configuration options and their respective type
31
+ *
32
+ * @var array
33
+ */
34
+ protected $configOptions = array(
35
+ 'editor/general/sections' => 'string',
36
+ 'editor/general/selectors' => 'string',
37
+ 'editor/prefs/emmet' => 'bool',
38
+ 'editor/prefs/activeLine' => 'bool',
39
+ 'editor/prefs/codeFolding' => 'bool',
40
+ 'editor/prefs/lineWrapping' => 'bool',
41
+ 'editor/prefs/matchTags' => 'bool',
42
+ 'editor/prefs/matchHighlight' => 'bool',
43
+ 'editor/prefs/trailingSpaces' => 'bool',
44
+ 'editor/prefs/closeTags' => 'bool',
45
+ 'editor/prefs/search' => 'bool',
46
+ 'editor/prefs/completion' => 'bool',
47
+ 'editor/prefs/lint' => 'bool',
48
+ 'editor/prefs/keymap' => 'string',
49
+ 'editor/appearance/theme' => 'string',
50
+ 'editor/appearance/scrollbars' => 'string',
51
+ 'editor/appearance/tabIndent' => 'bool',
52
+ 'editor/appearance/indentUnit' => 'int',
53
+ 'editor/appearance/lineLength' => 'int',
54
+ 'editor/appearance/autoFormat' => 'bool',
55
+ 'editor/appearance/fontSize' => 'string'
56
+ );
57
+
58
  /**
59
  * Return config settings for widgets insertion plugin based on editor element config
60
  *
64
  */
65
  public function getPluginSettings($config=array())
66
  {
67
+ $config = array();
68
  $store = Mage::app()->getStore();
69
  $configPlugins = (is_object($config) ? $config->getData('plugins') : array());
70
+ $plugin = array(
71
+ 'name' => 'esites_editor',
72
+ 'src' => Mage::getBaseUrl('js') . 'tiny_mce/plugins/esites_editor/esites_editor_plugin.js'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  );
74
 
75
+ foreach ($this->configOptions as $option => $type) {
76
+ $opt = explode('/', $option);
77
+ $value = Mage::getStoreConfig($option, $store);
78
+ settype($value, $type);
79
+ $config[$opt[2]] = $value;
80
+ }
81
+
82
+ if (!empty($config['selectors'])) {
83
+ $config['selectors'] = (array) explode(',', str_replace(array("\r", "\n"), '', $config['selectors']));
84
+ }
85
+
86
+ if (!empty($config['sections'])) {
87
+ $config['sections'] = (array) explode(',', $config['sections']);
88
+ }
89
+
90
+ $plugin['config'] = $config;
91
+ $EsitesEditorPlugin = array($plugin);
92
  $variableConfig['plugins'] = array_merge($EsitesEditorPlugin, $configPlugins);
93
 
94
  return $variableConfig;
app/code/community/Esites/Editor/Model/System/Config/Source/Scrollbars/Values.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Esites
16
+ * @package Esites_Editor
17
+ * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class Esites_Editor_Model_System_Config_Source_Scrollbars_Values extends Varien_Object
22
+ {
23
+ protected $scrollbars = array(
24
+ 'default' => 'default',
25
+ 'simple' => 'simple',
26
+ 'overlay' => 'overlay'
27
+ );
28
+
29
+ public function toOptionArray()
30
+ {
31
+ $values = array();
32
+
33
+ foreach ($this->scrollbars as $key => $label) {
34
+ $values[] = array(
35
+ 'value' => $key,
36
+ 'label' => Mage::helper('adminhtml')->__($label)
37
+ );
38
+ }
39
+
40
+ return $values;
41
+ }
42
+ }
app/code/community/Esites/Editor/etc/config.xml CHANGED
@@ -22,7 +22,7 @@
22
  <config>
23
  <modules>
24
  <Esites_Editor>
25
- <version>0.4.1</version>
26
  </Esites_Editor>
27
  </modules>
28
 
@@ -38,11 +38,9 @@
38
  </editor>
39
  </helpers>
40
  <blocks>
41
- <adminhtml>
42
- <rewrite>
43
- <system_email_template_edit_form>Esites_Editor_Block_Adminhtml_System_Email_Template_Edit_Form</system_email_template_edit_form>
44
- </rewrite>
45
- </adminhtml>
46
  </blocks>
47
  </global>
48
 
@@ -51,6 +49,7 @@
51
  <general>
52
  <enabled>0</enabled>
53
  <sections>wysiwygpage_content</sections>
 
54
  </general>
55
  <prefs>
56
  <keymap>default</keymap>
@@ -60,21 +59,42 @@
60
  <lineWrapping>1</lineWrapping>
61
  <matchTags>1</matchTags>
62
  <matchHighlight>0</matchHighlight>
 
63
  <closeTags>1</closeTags>
64
  <search>1</search>
65
  <completion>0</completion>
 
66
  </prefs>
67
  <appearance>
68
  <theme>default</theme>
 
69
  <fontSize>12</fontSize>
70
  <indentUnit>4</indentUnit>
 
71
  <autoFormat>1</autoFormat>
72
  <lineLength>100</lineLength>
73
  </appearance>
74
  </editor>
75
  </default>
76
 
 
 
 
 
 
 
 
 
 
 
77
  <adminhtml>
 
 
 
 
 
 
 
78
  <translate>
79
  <modules>
80
  <Esites_Editor>
22
  <config>
23
  <modules>
24
  <Esites_Editor>
25
+ <version>0.5.0</version>
26
  </Esites_Editor>
27
  </modules>
28
 
38
  </editor>
39
  </helpers>
40
  <blocks>
41
+ <editor>
42
+ <class>Esites_Editor_Block</class>
43
+ </editor>
 
 
44
  </blocks>
45
  </global>
46
 
49
  <general>
50
  <enabled>0</enabled>
51
  <sections>wysiwygpage_content</sections>
52
+ <selectors></selectors>
53
  </general>
54
  <prefs>
55
  <keymap>default</keymap>
59
  <lineWrapping>1</lineWrapping>
60
  <matchTags>1</matchTags>
61
  <matchHighlight>0</matchHighlight>
62
+ <trailingSpaces>0</trailingSpaces>
63
  <closeTags>1</closeTags>
64
  <search>1</search>
65
  <completion>0</completion>
66
+ <lint>0</lint>
67
  </prefs>
68
  <appearance>
69
  <theme>default</theme>
70
+ <scrollbars>default</scrollbars>
71
  <fontSize>12</fontSize>
72
  <indentUnit>4</indentUnit>
73
+ <tabIndent>0</tabIndent>
74
  <autoFormat>1</autoFormat>
75
  <lineLength>100</lineLength>
76
  </appearance>
77
  </editor>
78
  </default>
79
 
80
+ <frontend>
81
+ <layout>
82
+ <updates>
83
+ <editor module="Esites_Editor">
84
+ <file>esites_editor.xml</file>
85
+ </editor>
86
+ </updates>
87
+ </layout>
88
+ </frontend>
89
+
90
  <adminhtml>
91
+ <layout>
92
+ <updates>
93
+ <editor module="Esites_Editor">
94
+ <file>esites_editor.xml</file>
95
+ </editor>
96
+ </updates>
97
+ </layout>
98
  <translate>
99
  <modules>
100
  <Esites_Editor>
app/code/community/Esites/Editor/etc/system.xml CHANGED
@@ -28,7 +28,7 @@
28
  </tabs>
29
  <sections>
30
  <editor translate="label" module="editor">
31
- <label>Advanced HTML Editor</label>
32
  <tab>esites</tab>
33
  <frontend_type>text</frontend_type>
34
  <sort_order>100</sort_order>
@@ -64,6 +64,15 @@
64
  <validate>validate-select</validate>
65
  <comment><![CDATA[Select the sections where the editor should be active]]></comment>
66
  </sections>
 
 
 
 
 
 
 
 
 
67
  </fields>
68
  </general>
69
  <prefs translate="label" module="editor">
@@ -141,6 +150,16 @@
141
  <show_in_store>0</show_in_store>
142
  <comment><![CDATA[Search and highlight occurrences of the selected text]]></comment>
143
  </matchHighlight>
 
 
 
 
 
 
 
 
 
 
144
  <closeTags>
145
  <label>Auto-close tags</label>
146
  <frontend_type>select</frontend_type>
@@ -168,6 +187,15 @@
168
  <show_in_website>1</show_in_website>
169
  <show_in_store>0</show_in_store>
170
  </completion>
 
 
 
 
 
 
 
 
 
171
  </fields>
172
  </prefs>
173
  <appearance translate="label" module="editor">
@@ -177,41 +205,61 @@
177
  <show_in_website>1</show_in_website>
178
  <show_in_store>1</show_in_store>
179
  <fields>
180
- <fontSize translate="label">
181
- <label>Font size</label>
182
- <frontend_type>text</frontend_type>
183
- <sort_order>0</sort_order>
184
- <show_in_default>1</show_in_default>
185
- <show_in_website>1</show_in_website>
186
- <show_in_store>0</show_in_store>
187
- <validate>validate-number</validate>
188
- <comment><![CDATA[Font size of the editor (in pixels)]]></comment>
189
- </fontSize>
190
  <theme translate="label">
191
  <label>Theme</label>
192
  <frontend_type>select</frontend_type>
193
  <source_model>editor/system_config_source_theme_values</source_model>
194
- <sort_order>1</sort_order>
195
  <show_in_default>1</show_in_default>
196
  <show_in_website>1</show_in_website>
197
  <show_in_store>0</show_in_store>
198
  <comment><![CDATA[<a href="https://codemirror.net/demo/theme.html" target="_blank">Click here for a demo of all available themes</a>]]></comment>
199
  </theme>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  <indentUnit>
201
  <label>Indent unit</label>
202
  <frontend_type>select</frontend_type>
203
  <source_model>editor/system_config_source_indentunit_values</source_model>
204
- <sort_order>1</sort_order>
205
  <show_in_default>1</show_in_default>
206
  <show_in_website>1</show_in_website>
207
  <show_in_store>0</show_in_store>
208
  <comment><![CDATA[How many spaces a block should be indented]]></comment>
209
  </indentUnit>
 
 
 
 
 
 
 
 
 
 
210
  <autoFormat translate="label">
211
  <label>Auto format</label>
212
  <frontend_type>select</frontend_type>
213
  <source_model>adminhtml/system_config_source_yesno</source_model>
214
- <sort_order>2</sort_order>
215
  <show_in_default>1</show_in_default>
216
  <show_in_website>1</show_in_website>
217
  <show_in_store>0</show_in_store>
@@ -220,7 +268,7 @@
220
  <lineLength translate="label">
221
  <label>Wrap line length</label>
222
  <frontend_type>text</frontend_type>
223
- <sort_order>3</sort_order>
224
  <show_in_default>1</show_in_default>
225
  <show_in_website>1</show_in_website>
226
  <show_in_store>0</show_in_store>
28
  </tabs>
29
  <sections>
30
  <editor translate="label" module="editor">
31
+ <label>Advanced Code Editor</label>
32
  <tab>esites</tab>
33
  <frontend_type>text</frontend_type>
34
  <sort_order>100</sort_order>
64
  <validate>validate-select</validate>
65
  <comment><![CDATA[Select the sections where the editor should be active]]></comment>
66
  </sections>
67
+ <selectors translate="label">
68
+ <label>Stand-alone selectors</label>
69
+ <frontend_type>textarea</frontend_type>
70
+ <sort_order>3</sort_order>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>1</show_in_website>
73
+ <show_in_store>0</show_in_store>
74
+ <comment><![CDATA[Turn elements (i.e. &lt;textarea&gt;'s) into a stand-alone editor by passing (comma-separated) CSS selectors]]></comment>
75
+ </selectors>
76
  </fields>
77
  </general>
78
  <prefs translate="label" module="editor">
150
  <show_in_store>0</show_in_store>
151
  <comment><![CDATA[Search and highlight occurrences of the selected text]]></comment>
152
  </matchHighlight>
153
+ <trailingSpaces>
154
+ <label>Show trailing whitespace</label>
155
+ <frontend_type>select</frontend_type>
156
+ <source_model>adminhtml/system_config_source_yesno</source_model>
157
+ <sort_order>4</sort_order>
158
+ <show_in_default>1</show_in_default>
159
+ <show_in_website>1</show_in_website>
160
+ <show_in_store>0</show_in_store>
161
+ <comment><![CDATA[Highlights trailing whitespaces]]></comment>
162
+ </trailingSpaces>
163
  <closeTags>
164
  <label>Auto-close tags</label>
165
  <frontend_type>select</frontend_type>
187
  <show_in_website>1</show_in_website>
188
  <show_in_store>0</show_in_store>
189
  </completion>
190
+ <lint>
191
+ <label>HTML lint</label>
192
+ <frontend_type>select</frontend_type>
193
+ <source_model>adminhtml/system_config_source_yesno</source_model>
194
+ <sort_order>7</sort_order>
195
+ <show_in_default>1</show_in_default>
196
+ <show_in_website>1</show_in_website>
197
+ <show_in_store>0</show_in_store>
198
+ </lint>
199
  </fields>
200
  </prefs>
201
  <appearance translate="label" module="editor">
205
  <show_in_website>1</show_in_website>
206
  <show_in_store>1</show_in_store>
207
  <fields>
 
 
 
 
 
 
 
 
 
 
208
  <theme translate="label">
209
  <label>Theme</label>
210
  <frontend_type>select</frontend_type>
211
  <source_model>editor/system_config_source_theme_values</source_model>
212
+ <sort_order>0</sort_order>
213
  <show_in_default>1</show_in_default>
214
  <show_in_website>1</show_in_website>
215
  <show_in_store>0</show_in_store>
216
  <comment><![CDATA[<a href="https://codemirror.net/demo/theme.html" target="_blank">Click here for a demo of all available themes</a>]]></comment>
217
  </theme>
218
+ <scrollbars translate="label">
219
+ <label>Scrollbars</label>
220
+ <frontend_type>select</frontend_type>
221
+ <source_model>editor/system_config_source_scrollbars_values</source_model>
222
+ <sort_order>0</sort_order>
223
+ <show_in_default>1</show_in_default>
224
+ <show_in_website>1</show_in_website>
225
+ <show_in_store>0</show_in_store>
226
+ <comment><![CDATA[Non-native scrollbar style]]></comment>
227
+ </scrollbars>
228
+ <fontSize translate="label">
229
+ <label>Font size</label>
230
+ <frontend_type>text</frontend_type>
231
+ <sort_order>1</sort_order>
232
+ <show_in_default>1</show_in_default>
233
+ <show_in_website>1</show_in_website>
234
+ <show_in_store>0</show_in_store>
235
+ <validate>validate-number</validate>
236
+ <comment><![CDATA[Font size of the editor (in pixels)]]></comment>
237
+ </fontSize>
238
  <indentUnit>
239
  <label>Indent unit</label>
240
  <frontend_type>select</frontend_type>
241
  <source_model>editor/system_config_source_indentunit_values</source_model>
242
+ <sort_order>2</sort_order>
243
  <show_in_default>1</show_in_default>
244
  <show_in_website>1</show_in_website>
245
  <show_in_store>0</show_in_store>
246
  <comment><![CDATA[How many spaces a block should be indented]]></comment>
247
  </indentUnit>
248
+ <tabIndent translate="label">
249
+ <label>Indent with tabs</label>
250
+ <frontend_type>select</frontend_type>
251
+ <source_model>adminhtml/system_config_source_yesno</source_model>
252
+ <sort_order>3</sort_order>
253
+ <show_in_default>1</show_in_default>
254
+ <show_in_website>1</show_in_website>
255
+ <show_in_store>0</show_in_store>
256
+ <comment><![CDATA[Whether to indent with (highlighted) tabs]]></comment>
257
+ </tabIndent>
258
  <autoFormat translate="label">
259
  <label>Auto format</label>
260
  <frontend_type>select</frontend_type>
261
  <source_model>adminhtml/system_config_source_yesno</source_model>
262
+ <sort_order>4</sort_order>
263
  <show_in_default>1</show_in_default>
264
  <show_in_website>1</show_in_website>
265
  <show_in_store>0</show_in_store>
268
  <lineLength translate="label">
269
  <label>Wrap line length</label>
270
  <frontend_type>text</frontend_type>
271
+ <sort_order>5</sort_order>
272
  <show_in_default>1</show_in_default>
273
  <show_in_website>1</show_in_website>
274
  <show_in_store>0</show_in_store>
app/design/adminhtml/default/default/layout/esites_editor.xml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Esites
17
+ * @package Esites_Editor
18
+ * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <layout>
23
+ <default>
24
+ <block type="editor/standalone" name="standalone" template="esites_editor/standalone.phtml"></block>
25
+ <reference name="head">
26
+ <action method="addItem" ifconfig="editor/general/enabled">
27
+ <type>js_css</type>
28
+ <name>esites_editor/dist/js/vendor/codemirror/lib/codemirror.css</name>
29
+ </action>
30
+ <action method="addItem" ifconfig="editor/general/enabled">
31
+ <type>js_css</type>
32
+ <name>esites_editor/dist/css/styles.css</name>
33
+ </action>
34
+ <block type="editor/standalone" name="standalone" template="esites_editor/standalone.phtml"></block>
35
+ </reference>
36
+ <reference name="notifications">
37
+ <action method="append" ifconfig="editor/general/enabled">
38
+ <block>standalone</block>
39
+ </action>
40
+ </reference>
41
+ </default>
42
+ </layout>
app/design/adminhtml/default/default/template/esites_editor/standalone.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Esites
16
+ * @package Esites_Editor
17
+ * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ ?>
21
+
22
+ <script src="/js/esites_editor/dist/js/vendor/requirejs/require.js" async></script>
23
+ <script>
24
+ (function (window) {
25
+ var doc = window.document,
26
+ timer = 0,
27
+ esites_editor = {
28
+ instances: [],
29
+ version: '<?php echo $this->getExtensionVersion(); ?>',
30
+ settings: <?php echo json_encode($this->getEditorConfig()); ?>,
31
+ init: function () {
32
+ requirejs(['/js/esites_editor/dist/js/app.js']);
33
+ }
34
+ };
35
+
36
+ Ajax.Responders.register({
37
+ onComplete: esites_editor.init
38
+ });
39
+
40
+ window.onload = setTimeout(esites_editor.init, 1000);
41
+ window.esites_editor = esites_editor;
42
+ }(this));
43
+ </script>
app/design/frontend/base/default/layout/esites_editor.xml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Esites
17
+ * @package Esites_Editor
18
+ * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <layout version="0.1.0">
23
+ <default>
24
+ <reference name="head">
25
+ <action method="addItem" ifconfig="editor/general/enabled">
26
+ <type>js_css</type>
27
+ <name>esites_editor/dist/js/vendor/codemirror/lib/codemirror.css</name>
28
+ </action>
29
+ <action method="addItem" ifconfig="editor/general/enabled">
30
+ <type>js_css</type>
31
+ <name>esites_editor/dist/css/styles.css</name>
32
+ </action>
33
+ <block type="editor/standalone" name="standalone" template="esites_editor/standalone.phtml"></block>
34
+ </reference>
35
+ <reference name="root">
36
+ <action method="append" ifconfig="editor/general/enabled">
37
+ <block>standalone</block>
38
+ </action>
39
+ </reference>
40
+ </default>
41
+ </layout>
app/design/frontend/base/default/template/esites_editor/standalone.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Esites
16
+ * @package Esites_Editor
17
+ * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ ?>
21
+
22
+ <script src="/js/esites_editor/dist/js/vendor/requirejs/require.js" async></script>
23
+ <script>
24
+ (function (window) {
25
+ var doc = window.document,
26
+ esites_editor = {
27
+ instances: [],
28
+ version: '<?php echo $this->getExtensionVersion(); ?>',
29
+ settings: <?php echo json_encode($this->getEditorConfig()); ?>,
30
+ init: function () {
31
+ requirejs(['/js/esites_editor/dist/js/app.js']);
32
+ }
33
+ };
34
+
35
+ if ( 'addEventListener' in window ) {
36
+ doc.addEventListener('DOMContentLoaded', esites_editor.init);
37
+ } else {
38
+ window.onload = esites_editor.init;
39
+ }
40
+
41
+ window.esites_editor = esites_editor;
42
+ }(this));
43
+ </script>
js/esites_editor/dist/css/styles.css ADDED
@@ -0,0 +1 @@
 
1
+ #htmlSource{opacity:0}.CodeMirror{font-size:12px;font-family:'Source Code Pro',Menlo,Monaco,consolas,monospace;border:1px solid #ccc}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=) right no-repeat}.CodeMirror-lines{line-height:normal}td.value textarea{opacity:1}td.value .CodeMirror-wrap{border:1px solid;border-color:#aaa #c8c8c8 #c8c8c8 #aaa}
js/esites_editor/dist/js/app.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(requirejs){"use strict";requirejs.config({baseUrl:"/js/esites_editor/dist/js/vendor",map:{"*":{css:"require-css/css"}},paths:{app:"../app",emmet:"emmet-codemirror/dist/emmet",gator:"gator/gator.min",htmlhint:"htmlhint/lib/htmlhint"},shim:{gator:{exports:"Gator"}},waitSeconds:0});define(["app/var/targets"],function(targets){targets.length&&requirejs(["app/main"])})}(requirejs);
js/esites_editor/dist/js/app/main.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(){"use strict";define(["../app/var/plugin","../app/var/addons","../app/var/deps","../app/var/cmOptions","../app/module/editor","../app/module/dialog","../app/module/setup","../app/module/util","codemirror/lib/codemirror","codemirror/mode/htmlmixed/htmlmixed"],function(plugin,addons,deps,options,editor,dialog,setup,util,CodeMirror){window.CodeMirror=CodeMirror;dialog&&dialog.resize();setup.init();util.forEach(plugin.settings,function(value,setting){if(addons.hasOwnProperty(setting)&&value){deps=deps.concat(addons[setting].deps);if(addons[setting].options&&addons[setting].options.hasOwnProperty("gutters")){options.gutters=options.gutters.concat(addons[setting].options.gutters.slice(0));delete addons[setting].options.gutters}editor.options=util.extend(options,addons[setting].options)}});editor.options.gutters=options.gutters;requirejs(deps,editor.init)})}();
js/esites_editor/dist/js/app/module/code.js ADDED
@@ -0,0 +1 @@
 
1
+ define(["codemirror/lib/codemirror","js-beautify/js/lib/beautify","js-beautify/js/lib/beautify-html","js-beautify/js/lib/beautify-css","../var/plugin"],function(CodeMirror,jsBeautify,htmlBeautify,cssBeautify,plugin){"use strict";var code={format:function(type,source){var beautifier="html"===type?htmlBeautify:cssBeautify;return beautifier[type+"_beautify"](source,{indent_size:plugin.settings.indentUnit,wrap_line_length:plugin.settings.lineLength||100})},completeAfter:function(cm,pred){(!pred||pred())&&setTimeout(function(){cm.state.completionActive||cm.showHint({completeSingle:!1})},100);return CodeMirror.Pass},completeIfAfterLt:function(cm){return code.completeAfter(cm,function(){var cur=cm.getCursor();return"<"===cm.getRange(CodeMirror.Pos(cur.line,cur.ch-1),cur)})},completeIfInTag:function(cm){return code.completeAfter(cm,function(){var inner,tok=cm.getTokenAt(cm.getCursor());if("string"===tok.type&&(!/['"]/.test(tok.string.charAt(tok.string.length-1))||1===tok.string.length))return!1;inner=CodeMirror.innerMode(cm.getMode(),tok.state).state;return inner.tagName})}};return code});
js/esites_editor/dist/js/app/module/dialog.js ADDED
@@ -0,0 +1 @@
 
1
+ define(["../var/tinymcePopup","../var/targets","./util"],function(tinyMCEPopup,targets,util){"use strict";var dialog={prepare:function(editor){editor.setSize(null,tinyMCEPopup.dom.getViewPort(window).h-65);dialog.setEvents(editor)},setEvents:function(editor){tinymce.DOM.bind(window,"resize",dialog.resize);tinymce.DOM.bind(util.getElem("form-editor"),"submit",util.proxy(dialog.save,editor));tinymce.DOM.bind(util.getElem("cancel"),"click",dialog.close)},resize:function(){var vp=tinyMCEPopup.dom.getViewPort(window);tinyMCEPopup.resizeToInnerSize();targets&&util.forEach(targets,function(textarea){textarea.style.height=vp.h-65+"px"})},close:function(){tinyMCEPopup.close();return!1},save:function(){tinyMCEPopup.editor.setContent(this.getValue(),{source_view:!0});tinyMCEPopup.close();return!1}};return tinyMCEPopup?dialog:null});
js/esites_editor/dist/js/app/module/editor.js ADDED
@@ -0,0 +1 @@
 
1
+ define(["codemirror/lib/codemirror","../var/plugin","../var/targets","../var/deps","./dialog","./util","./standalone"],function(CodeMirror,plugin,targets,deps,dialog,util,standalone){"use strict";var editor={};editor.instances=[];editor.options=null;editor.init=function(){util.forEach(targets,editor.createInstance);editor.instances.length&&editor.instances[0].focus()};editor.createInstance=function(textarea){var cm=CodeMirror.fromTextArea(textarea,editor.options);dialog&&dialog.prepare(cm);plugin.settings.emmet&&editor.initEmmet();editor.isStandAlone()&&standalone.init(cm,editor);plugin.instances.push(cm);editor.instances.push(cm)};editor.syncValue=function(cm){cm.getTextArea().value=cm.getValue()};editor.initEmmet=function(cm){requirejs(["emmet"],function(emmetCodeMirror){cm?emmetCodeMirror(cm):util.forEach(editor.instances,function(c){emmetCodeMirror(c)})})};editor.isStandAlone=function(){return-1!==util.inArray("wysiwygtemplate_text",plugin.settings.sections)};editor.insertVariable=function(obj,cm){var attr=obj.getAttribute("onclick"),val=attr.match(/{{(.*?)[\|\|.*?]?}}/)[0],doc=cm.getDoc(),cursor=doc.getCursor();doc.replaceRange(val,cursor)};return editor});
js/esites_editor/dist/js/app/module/setup.js ADDED
@@ -0,0 +1 @@
 
1
+ define(["../var/plugin","../var/tinymcePopup","../var/targets","./util","./code","css!codemirror/addon/fold/foldgutter.css","css!codemirror/addon/search/matchesonscrollbar.css","css!codemirror/addon/dialog/dialog.css","css!codemirror/addon/hint/show-hint.css"],function(plugin,tinyMCEPopup,targets,util,code){"use strict";function _applyTheme(){"default"!==plugin.settings.theme&&requirejs(["css!codemirror/theme/"+plugin.settings.theme+".css"])}function _setFontSize(){"12"!==plugin.settings.fontSize&&util.addCSS(".CodeMirror {font-size: "+plugin.settings.fontSize+"px}")}function _setEditorValue(textarea){var source=tinyMCEPopup?tinyMCEPopup.editor.getContent({source_view:!0}):textarea.value;plugin.settings.autoFormat&&(source=code.format("html",source));plugin.settings.selectors.length&&util.addCSS(".CodeMirror ~ .btn-wysiwyg {display: none}");textarea.value=source}return{init:function(){util.forEach(targets,_setEditorValue);_applyTheme();_setFontSize()}}});
js/esites_editor/dist/js/app/module/standalone.js ADDED
@@ -0,0 +1 @@
 
1
+ define(["codemirror/lib/codemirror","gator","./code","./util","../var/plugin"],function(CodeMirror,Gator,code,util,plugin){"use strict";function _monitorChanges(){var textarea=this.getTextArea();if(""!==textarea.value){this.setValue(code.format("html",textarea.value));if(stylesEditor){cssCode=stylesEditor.value;plugin.settings.autoFormat&&(cssCode=code.format("css",stylesEditor.value));cmStyles.setValue(cssCode)}clearInterval(timer)}}function _createCssEditor(editor){if(stylesEditor){cmStyles=CodeMirror.fromTextArea(stylesEditor,util.extend(editor.options,{mode:"css"}));cmStyles.on("blur",editor.syncValue);plugin.settings.emmet&&editor.initEmmet(cmStyles)}}function _init(cm,editor){var cm=cm;cm.on("blur",editor.syncValue);_createCssEditor(editor);Gator(document).on("click","#variables-chooser_content a",function(){editor.insertVariable(this,cm)}).on("click","#email_template_load_form button",function(){stylesEditor&&(stylesEditor.value="");util.forEach(editor.instances,function(el){el.getTextArea().value=""});timer=setInterval(util.proxy(_monitorChanges,cm),250)})}var cmStyles,cssCode,timer=null,stylesEditor=util.getElem("template_styles");return{init:_init}});
js/esites_editor/dist/js/app/module/util.js ADDED
@@ -0,0 +1 @@
 
1
+ define(function(undef){"use strict";var util={getElem:function(id){return document.getElementById(id)},inArray:function(elem,arr,i){var len;if(arr){if(arr.indexOf)return arr.indexOf.call(arr,elem,i);len=arr.length;i=i?0>i?Math.max(0,len+i):i:0;for(;len>i;i++)if(i in arr&&arr[i]===elem)return i}return-1},isArray:function(arr){return"[object Array]"===Object.prototype.toString.call(arr)},extend:function(obj,ext){var i,l,name,value,args=arguments;for(i=1,l=args.length;l>i;i++){ext=args[i];for(name in ext)if(ext.hasOwnProperty(name)){value=ext[name];value!==undef&&(obj[name]=value)}}return obj},forEach:function(collection,callback,scope){if("[object Object]"===Object.prototype.toString.call(collection))for(var prop in collection)Object.prototype.hasOwnProperty.call(collection,prop)&&callback.call(scope,collection[prop],prop,collection);else for(var i=0,len=collection.length;len>i;i++)callback.call(scope,collection[i],i,collection)},addCSS:function(css){var head=document.getElementsByTagName("head")[0],s=document.createElement("style");s.styleSheet?s.styleSheet.cssText=css:s.appendChild(document.createTextNode(css));head.appendChild(s)},isFunction:function(obj){return"function"==typeof obj},proxy:function(fn,context){var tmp,args,proxy,slice=[].slice;if("string"==typeof context){tmp=fn[context];context=fn;fn=tmp}if(!util.isFunction(fn))return void 0;args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))};return proxy}};return util});
js/esites_editor/dist/js/app/var/addons.js ADDED
@@ -0,0 +1 @@
 
1
+ define(["./plugin","../module/code"],function(plugin,code){"use strict";return{activeLine:{deps:["codemirror/addon/selection/active-line"],options:{styleActiveLine:!0}},closeTags:{deps:["codemirror/addon/edit/closetag"],options:{autoCloseTags:!0}},codeFolding:{deps:["codemirror/addon/fold/foldcode","codemirror/addon/fold/foldgutter","codemirror/addon/fold/xml-fold"],options:{foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}},completion:{deps:["codemirror/addon/hint/show-hint","codemirror/addon/hint/xml-hint","codemirror/addon/hint/html-hint"],options:{extraKeys:{"'<'":code.completeAfter,"'/'":code.completeIfAfterLt,"' '":code.completeIfInTag,"Ctrl-Space":"autocomplete"}}},keymap:{deps:["default"!==plugin.settings.keymap?"codemirror/keymap/"+plugin.settings.keymap:""],options:{keyMap:plugin.settings.keymap}},lineWrapping:{deps:["codemirror/addon/wrap/hardwrap"],options:{lineWrapping:!0}},lint:{deps:["css!codemirror/addon/lint/lint.css","codemirror/addon/lint/lint","codemirror/addon/lint/html-lint"],options:{lint:!0,gutters:["CodeMirror-lint-markers"]}},matchHighlight:{deps:["codemirror/addon/search/searchcursor","codemirror/addon/search/match-highlighter"],options:{highlightSelectionMatches:{showToken:/\w/}}},matchTags:{deps:["codemirror/addon/edit/matchtags"],options:{matchTags:{bothTags:!0}}},scrollbars:{deps:"default"!==plugin.settings.scrollbars?["css!codemirror/addon/scroll/simplescrollbars.css","codemirror/addon/scroll/simplescrollbars"]:[],options:"default"!==plugin.settings.scrollbars?{scrollbarStyle:plugin.settings.scrollbars}:{}},search:{deps:["codemirror/addon/dialog/dialog","codemirror/addon/search/searchcursor","codemirror/addon/search/search","codemirror/addon/scroll/annotatescrollbar","codemirror/addon/search/matchesonscrollbar"]},tabIndent:{deps:[],options:{indentWithTabs:!0}},trailingSpaces:{deps:["codemirror/addon/edit/trailingspace"],options:{showTrailingSpace:!0}}}});
js/esites_editor/dist/js/app/var/cmOptions.js ADDED
@@ -0,0 +1 @@
 
1
+ define(["./plugin","./tinymcePopup","../../codemirror/lib/codemirror","../../codemirror/addon/mode/multiplex"],function(plugin,tinyMCEPopup,CodeMirror){"use strict";CodeMirror.defineMode("htmlhandlebars",function(config){return CodeMirror.multiplexingMode(CodeMirror.getMode(config,"text/html"),{open:"{{",close:"}}",mode:CodeMirror.getMode(config,"handlebars"),parseDelimiters:!0})});return{mode:tinyMCEPopup?"htmlmixed":"htmlhandlebars",lineNumbers:!0,indentUnit:plugin.settings.indentUnit,theme:plugin.settings.theme,showCursorWhenSelecting:!0,gutters:[]}});
js/esites_editor/dist/js/app/var/deps.js ADDED
@@ -0,0 +1 @@
 
1
+ define(function(){"use strict";return[]});
js/esites_editor/dist/js/app/var/plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ define(["./tinymcePopup"],function(tinyMCEPopup){"use strict";return tinyMCEPopup?tinyMCEPopup.editor.plugins.esites_editor:esites_editor});
js/esites_editor/dist/js/app/var/targets.js ADDED
@@ -0,0 +1 @@
 
1
+ define(["../module/util","./plugin"],function(util,plugin){"use strict";var targets=["#htmlSource","#template_text"];util.isArray(plugin.settings.selectors)&&(targets=targets.concat(plugin.settings.selectors));return document.querySelectorAll(targets.join())});
js/esites_editor/dist/js/app/var/tinymcePopup.js ADDED
@@ -0,0 +1 @@
 
1
+ define(function(){"use strict";return window.tinyMCEPopup});
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/comment/comment.js RENAMED
@@ -21,22 +21,28 @@
21
  }
22
 
23
  CodeMirror.commands.toggleComment = function(cm) {
24
- var minLine = Infinity, ranges = cm.listSelections(), mode = null;
 
 
 
 
 
 
25
  for (var i = ranges.length - 1; i >= 0; i--) {
26
  var from = ranges[i].from(), to = ranges[i].to();
27
  if (from.line >= minLine) continue;
28
  if (to.line >= minLine) to = Pos(minLine, 0);
29
  minLine = from.line;
30
  if (mode == null) {
31
- if (cm.uncomment(from, to)) mode = "un";
32
- else { cm.lineComment(from, to); mode = "line"; }
33
  } else if (mode == "un") {
34
- cm.uncomment(from, to);
35
  } else {
36
- cm.lineComment(from, to);
37
  }
38
  }
39
- };
40
 
41
  CodeMirror.defineExtension("lineComment", function(from, to, options) {
42
  if (!options) options = noOptions;
@@ -57,7 +63,14 @@
57
 
58
  self.operation(function() {
59
  if (options.indent) {
60
- var baseString = firstLine.slice(0, firstNonWS(firstLine));
 
 
 
 
 
 
 
61
  for (var i = from.line; i < end; ++i) {
62
  var line = self.getLine(i), cut = baseString.length;
63
  if (!blankLines && !nonWS.test(line)) continue;
21
  }
22
 
23
  CodeMirror.commands.toggleComment = function(cm) {
24
+ cm.toggleComment();
25
+ };
26
+
27
+ CodeMirror.defineExtension("toggleComment", function(options) {
28
+ if (!options) options = noOptions;
29
+ var cm = this;
30
+ var minLine = Infinity, ranges = this.listSelections(), mode = null;
31
  for (var i = ranges.length - 1; i >= 0; i--) {
32
  var from = ranges[i].from(), to = ranges[i].to();
33
  if (from.line >= minLine) continue;
34
  if (to.line >= minLine) to = Pos(minLine, 0);
35
  minLine = from.line;
36
  if (mode == null) {
37
+ if (cm.uncomment(from, to, options)) mode = "un";
38
+ else { cm.lineComment(from, to, options); mode = "line"; }
39
  } else if (mode == "un") {
40
+ cm.uncomment(from, to, options);
41
  } else {
42
+ cm.lineComment(from, to, options);
43
  }
44
  }
45
+ });
46
 
47
  CodeMirror.defineExtension("lineComment", function(from, to, options) {
48
  if (!options) options = noOptions;
63
 
64
  self.operation(function() {
65
  if (options.indent) {
66
+ var baseString = null;
67
+ for (var i = from.line; i < end; ++i) {
68
+ var line = self.getLine(i);
69
+ var whitespace = line.slice(0, firstNonWS(line));
70
+ if (baseString == null || baseString.length > whitespace.length) {
71
+ baseString = whitespace;
72
+ }
73
+ }
74
  for (var i = from.line; i < end; ++i) {
75
  var line = self.getLine(i), cut = baseString.length;
76
  if (!blankLines && !nonWS.test(line)) continue;
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/comment/continuecomment.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/dialog/dialog.css RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/dialog/dialog.js RENAMED
File without changes
js/esites_editor/dist/js/vendor/codemirror/addon/display/autorefresh.js ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"))
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod)
9
+ else // Plain browser env
10
+ mod(CodeMirror)
11
+ })(function(CodeMirror) {
12
+ "use strict"
13
+
14
+ CodeMirror.defineOption("autoRefresh", false, function(cm, val) {
15
+ if (cm.state.autoRefresh) {
16
+ stopListening(cm, cm.state.autoRefresh)
17
+ cm.state.autoRefresh = null
18
+ }
19
+ if (val && cm.display.wrapper.offsetHeight == 0)
20
+ startListening(cm, cm.state.autoRefresh = {delay: val.delay || 250})
21
+ })
22
+
23
+ function startListening(cm, state) {
24
+ function check() {
25
+ if (cm.display.wrapper.offsetHeight) {
26
+ stopListening(cm, state)
27
+ if (cm.display.lastWrapHeight != cm.display.wrapper.clientHeight)
28
+ cm.refresh()
29
+ } else {
30
+ state.timeout = setTimeout(check, state.delay)
31
+ }
32
+ }
33
+ state.timeout = setTimeout(check, state.delay)
34
+ state.hurry = function() {
35
+ clearTimeout(state.timeout)
36
+ state.timeout = setTimeout(check, 50)
37
+ }
38
+ CodeMirror.on(window, "mouseup", state.hurry)
39
+ CodeMirror.on(window, "keyup", state.hurry)
40
+ }
41
+
42
+ function stopListening(_cm, state) {
43
+ clearTimeout(state.timeout)
44
+ CodeMirror.off(window, "mouseup", state.hurry)
45
+ CodeMirror.off(window, "keyup", state.hurry)
46
+ }
47
+ });
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/fullscreen.css RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/fullscreen.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/panel.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/placeholder.js RENAMED
@@ -37,7 +37,9 @@
37
  var elt = cm.state.placeholder = document.createElement("pre");
38
  elt.style.cssText = "height: 0; overflow: visible";
39
  elt.className = "CodeMirror-placeholder";
40
- elt.appendChild(document.createTextNode(cm.getOption("placeholder")));
 
 
41
  cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);
42
  }
43
 
37
  var elt = cm.state.placeholder = document.createElement("pre");
38
  elt.style.cssText = "height: 0; overflow: visible";
39
  elt.className = "CodeMirror-placeholder";
40
+ var placeHolder = cm.getOption("placeholder")
41
+ if (typeof placeHolder == "string") placeHolder = document.createTextNode(placeHolder)
42
+ elt.appendChild(placeHolder)
43
  cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);
44
  }
45
 
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/display/rulers.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/closebrackets.js RENAMED
@@ -90,6 +90,12 @@
90
  });
91
  }
92
 
 
 
 
 
 
 
93
  function handleChar(cm, ch) {
94
  var conf = getConfig(cm);
95
  if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
@@ -145,6 +151,10 @@
145
  for (var i = 0; i < sels.length; i++)
146
  sels[i] = left + sels[i] + right;
147
  cm.replaceSelections(sels, "around");
 
 
 
 
148
  } else if (type == "both") {
149
  cm.replaceSelection(left + right, null);
150
  cm.triggerElectric(left + right);
90
  });
91
  }
92
 
93
+ function contractSelection(sel) {
94
+ var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0;
95
+ return {anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)),
96
+ head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1))};
97
+ }
98
+
99
  function handleChar(cm, ch) {
100
  var conf = getConfig(cm);
101
  if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
151
  for (var i = 0; i < sels.length; i++)
152
  sels[i] = left + sels[i] + right;
153
  cm.replaceSelections(sels, "around");
154
+ sels = cm.listSelections().slice();
155
+ for (var i = 0; i < sels.length; i++)
156
+ sels[i] = contractSelection(sels[i]);
157
+ cm.setSelections(sels);
158
  } else if (type == "both") {
159
  cm.replaceSelection(left + right, null);
160
  cm.triggerElectric(left + right);
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/closetag.js RENAMED
@@ -108,19 +108,22 @@
108
  // when completing in JS/CSS snippet in htmlmixed mode. Does not
109
  // work for other XML embedded languages (there is no general
110
  // way to go from a mixed mode to its current XML state).
 
111
  if (inner.mode.name != "xml") {
112
  if (cm.getMode().name == "htmlmixed" && inner.mode.name == "javascript")
113
- replacements[i] = head + "script>";
114
  else if (cm.getMode().name == "htmlmixed" && inner.mode.name == "css")
115
- replacements[i] = head + "style>";
116
  else
117
  return CodeMirror.Pass;
118
  } else {
119
  if (!state.context || !state.context.tagName ||
120
  closingTagExists(cm, state.context.tagName, pos, state))
121
  return CodeMirror.Pass;
122
- replacements[i] = head + state.context.tagName + ">";
123
  }
 
 
124
  }
125
  cm.replaceSelections(replacements);
126
  ranges = cm.listSelections();
108
  // when completing in JS/CSS snippet in htmlmixed mode. Does not
109
  // work for other XML embedded languages (there is no general
110
  // way to go from a mixed mode to its current XML state).
111
+ var replacement;
112
  if (inner.mode.name != "xml") {
113
  if (cm.getMode().name == "htmlmixed" && inner.mode.name == "javascript")
114
+ replacement = head + "script";
115
  else if (cm.getMode().name == "htmlmixed" && inner.mode.name == "css")
116
+ replacement = head + "style";
117
  else
118
  return CodeMirror.Pass;
119
  } else {
120
  if (!state.context || !state.context.tagName ||
121
  closingTagExists(cm, state.context.tagName, pos, state))
122
  return CodeMirror.Pass;
123
+ replacement = head + state.context.tagName;
124
  }
125
+ if (cm.getLine(pos.line).charAt(tok.end) != ">") replacement += ">";
126
+ replacements[i] = replacement;
127
  }
128
  cm.replaceSelections(replacements);
129
  ranges = cm.listSelections();
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/continuelist.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/matchbrackets.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/matchtags.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/edit/trailingspace.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/brace-fold.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/comment-fold.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/foldcode.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/foldgutter.css RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/foldgutter.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/indent-fold.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/markdown-fold.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/fold/xml-fold.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/anyword-hint.js RENAMED
@@ -21,7 +21,7 @@
21
  while (start && word.test(curLine.charAt(start - 1))) --start;
22
  var curWord = start != end && curLine.slice(start, end);
23
 
24
- var list = [], seen = {};
25
  var re = new RegExp(word.source, "g");
26
  for (var dir = -1; dir <= 1; dir += 2) {
27
  var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
21
  while (start && word.test(curLine.charAt(start - 1))) --start;
22
  var curWord = start != end && curLine.slice(start, end);
23
 
24
+ var list = options && options.list || [], seen = {};
25
  var re = new RegExp(word.source, "g");
26
  for (var dir = -1; dir <= 1; dir += 2) {
27
  var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/css-hint.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/html-hint.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/javascript-hint.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/show-hint.css RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/show-hint.js RENAMED
@@ -25,8 +25,18 @@
25
  };
26
 
27
  CodeMirror.defineExtension("showHint", function(options) {
28
- // We want a single cursor position.
29
- if (this.listSelections().length > 1 || this.somethingSelected()) return;
 
 
 
 
 
 
 
 
 
 
30
 
31
  if (this.state.completionActive) this.state.completionActive.close();
32
  var completion = this.state.completionActive = new Completion(this, options);
@@ -38,12 +48,12 @@
38
 
39
  function Completion(cm, options) {
40
  this.cm = cm;
41
- this.options = this.buildOptions(options);
42
  this.widget = null;
43
  this.debounce = 0;
44
  this.tick = 0;
45
- this.startPos = this.cm.getCursor();
46
- this.startLen = this.cm.getLine(this.startPos.line).length;
47
 
48
  var self = this;
49
  cm.on("cursorActivity", this.activityFunc = function() { self.cursorActivity(); });
@@ -99,7 +109,6 @@
99
 
100
  update: function(first) {
101
  if (this.tick == null) return;
102
- if (this.data) CodeMirror.signal(this.data, "update");
103
  if (!this.options.hint.async) {
104
  this.finishUpdate(this.options.hint(this.cm, this.options), first);
105
  } else {
@@ -111,6 +120,8 @@
111
  },
112
 
113
  finishUpdate: function(data, first) {
 
 
114
  this.data = data;
115
 
116
  var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle);
@@ -123,20 +134,21 @@
123
  CodeMirror.signal(data, "shown");
124
  }
125
  }
126
- },
127
-
128
- buildOptions: function(options) {
129
- var editor = this.cm.options.hintOptions;
130
- var out = {};
131
- for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
132
- if (editor) for (var prop in editor)
133
- if (editor[prop] !== undefined) out[prop] = editor[prop];
134
- if (options) for (var prop in options)
135
- if (options[prop] !== undefined) out[prop] = options[prop];
136
- return out;
137
  }
138
  };
139
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  function getText(completion) {
141
  if (typeof completion == "string") return completion;
142
  else return completion.text;
@@ -335,34 +347,79 @@
335
  }
336
  };
337
 
338
- CodeMirror.registerHelper("hint", "auto", function(cm, options) {
339
- var helpers = cm.getHelpers(cm.getCursor(), "hint"), words;
 
 
 
 
 
 
 
 
340
  if (helpers.length) {
341
- for (var i = 0; i < helpers.length; i++) {
342
- var cur = helpers[i](cm, options);
343
- if (cur && cur.list.length) return cur;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  }
 
 
345
  } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
346
- if (words) return CodeMirror.hint.fromList(cm, {words: words});
347
  } else if (CodeMirror.hint.anyword) {
348
- return CodeMirror.hint.anyword(cm, options);
 
 
349
  }
 
 
 
 
350
  });
351
 
352
  CodeMirror.registerHelper("hint", "fromList", function(cm, options) {
353
  var cur = cm.getCursor(), token = cm.getTokenAt(cur);
 
 
 
 
 
 
354
  var found = [];
355
  for (var i = 0; i < options.words.length; i++) {
356
  var word = options.words[i];
357
- if (word.slice(0, token.string.length) == token.string)
358
  found.push(word);
359
  }
360
 
361
- if (found.length) return {
362
- list: found,
363
- from: CodeMirror.Pos(cur.line, token.start),
364
- to: CodeMirror.Pos(cur.line, token.end)
365
- };
366
  });
367
 
368
  CodeMirror.commands.autocomplete = CodeMirror.showHint;
25
  };
26
 
27
  CodeMirror.defineExtension("showHint", function(options) {
28
+ options = parseOptions(this, this.getCursor("start"), options);
29
+ var selections = this.listSelections()
30
+ if (selections.length > 1) return;
31
+ // By default, don't allow completion when something is selected.
32
+ // A hint function can have a `supportsSelection` property to
33
+ // indicate that it can handle selections.
34
+ if (this.somethingSelected()) {
35
+ if (!options.hint.supportsSelection) return;
36
+ // Don't try with cross-line selections
37
+ for (var i = 0; i < selections.length; i++)
38
+ if (selections[i].head.line != selections[i].anchor.line) return;
39
+ }
40
 
41
  if (this.state.completionActive) this.state.completionActive.close();
42
  var completion = this.state.completionActive = new Completion(this, options);
48
 
49
  function Completion(cm, options) {
50
  this.cm = cm;
51
+ this.options = options;
52
  this.widget = null;
53
  this.debounce = 0;
54
  this.tick = 0;
55
+ this.startPos = this.cm.getCursor("start");
56
+ this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;
57
 
58
  var self = this;
59
  cm.on("cursorActivity", this.activityFunc = function() { self.cursorActivity(); });
109
 
110
  update: function(first) {
111
  if (this.tick == null) return;
 
112
  if (!this.options.hint.async) {
113
  this.finishUpdate(this.options.hint(this.cm, this.options), first);
114
  } else {
120
  },
121
 
122
  finishUpdate: function(data, first) {
123
+ if (this.data) CodeMirror.signal(this.data, "update");
124
+ if (data && this.data && CodeMirror.cmpPos(data.from, this.data.from)) data = null;
125
  this.data = data;
126
 
127
  var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle);
134
  CodeMirror.signal(data, "shown");
135
  }
136
  }
 
 
 
 
 
 
 
 
 
 
 
137
  }
138
  };
139
 
140
+ function parseOptions(cm, pos, options) {
141
+ var editor = cm.options.hintOptions;
142
+ var out = {};
143
+ for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
144
+ if (editor) for (var prop in editor)
145
+ if (editor[prop] !== undefined) out[prop] = editor[prop];
146
+ if (options) for (var prop in options)
147
+ if (options[prop] !== undefined) out[prop] = options[prop];
148
+ if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos)
149
+ return out;
150
+ }
151
+
152
  function getText(completion) {
153
  if (typeof completion == "string") return completion;
154
  else return completion.text;
347
  }
348
  };
349
 
350
+ function applicableHelpers(cm, helpers) {
351
+ if (!cm.somethingSelected()) return helpers
352
+ var result = []
353
+ for (var i = 0; i < helpers.length; i++)
354
+ if (helpers[i].supportsSelection) result.push(helpers[i])
355
+ return result
356
+ }
357
+
358
+ function resolveAutoHints(cm, pos) {
359
+ var helpers = cm.getHelpers(pos, "hint"), words
360
  if (helpers.length) {
361
+ var async = false, resolved
362
+ for (var i = 0; i < helpers.length; i++) if (helpers[i].async) async = true
363
+ if (async) {
364
+ resolved = function(cm, callback, options) {
365
+ var app = applicableHelpers(cm, helpers)
366
+ function run(i, result) {
367
+ if (i == app.length) return callback(null)
368
+ var helper = app[i]
369
+ if (helper.async) {
370
+ helper(cm, function(result) {
371
+ if (result) callback(result)
372
+ else run(i + 1)
373
+ }, options)
374
+ } else {
375
+ var result = helper(cm, options)
376
+ if (result) callback(result)
377
+ else run(i + 1)
378
+ }
379
+ }
380
+ run(0)
381
+ }
382
+ resolved.async = true
383
+ } else {
384
+ resolved = function(cm, options) {
385
+ var app = applicableHelpers(cm, helpers)
386
+ for (var i = 0; i < app.length; i++) {
387
+ var cur = app[i](cm, options)
388
+ if (cur && cur.list.length) return cur
389
+ }
390
+ }
391
  }
392
+ resolved.supportsSelection = true
393
+ return resolved
394
  } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
395
+ return function(cm) { return CodeMirror.hint.fromList(cm, {words: words}) }
396
  } else if (CodeMirror.hint.anyword) {
397
+ return function(cm, options) { return CodeMirror.hint.anyword(cm, options) }
398
+ } else {
399
+ return function() {}
400
  }
401
+ }
402
+
403
+ CodeMirror.registerHelper("hint", "auto", {
404
+ resolve: resolveAutoHints
405
  });
406
 
407
  CodeMirror.registerHelper("hint", "fromList", function(cm, options) {
408
  var cur = cm.getCursor(), token = cm.getTokenAt(cur);
409
+ var to = CodeMirror.Pos(cur.line, token.end);
410
+ if (token.string && /\w/.test(token.string[token.string.length - 1])) {
411
+ var term = token.string, from = CodeMirror.Pos(cur.line, token.start);
412
+ } else {
413
+ var term = "", from = to;
414
+ }
415
  var found = [];
416
  for (var i = 0; i < options.words.length; i++) {
417
  var word = options.words[i];
418
+ if (word.slice(0, term.length) == term)
419
  found.push(word);
420
  }
421
 
422
+ if (found.length) return {list: found, from: from, to: to};
 
 
 
 
423
  });
424
 
425
  CodeMirror.commands.autocomplete = CodeMirror.showHint;
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/sql-hint.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/hint/xml-hint.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/coffeescript-lint.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/css-lint.js RENAMED
File without changes
js/esites_editor/dist/js/vendor/codemirror/addon/lint/html-lint.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ // Depends on htmlhint.js from http://htmlhint.com/js/htmlhint.js
5
+
6
+ // declare global: HTMLHint
7
+
8
+ (function(mod) {
9
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
10
+ mod(require("../../lib/codemirror"), require("htmlhint"));
11
+ else if (typeof define == "function" && define.amd) // AMD
12
+ define(["../../lib/codemirror", "htmlhint"], mod);
13
+ else // Plain browser env
14
+ mod(CodeMirror);
15
+ })(function(CodeMirror) {
16
+ "use strict";
17
+
18
+ var defaultRules = {
19
+ "tagname-lowercase": true,
20
+ "attr-lowercase": true,
21
+ "attr-value-double-quotes": true,
22
+ "doctype-first": false,
23
+ "tag-pair": true,
24
+ "spec-char-escape": true,
25
+ "id-unique": true,
26
+ "src-not-empty": true,
27
+ "attr-no-duplication": true
28
+ };
29
+
30
+ CodeMirror.registerHelper("lint", "html", function(text, options) {
31
+ var found = [];
32
+ if (!window.HTMLHint) return found;
33
+ var messages = HTMLHint.verify(text, options && options.rules || defaultRules);
34
+ for (var i = 0; i < messages.length; i++) {
35
+ var message = messages[i];
36
+ var startLine = message.line - 1, endLine = message.line - 1, startCol = message.col - 1, endCol = message.col;
37
+ found.push({
38
+ from: CodeMirror.Pos(startLine, startCol),
39
+ to: CodeMirror.Pos(endLine, endCol),
40
+ message: message.message,
41
+ severity : message.type
42
+ });
43
+ }
44
+ return found;
45
+ });
46
+ });
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/javascript-lint.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/json-lint.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/lint.css RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/lint.js RENAMED
@@ -61,6 +61,7 @@
61
  this.timeout = null;
62
  this.hasGutter = hasGutter;
63
  this.onMouseOver = function(e) { onMouseOver(cm, e); };
 
64
  }
65
 
66
  function parseOptions(_cm, options) {
@@ -115,15 +116,32 @@
115
  return tip;
116
  }
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  function startLinting(cm) {
119
  var state = cm.state.lint, options = state.options;
120
  var passOptions = options.options || options; // Support deprecated passing of `options` property in options
121
  var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint");
122
  if (!getAnnotations) return;
123
- if (options.async || getAnnotations.async)
124
- getAnnotations(cm.getValue(), updateLinting, passOptions, cm);
125
- else
126
  updateLinting(cm, getAnnotations(cm.getValue(), passOptions, cm));
 
127
  }
128
 
129
  function updateLinting(cm, annotationsNotSorted) {
@@ -187,7 +205,8 @@
187
  CodeMirror.defineOption("lint", false, function(cm, val, old) {
188
  if (old && old != CodeMirror.Init) {
189
  clearMarks(cm);
190
- cm.off("change", onChange);
 
191
  CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver);
192
  clearTimeout(cm.state.lint.timeout);
193
  delete cm.state.lint;
@@ -197,11 +216,16 @@
197
  var gutters = cm.getOption("gutters"), hasLintGutter = false;
198
  for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;
199
  var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter);
200
- cm.on("change", onChange);
 
201
  if (state.options.tooltips != false)
202
  CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
203
 
204
  startLinting(cm);
205
  }
206
  });
 
 
 
 
207
  });
61
  this.timeout = null;
62
  this.hasGutter = hasGutter;
63
  this.onMouseOver = function(e) { onMouseOver(cm, e); };
64
+ this.waitingFor = 0
65
  }
66
 
67
  function parseOptions(_cm, options) {
116
  return tip;
117
  }
118
 
119
+ function lintAsync(cm, getAnnotations, passOptions) {
120
+ var state = cm.state.lint
121
+ var id = ++state.waitingFor
122
+ function abort() {
123
+ id = -1
124
+ cm.off("change", abort)
125
+ }
126
+ cm.on("change", abort)
127
+ getAnnotations(cm.getValue(), function(annotations, arg2) {
128
+ cm.off("change", abort)
129
+ if (state.waitingFor != id) return
130
+ if (arg2 && annotations instanceof CodeMirror) annotations = arg2
131
+ updateLinting(cm, annotations)
132
+ }, passOptions, cm);
133
+ }
134
+
135
  function startLinting(cm) {
136
  var state = cm.state.lint, options = state.options;
137
  var passOptions = options.options || options; // Support deprecated passing of `options` property in options
138
  var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint");
139
  if (!getAnnotations) return;
140
+ if (options.async || getAnnotations.async) {
141
+ lintAsync(cm, getAnnotations, passOptions)
142
+ } else {
143
  updateLinting(cm, getAnnotations(cm.getValue(), passOptions, cm));
144
+ }
145
  }
146
 
147
  function updateLinting(cm, annotationsNotSorted) {
205
  CodeMirror.defineOption("lint", false, function(cm, val, old) {
206
  if (old && old != CodeMirror.Init) {
207
  clearMarks(cm);
208
+ if (cm.state.lint.options.lintOnChange !== false)
209
+ cm.off("change", onChange);
210
  CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver);
211
  clearTimeout(cm.state.lint.timeout);
212
  delete cm.state.lint;
216
  var gutters = cm.getOption("gutters"), hasLintGutter = false;
217
  for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;
218
  var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter);
219
+ if (state.options.lintOnChange !== false)
220
+ cm.on("change", onChange);
221
  if (state.options.tooltips != false)
222
  CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
223
 
224
  startLinting(cm);
225
  }
226
  });
227
+
228
+ CodeMirror.defineExtension("performLint", function() {
229
+ if (this.state.lint) startLinting(this);
230
+ });
231
  });
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/lint/yaml-lint.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/merge/merge.css RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/merge/merge.js RENAMED
@@ -5,12 +5,12 @@
5
 
6
  (function(mod) {
7
  if (typeof exports == "object" && typeof module == "object") // CommonJS
8
- mod(require("../../lib/codemirror"), require("diff_match_patch"));
9
  else if (typeof define == "function" && define.amd) // AMD
10
  define(["../../lib/codemirror", "diff_match_patch"], mod);
11
  else // Plain browser env
12
- mod(CodeMirror, diff_match_patch);
13
- })(function(CodeMirror, diff_match_patch) {
14
  "use strict";
15
  var Pos = CodeMirror.Pos;
16
  var svgNS = "http://www.w3.org/2000/svg";
@@ -471,13 +471,10 @@
471
  if (left) left.init(leftPane, origLeft, options);
472
  if (right) right.init(rightPane, origRight, options);
473
 
474
- if (options.collapseIdentical) {
475
- updating = true;
476
  this.editor().operation(function() {
477
  collapseIdenticalStretches(self, options.collapseIdentical);
478
  });
479
- updating = false;
480
- }
481
  if (options.connect == "align") {
482
  this.aligners = [];
483
  alignChunks(this.left || this.right, true);
@@ -640,7 +637,7 @@
640
  mark.clear();
641
  cm.removeLineClass(from, "wrap", "CodeMirror-merge-collapsed-line");
642
  }
643
- widget.addEventListener("click", clear);
644
  return {mark: mark, clear: clear};
645
  }
646
 
5
 
6
  (function(mod) {
7
  if (typeof exports == "object" && typeof module == "object") // CommonJS
8
+ mod(require("../../lib/codemirror")); // Note non-packaged dependency diff_match_patch
9
  else if (typeof define == "function" && define.amd) // AMD
10
  define(["../../lib/codemirror", "diff_match_patch"], mod);
11
  else // Plain browser env
12
+ mod(CodeMirror);
13
+ })(function(CodeMirror) {
14
  "use strict";
15
  var Pos = CodeMirror.Pos;
16
  var svgNS = "http://www.w3.org/2000/svg";
471
  if (left) left.init(leftPane, origLeft, options);
472
  if (right) right.init(rightPane, origRight, options);
473
 
474
+ if (options.collapseIdentical)
 
475
  this.editor().operation(function() {
476
  collapseIdenticalStretches(self, options.collapseIdentical);
477
  });
 
 
478
  if (options.connect == "align") {
479
  this.aligners = [];
480
  alignChunks(this.left || this.right, true);
637
  mark.clear();
638
  cm.removeLineClass(from, "wrap", "CodeMirror-merge-collapsed-line");
639
  }
640
+ CodeMirror.on(widget, "click", clear);
641
  return {mark: mark, clear: clear};
642
  }
643
 
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/loadmode.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/multiplex.js RENAMED
@@ -51,7 +51,7 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
51
  if (!other.parseDelimiters) stream.match(other.open);
52
  state.innerActive = other;
53
  state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, "") : 0);
54
- return other.delimStyle;
55
  } else if (found != -1 && found < cutOff) {
56
  cutOff = found;
57
  }
@@ -70,7 +70,7 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
70
  if (found == stream.pos && !curInner.parseDelimiters) {
71
  stream.match(curInner.close);
72
  state.innerActive = state.inner = null;
73
- return curInner.delimStyle;
74
  }
75
  if (found > -1) stream.string = oldContent.slice(0, found);
76
  var innerToken = curInner.mode.token(stream, state.inner);
@@ -80,7 +80,7 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
80
  state.innerActive = state.inner = null;
81
 
82
  if (curInner.innerStyle) {
83
- if (innerToken) innerToken = innerToken + ' ' + curInner.innerStyle;
84
  else innerToken = curInner.innerStyle;
85
  }
86
 
51
  if (!other.parseDelimiters) stream.match(other.open);
52
  state.innerActive = other;
53
  state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, "") : 0);
54
+ return other.delimStyle && (other.delimStyle + " " + other.delimStyle + "-open");
55
  } else if (found != -1 && found < cutOff) {
56
  cutOff = found;
57
  }
70
  if (found == stream.pos && !curInner.parseDelimiters) {
71
  stream.match(curInner.close);
72
  state.innerActive = state.inner = null;
73
+ return curInner.delimStyle && (curInner.delimStyle + " " + curInner.delimStyle + "-close");
74
  }
75
  if (found > -1) stream.string = oldContent.slice(0, found);
76
  var innerToken = curInner.mode.token(stream, state.inner);
80
  state.innerActive = state.inner = null;
81
 
82
  if (curInner.innerStyle) {
83
+ if (innerToken) innerToken = innerToken + " " + curInner.innerStyle;
84
  else innerToken = curInner.innerStyle;
85
  }
86
 
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/multiplex_test.js RENAMED
@@ -29,5 +29,5 @@
29
 
30
  MT(
31
  "stexInsideMarkdown",
32
- "[strong **Equation:**] [delim $][inner&tag \\pi][delim $]");
33
  })();
29
 
30
  MT(
31
  "stexInsideMarkdown",
32
+ "[strong **Equation:**] [delim&delim-open $][inner&tag \\pi][delim&delim-close $]");
33
  })();
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/overlay.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/mode/simple.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/runmode/colorize.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/runmode/runmode-standalone.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/runmode/runmode.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/runmode/runmode.node.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/scroll/annotatescrollbar.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/scroll/scrollpastend.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/scroll/simplescrollbars.css RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/scroll/simplescrollbars.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/match-highlighter.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/matchesonscrollbar.css RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/matchesonscrollbar.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/search.js RENAMED
@@ -18,6 +18,7 @@
18
  mod(CodeMirror);
19
  })(function(CodeMirror) {
20
  "use strict";
 
21
  function searchOverlay(query, caseInsensitive) {
22
  if (typeof query == "string")
23
  query = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), caseInsensitive ? "gi" : "g");
@@ -42,57 +43,106 @@
42
  this.posFrom = this.posTo = this.lastQuery = this.query = null;
43
  this.overlay = null;
44
  }
 
45
  function getSearchState(cm) {
46
  return cm.state.search || (cm.state.search = new SearchState());
47
  }
 
48
  function queryCaseInsensitive(query) {
49
  return typeof query == "string" && query == query.toLowerCase();
50
  }
 
51
  function getSearchCursor(cm, query, pos) {
52
  // Heuristic: if the query string is all lowercase, do a case insensitive search.
53
  return cm.getSearchCursor(query, pos, queryCaseInsensitive(query));
54
  }
 
 
 
 
 
 
 
 
 
 
55
  function dialog(cm, text, shortText, deflt, f) {
56
  if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true});
57
  else f(prompt(shortText, deflt));
58
  }
 
59
  function confirmDialog(cm, text, shortText, fs) {
60
  if (cm.openConfirm) cm.openConfirm(text, fs);
61
  else if (confirm(shortText)) fs[0]();
62
  }
 
 
 
 
 
 
 
 
 
63
  function parseQuery(query) {
64
  var isRE = query.match(/^\/(.*)\/([a-z]*)$/);
65
  if (isRE) {
66
  try { query = new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i"); }
67
  catch(e) {} // Not a regular expression after all, do a string search
 
 
68
  }
69
  if (typeof query == "string" ? query == "" : query.test(""))
70
  query = /x^/;
71
  return query;
72
  }
 
73
  var queryDialog =
74
  'Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
75
- function doSearch(cm, rev) {
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  var state = getSearchState(cm);
77
  if (state.query) return findNext(cm, rev);
78
  var q = cm.getSelection() || state.lastQuery;
79
- dialog(cm, queryDialog, "Search for:", q, function(query) {
80
- cm.operation(function() {
81
- if (!query || state.query) return;
82
- state.query = parseQuery(query);
83
- cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query));
84
- state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query));
85
- cm.addOverlay(state.overlay);
86
- if (cm.showMatchesOnScrollbar) {
87
- if (state.annotate) { state.annotate.clear(); state.annotate = null; }
88
- state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query));
89
- }
90
- state.posFrom = state.posTo = cm.getCursor();
91
- findNext(cm, rev);
 
92
  });
93
- });
 
 
 
 
 
 
 
 
94
  }
95
- function findNext(cm, rev) {cm.operation(function() {
 
96
  var state = getSearchState(cm);
97
  var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);
98
  if (!cursor.find(rev)) {
@@ -100,38 +150,47 @@
100
  if (!cursor.find(rev)) return;
101
  }
102
  cm.setSelection(cursor.from(), cursor.to());
103
- cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
104
  state.posFrom = cursor.from(); state.posTo = cursor.to();
 
105
  });}
 
106
  function clearSearch(cm) {cm.operation(function() {
107
  var state = getSearchState(cm);
108
  state.lastQuery = state.query;
109
  if (!state.query) return;
110
- state.query = null;
111
  cm.removeOverlay(state.overlay);
112
  if (state.annotate) { state.annotate.clear(); state.annotate = null; }
113
  });}
114
 
115
  var replaceQueryDialog =
116
- 'Replace: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
117
  var replacementQueryDialog = 'With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>';
118
- var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";
 
 
 
 
 
 
 
 
 
 
 
 
119
  function replace(cm, all) {
120
  if (cm.getOption("readOnly")) return;
121
  var query = cm.getSelection() || getSearchState(cm).lastQuery;
122
- dialog(cm, replaceQueryDialog, "Replace:", query, function(query) {
 
123
  if (!query) return;
124
  query = parseQuery(query);
125
  dialog(cm, replacementQueryDialog, "Replace with:", "", function(text) {
 
126
  if (all) {
127
- cm.operation(function() {
128
- for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
129
- if (typeof query != "string") {
130
- var match = cm.getRange(cursor.from(), cursor.to()).match(query);
131
- cursor.replace(text.replace(/\$(\d)/g, function(_, i) {return match[i];}));
132
- } else cursor.replace(text);
133
- }
134
- });
135
  } else {
136
  clearSearch(cm);
137
  var cursor = getSearchCursor(cm, query, cm.getCursor());
@@ -145,7 +204,8 @@
145
  cm.setSelection(cursor.from(), cursor.to());
146
  cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
147
  confirmDialog(cm, doReplaceConfirm, "Replace?",
148
- [function() {doReplace(match);}, advance]);
 
149
  };
150
  var doReplace = function(match) {
151
  cursor.replace(typeof query == "string" ? text :
@@ -159,6 +219,7 @@
159
  }
160
 
161
  CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};
 
162
  CodeMirror.commands.findNext = doSearch;
163
  CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};
164
  CodeMirror.commands.clearSearch = clearSearch;
18
  mod(CodeMirror);
19
  })(function(CodeMirror) {
20
  "use strict";
21
+
22
  function searchOverlay(query, caseInsensitive) {
23
  if (typeof query == "string")
24
  query = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), caseInsensitive ? "gi" : "g");
43
  this.posFrom = this.posTo = this.lastQuery = this.query = null;
44
  this.overlay = null;
45
  }
46
+
47
  function getSearchState(cm) {
48
  return cm.state.search || (cm.state.search = new SearchState());
49
  }
50
+
51
  function queryCaseInsensitive(query) {
52
  return typeof query == "string" && query == query.toLowerCase();
53
  }
54
+
55
  function getSearchCursor(cm, query, pos) {
56
  // Heuristic: if the query string is all lowercase, do a case insensitive search.
57
  return cm.getSearchCursor(query, pos, queryCaseInsensitive(query));
58
  }
59
+
60
+ function persistentDialog(cm, text, deflt, f) {
61
+ cm.openDialog(text, f, {
62
+ value: deflt,
63
+ selectValueOnOpen: true,
64
+ closeOnEnter: false,
65
+ onClose: function() { clearSearch(cm); }
66
+ });
67
+ }
68
+
69
  function dialog(cm, text, shortText, deflt, f) {
70
  if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true});
71
  else f(prompt(shortText, deflt));
72
  }
73
+
74
  function confirmDialog(cm, text, shortText, fs) {
75
  if (cm.openConfirm) cm.openConfirm(text, fs);
76
  else if (confirm(shortText)) fs[0]();
77
  }
78
+
79
+ function parseString(string) {
80
+ return string.replace(/\\(.)/g, function(_, ch) {
81
+ if (ch == "n") return "\n"
82
+ if (ch == "r") return "\r"
83
+ return ch
84
+ })
85
+ }
86
+
87
  function parseQuery(query) {
88
  var isRE = query.match(/^\/(.*)\/([a-z]*)$/);
89
  if (isRE) {
90
  try { query = new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i"); }
91
  catch(e) {} // Not a regular expression after all, do a string search
92
+ } else {
93
+ query = parseString(query)
94
  }
95
  if (typeof query == "string" ? query == "" : query.test(""))
96
  query = /x^/;
97
  return query;
98
  }
99
+
100
  var queryDialog =
101
  'Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
102
+
103
+ function startSearch(cm, state, query) {
104
+ state.queryText = query;
105
+ state.query = parseQuery(query);
106
+ cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query));
107
+ state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query));
108
+ cm.addOverlay(state.overlay);
109
+ if (cm.showMatchesOnScrollbar) {
110
+ if (state.annotate) { state.annotate.clear(); state.annotate = null; }
111
+ state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query));
112
+ }
113
+ }
114
+
115
+ function doSearch(cm, rev, persistent) {
116
  var state = getSearchState(cm);
117
  if (state.query) return findNext(cm, rev);
118
  var q = cm.getSelection() || state.lastQuery;
119
+ if (persistent && cm.openDialog) {
120
+ var hiding = null
121
+ persistentDialog(cm, queryDialog, q, function(query, event) {
122
+ CodeMirror.e_stop(event);
123
+ if (!query) return;
124
+ if (query != state.queryText) startSearch(cm, state, query);
125
+ if (hiding) hiding.style.opacity = 1
126
+ findNext(cm, event.shiftKey, function(_, to) {
127
+ var dialog
128
+ if (to.line < 3 && document.querySelector &&
129
+ (dialog = cm.display.wrapper.querySelector(".CodeMirror-dialog")) &&
130
+ dialog.getBoundingClientRect().bottom - 4 > cm.cursorCoords(to, "window").top)
131
+ (hiding = dialog).style.opacity = .4
132
+ })
133
  });
134
+ } else {
135
+ dialog(cm, queryDialog, "Search for:", q, function(query) {
136
+ if (query && !state.query) cm.operation(function() {
137
+ startSearch(cm, state, query);
138
+ state.posFrom = state.posTo = cm.getCursor();
139
+ findNext(cm, rev);
140
+ });
141
+ });
142
+ }
143
  }
144
+
145
+ function findNext(cm, rev, callback) {cm.operation(function() {
146
  var state = getSearchState(cm);
147
  var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);
148
  if (!cursor.find(rev)) {
150
  if (!cursor.find(rev)) return;
151
  }
152
  cm.setSelection(cursor.from(), cursor.to());
153
+ cm.scrollIntoView({from: cursor.from(), to: cursor.to()}, 20);
154
  state.posFrom = cursor.from(); state.posTo = cursor.to();
155
+ if (callback) callback(cursor.from(), cursor.to())
156
  });}
157
+
158
  function clearSearch(cm) {cm.operation(function() {
159
  var state = getSearchState(cm);
160
  state.lastQuery = state.query;
161
  if (!state.query) return;
162
+ state.query = state.queryText = null;
163
  cm.removeOverlay(state.overlay);
164
  if (state.annotate) { state.annotate.clear(); state.annotate = null; }
165
  });}
166
 
167
  var replaceQueryDialog =
168
+ ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
169
  var replacementQueryDialog = 'With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>';
170
+ var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>";
171
+
172
+ function replaceAll(cm, query, text) {
173
+ cm.operation(function() {
174
+ for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
175
+ if (typeof query != "string") {
176
+ var match = cm.getRange(cursor.from(), cursor.to()).match(query);
177
+ cursor.replace(text.replace(/\$(\d)/g, function(_, i) {return match[i];}));
178
+ } else cursor.replace(text);
179
+ }
180
+ });
181
+ }
182
+
183
  function replace(cm, all) {
184
  if (cm.getOption("readOnly")) return;
185
  var query = cm.getSelection() || getSearchState(cm).lastQuery;
186
+ var dialogText = all ? "Replace all:" : "Replace:"
187
+ dialog(cm, dialogText + replaceQueryDialog, dialogText, query, function(query) {
188
  if (!query) return;
189
  query = parseQuery(query);
190
  dialog(cm, replacementQueryDialog, "Replace with:", "", function(text) {
191
+ text = parseString(text)
192
  if (all) {
193
+ replaceAll(cm, query, text)
 
 
 
 
 
 
 
194
  } else {
195
  clearSearch(cm);
196
  var cursor = getSearchCursor(cm, query, cm.getCursor());
204
  cm.setSelection(cursor.from(), cursor.to());
205
  cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
206
  confirmDialog(cm, doReplaceConfirm, "Replace?",
207
+ [function() {doReplace(match);}, advance,
208
+ function() {replaceAll(cm, query, text)}]);
209
  };
210
  var doReplace = function(match) {
211
  cursor.replace(typeof query == "string" ? text :
219
  }
220
 
221
  CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};
222
+ CodeMirror.commands.findPersistent = function(cm) {clearSearch(cm); doSearch(cm, false, true);};
223
  CodeMirror.commands.findNext = doSearch;
224
  CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};
225
  CodeMirror.commands.clearSearch = clearSearch;
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/search/searchcursor.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/selection/active-line.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/selection/mark-selection.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/selection/selection-pointer.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/tern/tern.css RENAMED
@@ -1,6 +1,7 @@
1
  .CodeMirror-Tern-completion {
2
  padding-left: 22px;
3
  position: relative;
 
4
  }
5
  .CodeMirror-Tern-completion:before {
6
  position: absolute;
1
  .CodeMirror-Tern-completion {
2
  padding-left: 22px;
3
  position: relative;
4
+ line-height: 1.5;
5
  }
6
  .CodeMirror-Tern-completion:before {
7
  position: absolute;
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/tern/tern.js RENAMED
@@ -216,7 +216,7 @@
216
  var completion = data.completions[i], className = typeToIcon(completion.type);
217
  if (data.guess) className += " " + cls + "guess";
218
  completions.push({text: completion.name + after,
219
- displayText: completion.name,
220
  className: className,
221
  data: completion});
222
  }
@@ -266,7 +266,7 @@
266
  child.target = "_blank";
267
  }
268
  }
269
- tempTooltip(cm, tip);
270
  if (c) c();
271
  }, pos);
272
  }
@@ -466,11 +466,12 @@
466
  ts.request(cm, {type: "refs"}, function(error, data) {
467
  if (error) return showError(ts, cm, error);
468
  var ranges = [], cur = 0;
 
469
  for (var i = 0; i < data.refs.length; i++) {
470
  var ref = data.refs[i];
471
  if (ref.file == name) {
472
  ranges.push({anchor: ref.start, head: ref.end});
473
- if (cmpPos(cur, ref.start) >= 0 && cmpPos(cur, ref.end) <= 0)
474
  cur = ranges.length - 1;
475
  }
476
  }
@@ -592,7 +593,7 @@
592
 
593
  // Tooltips
594
 
595
- function tempTooltip(cm, content) {
596
  if (cm.state.ternTooltip) remove(cm.state.ternTooltip);
597
  var where = cm.cursorCoords();
598
  var tip = cm.state.ternTooltip = makeTooltip(where.right + 1, where.bottom, content);
@@ -616,7 +617,7 @@
616
  else mouseOnTip = false;
617
  }
618
  });
619
- setTimeout(maybeClear, 1700);
620
  cm.on("cursorActivity", clear);
621
  cm.on('blur', clear);
622
  cm.on('scroll', clear);
@@ -644,7 +645,7 @@
644
  if (ts.options.showError)
645
  ts.options.showError(cm, msg);
646
  else
647
- tempTooltip(cm, String(msg));
648
  }
649
 
650
  function closeArgHints(ts) {
216
  var completion = data.completions[i], className = typeToIcon(completion.type);
217
  if (data.guess) className += " " + cls + "guess";
218
  completions.push({text: completion.name + after,
219
+ displayText: completion.displayName || completion.name,
220
  className: className,
221
  data: completion});
222
  }
266
  child.target = "_blank";
267
  }
268
  }
269
+ tempTooltip(cm, tip, ts);
270
  if (c) c();
271
  }, pos);
272
  }
466
  ts.request(cm, {type: "refs"}, function(error, data) {
467
  if (error) return showError(ts, cm, error);
468
  var ranges = [], cur = 0;
469
+ var curPos = cm.getCursor();
470
  for (var i = 0; i < data.refs.length; i++) {
471
  var ref = data.refs[i];
472
  if (ref.file == name) {
473
  ranges.push({anchor: ref.start, head: ref.end});
474
+ if (cmpPos(curPos, ref.start) >= 0 && cmpPos(curPos, ref.end) <= 0)
475
  cur = ranges.length - 1;
476
  }
477
  }
593
 
594
  // Tooltips
595
 
596
+ function tempTooltip(cm, content, ts) {
597
  if (cm.state.ternTooltip) remove(cm.state.ternTooltip);
598
  var where = cm.cursorCoords();
599
  var tip = cm.state.ternTooltip = makeTooltip(where.right + 1, where.bottom, content);
617
  else mouseOnTip = false;
618
  }
619
  });
620
+ setTimeout(maybeClear, ts.options.hintDelay ? ts.options.hintDelay : 1700);
621
  cm.on("cursorActivity", clear);
622
  cm.on('blur', clear);
623
  cm.on('scroll', clear);
645
  if (ts.options.showError)
646
  ts.options.showError(cm, msg);
647
  else
648
+ tempTooltip(cm, String(msg), ts);
649
  }
650
 
651
  function closeArgHints(ts) {
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/tern/worker.js RENAMED
File without changes
js/{tiny_mce/plugins/esites_editor → esites_editor/dist}/js/vendor/codemirror/addon/wrap/hardwrap.js RENAMED
@@ -32,11 +32,13 @@
32
  function findBreakPoint(text, column, wrapOn, killTrailingSpace) {
33
  for (var at = column; at > 0; --at)
34
  if (wrapOn.test(text.slice(at - 1, at + 1))) break;
35
- if (at == 0) at = column;
36
- var endOfText = at;
37
- if (killTrailingSpace)
38
- while (text.charAt(endOfText - 1) == " ") --endOfText;
39
- return {from: endOfText, to: at};
 
 
40
  }
41
 
42
  function wrapRange(cm, from, to, options) {
@@ -86,7 +88,8 @@
86
  if (changes.length) cm.operation(function() {
87
  for (var i = 0; i < changes.length; ++i) {
88
  var change = changes[i];
89
- cm.replaceRange(change.text, change.from, change.to);
 
90
  }
91
  });
92
  return changes.length ? {from: changes[0].from, to: CodeMirror.changeEnd(changes[changes.length - 1])} : null;
32
  function findBreakPoint(text, column, wrapOn, killTrailingSpace) {
33
  for (var at = column; at > 0; --at)
34
  if (wrapOn.test(text.slice(at - 1, at + 1))) break;
35
+ for (var first = true;; first = false) {
36
+ var endOfText = at;
37
+ if (killTrailingSpace)
38
+ while (text.charAt(endOfText - 1) == " ") --endOfText;
39
+ if (endOfText == 0 && first) at = column;
40
+ else return {from: endOfText, to: at};
41
+ }
42
  }
43
 
44
  function wrapRange(cm, from, to, options) {
88
  if (changes.length) cm.operation(function() {
89
  for (var i = 0; i < changes.length; ++i) {
90
  var change = changes[i];
91
+ if (change.text || CodeMirror.cmpPos(change.from, change.to))
92
+ cm.replaceRange(change.text, change.from, change.to);
93
  }
94
  });
95
  return changes.length ? {from: changes[0].from, to: CodeMirror.changeEnd(changes[changes.length - 1])} : null;
js/esites_editor/dist/js/vendor/codemirror/keymap/emacs.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";function posEq(a,b){return a.line==b.line&&a.ch==b.ch}function addToRing(str){killRing.push(str);killRing.length>50&&killRing.shift()}function growRingTop(str){if(!killRing.length)return addToRing(str);killRing[killRing.length-1]+=str;return void 0}function getFromRing(n){return killRing[killRing.length-(n?Math.min(n,1):1)]||""}function popFromRing(){killRing.length>1&&killRing.pop();return getFromRing()}function kill(cm,from,to,mayGrow,text){null==text&&(text=cm.getRange(from,to));mayGrow&&lastKill&&lastKill.cm==cm&&posEq(from,lastKill.pos)&&cm.isClean(lastKill.gen)?growRingTop(text):addToRing(text);cm.replaceRange("",from,to,"+delete");lastKill=mayGrow?{cm:cm,pos:from,gen:cm.changeGeneration()}:null}function byChar(cm,pos,dir){return cm.findPosH(pos,dir,"char",!0)}function byWord(cm,pos,dir){return cm.findPosH(pos,dir,"word",!0)}function byLine(cm,pos,dir){return cm.findPosV(pos,dir,"line",cm.doc.sel.goalColumn)}function byPage(cm,pos,dir){return cm.findPosV(pos,dir,"page",cm.doc.sel.goalColumn)}function byParagraph(cm,pos,dir){for(var no=pos.line,line=cm.getLine(no),sawText=/\S/.test(0>dir?line.slice(0,pos.ch):line.slice(pos.ch)),fst=cm.firstLine(),lst=cm.lastLine();;){no+=dir;if(fst>no||no>lst)return cm.clipPos(Pos(no-dir,0>dir?0:null));line=cm.getLine(no);var hasText=/\S/.test(line);if(hasText)sawText=!0;else if(sawText)return Pos(no,0)}}function bySentence(cm,pos,dir){for(var line=pos.line,ch=pos.ch,text=cm.getLine(pos.line),sawWord=!1;;){var next=text.charAt(ch+(0>dir?-1:0));if(next){if(sawWord&&/[!?.]/.test(next))return Pos(line,ch+(dir>0?1:0));sawWord||(sawWord=/\w/.test(next));ch+=dir}else{if(line==(0>dir?cm.firstLine():cm.lastLine()))return Pos(line,ch);text=cm.getLine(line+dir);if(!/\S/.test(text))return Pos(line,ch);line+=dir;ch=0>dir?text.length:0}}}function byExpr(cm,pos,dir){var wrap;if(cm.findMatchingBracket&&(wrap=cm.findMatchingBracket(pos,!0))&&wrap.match&&(wrap.forward?1:-1)==dir)return dir>0?Pos(wrap.to.line,wrap.to.ch+1):wrap.to;for(var first=!0;;first=!1){var token=cm.getTokenAt(pos),after=Pos(pos.line,0>dir?token.start:token.end);if(!(first&&dir>0&&token.end==pos.ch)&&/\w/.test(token.string))return after;var newPos=cm.findPosH(after,dir,"char");if(posEq(after,newPos))return pos;pos=newPos}}function getPrefix(cm,precise){var digits=cm.state.emacsPrefix;if(!digits)return precise?null:1;clearPrefix(cm);return"-"==digits?-1:Number(digits)}function repeated(cmd){var f="string"==typeof cmd?function(cm){cm.execCommand(cmd)}:cmd;return function(cm){var prefix=getPrefix(cm);f(cm);for(var i=1;prefix>i;++i)f(cm)}}function findEnd(cm,pos,by,dir){var prefix=getPrefix(cm);if(0>prefix){dir=-dir;prefix=-prefix}for(var i=0;prefix>i;++i){var newPos=by(cm,pos,dir);if(posEq(newPos,pos))break;pos=newPos}return pos}function move(by,dir){var f=function(cm){cm.extendSelection(findEnd(cm,cm.getCursor(),by,dir))};f.motion=!0;return f}function killTo(cm,by,dir){for(var cursor,selections=cm.listSelections(),i=selections.length;i--;){cursor=selections[i].head;kill(cm,cursor,findEnd(cm,cursor,by,dir),!0)}}function killRegion(cm){if(cm.somethingSelected()){for(var selection,selections=cm.listSelections(),i=selections.length;i--;){selection=selections[i];kill(cm,selection.anchor,selection.head)}return!0}}function addPrefix(cm,digit){if(cm.state.emacsPrefix)"-"!=digit&&(cm.state.emacsPrefix+=digit);else{cm.state.emacsPrefix=digit;cm.on("keyHandled",maybeClearPrefix);cm.on("inputRead",maybeDuplicateInput)}}function maybeClearPrefix(cm,arg){cm.state.emacsPrefixMap||prefixPreservingKeys.hasOwnProperty(arg)||clearPrefix(cm)}function clearPrefix(cm){cm.state.emacsPrefix=null;cm.off("keyHandled",maybeClearPrefix);cm.off("inputRead",maybeDuplicateInput)}function maybeDuplicateInput(cm,event){var dup=getPrefix(cm);if(dup>1&&"+input"==event.origin){for(var one=event.text.join("\n"),txt="",i=1;dup>i;++i)txt+=one;cm.replaceSelection(txt)}}function addPrefixMap(cm){cm.state.emacsPrefixMap=!0;cm.addKeyMap(prefixMap);cm.on("keyHandled",maybeRemovePrefixMap);cm.on("inputRead",maybeRemovePrefixMap)}function maybeRemovePrefixMap(cm,arg){if("string"!=typeof arg||!/^\d$/.test(arg)&&"Ctrl-U"!=arg){cm.removeKeyMap(prefixMap);cm.state.emacsPrefixMap=!1;cm.off("keyHandled",maybeRemovePrefixMap);cm.off("inputRead",maybeRemovePrefixMap)}}function setMark(cm){cm.setCursor(cm.getCursor());cm.setExtending(!cm.getExtending());cm.on("change",function(){cm.setExtending(!1)})}function clearMark(cm){cm.setExtending(!1);cm.setCursor(cm.getCursor())}function getInput(cm,msg,f){cm.openDialog?cm.openDialog(msg+': <input type="text" style="width: 10em"/>',f,{bottom:!0}):f(prompt(msg,""))}function operateOnWord(cm,op){var start=cm.getCursor(),end=cm.findPosH(start,1,"word");cm.replaceRange(op(cm.getRange(start,end)),start,end);cm.setCursor(end)}function toEnclosingExpr(cm){for(var pos=cm.getCursor(),line=pos.line,ch=pos.ch,stack=[];line>=cm.firstLine();){for(var text=cm.getLine(line),i=null==ch?text.length:ch;i>0;){var ch=text.charAt(--i);if(")"==ch)stack.push("(");else if("]"==ch)stack.push("[");else if("}"==ch)stack.push("{");else if(/[\(\{\[]/.test(ch)&&(!stack.length||stack.pop()!=ch))return cm.extendSelection(Pos(line,i))}--line;ch=null}}function quit(cm){cm.execCommand("clearSearch");clearMark(cm)}function regPrefix(d){prefixMap[d]=function(cm){addPrefix(cm,d)};keyMap["Ctrl-"+d]=function(cm){addPrefix(cm,d)};prefixPreservingKeys["Ctrl-"+d]=!0}for(var Pos=CodeMirror.Pos,killRing=[],lastKill=null,prefixPreservingKeys={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0},keyMap=CodeMirror.keyMap.emacs=CodeMirror.normalizeKeyMap({"Ctrl-W":function(cm){kill(cm,cm.getCursor("start"),cm.getCursor("end"))},"Ctrl-K":repeated(function(cm){var start=cm.getCursor(),end=cm.clipPos(Pos(start.line)),text=cm.getRange(start,end);if(!/\S/.test(text)){text+="\n";end=Pos(start.line+1,0)}kill(cm,start,end,!0,text)}),"Alt-W":function(cm){addToRing(cm.getSelection());clearMark(cm)},"Ctrl-Y":function(cm){var start=cm.getCursor();cm.replaceRange(getFromRing(getPrefix(cm)),start,start,"paste");cm.setSelection(start,cm.getCursor())},"Alt-Y":function(cm){cm.replaceSelection(popFromRing(),"around","paste")},"Ctrl-Space":setMark,"Ctrl-Shift-2":setMark,"Ctrl-F":move(byChar,1),"Ctrl-B":move(byChar,-1),Right:move(byChar,1),Left:move(byChar,-1),"Ctrl-D":function(cm){killTo(cm,byChar,1)},Delete:function(cm){killRegion(cm)||killTo(cm,byChar,1)},"Ctrl-H":function(cm){killTo(cm,byChar,-1)},Backspace:function(cm){killRegion(cm)||killTo(cm,byChar,-1)},"Alt-F":move(byWord,1),"Alt-B":move(byWord,-1),"Alt-D":function(cm){killTo(cm,byWord,1)},"Alt-Backspace":function(cm){killTo(cm,byWord,-1)},"Ctrl-N":move(byLine,1),"Ctrl-P":move(byLine,-1),Down:move(byLine,1),Up:move(byLine,-1),"Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":move(byPage,-1),"Ctrl-V":move(byPage,1),PageUp:move(byPage,-1),PageDown:move(byPage,1),"Ctrl-Up":move(byParagraph,-1),"Ctrl-Down":move(byParagraph,1),"Alt-A":move(bySentence,-1),"Alt-E":move(bySentence,1),"Alt-K":function(cm){killTo(cm,bySentence,1)},"Ctrl-Alt-K":function(cm){killTo(cm,byExpr,1)},"Ctrl-Alt-Backspace":function(cm){killTo(cm,byExpr,-1)},"Ctrl-Alt-F":move(byExpr,1),"Ctrl-Alt-B":move(byExpr,-1),"Shift-Ctrl-Alt-2":function(cm){var cursor=cm.getCursor();cm.setSelection(findEnd(cm,cursor,byExpr,1),cursor)},"Ctrl-Alt-T":function(cm){var leftStart=byExpr(cm,cm.getCursor(),-1),leftEnd=byExpr(cm,leftStart,1),rightEnd=byExpr(cm,leftEnd,1),rightStart=byExpr(cm,rightEnd,-1);cm.replaceRange(cm.getRange(rightStart,rightEnd)+cm.getRange(leftEnd,rightStart)+cm.getRange(leftStart,leftEnd),leftStart,rightEnd)},"Ctrl-Alt-U":repeated(toEnclosingExpr),"Alt-Space":function(cm){for(var pos=cm.getCursor(),from=pos.ch,to=pos.ch,text=cm.getLine(pos.line);from&&/\s/.test(text.charAt(from-1));)--from;for(;to<text.length&&/\s/.test(text.charAt(to));)++to;cm.replaceRange(" ",Pos(pos.line,from),Pos(pos.line,to))},"Ctrl-O":repeated(function(cm){cm.replaceSelection("\n","start")}),"Ctrl-T":repeated(function(cm){cm.execCommand("transposeChars")}),"Alt-C":repeated(function(cm){operateOnWord(cm,function(w){var letter=w.search(/\w/);return-1==letter?w:w.slice(0,letter)+w.charAt(letter).toUpperCase()+w.slice(letter+1).toLowerCase()})}),"Alt-U":repeated(function(cm){operateOnWord(cm,function(w){return w.toUpperCase()})}),"Alt-L":repeated(function(cm){operateOnWord(cm,function(w){return w.toLowerCase()})}),"Alt-;":"toggleComment","Ctrl-/":repeated("undo"),"Shift-Ctrl--":repeated("undo"),"Ctrl-Z":repeated("undo"),"Cmd-Z":repeated("undo"),"Shift-Alt-,":"goDocStart","Shift-Alt-.":"goDocEnd","Ctrl-S":"findNext","Ctrl-R":"findPrev","Ctrl-G":quit,"Shift-Alt-5":"replace","Alt-/":"autocomplete","Ctrl-J":"newlineAndIndent",Enter:!1,Tab:"indentAuto","Alt-G G":function(cm){var prefix=getPrefix(cm,!0);if(null!=prefix&&prefix>0)return cm.setCursor(prefix-1);getInput(cm,"Goto line",function(str){var num;str&&!isNaN(num=Number(str))&&num==(0|num)&&num>0&&cm.setCursor(num-1)});return void 0},"Ctrl-X Tab":function(cm){cm.indentSelection(getPrefix(cm,!0)||cm.getOption("indentUnit"))},"Ctrl-X Ctrl-X":function(cm){cm.setSelection(cm.getCursor("head"),cm.getCursor("anchor"))},"Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X U":repeated("undo"),"Ctrl-X K":"close","Ctrl-X Delete":function(cm){kill(cm,cm.getCursor(),bySentence(cm,cm.getCursor(),1),!0)},"Ctrl-X H":"selectAll","Ctrl-Q Tab":repeated("insertTab"),"Ctrl-U":addPrefixMap}),prefixMap={"Ctrl-G":clearPrefix},i=0;10>i;++i)regPrefix(String(i));regPrefix("-")});
js/esites_editor/dist/js/vendor/codemirror/keymap/sublime.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";function findPosSubword(doc,start,dir){if(0>dir&&0==start.ch)return doc.clipPos(Pos(start.line-1));var line=doc.getLine(start.line);if(dir>0&&start.ch>=line.length)return doc.clipPos(Pos(start.line+1,0));for(var type,state="start",pos=start.ch,e=0>dir?0:line.length,i=0;pos!=e;pos+=dir,i++){var next=line.charAt(0>dir?pos-1:pos),cat="_"!=next&&CodeMirror.isWordChar(next)?"w":"o";"w"==cat&&next.toUpperCase()==next&&(cat="W");if("start"==state){if("o"!=cat){state="in";type=cat}}else if("in"==state&&type!=cat){"w"==type&&"W"==cat&&0>dir&&pos--;if("W"==type&&"w"==cat&&dir>0){type="w";continue}break}}return Pos(start.line,pos)}function moveSubword(cm,dir){cm.extendSelectionsBy(function(range){return cm.display.shift||cm.doc.extend||range.empty()?findPosSubword(cm.doc,range.head,dir):0>dir?range.from():range.to()})}function insertLine(cm,above){cm.operation(function(){for(var len=cm.listSelections().length,newSelection=[],last=-1,i=0;len>i;i++){var head=cm.listSelections()[i].head;if(!(head.line<=last)){var at=Pos(head.line+(above?0:1),0);cm.replaceRange("\n",at,null,"+insertLine");cm.indentLine(at.line,null,!0);newSelection.push({head:at,anchor:at});last=head.line+1}}cm.setSelections(newSelection)})}function wordAt(cm,pos){for(var start=pos.ch,end=start,line=cm.getLine(pos.line);start&&CodeMirror.isWordChar(line.charAt(start-1));)--start;for(;end<line.length&&CodeMirror.isWordChar(line.charAt(end));)++end;return{from:Pos(pos.line,start),to:Pos(pos.line,end),word:line.slice(start,end)}}function selectBetweenBrackets(cm){var pos=cm.getCursor(),opening=cm.scanForBracket(pos,-1);if(opening)for(;;){var closing=cm.scanForBracket(pos,1);if(!closing)return;if(closing.ch==mirror.charAt(mirror.indexOf(opening.ch)+1)){cm.setSelection(Pos(opening.pos.line,opening.pos.ch+1),closing.pos,!1);return!0}pos=Pos(closing.pos.line,closing.pos.ch+1)}}function sortLines(cm,caseSensitive){for(var selected,ranges=cm.listSelections(),toSort=[],i=0;i<ranges.length;i++){var range=ranges[i];if(!range.empty()){for(var from=range.from().line,to=range.to().line;i<ranges.length-1&&ranges[i+1].from().line==to;)to=range[++i].to().line;toSort.push(from,to)}}toSort.length?selected=!0:toSort.push(cm.firstLine(),cm.lastLine());cm.operation(function(){for(var ranges=[],i=0;i<toSort.length;i+=2){var from=toSort[i],to=toSort[i+1],start=Pos(from,0),end=Pos(to),lines=cm.getRange(start,end,!1);caseSensitive?lines.sort():lines.sort(function(a,b){var au=a.toUpperCase(),bu=b.toUpperCase();if(au!=bu){a=au;b=bu}return b>a?-1:a==b?0:1});cm.replaceRange(lines,start,end);selected&&ranges.push({anchor:start,head:end})}selected&&cm.setSelections(ranges,0)})}function modifyWordOrSelection(cm,mod){cm.operation(function(){for(var ranges=cm.listSelections(),indices=[],replacements=[],i=0;i<ranges.length;i++){var range=ranges[i];if(range.empty()){indices.push(i);replacements.push("")}else replacements.push(mod(cm.getRange(range.from(),range.to())))}cm.replaceSelections(replacements,"around","case");for(var at,i=indices.length-1;i>=0;i--){var range=ranges[indices[i]];if(!(at&&CodeMirror.cmpPos(range.head,at)>0)){var word=wordAt(cm,range.head);at=word.from;cm.replaceRange(mod(word.word),word.from,word.to)}}})}function getTarget(cm){var from=cm.getCursor("from"),to=cm.getCursor("to");if(0==CodeMirror.cmpPos(from,to)){var word=wordAt(cm,from);if(!word.word)return;from=word.from;to=word.to}return{from:from,to:to,query:cm.getRange(from,to),word:word}}function findAndGoTo(cm,forward){var target=getTarget(cm);if(target){var query=target.query,cur=cm.getSearchCursor(query,forward?target.to:target.from);if(forward?cur.findNext():cur.findPrevious())cm.setSelection(cur.from(),cur.to());else{cur=cm.getSearchCursor(query,forward?Pos(cm.firstLine(),0):cm.clipPos(Pos(cm.lastLine())));(forward?cur.findNext():cur.findPrevious())?cm.setSelection(cur.from(),cur.to()):target.word&&cm.setSelection(target.from,target.to)}}}var map=CodeMirror.keyMap.sublime={fallthrough:"default"},cmds=CodeMirror.commands,Pos=CodeMirror.Pos,mac=CodeMirror.keyMap["default"]==CodeMirror.keyMap.macDefault,ctrl=mac?"Cmd-":"Ctrl-";cmds[map["Alt-Left"]="goSubwordLeft"]=function(cm){moveSubword(cm,-1)};cmds[map["Alt-Right"]="goSubwordRight"]=function(cm){moveSubword(cm,1)};var scrollLineCombo=mac?"Ctrl-Alt-":"Ctrl-";cmds[map[scrollLineCombo+"Up"]="scrollLineUp"]=function(cm){var info=cm.getScrollInfo();if(!cm.somethingSelected()){var visibleBottomLine=cm.lineAtHeight(info.top+info.clientHeight,"local");cm.getCursor().line>=visibleBottomLine&&cm.execCommand("goLineUp")}cm.scrollTo(null,info.top-cm.defaultTextHeight())};cmds[map[scrollLineCombo+"Down"]="scrollLineDown"]=function(cm){var info=cm.getScrollInfo();if(!cm.somethingSelected()){var visibleTopLine=cm.lineAtHeight(info.top,"local")+1;cm.getCursor().line<=visibleTopLine&&cm.execCommand("goLineDown")}cm.scrollTo(null,info.top+cm.defaultTextHeight())};cmds[map["Shift-"+ctrl+"L"]="splitSelectionByLine"]=function(cm){for(var ranges=cm.listSelections(),lineRanges=[],i=0;i<ranges.length;i++)for(var from=ranges[i].from(),to=ranges[i].to(),line=from.line;line<=to.line;++line)to.line>from.line&&line==to.line&&0==to.ch||lineRanges.push({anchor:line==from.line?from:Pos(line,0),head:line==to.line?to:Pos(line)});cm.setSelections(lineRanges,0)};map["Shift-Tab"]="indentLess";cmds[map.Esc="singleSelectionTop"]=function(cm){var range=cm.listSelections()[0];cm.setSelection(range.anchor,range.head,{scroll:!1})};cmds[map[ctrl+"L"]="selectLine"]=function(cm){for(var ranges=cm.listSelections(),extended=[],i=0;i<ranges.length;i++){var range=ranges[i];extended.push({anchor:Pos(range.from().line,0),head:Pos(range.to().line+1,0)})}cm.setSelections(extended)};map["Shift-"+ctrl+"K"]="deleteLine";cmds[map[ctrl+"Enter"]="insertLineAfter"]=function(cm){insertLine(cm,!1)};cmds[map["Shift-"+ctrl+"Enter"]="insertLineBefore"]=function(cm){insertLine(cm,!0)};cmds[map[ctrl+"D"]="selectNextOccurrence"]=function(cm){var from=cm.getCursor("from"),to=cm.getCursor("to"),fullWord=cm.state.sublimeFindFullWord==cm.doc.sel;if(0==CodeMirror.cmpPos(from,to)){var word=wordAt(cm,from);if(!word.word)return;cm.setSelection(word.from,word.to);fullWord=!0}else{var text=cm.getRange(from,to),query=fullWord?new RegExp("\\b"+text+"\\b"):text,cur=cm.getSearchCursor(query,to);if(cur.findNext())cm.addSelection(cur.from(),cur.to());else{cur=cm.getSearchCursor(query,Pos(cm.firstLine(),0));cur.findNext()&&cm.addSelection(cur.from(),cur.to())}}fullWord&&(cm.state.sublimeFindFullWord=cm.doc.sel)};var mirror="(){}[]";cmds[map["Shift-"+ctrl+"Space"]="selectScope"]=function(cm){selectBetweenBrackets(cm)||cm.execCommand("selectAll")};cmds[map["Shift-"+ctrl+"M"]="selectBetweenBrackets"]=function(cm){return selectBetweenBrackets(cm)?void 0:CodeMirror.Pass};cmds[map[ctrl+"M"]="goToBracket"]=function(cm){cm.extendSelectionsBy(function(range){var next=cm.scanForBracket(range.head,1);if(next&&0!=CodeMirror.cmpPos(next.pos,range.head))return next.pos;var prev=cm.scanForBracket(range.head,-1);return prev&&Pos(prev.pos.line,prev.pos.ch+1)||range.head})};var swapLineCombo=mac?"Cmd-Ctrl-":"Shift-Ctrl-";cmds[map[swapLineCombo+"Up"]="swapLineUp"]=function(cm){for(var ranges=cm.listSelections(),linesToMove=[],at=cm.firstLine()-1,newSels=[],i=0;i<ranges.length;i++){var range=ranges[i],from=range.from().line-1,to=range.to().line;newSels.push({anchor:Pos(range.anchor.line-1,range.anchor.ch),head:Pos(range.head.line-1,range.head.ch)});0!=range.to().ch||range.empty()||--to;from>at?linesToMove.push(from,to):linesToMove.length&&(linesToMove[linesToMove.length-1]=to);at=to}cm.operation(function(){for(var i=0;i<linesToMove.length;i+=2){var from=linesToMove[i],to=linesToMove[i+1],line=cm.getLine(from);cm.replaceRange("",Pos(from,0),Pos(from+1,0),"+swapLine");to>cm.lastLine()?cm.replaceRange("\n"+line,Pos(cm.lastLine()),null,"+swapLine"):cm.replaceRange(line+"\n",Pos(to,0),null,"+swapLine")}cm.setSelections(newSels);cm.scrollIntoView()})};cmds[map[swapLineCombo+"Down"]="swapLineDown"]=function(cm){for(var ranges=cm.listSelections(),linesToMove=[],at=cm.lastLine()+1,i=ranges.length-1;i>=0;i--){var range=ranges[i],from=range.to().line+1,to=range.from().line;0!=range.to().ch||range.empty()||from--;at>from?linesToMove.push(from,to):linesToMove.length&&(linesToMove[linesToMove.length-1]=to);at=to}cm.operation(function(){for(var i=linesToMove.length-2;i>=0;i-=2){var from=linesToMove[i],to=linesToMove[i+1],line=cm.getLine(from);from==cm.lastLine()?cm.replaceRange("",Pos(from-1),Pos(from),"+swapLine"):cm.replaceRange("",Pos(from,0),Pos(from+1,0),"+swapLine");cm.replaceRange(line+"\n",Pos(to,0),null,"+swapLine")}cm.scrollIntoView()})};map[ctrl+"/"]=function(cm){cm.toggleComment({indent:!0})};cmds[map[ctrl+"J"]="joinLines"]=function(cm){for(var ranges=cm.listSelections(),joined=[],i=0;i<ranges.length;i++){for(var range=ranges[i],from=range.from(),start=from.line,end=range.to().line;i<ranges.length-1&&ranges[i+1].from().line==end;)end=ranges[++i].to().line;joined.push({start:start,end:end,anchor:!range.empty()&&from})}cm.operation(function(){for(var offset=0,ranges=[],i=0;i<joined.length;i++){for(var head,obj=joined[i],anchor=obj.anchor&&Pos(obj.anchor.line-offset,obj.anchor.ch),line=obj.start;line<=obj.end;line++){var actual=line-offset;line==obj.end&&(head=Pos(actual,cm.getLine(actual).length+1));if(actual<cm.lastLine()){cm.replaceRange(" ",Pos(actual),Pos(actual+1,/^\s*/.exec(cm.getLine(actual+1))[0].length));++offset}}ranges.push({anchor:anchor||head,head:head})}cm.setSelections(ranges,0)})};cmds[map["Shift-"+ctrl+"D"]="duplicateLine"]=function(cm){cm.operation(function(){for(var rangeCount=cm.listSelections().length,i=0;rangeCount>i;i++){var range=cm.listSelections()[i];range.empty()?cm.replaceRange(cm.getLine(range.head.line)+"\n",Pos(range.head.line,0)):cm.replaceRange(cm.getRange(range.from(),range.to()),range.from())}cm.scrollIntoView()})};map[ctrl+"T"]="transposeChars";cmds[map.F9="sortLines"]=function(cm){sortLines(cm,!0)};cmds[map[ctrl+"F9"]="sortLinesInsensitive"]=function(cm){sortLines(cm,!1)};cmds[map.F2="nextBookmark"]=function(cm){var marks=cm.state.sublimeBookmarks;if(marks)for(;marks.length;){var current=marks.shift(),found=current.find();if(found){marks.push(current);return cm.setSelection(found.from,found.to)}}};cmds[map["Shift-F2"]="prevBookmark"]=function(cm){var marks=cm.state.sublimeBookmarks;if(marks)for(;marks.length;){marks.unshift(marks.pop());var found=marks[marks.length-1].find();if(found)return cm.setSelection(found.from,found.to);marks.pop()}};cmds[map[ctrl+"F2"]="toggleBookmark"]=function(cm){for(var ranges=cm.listSelections(),marks=cm.state.sublimeBookmarks||(cm.state.sublimeBookmarks=[]),i=0;i<ranges.length;i++){for(var from=ranges[i].from(),to=ranges[i].to(),found=cm.findMarks(from,to),j=0;j<found.length;j++)if(found[j].sublimeBookmark){found[j].clear();for(var k=0;k<marks.length;k++)marks[k]==found[j]&&marks.splice(k--,1);break}j==found.length&&marks.push(cm.markText(from,to,{sublimeBookmark:!0,clearWhenEmpty:!1}))}};cmds[map["Shift-"+ctrl+"F2"]="clearBookmarks"]=function(cm){var marks=cm.state.sublimeBookmarks;if(marks)for(var i=0;i<marks.length;i++)marks[i].clear();marks.length=0};cmds[map["Alt-F2"]="selectBookmarks"]=function(cm){var marks=cm.state.sublimeBookmarks,ranges=[];if(marks)for(var i=0;i<marks.length;i++){var found=marks[i].find();found?ranges.push({anchor:found.from,head:found.to}):marks.splice(i--,0)}ranges.length&&cm.setSelections(ranges,0)};map["Alt-Q"]="wrapLines";var cK=ctrl+"K ";map[cK+ctrl+"Backspace"]="delLineLeft";cmds[map.Backspace="smartBackspace"]=function(cm){if(cm.somethingSelected())return CodeMirror.Pass;var cursor=cm.getCursor(),toStartOfLine=cm.getRange({line:cursor.line,ch:0},cursor),column=CodeMirror.countColumn(toStartOfLine,null,cm.getOption("tabSize")),indentUnit=cm.getOption("indentUnit");if(toStartOfLine&&!/\S/.test(toStartOfLine)&&column%indentUnit==0){var prevIndent=new Pos(cursor.line,CodeMirror.findColumn(toStartOfLine,column-indentUnit,indentUnit));return prevIndent.ch==cursor.ch?CodeMirror.Pass:cm.replaceRange("",prevIndent,cursor,"+delete")}return CodeMirror.Pass};cmds[map[cK+ctrl+"K"]="delLineRight"]=function(cm){cm.operation(function(){for(var ranges=cm.listSelections(),i=ranges.length-1;i>=0;i--)cm.replaceRange("",ranges[i].anchor,Pos(ranges[i].to().line),"+delete");cm.scrollIntoView()})};cmds[map[cK+ctrl+"U"]="upcaseAtCursor"]=function(cm){modifyWordOrSelection(cm,function(str){return str.toUpperCase()})};cmds[map[cK+ctrl+"L"]="downcaseAtCursor"]=function(cm){modifyWordOrSelection(cm,function(str){return str.toLowerCase()})};cmds[map[cK+ctrl+"Space"]="setSublimeMark"]=function(cm){cm.state.sublimeMark&&cm.state.sublimeMark.clear();cm.state.sublimeMark=cm.setBookmark(cm.getCursor())};cmds[map[cK+ctrl+"A"]="selectToSublimeMark"]=function(cm){var found=cm.state.sublimeMark&&cm.state.sublimeMark.find();found&&cm.setSelection(cm.getCursor(),found)};cmds[map[cK+ctrl+"W"]="deleteToSublimeMark"]=function(cm){var found=cm.state.sublimeMark&&cm.state.sublimeMark.find();if(found){var from=cm.getCursor(),to=found;if(CodeMirror.cmpPos(from,to)>0){var tmp=to;to=from;from=tmp}cm.state.sublimeKilled=cm.getRange(from,to);cm.replaceRange("",from,to)}};cmds[map[cK+ctrl+"X"]="swapWithSublimeMark"]=function(cm){var found=cm.state.sublimeMark&&cm.state.sublimeMark.find();if(found){cm.state.sublimeMark.clear();cm.state.sublimeMark=cm.setBookmark(cm.getCursor());cm.setCursor(found)}};cmds[map[cK+ctrl+"Y"]="sublimeYank"]=function(cm){null!=cm.state.sublimeKilled&&cm.replaceSelection(cm.state.sublimeKilled,null,"paste")};map[cK+ctrl+"G"]="clearBookmarks";cmds[map[cK+ctrl+"C"]="showInCenter"]=function(cm){var pos=cm.cursorCoords(null,"local");cm.scrollTo(null,(pos.top+pos.bottom)/2-cm.getScrollInfo().clientHeight/2)};cmds[map["Shift-Alt-Up"]="selectLinesUpward"]=function(cm){cm.operation(function(){for(var ranges=cm.listSelections(),i=0;i<ranges.length;i++){var range=ranges[i];range.head.line>cm.firstLine()&&cm.addSelection(Pos(range.head.line-1,range.head.ch))}})};cmds[map["Shift-Alt-Down"]="selectLinesDownward"]=function(cm){cm.operation(function(){for(var ranges=cm.listSelections(),i=0;i<ranges.length;i++){var range=ranges[i];range.head.line<cm.lastLine()&&cm.addSelection(Pos(range.head.line+1,range.head.ch))}})};cmds[map[ctrl+"F3"]="findUnder"]=function(cm){findAndGoTo(cm,!0)};cmds[map["Shift-"+ctrl+"F3"]="findUnderPrevious"]=function(cm){findAndGoTo(cm,!1)};cmds[map["Alt-F3"]="findAllUnder"]=function(cm){var target=getTarget(cm);if(target){for(var cur=cm.getSearchCursor(target.query),matches=[],primaryIndex=-1;cur.findNext();){matches.push({anchor:cur.from(),head:cur.to()});cur.from().line<=target.from.line&&cur.from().ch<=target.from.ch&&primaryIndex++}cm.setSelections(matches,primaryIndex)}};map["Shift-"+ctrl+"["]="fold";map["Shift-"+ctrl+"]"]="unfold";map[cK+ctrl+"0"]=map[cK+ctrl+"j"]="unfoldAll";map[ctrl+"I"]="findIncremental";map["Shift-"+ctrl+"I"]="findIncrementalReverse";map[ctrl+"H"]="replace";map.F3="findNext";map["Shift-F3"]="findPrev";CodeMirror.normalizeKeyMap(map)});
js/esites_editor/dist/js/vendor/codemirror/keymap/vim.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ !function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/dialog/dialog"),require("../addon/edit/matchbrackets.js")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/dialog/dialog","../addon/edit/matchbrackets"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";var defaultKeymap=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"xi",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"dcc",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],defaultExCommandMap=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],Pos=CodeMirror.Pos,Vim=function(){function enterVimMode(cm){cm.setOption("disableInput",!0);cm.setOption("showCursorWhenSelecting",!1);CodeMirror.signal(cm,"vim-mode-change",{mode:"normal"});cm.on("cursorActivity",onCursorActivity);maybeInitVimState(cm);CodeMirror.on(cm.getInputField(),"paste",getOnPasteFn(cm))}function leaveVimMode(cm){cm.setOption("disableInput",!1);cm.off("cursorActivity",onCursorActivity);CodeMirror.off(cm.getInputField(),"paste",getOnPasteFn(cm));cm.state.vim=null}function detachVimMap(cm,next){this==CodeMirror.keyMap.vim&&CodeMirror.rmClass(cm.getWrapperElement(),"cm-fat-cursor");next&&next.attach==attachVimMap||leaveVimMode(cm,!1)}function attachVimMap(cm,prev){this==CodeMirror.keyMap.vim&&CodeMirror.addClass(cm.getWrapperElement(),"cm-fat-cursor");prev&&prev.attach==attachVimMap||enterVimMode(cm)}function cmKey(key,cm){if(!cm)return void 0;var vimKey=cmKeyToVimKey(key);if(!vimKey)return!1;var cmd=CodeMirror.Vim.findKey(cm,vimKey);"function"==typeof cmd&&CodeMirror.signal(cm,"vim-keypress",vimKey);return cmd}function cmKeyToVimKey(key){if("'"==key.charAt(0))return key.charAt(1);var pieces=key.split("-");/-$/.test(key)&&pieces.splice(-2,2,"-");var lastPiece=pieces[pieces.length-1];if(1==pieces.length&&1==pieces[0].length)return!1;if(2==pieces.length&&"Shift"==pieces[0]&&1==lastPiece.length)return!1;for(var hasCharacter=!1,i=0;i<pieces.length;i++){var piece=pieces[i];piece in modifiers?pieces[i]=modifiers[piece]:hasCharacter=!0;piece in specialKeys&&(pieces[i]=specialKeys[piece])}if(!hasCharacter)return!1;isUpperCase(lastPiece)&&(pieces[pieces.length-1]=lastPiece.toLowerCase());return"<"+pieces.join("-")+">"}function getOnPasteFn(cm){var vim=cm.state.vim;vim.onPasteFn||(vim.onPasteFn=function(){if(!vim.insertMode){cm.setCursor(offsetCursor(cm.getCursor(),0,1));actions.enterInsertMode(cm,{},vim)}});return vim.onPasteFn}function makeKeyRange(start,size){for(var keys=[],i=start;start+size>i;i++)keys.push(String.fromCharCode(i));return keys}function isLine(cm,line){return line>=cm.firstLine()&&line<=cm.lastLine()}function isLowerCase(k){return/^[a-z]$/.test(k)}function isMatchableSymbol(k){return-1!="()[]{}".indexOf(k)}function isNumber(k){return numberRegex.test(k)}function isUpperCase(k){return/^[A-Z]$/.test(k)}function isWhiteSpaceString(k){return/^\s*$/.test(k)}function inArray(val,arr){for(var i=0;i<arr.length;i++)if(arr[i]==val)return!0;return!1}function defineOption(name,defaultValue,type,aliases,callback){if(void 0===defaultValue&&!callback)throw Error("defaultValue is required unless callback is provided");type||(type="string");options[name]={type:type,defaultValue:defaultValue,callback:callback};if(aliases)for(var i=0;i<aliases.length;i++)options[aliases[i]]=options[name];defaultValue&&setOption(name,defaultValue)}function setOption(name,value,cm,cfg){var option=options[name];cfg=cfg||{};var scope=cfg.scope;if(!option)throw Error("Unknown option: "+name);if("boolean"==option.type){if(value&&value!==!0)throw Error("Invalid argument: "+name+"="+value);value!==!1&&(value=!0)}if(option.callback){"local"!==scope&&option.callback(value,void 0);"global"!==scope&&cm&&option.callback(value,cm)}else{"local"!==scope&&(option.value="boolean"==option.type?!!value:value);"global"!==scope&&cm&&(cm.state.vim.options[name]={value:value})}}function getOption(name,cm,cfg){var option=options[name];cfg=cfg||{};var scope=cfg.scope;if(!option)throw Error("Unknown option: "+name);if(!option.callback){var local="global"!==scope&&cm&&cm.state.vim.options[name];return(local||"local"!==scope&&option||{}).value}var local=cm&&option.callback(void 0,cm);return"global"!==scope&&void 0!==local?local:"local"!==scope?option.callback():void 0}function MacroModeState(){this.latestRegister=void 0;this.isPlaying=!1;this.isRecording=!1;this.replaySearchQueries=[];this.onRecordingDone=void 0;this.lastInsertModeChanges=createInsertModeChanges()}function maybeInitVimState(cm){cm.state.vim||(cm.state.vim={inputState:new InputState,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}});return cm.state.vim}function resetVimGlobalState(){vimGlobalState={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:createCircularJumpList(),macroModeState:new MacroModeState,lastChararacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new RegisterController({}),searchHistoryController:new HistoryController({}),exCommandHistoryController:new HistoryController({})};for(var optionName in options){var option=options[optionName];option.value=option.defaultValue}}function InputState(){this.prefixRepeat=[];this.motionRepeat=[];this.operator=null;this.operatorArgs=null;this.motion=null;this.motionArgs=null;this.keyBuffer=[];this.registerName=null}function clearInputState(cm,reason){cm.state.vim.inputState=new InputState;CodeMirror.signal(cm,"vim-command-done",reason)}function Register(text,linewise,blockwise){this.clear();this.keyBuffer=[text||""];this.insertModeChanges=[];this.searchQueries=[];this.linewise=!!linewise;this.blockwise=!!blockwise}function defineRegister(name,register){var registers=vimGlobalState.registerController.registers[name];if(!name||1!=name.length)throw Error("Register name must be 1 character");if(registers[name])throw Error("Register already defined "+name);registers[name]=register;validRegisters.push(name)}function RegisterController(registers){this.registers=registers;this.unnamedRegister=registers['"']=new Register;registers["."]=new Register;registers[":"]=new Register;registers["/"]=new Register}function HistoryController(){this.historyBuffer=[];this.iterator;this.initialPrefix=null}function defineMotion(name,fn){motions[name]=fn}function fillArray(val,times){for(var arr=[],i=0;times>i;i++)arr.push(val);return arr}function defineOperator(name,fn){operators[name]=fn}function defineAction(name,fn){actions[name]=fn}function clipCursorToContent(cm,cur,includeLineBreak){var line=Math.min(Math.max(cm.firstLine(),cur.line),cm.lastLine()),maxCh=lineLength(cm,line)-1;maxCh=includeLineBreak?maxCh+1:maxCh;var ch=Math.min(Math.max(0,cur.ch),maxCh);return Pos(line,ch)}function copyArgs(args){var ret={};for(var prop in args)args.hasOwnProperty(prop)&&(ret[prop]=args[prop]);return ret}function offsetCursor(cur,offsetLine,offsetCh){if("object"==typeof offsetLine){offsetCh=offsetLine.ch;offsetLine=offsetLine.line}return Pos(cur.line+offsetLine,cur.ch+offsetCh)}function getOffset(anchor,head){return{line:head.line-anchor.line,ch:head.line-anchor.line}}function commandMatches(keys,keyMap,context,inputState){for(var match,partial=[],full=[],i=0;i<keyMap.length;i++){var command=keyMap[i];if(!("insert"==context&&"insert"!=command.context||command.context&&command.context!=context||inputState.operator&&"action"==command.type)&&(match=commandMatch(keys,command.keys))){"partial"==match&&partial.push(command);"full"==match&&full.push(command)}}return{partial:partial.length&&partial,full:full.length&&full}}function commandMatch(pressed,mapped){if("<character>"==mapped.slice(-11)){var prefixLen=mapped.length-11,pressedPrefix=pressed.slice(0,prefixLen),mappedPrefix=mapped.slice(0,prefixLen);return pressedPrefix==mappedPrefix&&pressed.length>prefixLen?"full":0==mappedPrefix.indexOf(pressedPrefix)?"partial":!1}return pressed==mapped?"full":0==mapped.indexOf(pressed)?"partial":!1}function lastChar(keys){var match=/^.*(<[\w\-]+>)$/.exec(keys),selectedCharacter=match?match[1]:keys.slice(-1);if(selectedCharacter.length>1)switch(selectedCharacter){case"<CR>":selectedCharacter="\n";break;case"<Space>":selectedCharacter=" "}return selectedCharacter}function repeatFn(cm,fn,repeat){return function(){for(var i=0;repeat>i;i++)fn(cm)}}function copyCursor(cur){return Pos(cur.line,cur.ch)}function cursorEqual(cur1,cur2){return cur1.ch==cur2.ch&&cur1.line==cur2.line}function cursorIsBefore(cur1,cur2){return cur1.line<cur2.line?!0:cur1.line==cur2.line&&cur1.ch<cur2.ch?!0:!1}function cursorMin(cur1,cur2){arguments.length>2&&(cur2=cursorMin.apply(void 0,Array.prototype.slice.call(arguments,1)));return cursorIsBefore(cur1,cur2)?cur1:cur2}function cursorMax(cur1,cur2){arguments.length>2&&(cur2=cursorMax.apply(void 0,Array.prototype.slice.call(arguments,1)));return cursorIsBefore(cur1,cur2)?cur2:cur1}function cursorIsBetween(cur1,cur2,cur3){var cur1before2=cursorIsBefore(cur1,cur2),cur2before3=cursorIsBefore(cur2,cur3);return cur1before2&&cur2before3}function lineLength(cm,lineNum){return cm.getLine(lineNum).length}function trim(s){return s.trim?s.trim():s.replace(/^\s+|\s+$/g,"")}function escapeRegex(s){return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function extendLineToColumn(cm,lineNum,column){var endCh=lineLength(cm,lineNum),spaces=new Array(column-endCh+1).join(" ");cm.setCursor(Pos(lineNum,endCh));cm.replaceRange(spaces,cm.getCursor())}function selectBlock(cm,selectionEnd){var selections=[],ranges=cm.listSelections(),head=copyCursor(cm.clipPos(selectionEnd)),isClipped=!cursorEqual(selectionEnd,head),curHead=cm.getCursor("head"),primIndex=getIndex(ranges,curHead),wasClipped=cursorEqual(ranges[primIndex].head,ranges[primIndex].anchor),max=ranges.length-1,index=max-primIndex>primIndex?max:0,base=ranges[index].anchor,firstLine=Math.min(base.line,head.line),lastLine=Math.max(base.line,head.line),baseCh=base.ch,headCh=head.ch,dir=ranges[index].head.ch-baseCh,newDir=headCh-baseCh;if(dir>0&&0>=newDir){baseCh++;isClipped||headCh--}else if(0>dir&&newDir>=0){baseCh--;wasClipped||headCh++}else if(0>dir&&-1==newDir){baseCh--;headCh++}for(var line=firstLine;lastLine>=line;line++){var range={anchor:new Pos(line,baseCh),head:new Pos(line,headCh)};selections.push(range)}primIndex=head.line==lastLine?selections.length-1:0;cm.setSelections(selections);selectionEnd.ch=headCh;base.ch=baseCh;return base}function selectForInsert(cm,head,height){for(var sel=[],i=0;height>i;i++){var lineHead=offsetCursor(head,i,0);sel.push({anchor:lineHead,head:lineHead})}cm.setSelections(sel,0)}function getIndex(ranges,cursor,end){for(var i=0;i<ranges.length;i++){var atAnchor="head"!=end&&cursorEqual(ranges[i].anchor,cursor),atHead="anchor"!=end&&cursorEqual(ranges[i].head,cursor);if(atAnchor||atHead)return i}return-1}function getSelectedAreaRange(cm,vim){var lastSelection=vim.lastSelection,getCurrentSelectedAreaRange=function(){var selections=cm.listSelections(),start=selections[0],end=selections[selections.length-1],selectionStart=cursorIsBefore(start.anchor,start.head)?start.anchor:start.head,selectionEnd=cursorIsBefore(end.anchor,end.head)?end.head:end.anchor;return[selectionStart,selectionEnd]},getLastSelectedAreaRange=function(){var selectionStart=cm.getCursor(),selectionEnd=cm.getCursor(),block=lastSelection.visualBlock;if(block){var width=block.width,height=block.height;selectionEnd=Pos(selectionStart.line+height,selectionStart.ch+width);for(var selections=[],i=selectionStart.line;i<selectionEnd.line;i++){var anchor=Pos(i,selectionStart.ch),head=Pos(i,selectionEnd.ch),range={anchor:anchor,head:head};selections.push(range)}cm.setSelections(selections)}else{var start=lastSelection.anchorMark.find(),end=lastSelection.headMark.find(),line=end.line-start.line,ch=end.ch-start.ch;selectionEnd={line:selectionEnd.line+line,ch:line?selectionEnd.ch:ch+selectionEnd.ch};if(lastSelection.visualLine){selectionStart=Pos(selectionStart.line,0);selectionEnd=Pos(selectionEnd.line,lineLength(cm,selectionEnd.line))}cm.setSelection(selectionStart,selectionEnd)}return[selectionStart,selectionEnd]};return vim.visualMode?getCurrentSelectedAreaRange():getLastSelectedAreaRange()}function updateLastSelection(cm,vim){var anchor=vim.sel.anchor,head=vim.sel.head;if(vim.lastPastedText){head=cm.posFromIndex(cm.indexFromPos(anchor)+vim.lastPastedText.length);vim.lastPastedText=null}vim.lastSelection={anchorMark:cm.setBookmark(anchor),headMark:cm.setBookmark(head),anchor:copyCursor(anchor),head:copyCursor(head),visualMode:vim.visualMode,visualLine:vim.visualLine,visualBlock:vim.visualBlock}}function expandSelection(cm,start,end){var tmp,sel=cm.state.vim.sel,head=sel.head,anchor=sel.anchor;if(cursorIsBefore(end,start)){tmp=end;end=start;start=tmp}if(cursorIsBefore(head,anchor)){head=cursorMin(start,head);anchor=cursorMax(anchor,end)}else{anchor=cursorMin(start,anchor);head=cursorMax(head,end);head=offsetCursor(head,0,-1);-1==head.ch&&head.line!=cm.firstLine()&&(head=Pos(head.line-1,lineLength(cm,head.line-1)))}return[anchor,head]}function updateCmSelection(cm,sel,mode){var vim=cm.state.vim;sel=sel||vim.sel;var mode=mode||vim.visualLine?"line":vim.visualBlock?"block":"char",cmSel=makeCmSelection(cm,sel,mode);cm.setSelections(cmSel.ranges,cmSel.primary);updateFakeCursor(cm)}function makeCmSelection(cm,sel,mode,exclusive){var head=copyCursor(sel.head),anchor=copyCursor(sel.anchor);if("char"==mode){var headOffset=exclusive||cursorIsBefore(sel.head,sel.anchor)?0:1,anchorOffset=cursorIsBefore(sel.head,sel.anchor)?1:0;head=offsetCursor(sel.head,0,headOffset);anchor=offsetCursor(sel.anchor,0,anchorOffset);return{ranges:[{anchor:anchor,head:head}],primary:0}}if("line"==mode){if(cursorIsBefore(sel.head,sel.anchor)){head.ch=0;anchor.ch=lineLength(cm,anchor.line)}else{anchor.ch=0;var lastLine=cm.lastLine();head.line>lastLine&&(head.line=lastLine);head.ch=lineLength(cm,head.line)}return{ranges:[{anchor:anchor,head:head}],primary:0}}if("block"==mode){for(var top=Math.min(anchor.line,head.line),left=Math.min(anchor.ch,head.ch),bottom=Math.max(anchor.line,head.line),right=Math.max(anchor.ch,head.ch)+1,height=bottom-top+1,primary=head.line==top?0:height-1,ranges=[],i=0;height>i;i++)ranges.push({anchor:Pos(top+i,left),head:Pos(top+i,right)});return{ranges:ranges,primary:primary}}}function getHead(cm){var cur=cm.getCursor("head");1==cm.getSelection().length&&(cur=cursorMin(cur,cm.getCursor("anchor")));return cur}function exitVisualMode(cm,moveHead){var vim=cm.state.vim;moveHead!==!1&&cm.setCursor(clipCursorToContent(cm,vim.sel.head));updateLastSelection(cm,vim);vim.visualMode=!1;vim.visualLine=!1;vim.visualBlock=!1;CodeMirror.signal(cm,"vim-mode-change",{mode:"normal"});vim.fakeCursor&&vim.fakeCursor.clear()}function clipToLine(cm,curStart,curEnd){var selection=cm.getRange(curStart,curEnd);if(/\n\s*$/.test(selection)){var lines=selection.split("\n");lines.pop();for(var line,line=lines.pop();lines.length>0&&line&&isWhiteSpaceString(line);line=lines.pop()){curEnd.line--;curEnd.ch=0}if(line){curEnd.line--;curEnd.ch=lineLength(cm,curEnd.line)}else curEnd.ch=0}}function expandSelectionToLine(_cm,curStart,curEnd){curStart.ch=0;curEnd.ch=0;curEnd.line++}function findFirstNonWhiteSpaceCharacter(text){if(!text)return 0;var firstNonWS=text.search(/\S/);return-1==firstNonWS?text.length:firstNonWS}function expandWordUnderCursor(cm,inclusive,_forward,bigWord,noSymbol){for(var cur=getHead(cm),line=cm.getLine(cur.line),idx=cur.ch,test=noSymbol?wordCharTest[0]:bigWordCharTest[0];!test(line.charAt(idx));){idx++;if(idx>=line.length)return null}if(bigWord)test=bigWordCharTest[0];else{test=wordCharTest[0];test(line.charAt(idx))||(test=wordCharTest[1])}for(var end=idx,start=idx;test(line.charAt(end))&&end<line.length;)end++;for(;test(line.charAt(start))&&start>=0;)start--;start++;if(inclusive){for(var wordEnd=end;/\s/.test(line.charAt(end))&&end<line.length;)end++;if(wordEnd==end){for(var wordStart=start;/\s/.test(line.charAt(start-1))&&start>0;)start--;start||(start=wordStart)}}return{start:Pos(cur.line,start),end:Pos(cur.line,end)}}function recordJumpPosition(cm,oldCur,newCur){cursorEqual(oldCur,newCur)||vimGlobalState.jumpList.add(cm,oldCur,newCur)}function recordLastCharacterSearch(increment,args){vimGlobalState.lastChararacterSearch.increment=increment;vimGlobalState.lastChararacterSearch.forward=args.forward;vimGlobalState.lastChararacterSearch.selectedCharacter=args.selectedCharacter}function findSymbol(cm,repeat,forward,symb){var cur=copyCursor(cm.getCursor()),increment=forward?1:-1,endLine=forward?cm.lineCount():-1,curCh=cur.ch,line=cur.line,lineText=cm.getLine(line),state={lineText:lineText,nextCh:lineText.charAt(curCh),lastCh:null,index:curCh,symb:symb,reverseSymb:(forward?{")":"(","}":"{"}:{"(":")","{":"}"})[symb],forward:forward,depth:0,curMoveThrough:!1},mode=symbolToMode[symb];if(!mode)return cur;var init=findSymbolModes[mode].init,isComplete=findSymbolModes[mode].isComplete;init&&init(state);for(;line!==endLine&&repeat;){state.index+=increment;state.nextCh=state.lineText.charAt(state.index);if(!state.nextCh){line+=increment;state.lineText=cm.getLine(line)||"";if(increment>0)state.index=0;else{var lineLen=state.lineText.length;state.index=lineLen>0?lineLen-1:0}state.nextCh=state.lineText.charAt(state.index)}if(isComplete(state)){cur.line=line;cur.ch=state.index;repeat--}}return state.nextCh||state.curMoveThrough?Pos(line,state.index):cur}function findWord(cm,cur,forward,bigWord,emptyLineIsWord){var lineNum=cur.line,pos=cur.ch,line=cm.getLine(lineNum),dir=forward?1:-1,charTests=bigWord?bigWordCharTest:wordCharTest;if(emptyLineIsWord&&""==line){lineNum+=dir;line=cm.getLine(lineNum);if(!isLine(cm,lineNum))return null;pos=forward?0:line.length}for(;;){if(emptyLineIsWord&&""==line)return{from:0,to:0,line:lineNum};for(var stop=dir>0?line.length:-1,wordStart=stop,wordEnd=stop;pos!=stop;){for(var foundWord=!1,i=0;i<charTests.length&&!foundWord;++i)if(charTests[i](line.charAt(pos))){wordStart=pos;for(;pos!=stop&&charTests[i](line.charAt(pos));)pos+=dir;wordEnd=pos;foundWord=wordStart!=wordEnd;if(wordStart==cur.ch&&lineNum==cur.line&&wordEnd==wordStart+dir)continue;return{from:Math.min(wordStart,wordEnd+1),to:Math.max(wordStart,wordEnd),line:lineNum}}foundWord||(pos+=dir)}lineNum+=dir;if(!isLine(cm,lineNum))return null;line=cm.getLine(lineNum);pos=dir>0?0:line.length}throw new Error("The impossible happened.")}function moveToWord(cm,cur,repeat,forward,wordEnd,bigWord){var curStart=copyCursor(cur),words=[];(forward&&!wordEnd||!forward&&wordEnd)&&repeat++;for(var emptyLineIsWord=!(forward&&wordEnd),i=0;repeat>i;i++){var word=findWord(cm,cur,forward,bigWord,emptyLineIsWord);if(!word){var eodCh=lineLength(cm,cm.lastLine());words.push(forward?{line:cm.lastLine(),from:eodCh,to:eodCh}:{line:0,from:0,to:0});break}words.push(word);cur=Pos(word.line,forward?word.to-1:word.from)}var shortCircuit=words.length!=repeat,firstWord=words[0],lastWord=words.pop();if(forward&&!wordEnd){shortCircuit||firstWord.from==curStart.ch&&firstWord.line==curStart.line||(lastWord=words.pop());return Pos(lastWord.line,lastWord.from)}if(forward&&wordEnd)return Pos(lastWord.line,lastWord.to-1);if(!forward&&wordEnd){shortCircuit||firstWord.to==curStart.ch&&firstWord.line==curStart.line||(lastWord=words.pop());return Pos(lastWord.line,lastWord.to)}return Pos(lastWord.line,lastWord.from)}function moveToCharacter(cm,repeat,forward,character){for(var idx,cur=cm.getCursor(),start=cur.ch,i=0;repeat>i;i++){var line=cm.getLine(cur.line);idx=charIdxInLine(start,line,character,forward,!0);if(-1==idx)return null;start=idx}return Pos(cm.getCursor().line,idx)}function moveToColumn(cm,repeat){var line=cm.getCursor().line;return clipCursorToContent(cm,Pos(line,repeat-1));
2
+ }function updateMark(cm,vim,markName,pos){if(inArray(markName,validMarks)){vim.marks[markName]&&vim.marks[markName].clear();vim.marks[markName]=cm.setBookmark(pos)}}function charIdxInLine(start,line,character,forward,includeChar){var idx;if(forward){idx=line.indexOf(character,start+1);-1==idx||includeChar||(idx-=1)}else{idx=line.lastIndexOf(character,start-1);-1==idx||includeChar||(idx+=1)}return idx}function findParagraph(cm,head,repeat,dir,inclusive){function isEmpty(i){return!cm.getLine(i)}function isBoundary(i,dir,any){return any?isEmpty(i)!=isEmpty(i+dir):!isEmpty(i)&&isEmpty(i+dir)}var start,end,line=head.line,min=cm.firstLine(),max=cm.lastLine(),i=line;if(dir){for(;i>=min&&max>=i&&repeat>0;){isBoundary(i,dir)&&repeat--;i+=dir}return new Pos(i,0)}var vim=cm.state.vim;if(vim.visualLine&&isBoundary(line,1,!0)){var anchor=vim.sel.anchor;isBoundary(anchor.line,-1,!0)&&(inclusive&&anchor.line==line||(line+=1))}var startState=isEmpty(line);for(i=line;max>=i&&repeat;i++)isBoundary(i,1,!0)&&(inclusive&&isEmpty(i)==startState||repeat--);end=new Pos(i,0);i>max&&!startState?startState=!0:inclusive=!1;for(i=line;i>min&&(inclusive&&isEmpty(i)!=startState&&i!=line||!isBoundary(i,-1,!0));i--);start=new Pos(i,0);return{start:start,end:end}}function selectCompanionObject(cm,head,symb,inclusive){var start,end,cur=head,bracketRegexp={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[symb],openSym={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[symb],curChar=cm.getLine(cur.line).charAt(cur.ch),offset=curChar===openSym?1:0;start=cm.scanForBracket(Pos(cur.line,cur.ch+offset),-1,null,{bracketRegex:bracketRegexp});end=cm.scanForBracket(Pos(cur.line,cur.ch+offset),1,null,{bracketRegex:bracketRegexp});if(!start||!end)return{start:cur,end:cur};start=start.pos;end=end.pos;if(start.line==end.line&&start.ch>end.ch||start.line>end.line){var tmp=start;start=end;end=tmp}inclusive?end.ch+=1:start.ch+=1;return{start:start,end:end}}function findBeginningAndEnd(cm,head,symb,inclusive){var start,end,i,len,cur=copyCursor(head),line=cm.getLine(cur.line),chars=line.split(""),firstIndex=chars.indexOf(symb);if(cur.ch<firstIndex)cur.ch=firstIndex;else if(firstIndex<cur.ch&&chars[cur.ch]==symb){end=cur.ch;--cur.ch}if(chars[cur.ch]!=symb||end)for(i=cur.ch;i>-1&&!start;i--)chars[i]==symb&&(start=i+1);else start=cur.ch+1;if(start&&!end)for(i=start,len=chars.length;len>i&&!end;i++)chars[i]==symb&&(end=i);if(!start||!end)return{start:cur,end:cur};if(inclusive){--start;++end}return{start:Pos(cur.line,start),end:Pos(cur.line,end)}}function SearchState(){}function getSearchState(cm){var vim=cm.state.vim;return vim.searchState_||(vim.searchState_=new SearchState)}function dialog(cm,template,shortText,onClose,options){cm.openDialog?cm.openDialog(template,onClose,{bottom:!0,value:options.value,onKeyDown:options.onKeyDown,onKeyUp:options.onKeyUp,selectValueOnOpen:!1}):onClose(prompt(shortText,""))}function splitBySlash(argString){var slashes=findUnescapedSlashes(argString)||[];if(!slashes.length)return[];var tokens=[];if(0===slashes[0]){for(var i=0;i<slashes.length;i++)"number"==typeof slashes[i]&&tokens.push(argString.substring(slashes[i]+1,slashes[i+1]));return tokens}}function findUnescapedSlashes(str){for(var escapeNextChar=!1,slashes=[],i=0;i<str.length;i++){var c=str.charAt(i);escapeNextChar||"/"!=c||slashes.push(i);escapeNextChar=!escapeNextChar&&"\\"==c}return slashes}function translateRegex(str){for(var specials="|(){",unescape="}",escapeNextChar=!1,out=[],i=-1;i<str.length;i++){var c=str.charAt(i)||"",n=str.charAt(i+1)||"",specialComesNext=n&&-1!=specials.indexOf(n);if(escapeNextChar){"\\"===c&&specialComesNext||out.push(c);escapeNextChar=!1}else if("\\"===c){escapeNextChar=!0;n&&-1!=unescape.indexOf(n)&&(specialComesNext=!0);specialComesNext&&"\\"!==n||out.push(c)}else{out.push(c);specialComesNext&&"\\"!==n&&out.push("\\")}}return out.join("")}function translateRegexReplace(str){for(var escapeNextChar=!1,out=[],i=-1;i<str.length;i++){var c=str.charAt(i)||"",n=str.charAt(i+1)||"";if(charUnescapes[c+n]){out.push(charUnescapes[c+n]);i++}else if(escapeNextChar){out.push(c);escapeNextChar=!1}else if("\\"===c){escapeNextChar=!0;isNumber(n)||"$"===n?out.push("$"):"/"!==n&&"\\"!==n&&out.push("\\")}else{"$"===c&&out.push("$");out.push(c);"/"===n&&out.push("\\")}}return out.join("")}function unescapeRegexReplace(str){for(var stream=new CodeMirror.StringStream(str),output=[];!stream.eol();){for(;stream.peek()&&"\\"!=stream.peek();)output.push(stream.next());var matched=!1;for(var matcher in unescapes)if(stream.match(matcher,!0)){matched=!0;output.push(unescapes[matcher]);break}matched||output.push(stream.next())}return output.join("")}function parseQuery(query,ignoreCase,smartCase){var lastSearchRegister=vimGlobalState.registerController.getRegister("/");lastSearchRegister.setText(query);if(query instanceof RegExp)return query;var regexPart,forceIgnoreCase,slashes=findUnescapedSlashes(query);if(slashes.length){regexPart=query.substring(0,slashes[0]);var flagsPart=query.substring(slashes[0]);forceIgnoreCase=-1!=flagsPart.indexOf("i")}else regexPart=query;if(!regexPart)return null;getOption("pcre")||(regexPart=translateRegex(regexPart));smartCase&&(ignoreCase=/^[^A-Z]*$/.test(regexPart));var regexp=new RegExp(regexPart,ignoreCase||forceIgnoreCase?"i":void 0);return regexp}function showConfirm(cm,text){cm.openNotification?cm.openNotification('<span style="color: red">'+text+"</span>",{bottom:!0,duration:5e3}):alert(text)}function makePrompt(prefix,desc){var raw="";prefix&&(raw+='<span style="font-family: monospace">'+prefix+"</span>");raw+='<input type="text"/> <span style="color: #888">';if(desc){raw+='<span style="color: #888">';raw+=desc;raw+="</span>"}return raw}function showPrompt(cm,options){var shortText=(options.prefix||"")+" "+(options.desc||""),prompt=makePrompt(options.prefix,options.desc);dialog(cm,prompt,shortText,options.onClose,options)}function regexEqual(r1,r2){if(r1 instanceof RegExp&&r2 instanceof RegExp){for(var props=["global","multiline","ignoreCase","source"],i=0;i<props.length;i++){var prop=props[i];if(r1[prop]!==r2[prop])return!1}return!0}return!1}function updateSearchQuery(cm,rawQuery,ignoreCase,smartCase){if(rawQuery){var state=getSearchState(cm),query=parseQuery(rawQuery,!!ignoreCase,!!smartCase);if(query){highlightSearchMatches(cm,query);if(regexEqual(query,state.getQuery()))return query;state.setQuery(query);return query}}}function searchOverlay(query){if("^"==query.source.charAt(0))var matchSol=!0;return{token:function(stream){if(!matchSol||stream.sol()){var match=stream.match(query,!1);if(match){if(0==match[0].length){stream.next();return"searching"}if(!stream.sol()){stream.backUp(1);if(!query.exec(stream.next()+match[0])){stream.next();return null}}stream.match(query);return"searching"}for(;!stream.eol();){stream.next();if(stream.match(query,!1))break}}else stream.skipToEnd()},query:query}}function highlightSearchMatches(cm,query){var searchState=getSearchState(cm),overlay=searchState.getOverlay();if(!overlay||query!=overlay.query){overlay&&cm.removeOverlay(overlay);overlay=searchOverlay(query);cm.addOverlay(overlay);if(cm.showMatchesOnScrollbar){searchState.getScrollbarAnnotate()&&searchState.getScrollbarAnnotate().clear();searchState.setScrollbarAnnotate(cm.showMatchesOnScrollbar(query))}searchState.setOverlay(overlay)}}function findNext(cm,prev,query,repeat){void 0===repeat&&(repeat=1);return cm.operation(function(){for(var pos=cm.getCursor(),cursor=cm.getSearchCursor(query,pos),i=0;repeat>i;i++){var found=cursor.find(prev);0==i&&found&&cursorEqual(cursor.from(),pos)&&(found=cursor.find(prev));if(!found){cursor=cm.getSearchCursor(query,prev?Pos(cm.lastLine()):Pos(cm.firstLine(),0));if(!cursor.find(prev))return}}return cursor.from()})}function clearSearchHighlight(cm){var state=getSearchState(cm);cm.removeOverlay(getSearchState(cm).getOverlay());state.setOverlay(null);if(state.getScrollbarAnnotate()){state.getScrollbarAnnotate().clear();state.setScrollbarAnnotate(null)}}function isInRange(pos,start,end){"number"!=typeof pos&&(pos=pos.line);return start instanceof Array?inArray(pos,start):end?pos>=start&&end>=pos:pos==start}function getUserVisibleLines(cm){var scrollInfo=cm.getScrollInfo(),occludeToleranceTop=6,occludeToleranceBottom=10,from=cm.coordsChar({left:0,top:occludeToleranceTop+scrollInfo.top},"local"),bottomY=scrollInfo.clientHeight-occludeToleranceBottom+scrollInfo.top,to=cm.coordsChar({left:0,top:bottomY},"local");return{top:from.line,bottom:to.line}}function doReplace(cm,confirm,global,lineStart,lineEnd,searchCursor,query,replaceWith,callback){function replaceAll(){cm.operation(function(){for(;!done;){replace();next()}stop()})}function replace(){var text=cm.getRange(searchCursor.from(),searchCursor.to()),newText=text.replace(query,replaceWith);searchCursor.replace(newText)}function next(){for(;searchCursor.findNext()&&isInRange(searchCursor.from(),lineStart,lineEnd);)if(global||!lastPos||searchCursor.from().line!=lastPos.line){cm.scrollIntoView(searchCursor.from(),30);cm.setSelection(searchCursor.from(),searchCursor.to());lastPos=searchCursor.from();done=!1;return}done=!0}function stop(close){close&&close();cm.focus();if(lastPos){cm.setCursor(lastPos);var vim=cm.state.vim;vim.exMode=!1;vim.lastHPos=vim.lastHSPos=lastPos.ch}callback&&callback()}function onPromptKeyDown(e,_value,close){CodeMirror.e_stop(e);var keyName=CodeMirror.keyName(e);switch(keyName){case"Y":replace();next();break;case"N":next();break;case"A":var savedCallback=callback;callback=void 0;cm.operation(replaceAll);callback=savedCallback;break;case"L":replace();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":stop(close)}done&&stop(close);return!0}cm.state.vim.exMode=!0;var done=!1,lastPos=searchCursor.from();next();if(done)showConfirm(cm,"No matches for "+query.source);else if(confirm)showPrompt(cm,{prefix:"replace with <strong>"+replaceWith+"</strong> (y/n/a/q/l)",onKeyDown:onPromptKeyDown});else{replaceAll();callback&&callback()}}function exitInsertMode(cm){var vim=cm.state.vim,macroModeState=vimGlobalState.macroModeState,insertModeChangeRegister=vimGlobalState.registerController.getRegister("."),isPlaying=macroModeState.isPlaying,lastChange=macroModeState.lastInsertModeChanges,text=[];if(!isPlaying){for(var selLength=lastChange.inVisualBlock?vim.lastSelection.visualBlock.height:1,changes=lastChange.changes,text=[],i=0;i<changes.length;){text.push(changes[i]);changes[i]instanceof InsertModeKey?i++:i+=selLength}lastChange.changes=text;cm.off("change",onChange);CodeMirror.off(cm.getInputField(),"keydown",onKeyEventTargetKeyDown)}if(!isPlaying&&vim.insertModeRepeat>1){repeatLastEdit(cm,vim,vim.insertModeRepeat-1,!0);vim.lastEditInputState.repeatOverride=vim.insertModeRepeat}delete vim.insertModeRepeat;vim.insertMode=!1;cm.setCursor(cm.getCursor().line,cm.getCursor().ch-1);cm.setOption("keyMap","vim");cm.setOption("disableInput",!0);cm.toggleOverwrite(!1);insertModeChangeRegister.setText(lastChange.changes.join(""));CodeMirror.signal(cm,"vim-mode-change",{mode:"normal"});macroModeState.isRecording&&logInsertModeChange(macroModeState)}function _mapCommand(command){defaultKeymap.unshift(command)}function mapCommand(keys,type,name,args,extra){var command={keys:keys,type:type};command[type]=name;command[type+"Args"]=args;for(var key in extra)command[key]=extra[key];_mapCommand(command)}function executeMacroRegister(cm,vim,macroModeState,registerName){var register=vimGlobalState.registerController.getRegister(registerName);if(":"!=registerName){var keyBuffer=register.keyBuffer,imc=0;macroModeState.isPlaying=!0;macroModeState.replaySearchQueries=register.searchQueries.slice(0);for(var i=0;i<keyBuffer.length;i++)for(var match,key,text=keyBuffer[i];text;){match=/<\w+-.+?>|<\w+>|./.exec(text);key=match[0];text=text.substring(match.index+key.length);CodeMirror.Vim.handleKey(cm,key,"macro");if(vim.insertMode){var changes=register.insertModeChanges[imc++].changes;vimGlobalState.macroModeState.lastInsertModeChanges.changes=changes;repeatInsertModeChanges(cm,changes,1);exitInsertMode(cm)}}macroModeState.isPlaying=!1}else{register.keyBuffer[0]&&exCommandDispatcher.processCommand(cm,register.keyBuffer[0]);macroModeState.isPlaying=!1}}function logKey(macroModeState,key){if(!macroModeState.isPlaying){var registerName=macroModeState.latestRegister,register=vimGlobalState.registerController.getRegister(registerName);register&&register.pushText(key)}}function logInsertModeChange(macroModeState){if(!macroModeState.isPlaying){var registerName=macroModeState.latestRegister,register=vimGlobalState.registerController.getRegister(registerName);register&&register.pushInsertModeChanges&&register.pushInsertModeChanges(macroModeState.lastInsertModeChanges)}}function logSearchQuery(macroModeState,query){if(!macroModeState.isPlaying){var registerName=macroModeState.latestRegister,register=vimGlobalState.registerController.getRegister(registerName);register&&register.pushSearchQuery&&register.pushSearchQuery(query)}}function onChange(_cm,changeObj){var macroModeState=vimGlobalState.macroModeState,lastChange=macroModeState.lastInsertModeChanges;if(!macroModeState.isPlaying)for(;changeObj;){lastChange.expectCursorActivityForChange=!0;if("+input"==changeObj.origin||"paste"==changeObj.origin||void 0===changeObj.origin){var text=changeObj.text.join("\n");lastChange.changes.push(text)}changeObj=changeObj.next}}function onCursorActivity(cm){var vim=cm.state.vim;if(vim.insertMode){var macroModeState=vimGlobalState.macroModeState;if(macroModeState.isPlaying)return;var lastChange=macroModeState.lastInsertModeChanges;lastChange.expectCursorActivityForChange?lastChange.expectCursorActivityForChange=!1:lastChange.changes=[]}else cm.curOp.isVimOp||handleExternalSelection(cm,vim);vim.visualMode&&updateFakeCursor(cm)}function updateFakeCursor(cm){var vim=cm.state.vim,from=clipCursorToContent(cm,copyCursor(vim.sel.head)),to=offsetCursor(from,0,1);vim.fakeCursor&&vim.fakeCursor.clear();vim.fakeCursor=cm.markText(from,to,{className:"cm-animate-fat-cursor"})}function handleExternalSelection(cm,vim){var anchor=cm.getCursor("anchor"),head=cm.getCursor("head");if(vim.visualMode&&!cm.somethingSelected())exitVisualMode(cm,!1);else if(!vim.visualMode&&!vim.insertMode&&cm.somethingSelected()){vim.visualMode=!0;vim.visualLine=!1;CodeMirror.signal(cm,"vim-mode-change",{mode:"visual"})}if(vim.visualMode){var headOffset=cursorIsBefore(head,anchor)?0:-1,anchorOffset=cursorIsBefore(head,anchor)?-1:0;head=offsetCursor(head,0,headOffset);anchor=offsetCursor(anchor,0,anchorOffset);vim.sel={anchor:anchor,head:head};updateMark(cm,vim,"<",cursorMin(head,anchor));updateMark(cm,vim,">",cursorMax(head,anchor))}else vim.insertMode||(vim.lastHPos=cm.getCursor().ch)}function InsertModeKey(keyName){this.keyName=keyName}function onKeyEventTargetKeyDown(e){function onKeyFound(){lastChange.changes.push(new InsertModeKey(keyName));return!0}var macroModeState=vimGlobalState.macroModeState,lastChange=macroModeState.lastInsertModeChanges,keyName=CodeMirror.keyName(e);keyName&&(-1!=keyName.indexOf("Delete")||-1!=keyName.indexOf("Backspace"))&&CodeMirror.lookupKey(keyName,"vim-insert",onKeyFound)}function repeatLastEdit(cm,vim,repeat,repeatForInsert){function repeatCommand(){isAction?commandDispatcher.processAction(cm,vim,vim.lastEditActionCommand):commandDispatcher.evalInput(cm,vim)}function repeatInsert(repeat){if(macroModeState.lastInsertModeChanges.changes.length>0){repeat=vim.lastEditActionCommand?repeat:1;var changeObject=macroModeState.lastInsertModeChanges;repeatInsertModeChanges(cm,changeObject.changes,repeat)}}var macroModeState=vimGlobalState.macroModeState;macroModeState.isPlaying=!0;var isAction=!!vim.lastEditActionCommand,cachedInputState=vim.inputState;vim.inputState=vim.lastEditInputState;if(isAction&&vim.lastEditActionCommand.interlaceInsertRepeat)for(var i=0;repeat>i;i++){repeatCommand();repeatInsert(1)}else{repeatForInsert||repeatCommand();repeatInsert(repeat)}vim.inputState=cachedInputState;vim.insertMode&&!repeatForInsert&&exitInsertMode(cm);macroModeState.isPlaying=!1}function repeatInsertModeChanges(cm,changes,repeat){function keyHandler(binding){"string"==typeof binding?CodeMirror.commands[binding](cm):binding(cm);return!0}var head=cm.getCursor("head"),inVisualBlock=vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock;if(inVisualBlock){var vim=cm.state.vim,lastSel=vim.lastSelection,offset=getOffset(lastSel.anchor,lastSel.head);selectForInsert(cm,head,offset.line+1);repeat=cm.listSelections().length;cm.setCursor(head)}for(var i=0;repeat>i;i++){inVisualBlock&&cm.setCursor(offsetCursor(head,i,0));for(var j=0;j<changes.length;j++){var change=changes[j];if(change instanceof InsertModeKey)CodeMirror.lookupKey(change.keyName,"vim-insert",keyHandler);else{var cur=cm.getCursor();cm.replaceRange(change,cur,cur)}}}inVisualBlock&&cm.setCursor(offsetCursor(head,0,1))}CodeMirror.defineOption("vimMode",!1,function(cm,val,prev){val&&"vim"!=cm.getOption("keyMap")?cm.setOption("keyMap","vim"):!val&&prev!=CodeMirror.Init&&/^vim/.test(cm.getOption("keyMap"))&&cm.setOption("keyMap","default")});var modifiers={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},specialKeys={Enter:"CR",Backspace:"BS",Delete:"Del"},numberRegex=/[\d]/,wordCharTest=[CodeMirror.isWordChar,function(ch){return ch&&!CodeMirror.isWordChar(ch)&&!/\s/.test(ch)}],bigWordCharTest=[function(ch){return/\S/.test(ch)}],upperCaseAlphabet=makeKeyRange(65,26),lowerCaseAlphabet=makeKeyRange(97,26),numbers=makeKeyRange(48,10),validMarks=[].concat(upperCaseAlphabet,lowerCaseAlphabet,numbers,["<",">"]),validRegisters=[].concat(upperCaseAlphabet,lowerCaseAlphabet,numbers,["-",'"',".",":","/"]),options={};defineOption("filetype",void 0,"string",["ft"],function(name,cm){if(void 0!==cm){if(void 0===name){var mode=cm.getOption("mode");return"null"==mode?"":mode}var mode=""==name?"null":name;cm.setOption("mode",mode)}});var createCircularJumpList=function(){function add(cm,oldCur,newCur){function useNextSlot(cursor){var next=++pointer%size,trashMark=buffer[next];trashMark&&trashMark.clear();buffer[next]=cm.setBookmark(cursor)}var current=pointer%size,curMark=buffer[current];if(curMark){var markPos=curMark.find();markPos&&!cursorEqual(markPos,oldCur)&&useNextSlot(oldCur)}else useNextSlot(oldCur);useNextSlot(newCur);head=pointer;tail=pointer-size+1;0>tail&&(tail=0)}function move(cm,offset){pointer+=offset;pointer>head?pointer=head:tail>pointer&&(pointer=tail);var mark=buffer[(size+pointer)%size];if(mark&&!mark.find()){var newCur,inc=offset>0?1:-1,oldCur=cm.getCursor();do{pointer+=inc;mark=buffer[(size+pointer)%size];if(mark&&(newCur=mark.find())&&!cursorEqual(oldCur,newCur))break}while(head>pointer&&pointer>tail)}return mark}var size=100,pointer=-1,head=0,tail=0,buffer=new Array(size);return{cachedCursor:void 0,add:add,move:move}},createInsertModeChanges=function(c){return c?{changes:c.changes,expectCursorActivityForChange:c.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};MacroModeState.prototype={exitMacroRecordMode:function(){var macroModeState=vimGlobalState.macroModeState;macroModeState.onRecordingDone&&macroModeState.onRecordingDone();macroModeState.onRecordingDone=void 0;macroModeState.isRecording=!1},enterMacroRecordMode:function(cm,registerName){var register=vimGlobalState.registerController.getRegister(registerName);if(register){register.clear();this.latestRegister=registerName;cm.openDialog&&(this.onRecordingDone=cm.openDialog("(recording)["+registerName+"]",null,{bottom:!0}));this.isRecording=!0}}};var vimGlobalState,lastInsertModeKeyTimer,vimApi={buildKeyMap:function(){},getRegisterController:function(){return vimGlobalState.registerController},resetVimGlobalState_:resetVimGlobalState,getVimGlobalState_:function(){return vimGlobalState},maybeInitVimState_:maybeInitVimState,suppressErrorLogging:!1,InsertModeKey:InsertModeKey,map:function(lhs,rhs,ctx){exCommandDispatcher.map(lhs,rhs,ctx)},setOption:setOption,getOption:getOption,defineOption:defineOption,defineEx:function(name,prefix,func){if(prefix){if(0!==name.indexOf(prefix))throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered')}else prefix=name;exCommands[name]=func;exCommandDispatcher.commandMap_[prefix]={name:name,shortName:prefix,type:"api"}},handleKey:function(cm,key,origin){var command=this.findKey(cm,key,origin);return"function"==typeof command?command():void 0},findKey:function(cm,key,origin){function handleMacroRecording(){var macroModeState=vimGlobalState.macroModeState;if(macroModeState.isRecording){if("q"==key){macroModeState.exitMacroRecordMode();clearInputState(cm);return!0}"mapping"!=origin&&logKey(macroModeState,key)}}function handleEsc(){if("<Esc>"==key){clearInputState(cm);vim.visualMode?exitVisualMode(cm):vim.insertMode&&exitInsertMode(cm);return!0}}function doKeyToKey(keys){for(var match;keys;){match=/<\w+-.+?>|<\w+>|./.exec(keys);key=match[0];keys=keys.substring(match.index+key.length);CodeMirror.Vim.handleKey(cm,key,"mapping")}}function handleKeyInsertMode(){if(handleEsc())return!0;for(var keys=vim.inputState.keyBuffer=vim.inputState.keyBuffer+key,keysAreChars=1==key.length,match=commandDispatcher.matchCommand(keys,defaultKeymap,vim.inputState,"insert");keys.length>1&&"full"!=match.type;){var keys=vim.inputState.keyBuffer=keys.slice(1),thisMatch=commandDispatcher.matchCommand(keys,defaultKeymap,vim.inputState,"insert");"none"!=thisMatch.type&&(match=thisMatch)}if("none"==match.type){clearInputState(cm);return!1}if("partial"==match.type){lastInsertModeKeyTimer&&window.clearTimeout(lastInsertModeKeyTimer);lastInsertModeKeyTimer=window.setTimeout(function(){vim.insertMode&&vim.inputState.keyBuffer&&clearInputState(cm)},getOption("insertModeEscKeysTimeout"));return!keysAreChars}lastInsertModeKeyTimer&&window.clearTimeout(lastInsertModeKeyTimer);if(keysAreChars){var here=cm.getCursor();cm.replaceRange("",offsetCursor(here,0,-(keys.length-1)),here,"+input")}clearInputState(cm);return match.command}function handleKeyNonInsertMode(){if(handleMacroRecording()||handleEsc())return!0;var keys=vim.inputState.keyBuffer=vim.inputState.keyBuffer+key;if(/^[1-9]\d*$/.test(keys))return!0;var keysMatcher=/^(\d*)(.*)$/.exec(keys);if(!keysMatcher){clearInputState(cm);return!1}var context=vim.visualMode?"visual":"normal",match=commandDispatcher.matchCommand(keysMatcher[2]||keysMatcher[1],defaultKeymap,vim.inputState,context);if("none"==match.type){clearInputState(cm);return!1}if("partial"==match.type)return!0;vim.inputState.keyBuffer="";var keysMatcher=/^(\d*)(.*)$/.exec(keys);keysMatcher[1]&&"0"!=keysMatcher[1]&&vim.inputState.pushRepeatDigit(keysMatcher[1]);return match.command}var command,vim=maybeInitVimState(cm);command=vim.insertMode?handleKeyInsertMode():handleKeyNonInsertMode();return command===!1?void 0:command===!0?function(){}:function(){return cm.operation(function(){cm.curOp.isVimOp=!0;try{"keyToKey"==command.type?doKeyToKey(command.toKeys):commandDispatcher.processCommand(cm,vim,command)}catch(e){cm.state.vim=void 0;maybeInitVimState(cm);CodeMirror.Vim.suppressErrorLogging||console.log(e);throw e}return!0})}},handleEx:function(cm,input){exCommandDispatcher.processCommand(cm,input)},defineMotion:defineMotion,defineAction:defineAction,defineOperator:defineOperator,mapCommand:mapCommand,_mapCommand:_mapCommand,defineRegister:defineRegister,exitVisualMode:exitVisualMode,exitInsertMode:exitInsertMode};InputState.prototype.pushRepeatDigit=function(n){this.operator?this.motionRepeat=this.motionRepeat.concat(n):this.prefixRepeat=this.prefixRepeat.concat(n)};InputState.prototype.getRepeat=function(){var repeat=0;if(this.prefixRepeat.length>0||this.motionRepeat.length>0){repeat=1;this.prefixRepeat.length>0&&(repeat*=parseInt(this.prefixRepeat.join(""),10));this.motionRepeat.length>0&&(repeat*=parseInt(this.motionRepeat.join(""),10))}return repeat};Register.prototype={setText:function(text,linewise,blockwise){this.keyBuffer=[text||""];this.linewise=!!linewise;this.blockwise=!!blockwise},pushText:function(text,linewise){if(linewise){this.linewise||this.keyBuffer.push("\n");this.linewise=!0}this.keyBuffer.push(text)},pushInsertModeChanges:function(changes){this.insertModeChanges.push(createInsertModeChanges(changes))},pushSearchQuery:function(query){this.searchQueries.push(query)},clear:function(){this.keyBuffer=[];this.insertModeChanges=[];this.searchQueries=[];this.linewise=!1},toString:function(){return this.keyBuffer.join("")}};RegisterController.prototype={pushText:function(registerName,operator,text,linewise,blockwise){linewise&&"\n"==text.charAt(0)&&(text=text.slice(1)+"\n");linewise&&"\n"!==text.charAt(text.length-1)&&(text+="\n");var register=this.isValidRegister(registerName)?this.getRegister(registerName):null;if(register){var append=isUpperCase(registerName);append?register.pushText(text,linewise):register.setText(text,linewise,blockwise);this.unnamedRegister.setText(register.toString(),linewise)}else{switch(operator){case"yank":this.registers[0]=new Register(text,linewise,blockwise);break;case"delete":case"change":if(-1==text.indexOf("\n"))this.registers["-"]=new Register(text,linewise);else{this.shiftNumericRegisters_();this.registers[1]=new Register(text,linewise)}}this.unnamedRegister.setText(text,linewise,blockwise)}},getRegister:function(name){if(!this.isValidRegister(name))return this.unnamedRegister;name=name.toLowerCase();this.registers[name]||(this.registers[name]=new Register);return this.registers[name]},isValidRegister:function(name){return name&&inArray(name,validRegisters)},shiftNumericRegisters_:function(){for(var i=9;i>=2;i--)this.registers[i]=this.getRegister(""+(i-1))}};HistoryController.prototype={nextMatch:function(input,up){var historyBuffer=this.historyBuffer,dir=up?-1:1;null===this.initialPrefix&&(this.initialPrefix=input);for(var i=this.iterator+dir;up?i>=0:i<historyBuffer.length;i+=dir)for(var element=historyBuffer[i],j=0;j<=element.length;j++)if(this.initialPrefix==element.substring(0,j)){this.iterator=i;return element}if(i>=historyBuffer.length){this.iterator=historyBuffer.length;return this.initialPrefix}return 0>i?input:void 0},pushInput:function(input){var index=this.historyBuffer.indexOf(input);index>-1&&this.historyBuffer.splice(index,1);input.length&&this.historyBuffer.push(input)},reset:function(){this.initialPrefix=null;this.iterator=this.historyBuffer.length}};var commandDispatcher={matchCommand:function(keys,keyMap,inputState,context){var matches=commandMatches(keys,keyMap,context,inputState);if(!matches.full&&!matches.partial)return{type:"none"};if(!matches.full&&matches.partial)return{type:"partial"};for(var bestMatch,i=0;i<matches.full.length;i++){var match=matches.full[i];bestMatch||(bestMatch=match)}"<character>"==bestMatch.keys.slice(-11)&&(inputState.selectedCharacter=lastChar(keys));return{type:"full",command:bestMatch}},processCommand:function(cm,vim,command){vim.inputState.repeatOverride=command.repeatOverride;switch(command.type){case"motion":this.processMotion(cm,vim,command);break;case"operator":this.processOperator(cm,vim,command);break;case"operatorMotion":this.processOperatorMotion(cm,vim,command);break;case"action":this.processAction(cm,vim,command);break;case"search":this.processSearch(cm,vim,command);break;case"ex":case"keyToEx":this.processEx(cm,vim,command)}},processMotion:function(cm,vim,command){vim.inputState.motion=command.motion;vim.inputState.motionArgs=copyArgs(command.motionArgs);this.evalInput(cm,vim)},processOperator:function(cm,vim,command){var inputState=vim.inputState;if(inputState.operator){if(inputState.operator==command.operator){inputState.motion="expandToLine";inputState.motionArgs={linewise:!0};this.evalInput(cm,vim);return}clearInputState(cm)}inputState.operator=command.operator;inputState.operatorArgs=copyArgs(command.operatorArgs);vim.visualMode&&this.evalInput(cm,vim)},processOperatorMotion:function(cm,vim,command){var visualMode=vim.visualMode,operatorMotionArgs=copyArgs(command.operatorMotionArgs);operatorMotionArgs&&visualMode&&operatorMotionArgs.visualLine&&(vim.visualLine=!0);this.processOperator(cm,vim,command);visualMode||this.processMotion(cm,vim,command)},processAction:function(cm,vim,command){var inputState=vim.inputState,repeat=inputState.getRepeat(),repeatIsExplicit=!!repeat,actionArgs=copyArgs(command.actionArgs)||{};inputState.selectedCharacter&&(actionArgs.selectedCharacter=inputState.selectedCharacter);command.operator&&this.processOperator(cm,vim,command);command.motion&&this.processMotion(cm,vim,command);(command.motion||command.operator)&&this.evalInput(cm,vim);actionArgs.repeat=repeat||1;actionArgs.repeatIsExplicit=repeatIsExplicit;actionArgs.registerName=inputState.registerName;clearInputState(cm);vim.lastMotion=null;command.isEdit&&this.recordLastEdit(vim,inputState,command);actions[command.action](cm,actionArgs,vim)},processSearch:function(cm,vim,command){function handleQuery(query,ignoreCase,smartCase){vimGlobalState.searchHistoryController.pushInput(query);vimGlobalState.searchHistoryController.reset();try{updateSearchQuery(cm,query,ignoreCase,smartCase)}catch(e){showConfirm(cm,"Invalid regex: "+query);clearInputState(cm);return}commandDispatcher.processMotion(cm,vim,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:command.searchArgs.toJumplist}})}function onPromptClose(query){cm.scrollTo(originalScrollPos.left,originalScrollPos.top);handleQuery(query,!0,!0);var macroModeState=vimGlobalState.macroModeState;macroModeState.isRecording&&logSearchQuery(macroModeState,query)}function onPromptKeyUp(e,query,close){var up,keyName=CodeMirror.keyName(e);if("Up"==keyName||"Down"==keyName){up="Up"==keyName?!0:!1;query=vimGlobalState.searchHistoryController.nextMatch(query,up)||"";close(query)}else"Left"!=keyName&&"Right"!=keyName&&"Ctrl"!=keyName&&"Alt"!=keyName&&"Shift"!=keyName&&vimGlobalState.searchHistoryController.reset();var parsedQuery;try{parsedQuery=updateSearchQuery(cm,query,!0,!0)}catch(e){}if(parsedQuery)cm.scrollIntoView(findNext(cm,!forward,parsedQuery),30);else{clearSearchHighlight(cm);cm.scrollTo(originalScrollPos.left,originalScrollPos.top)}}function onPromptKeyDown(e,query,close){var keyName=CodeMirror.keyName(e);if("Esc"==keyName||"Ctrl-C"==keyName||"Ctrl-["==keyName||"Backspace"==keyName&&""==query){vimGlobalState.searchHistoryController.pushInput(query);vimGlobalState.searchHistoryController.reset();updateSearchQuery(cm,originalQuery);clearSearchHighlight(cm);cm.scrollTo(originalScrollPos.left,originalScrollPos.top);CodeMirror.e_stop(e);clearInputState(cm);close();cm.focus()}else if("Ctrl-U"==keyName){CodeMirror.e_stop(e);close("")}}if(cm.getSearchCursor){var forward=command.searchArgs.forward,wholeWordOnly=command.searchArgs.wholeWordOnly;getSearchState(cm).setReversed(!forward);var promptPrefix=forward?"/":"?",originalQuery=getSearchState(cm).getQuery(),originalScrollPos=cm.getScrollInfo();switch(command.searchArgs.querySrc){case"prompt":var macroModeState=vimGlobalState.macroModeState;if(macroModeState.isPlaying){var query=macroModeState.replaySearchQueries.shift();handleQuery(query,!0,!1)}else showPrompt(cm,{onClose:onPromptClose,prefix:promptPrefix,desc:searchPromptDesc,onKeyUp:onPromptKeyUp,onKeyDown:onPromptKeyDown});break;case"wordUnderCursor":var word=expandWordUnderCursor(cm,!1,!0,!1,!0),isKeyword=!0;if(!word){word=expandWordUnderCursor(cm,!1,!0,!1,!1);isKeyword=!1}if(!word)return;var query=cm.getLine(word.start.line).substring(word.start.ch,word.end.ch);query=isKeyword&&wholeWordOnly?"\\b"+query+"\\b":escapeRegex(query);vimGlobalState.jumpList.cachedCursor=cm.getCursor();cm.setCursor(word.start);handleQuery(query,!0,!1)}}},processEx:function(cm,vim,command){function onPromptClose(input){vimGlobalState.exCommandHistoryController.pushInput(input);vimGlobalState.exCommandHistoryController.reset();exCommandDispatcher.processCommand(cm,input)}function onPromptKeyDown(e,input,close){var up,keyName=CodeMirror.keyName(e);if("Esc"==keyName||"Ctrl-C"==keyName||"Ctrl-["==keyName||"Backspace"==keyName&&""==input){
3
+ vimGlobalState.exCommandHistoryController.pushInput(input);vimGlobalState.exCommandHistoryController.reset();CodeMirror.e_stop(e);clearInputState(cm);close();cm.focus()}if("Up"==keyName||"Down"==keyName){up="Up"==keyName?!0:!1;input=vimGlobalState.exCommandHistoryController.nextMatch(input,up)||"";close(input)}else if("Ctrl-U"==keyName){CodeMirror.e_stop(e);close("")}else"Left"!=keyName&&"Right"!=keyName&&"Ctrl"!=keyName&&"Alt"!=keyName&&"Shift"!=keyName&&vimGlobalState.exCommandHistoryController.reset()}"keyToEx"==command.type?exCommandDispatcher.processCommand(cm,command.exArgs.input):vim.visualMode?showPrompt(cm,{onClose:onPromptClose,prefix:":",value:"'<,'>",onKeyDown:onPromptKeyDown}):showPrompt(cm,{onClose:onPromptClose,prefix:":",onKeyDown:onPromptKeyDown})},evalInput:function(cm,vim){var newHead,newAnchor,repeat,inputState=vim.inputState,motion=inputState.motion,motionArgs=inputState.motionArgs||{},operator=inputState.operator,operatorArgs=inputState.operatorArgs||{},registerName=inputState.registerName,sel=vim.sel,origHead=copyCursor(vim.visualMode?clipCursorToContent(cm,sel.head):cm.getCursor("head")),origAnchor=copyCursor(vim.visualMode?clipCursorToContent(cm,sel.anchor):cm.getCursor("anchor")),oldHead=copyCursor(origHead),oldAnchor=copyCursor(origAnchor);operator&&this.recordLastEdit(vim,inputState);repeat=void 0!==inputState.repeatOverride?inputState.repeatOverride:inputState.getRepeat();if(repeat>0&&motionArgs.explicitRepeat)motionArgs.repeatIsExplicit=!0;else if(motionArgs.noRepeat||!motionArgs.explicitRepeat&&0===repeat){repeat=1;motionArgs.repeatIsExplicit=!1}inputState.selectedCharacter&&(motionArgs.selectedCharacter=operatorArgs.selectedCharacter=inputState.selectedCharacter);motionArgs.repeat=repeat;clearInputState(cm);if(motion){var motionResult=motions[motion](cm,origHead,motionArgs,vim);vim.lastMotion=motions[motion];if(!motionResult)return;if(motionArgs.toJumplist){var jumpList=vimGlobalState.jumpList,cachedCursor=jumpList.cachedCursor;if(cachedCursor){recordJumpPosition(cm,cachedCursor,motionResult);delete jumpList.cachedCursor}else recordJumpPosition(cm,origHead,motionResult)}if(motionResult instanceof Array){newAnchor=motionResult[0];newHead=motionResult[1]}else newHead=motionResult;newHead||(newHead=copyCursor(origHead));if(vim.visualMode){vim.visualBlock&&newHead.ch===1/0||(newHead=clipCursorToContent(cm,newHead,vim.visualBlock));newAnchor&&(newAnchor=clipCursorToContent(cm,newAnchor,!0));newAnchor=newAnchor||oldAnchor;sel.anchor=newAnchor;sel.head=newHead;updateCmSelection(cm);updateMark(cm,vim,"<",cursorIsBefore(newAnchor,newHead)?newAnchor:newHead);updateMark(cm,vim,">",cursorIsBefore(newAnchor,newHead)?newHead:newAnchor)}else if(!operator){newHead=clipCursorToContent(cm,newHead);cm.setCursor(newHead.line,newHead.ch)}}if(operator){if(operatorArgs.lastSel){newAnchor=oldAnchor;var lastSel=operatorArgs.lastSel,lineOffset=Math.abs(lastSel.head.line-lastSel.anchor.line),chOffset=Math.abs(lastSel.head.ch-lastSel.anchor.ch);newHead=lastSel.visualLine?Pos(oldAnchor.line+lineOffset,oldAnchor.ch):lastSel.visualBlock?Pos(oldAnchor.line+lineOffset,oldAnchor.ch+chOffset):lastSel.head.line==lastSel.anchor.line?Pos(oldAnchor.line,oldAnchor.ch+chOffset):Pos(oldAnchor.line+lineOffset,oldAnchor.ch);vim.visualMode=!0;vim.visualLine=lastSel.visualLine;vim.visualBlock=lastSel.visualBlock;sel=vim.sel={anchor:newAnchor,head:newHead};updateCmSelection(cm)}else vim.visualMode&&(operatorArgs.lastSel={anchor:copyCursor(sel.anchor),head:copyCursor(sel.head),visualBlock:vim.visualBlock,visualLine:vim.visualLine});var curStart,curEnd,linewise,mode,cmSel;if(vim.visualMode){curStart=cursorMin(sel.head,sel.anchor);curEnd=cursorMax(sel.head,sel.anchor);linewise=vim.visualLine||operatorArgs.linewise;mode=vim.visualBlock?"block":linewise?"line":"char";cmSel=makeCmSelection(cm,{anchor:curStart,head:curEnd},mode);if(linewise){var ranges=cmSel.ranges;if("block"==mode)for(var i=0;i<ranges.length;i++)ranges[i].head.ch=lineLength(cm,ranges[i].head.line);else"line"==mode&&(ranges[0].head=Pos(ranges[0].head.line+1,0))}}else{curStart=copyCursor(newAnchor||oldAnchor);curEnd=copyCursor(newHead||oldHead);if(cursorIsBefore(curEnd,curStart)){var tmp=curStart;curStart=curEnd;curEnd=tmp}linewise=motionArgs.linewise||operatorArgs.linewise;linewise?expandSelectionToLine(cm,curStart,curEnd):motionArgs.forward&&clipToLine(cm,curStart,curEnd);mode="char";var exclusive=!motionArgs.inclusive||linewise;cmSel=makeCmSelection(cm,{anchor:curStart,head:curEnd},mode,exclusive)}cm.setSelections(cmSel.ranges,cmSel.primary);vim.lastMotion=null;operatorArgs.repeat=repeat;operatorArgs.registerName=registerName;operatorArgs.linewise=linewise;var operatorMoveTo=operators[operator](cm,operatorArgs,cmSel.ranges,oldAnchor,newHead);vim.visualMode&&exitVisualMode(cm,null!=operatorMoveTo);operatorMoveTo&&cm.setCursor(operatorMoveTo)}},recordLastEdit:function(vim,inputState,actionCommand){var macroModeState=vimGlobalState.macroModeState;if(!macroModeState.isPlaying){vim.lastEditInputState=inputState;vim.lastEditActionCommand=actionCommand;macroModeState.lastInsertModeChanges.changes=[];macroModeState.lastInsertModeChanges.expectCursorActivityForChange=!1}}},motions={moveToTopLine:function(cm,_head,motionArgs){var line=getUserVisibleLines(cm).top+motionArgs.repeat-1;return Pos(line,findFirstNonWhiteSpaceCharacter(cm.getLine(line)))},moveToMiddleLine:function(cm){var range=getUserVisibleLines(cm),line=Math.floor(.5*(range.top+range.bottom));return Pos(line,findFirstNonWhiteSpaceCharacter(cm.getLine(line)))},moveToBottomLine:function(cm,_head,motionArgs){var line=getUserVisibleLines(cm).bottom-motionArgs.repeat+1;return Pos(line,findFirstNonWhiteSpaceCharacter(cm.getLine(line)))},expandToLine:function(_cm,head,motionArgs){var cur=head;return Pos(cur.line+motionArgs.repeat-1,1/0)},findNext:function(cm,_head,motionArgs){var state=getSearchState(cm),query=state.getQuery();if(query){var prev=!motionArgs.forward;prev=state.isReversed()?!prev:prev;highlightSearchMatches(cm,query);return findNext(cm,prev,query,motionArgs.repeat)}},goToMark:function(cm,_head,motionArgs,vim){var mark=vim.marks[motionArgs.selectedCharacter];if(mark){var pos=mark.find();return motionArgs.linewise?{line:pos.line,ch:findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line))}:pos}return null},moveToOtherHighlightedEnd:function(cm,_head,motionArgs,vim){if(vim.visualBlock&&motionArgs.sameLine){var sel=vim.sel;return[clipCursorToContent(cm,Pos(sel.anchor.line,sel.head.ch)),clipCursorToContent(cm,Pos(sel.head.line,sel.anchor.ch))]}return[vim.sel.head,vim.sel.anchor]},jumpToMark:function(cm,head,motionArgs,vim){for(var best=head,i=0;i<motionArgs.repeat;i++){var cursor=best;for(var key in vim.marks)if(isLowerCase(key)){var mark=vim.marks[key].find(),isWrongDirection=motionArgs.forward?cursorIsBefore(mark,cursor):cursorIsBefore(cursor,mark);if(!(isWrongDirection||motionArgs.linewise&&mark.line==cursor.line)){var equal=cursorEqual(cursor,best),between=motionArgs.forward?cursorIsBetween(cursor,mark,best):cursorIsBetween(best,mark,cursor);(equal||between)&&(best=mark)}}}motionArgs.linewise&&(best=Pos(best.line,findFirstNonWhiteSpaceCharacter(cm.getLine(best.line))));return best},moveByCharacters:function(_cm,head,motionArgs){var cur=head,repeat=motionArgs.repeat,ch=motionArgs.forward?cur.ch+repeat:cur.ch-repeat;return Pos(cur.line,ch)},moveByLines:function(cm,head,motionArgs,vim){var cur=head,endCh=cur.ch;switch(vim.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:endCh=vim.lastHPos;break;default:vim.lastHPos=endCh}var repeat=motionArgs.repeat+(motionArgs.repeatOffset||0),line=motionArgs.forward?cur.line+repeat:cur.line-repeat,first=cm.firstLine(),last=cm.lastLine();if(!(first>line&&cur.line==first||line>last&&cur.line==last)){if(motionArgs.toFirstChar){endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line));vim.lastHPos=endCh}vim.lastHSPos=cm.charCoords(Pos(line,endCh),"div").left;return Pos(line,endCh)}},moveByDisplayLines:function(cm,head,motionArgs,vim){var cur=head;switch(vim.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:vim.lastHSPos=cm.charCoords(cur,"div").left}var repeat=motionArgs.repeat,res=cm.findPosV(cur,motionArgs.forward?repeat:-repeat,"line",vim.lastHSPos);if(res.hitSide)if(motionArgs.forward)var lastCharCoords=cm.charCoords(res,"div"),goalCoords={top:lastCharCoords.top+8,left:vim.lastHSPos},res=cm.coordsChar(goalCoords,"div");else{var resCoords=cm.charCoords(Pos(cm.firstLine(),0),"div");resCoords.left=vim.lastHSPos;res=cm.coordsChar(resCoords,"div")}vim.lastHPos=res.ch;return res},moveByPage:function(cm,head,motionArgs){var curStart=head,repeat=motionArgs.repeat;return cm.findPosV(curStart,motionArgs.forward?repeat:-repeat,"page")},moveByParagraph:function(cm,head,motionArgs){var dir=motionArgs.forward?1:-1;return findParagraph(cm,head,motionArgs.repeat,dir)},moveByScroll:function(cm,head,motionArgs,vim){var scrollbox=cm.getScrollInfo(),curEnd=null,repeat=motionArgs.repeat;repeat||(repeat=scrollbox.clientHeight/(2*cm.defaultTextHeight()));var orig=cm.charCoords(head,"local");motionArgs.repeat=repeat;var curEnd=motions.moveByDisplayLines(cm,head,motionArgs,vim);if(!curEnd)return null;var dest=cm.charCoords(curEnd,"local");cm.scrollTo(null,scrollbox.top+dest.top-orig.top);return curEnd},moveByWords:function(cm,head,motionArgs){return moveToWord(cm,head,motionArgs.repeat,!!motionArgs.forward,!!motionArgs.wordEnd,!!motionArgs.bigWord)},moveTillCharacter:function(cm,_head,motionArgs){var repeat=motionArgs.repeat,curEnd=moveToCharacter(cm,repeat,motionArgs.forward,motionArgs.selectedCharacter),increment=motionArgs.forward?-1:1;recordLastCharacterSearch(increment,motionArgs);if(!curEnd)return null;curEnd.ch+=increment;return curEnd},moveToCharacter:function(cm,head,motionArgs){var repeat=motionArgs.repeat;recordLastCharacterSearch(0,motionArgs);return moveToCharacter(cm,repeat,motionArgs.forward,motionArgs.selectedCharacter)||head},moveToSymbol:function(cm,head,motionArgs){var repeat=motionArgs.repeat;return findSymbol(cm,repeat,motionArgs.forward,motionArgs.selectedCharacter)||head},moveToColumn:function(cm,head,motionArgs,vim){var repeat=motionArgs.repeat;vim.lastHPos=repeat-1;vim.lastHSPos=cm.charCoords(head,"div").left;return moveToColumn(cm,repeat)},moveToEol:function(cm,head,motionArgs,vim){var cur=head;vim.lastHPos=1/0;var retval=Pos(cur.line+motionArgs.repeat-1,1/0),end=cm.clipPos(retval);end.ch--;vim.lastHSPos=cm.charCoords(end,"div").left;return retval},moveToFirstNonWhiteSpaceCharacter:function(cm,head){var cursor=head;return Pos(cursor.line,findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line)))},moveToMatchedSymbol:function(cm,head){var symbol,cursor=head,line=cursor.line,ch=cursor.ch,lineText=cm.getLine(line);do{symbol=lineText.charAt(ch++);if(symbol&&isMatchableSymbol(symbol)){var style=cm.getTokenTypeAt(Pos(line,ch));if("string"!==style&&"comment"!==style)break}}while(symbol);if(symbol){var matched=cm.findMatchingBracket(Pos(line,ch));return matched.to}return cursor},moveToStartOfLine:function(_cm,head){return Pos(head.line,0)},moveToLineOrEdgeOfDocument:function(cm,_head,motionArgs){var lineNum=motionArgs.forward?cm.lastLine():cm.firstLine();motionArgs.repeatIsExplicit&&(lineNum=motionArgs.repeat-cm.getOption("firstLineNumber"));return Pos(lineNum,findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum)))},textObjectManipulation:function(cm,head,motionArgs,vim){var mirroredPairs={"(":")",")":"(","{":"}","}":"{","[":"]","]":"["},selfPaired={"'":!0,'"':!0},character=motionArgs.selectedCharacter;"b"==character?character="(":"B"==character&&(character="{");var tmp,inclusive=!motionArgs.textObjectInner;if(mirroredPairs[character])tmp=selectCompanionObject(cm,head,character,inclusive);else if(selfPaired[character])tmp=findBeginningAndEnd(cm,head,character,inclusive);else if("W"===character)tmp=expandWordUnderCursor(cm,inclusive,!0,!0);else if("w"===character)tmp=expandWordUnderCursor(cm,inclusive,!0,!1);else{if("p"!==character)return null;tmp=findParagraph(cm,head,motionArgs.repeat,0,inclusive);motionArgs.linewise=!0;if(vim.visualMode)vim.visualLine||(vim.visualLine=!0);else{var operatorArgs=vim.inputState.operatorArgs;operatorArgs&&(operatorArgs.linewise=!0);tmp.end.line--}}return cm.state.vim.visualMode?expandSelection(cm,tmp.start,tmp.end):[tmp.start,tmp.end]},repeatLastCharacterSearch:function(cm,head,motionArgs){var lastSearch=vimGlobalState.lastChararacterSearch,repeat=motionArgs.repeat,forward=motionArgs.forward===lastSearch.forward,increment=(lastSearch.increment?1:0)*(forward?-1:1);cm.moveH(-increment,"char");motionArgs.inclusive=forward?!0:!1;var curEnd=moveToCharacter(cm,repeat,forward,lastSearch.selectedCharacter);if(!curEnd){cm.moveH(increment,"char");return head}curEnd.ch+=increment;return curEnd}},operators={change:function(cm,args,ranges){var finalHead,text,vim=cm.state.vim;vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock=vim.visualBlock;if(vim.visualMode){text=cm.getSelection();var replacement=fillArray("",ranges.length);cm.replaceSelections(replacement);finalHead=cursorMin(ranges[0].head,ranges[0].anchor)}else{var anchor=ranges[0].anchor,head=ranges[0].head;text=cm.getRange(anchor,head);var lastState=vim.lastEditInputState||{};if("moveByWords"==lastState.motion&&!isWhiteSpaceString(text)){var match=/\s+$/.exec(text);if(match&&lastState.motionArgs&&lastState.motionArgs.forward){head=offsetCursor(head,0,-match[0].length);text=text.slice(0,-match[0].length)}}var wasLastLine=head.line-1==cm.lastLine();cm.replaceRange("",anchor,head);if(args.linewise&&!wasLastLine){CodeMirror.commands.newlineAndIndent(cm);anchor.ch=null}finalHead=anchor}vimGlobalState.registerController.pushText(args.registerName,"change",text,args.linewise,ranges.length>1);actions.enterInsertMode(cm,{head:finalHead},cm.state.vim)},"delete":function(cm,args,ranges){var finalHead,text,vim=cm.state.vim;if(vim.visualBlock){text=cm.getSelection();var replacement=fillArray("",ranges.length);cm.replaceSelections(replacement);finalHead=ranges[0].anchor}else{var anchor=ranges[0].anchor,head=ranges[0].head;args.linewise&&head.line!=cm.firstLine()&&anchor.line==cm.lastLine()&&anchor.line==head.line-1&&(anchor.line==cm.firstLine()?anchor.ch=0:anchor=Pos(anchor.line-1,lineLength(cm,anchor.line-1)));text=cm.getRange(anchor,head);cm.replaceRange("",anchor,head);finalHead=anchor;args.linewise&&(finalHead=motions.moveToFirstNonWhiteSpaceCharacter(cm,anchor))}vimGlobalState.registerController.pushText(args.registerName,"delete",text,args.linewise,vim.visualBlock);return clipCursorToContent(cm,finalHead)},indent:function(cm,args,ranges){var vim=cm.state.vim,startLine=ranges[0].anchor.line,endLine=vim.visualBlock?ranges[ranges.length-1].anchor.line:ranges[0].head.line,repeat=vim.visualMode?args.repeat:1;args.linewise&&endLine--;for(var i=startLine;endLine>=i;i++)for(var j=0;repeat>j;j++)cm.indentLine(i,args.indentRight);return motions.moveToFirstNonWhiteSpaceCharacter(cm,ranges[0].anchor)},changeCase:function(cm,args,ranges,oldAnchor,newHead){for(var selections=cm.getSelections(),swapped=[],toLower=args.toLower,j=0;j<selections.length;j++){var toSwap=selections[j],text="";if(toLower===!0)text=toSwap.toLowerCase();else if(toLower===!1)text=toSwap.toUpperCase();else for(var i=0;i<toSwap.length;i++){var character=toSwap.charAt(i);text+=isUpperCase(character)?character.toLowerCase():character.toUpperCase()}swapped.push(text)}cm.replaceSelections(swapped);return args.shouldMoveCursor?newHead:!cm.state.vim.visualMode&&args.linewise&&ranges[0].anchor.line+1==ranges[0].head.line?motions.moveToFirstNonWhiteSpaceCharacter(cm,oldAnchor):args.linewise?oldAnchor:cursorMin(ranges[0].anchor,ranges[0].head)},yank:function(cm,args,ranges,oldAnchor){var vim=cm.state.vim,text=cm.getSelection(),endPos=vim.visualMode?cursorMin(vim.sel.anchor,vim.sel.head,ranges[0].head,ranges[0].anchor):oldAnchor;vimGlobalState.registerController.pushText(args.registerName,"yank",text,args.linewise,vim.visualBlock);return endPos}},actions={jumpListWalk:function(cm,actionArgs,vim){if(!vim.visualMode){var repeat=actionArgs.repeat,forward=actionArgs.forward,jumpList=vimGlobalState.jumpList,mark=jumpList.move(cm,forward?repeat:-repeat),markPos=mark?mark.find():void 0;markPos=markPos?markPos:cm.getCursor();cm.setCursor(markPos)}},scroll:function(cm,actionArgs,vim){if(!vim.visualMode){var repeat=actionArgs.repeat||1,lineHeight=cm.defaultTextHeight(),top=cm.getScrollInfo().top,delta=lineHeight*repeat,newPos=actionArgs.forward?top+delta:top-delta,cursor=copyCursor(cm.getCursor()),cursorCoords=cm.charCoords(cursor,"local");if(actionArgs.forward)if(newPos>cursorCoords.top){cursor.line+=(newPos-cursorCoords.top)/lineHeight;cursor.line=Math.ceil(cursor.line);cm.setCursor(cursor);cursorCoords=cm.charCoords(cursor,"local");cm.scrollTo(null,cursorCoords.top)}else cm.scrollTo(null,newPos);else{var newBottom=newPos+cm.getScrollInfo().clientHeight;if(newBottom<cursorCoords.bottom){cursor.line-=(cursorCoords.bottom-newBottom)/lineHeight;cursor.line=Math.floor(cursor.line);cm.setCursor(cursor);cursorCoords=cm.charCoords(cursor,"local");cm.scrollTo(null,cursorCoords.bottom-cm.getScrollInfo().clientHeight)}else cm.scrollTo(null,newPos)}}},scrollToCursor:function(cm,actionArgs){var lineNum=cm.getCursor().line,charCoords=cm.charCoords(Pos(lineNum,0),"local"),height=cm.getScrollInfo().clientHeight,y=charCoords.top,lineHeight=charCoords.bottom-y;switch(actionArgs.position){case"center":y=y-height/2+lineHeight;break;case"bottom":y=y-height+1.4*lineHeight;break;case"top":y+=.4*lineHeight}cm.scrollTo(null,y)},replayMacro:function(cm,actionArgs,vim){var registerName=actionArgs.selectedCharacter,repeat=actionArgs.repeat,macroModeState=vimGlobalState.macroModeState;"@"==registerName&&(registerName=macroModeState.latestRegister);for(;repeat--;)executeMacroRegister(cm,vim,macroModeState,registerName)},enterMacroRecordMode:function(cm,actionArgs){var macroModeState=vimGlobalState.macroModeState,registerName=actionArgs.selectedCharacter;macroModeState.enterMacroRecordMode(cm,registerName)},enterInsertMode:function(cm,actionArgs,vim){if(!cm.getOption("readOnly")){vim.insertMode=!0;vim.insertModeRepeat=actionArgs&&actionArgs.repeat||1;var insertAt=actionArgs?actionArgs.insertAt:null,sel=vim.sel,head=actionArgs.head||cm.getCursor("head"),height=cm.listSelections().length;if("eol"==insertAt)head=Pos(head.line,lineLength(cm,head.line));else if("charAfter"==insertAt)head=offsetCursor(head,0,1);else if("firstNonBlank"==insertAt)head=motions.moveToFirstNonWhiteSpaceCharacter(cm,head);else if("startOfSelectedArea"==insertAt)if(vim.visualBlock){head=Pos(Math.min(sel.head.line,sel.anchor.line),Math.min(sel.head.ch,sel.anchor.ch));height=Math.abs(sel.head.line-sel.anchor.line)+1}else head=sel.head.line<sel.anchor.line?sel.head:Pos(sel.anchor.line,0);else if("endOfSelectedArea"==insertAt)if(vim.visualBlock){head=Pos(Math.min(sel.head.line,sel.anchor.line),Math.max(sel.head.ch+1,sel.anchor.ch));height=Math.abs(sel.head.line-sel.anchor.line)+1}else head=sel.head.line>=sel.anchor.line?offsetCursor(sel.head,0,1):Pos(sel.anchor.line,0);else if("inplace"==insertAt&&vim.visualMode)return;cm.setOption("keyMap","vim-insert");cm.setOption("disableInput",!1);if(actionArgs&&actionArgs.replace){cm.toggleOverwrite(!0);cm.setOption("keyMap","vim-replace");CodeMirror.signal(cm,"vim-mode-change",{mode:"replace"})}else{cm.setOption("keyMap","vim-insert");CodeMirror.signal(cm,"vim-mode-change",{mode:"insert"})}if(!vimGlobalState.macroModeState.isPlaying){cm.on("change",onChange);CodeMirror.on(cm.getInputField(),"keydown",onKeyEventTargetKeyDown)}vim.visualMode&&exitVisualMode(cm);selectForInsert(cm,head,height)}},toggleVisualMode:function(cm,actionArgs,vim){var head,repeat=actionArgs.repeat,anchor=cm.getCursor();if(vim.visualMode)if(vim.visualLine^actionArgs.linewise||vim.visualBlock^actionArgs.blockwise){vim.visualLine=!!actionArgs.linewise;vim.visualBlock=!!actionArgs.blockwise;CodeMirror.signal(cm,"vim-mode-change",{mode:"visual",subMode:vim.visualLine?"linewise":vim.visualBlock?"blockwise":""});updateCmSelection(cm)}else exitVisualMode(cm);else{vim.visualMode=!0;vim.visualLine=!!actionArgs.linewise;vim.visualBlock=!!actionArgs.blockwise;head=clipCursorToContent(cm,Pos(anchor.line,anchor.ch+repeat-1),!0);vim.sel={anchor:anchor,head:head};CodeMirror.signal(cm,"vim-mode-change",{mode:"visual",subMode:vim.visualLine?"linewise":vim.visualBlock?"blockwise":""});updateCmSelection(cm);updateMark(cm,vim,"<",cursorMin(anchor,head));updateMark(cm,vim,">",cursorMax(anchor,head))}},reselectLastSelection:function(cm,_actionArgs,vim){var lastSelection=vim.lastSelection;vim.visualMode&&updateLastSelection(cm,vim);if(lastSelection){var anchor=lastSelection.anchorMark.find(),head=lastSelection.headMark.find();if(!anchor||!head)return;vim.sel={anchor:anchor,head:head};vim.visualMode=!0;vim.visualLine=lastSelection.visualLine;vim.visualBlock=lastSelection.visualBlock;updateCmSelection(cm);updateMark(cm,vim,"<",cursorMin(anchor,head));updateMark(cm,vim,">",cursorMax(anchor,head));CodeMirror.signal(cm,"vim-mode-change",{mode:"visual",subMode:vim.visualLine?"linewise":vim.visualBlock?"blockwise":""})}},joinLines:function(cm,actionArgs,vim){var curStart,curEnd;if(vim.visualMode){curStart=cm.getCursor("anchor");curEnd=cm.getCursor("head");if(cursorIsBefore(curEnd,curStart)){var tmp=curEnd;curEnd=curStart;curStart=tmp}curEnd.ch=lineLength(cm,curEnd.line)-1}else{var repeat=Math.max(actionArgs.repeat,2);curStart=cm.getCursor();curEnd=clipCursorToContent(cm,Pos(curStart.line+repeat-1,1/0))}for(var finalCh=0,i=curStart.line;i<curEnd.line;i++){finalCh=lineLength(cm,curStart.line);var tmp=Pos(curStart.line+1,lineLength(cm,curStart.line+1)),text=cm.getRange(curStart,tmp);text=text.replace(/\n\s*/g," ");cm.replaceRange(text,curStart,tmp)}var curFinalPos=Pos(curStart.line,finalCh);vim.visualMode&&exitVisualMode(cm,!1);cm.setCursor(curFinalPos)},newLineAndEnterInsertMode:function(cm,actionArgs,vim){vim.insertMode=!0;var insertAt=copyCursor(cm.getCursor());if(insertAt.line!==cm.firstLine()||actionArgs.after){insertAt.line=actionArgs.after?insertAt.line:insertAt.line-1;insertAt.ch=lineLength(cm,insertAt.line);cm.setCursor(insertAt);var newlineFn=CodeMirror.commands.newlineAndIndentContinueComment||CodeMirror.commands.newlineAndIndent;newlineFn(cm)}else{cm.replaceRange("\n",Pos(cm.firstLine(),0));cm.setCursor(cm.firstLine(),0)}this.enterInsertMode(cm,{repeat:actionArgs.repeat},vim)},paste:function(cm,actionArgs,vim){var cur=copyCursor(cm.getCursor()),register=vimGlobalState.registerController.getRegister(actionArgs.registerName),text=register.toString();if(text){if(actionArgs.matchIndent){var tabSize=cm.getOption("tabSize"),whitespaceLength=function(str){var tabs=str.split(" ").length-1,spaces=str.split(" ").length-1;return tabs*tabSize+1*spaces},currentLine=cm.getLine(cm.getCursor().line),indent=whitespaceLength(currentLine.match(/^\s*/)[0]),chompedText=text.replace(/\n$/,""),wasChomped=text!==chompedText,firstIndent=whitespaceLength(text.match(/^\s*/)[0]),text=chompedText.replace(/^\s*/gm,function(wspace){var newIndent=indent+(whitespaceLength(wspace)-firstIndent);if(0>newIndent)return"";if(cm.getOption("indentWithTabs")){var quotient=Math.floor(newIndent/tabSize);return Array(quotient+1).join(" ")}return Array(newIndent+1).join(" ")});text+=wasChomped?"\n":""}if(actionArgs.repeat>1)var text=Array(actionArgs.repeat+1).join(text);var linewise=register.linewise,blockwise=register.blockwise;if(linewise)if(vim.visualMode)text=vim.visualLine?text.slice(0,-1):"\n"+text.slice(0,text.length-1)+"\n";else if(actionArgs.after){text="\n"+text.slice(0,text.length-1);cur.ch=lineLength(cm,cur.line)}else cur.ch=0;else{if(blockwise){text=text.split("\n");for(var i=0;i<text.length;i++)text[i]=""==text[i]?" ":text[i]}cur.ch+=actionArgs.after?1:0}var curPosFinal,idx;if(vim.visualMode){vim.lastPastedText=text;var lastSelectionCurEnd,selectedArea=getSelectedAreaRange(cm,vim),selectionStart=selectedArea[0],selectionEnd=selectedArea[1],selectedText=cm.getSelection(),selections=cm.listSelections(),emptyStrings=new Array(selections.length).join("1").split("1");vim.lastSelection&&(lastSelectionCurEnd=vim.lastSelection.headMark.find());vimGlobalState.registerController.unnamedRegister.setText(selectedText);if(blockwise){cm.replaceSelections(emptyStrings);selectionEnd=Pos(selectionStart.line+text.length-1,selectionStart.ch);cm.setCursor(selectionStart);selectBlock(cm,selectionEnd);cm.replaceSelections(text);curPosFinal=selectionStart}else if(vim.visualBlock){cm.replaceSelections(emptyStrings);cm.setCursor(selectionStart);cm.replaceRange(text,selectionStart,selectionStart);curPosFinal=selectionStart}else{cm.replaceRange(text,selectionStart,selectionEnd);curPosFinal=cm.posFromIndex(cm.indexFromPos(selectionStart)+text.length-1)}lastSelectionCurEnd&&(vim.lastSelection.headMark=cm.setBookmark(lastSelectionCurEnd));linewise&&(curPosFinal.ch=0)}else if(blockwise){cm.setCursor(cur);for(var i=0;i<text.length;i++){var line=cur.line+i;line>cm.lastLine()&&cm.replaceRange("\n",Pos(line,0));var lastCh=lineLength(cm,line);lastCh<cur.ch&&extendLineToColumn(cm,line,cur.ch)}cm.setCursor(cur);selectBlock(cm,Pos(cur.line+text.length-1,cur.ch));cm.replaceSelections(text);curPosFinal=cur}else{cm.replaceRange(text,cur);if(linewise&&actionArgs.after)curPosFinal=Pos(cur.line+1,findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line+1)));else if(linewise&&!actionArgs.after)curPosFinal=Pos(cur.line,findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line)));else if(!linewise&&actionArgs.after){idx=cm.indexFromPos(cur);curPosFinal=cm.posFromIndex(idx+text.length-1)}else{idx=cm.indexFromPos(cur);curPosFinal=cm.posFromIndex(idx+text.length)}}vim.visualMode&&exitVisualMode(cm,!1);cm.setCursor(curPosFinal)}},undo:function(cm,actionArgs){cm.operation(function(){repeatFn(cm,CodeMirror.commands.undo,actionArgs.repeat)();cm.setCursor(cm.getCursor("anchor"))})},redo:function(cm,actionArgs){repeatFn(cm,CodeMirror.commands.redo,actionArgs.repeat)()},setRegister:function(_cm,actionArgs,vim){vim.inputState.registerName=actionArgs.selectedCharacter},setMark:function(cm,actionArgs,vim){var markName=actionArgs.selectedCharacter;updateMark(cm,vim,markName,cm.getCursor())},replace:function(cm,actionArgs,vim){var replaceTo,curEnd,replaceWith=actionArgs.selectedCharacter,curStart=cm.getCursor(),selections=cm.listSelections();if(vim.visualMode){curStart=cm.getCursor("start");curEnd=cm.getCursor("end")}else{var line=cm.getLine(curStart.line);replaceTo=curStart.ch+actionArgs.repeat;replaceTo>line.length&&(replaceTo=line.length);curEnd=Pos(curStart.line,replaceTo)}if("\n"==replaceWith){vim.visualMode||cm.replaceRange("",curStart,curEnd);(CodeMirror.commands.newlineAndIndentContinueComment||CodeMirror.commands.newlineAndIndent)(cm)}else{var replaceWithStr=cm.getRange(curStart,curEnd);replaceWithStr=replaceWithStr.replace(/[^\n]/g,replaceWith);if(vim.visualBlock){var spaces=new Array(cm.getOption("tabSize")+1).join(" ");replaceWithStr=cm.getSelection();replaceWithStr=replaceWithStr.replace(/\t/g,spaces).replace(/[^\n]/g,replaceWith).split("\n");cm.replaceSelections(replaceWithStr)}else cm.replaceRange(replaceWithStr,curStart,curEnd);if(vim.visualMode){curStart=cursorIsBefore(selections[0].anchor,selections[0].head)?selections[0].anchor:selections[0].head;cm.setCursor(curStart);exitVisualMode(cm,!1)}else cm.setCursor(offsetCursor(curEnd,0,-1))}},incrementNumberToken:function(cm,actionArgs){for(var match,start,end,numberStr,token,cur=cm.getCursor(),lineStr=cm.getLine(cur.line),re=/-?\d+/g;null!==(match=re.exec(lineStr));){token=match[0];start=match.index;end=start+token.length;if(cur.ch<end)break}if((actionArgs.backtrack||!(end<=cur.ch))&&token){var increment=actionArgs.increase?1:-1,number=parseInt(token)+increment*actionArgs.repeat,from=Pos(cur.line,start),to=Pos(cur.line,end);numberStr=number.toString();cm.replaceRange(numberStr,from,to);cm.setCursor(Pos(cur.line,start+numberStr.length-1))}},repeatLastEdit:function(cm,actionArgs,vim){var lastEditInputState=vim.lastEditInputState;if(lastEditInputState){var repeat=actionArgs.repeat;repeat&&actionArgs.repeatIsExplicit?vim.lastEditInputState.repeatOverride=repeat:repeat=vim.lastEditInputState.repeatOverride||repeat;repeatLastEdit(cm,vim,repeat,!1)}},exitInsertMode:exitInsertMode},symbolToMode={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},findSymbolModes={bracket:{isComplete:function(state){if(state.nextCh===state.symb){state.depth++;if(state.depth>=1)return!0}else state.nextCh===state.reverseSymb&&state.depth--;return!1}},section:{init:function(state){state.curMoveThrough=!0;state.symb=(state.forward?"]":"[")===state.symb?"{":"}"},isComplete:function(state){return 0===state.index&&state.nextCh===state.symb}},comment:{isComplete:function(state){var found="*"===state.lastCh&&"/"===state.nextCh;state.lastCh=state.nextCh;return found}},method:{init:function(state){state.symb="m"===state.symb?"{":"}";state.reverseSymb="{"===state.symb?"}":"{"},isComplete:function(state){return state.nextCh===state.symb?!0:!1}},preprocess:{init:function(state){state.index=0},isComplete:function(state){if("#"===state.nextCh){var token=state.lineText.match(/#(\w+)/)[1];if("endif"===token){if(state.forward&&0===state.depth)return!0;state.depth++}else if("if"===token){if(!state.forward&&0===state.depth)return!0;state.depth--}if("else"===token&&0===state.depth)return!0}return!1}}};defineOption("pcre",!0,"boolean");SearchState.prototype={getQuery:function(){return vimGlobalState.query},setQuery:function(query){vimGlobalState.query=query},getOverlay:function(){return this.searchOverlay},setOverlay:function(overlay){this.searchOverlay=overlay},isReversed:function(){return vimGlobalState.isReversed},setReversed:function(reversed){vimGlobalState.isReversed=reversed},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(annotate){this.annotate=annotate}};var charUnescapes={"\\n":"\n","\\r":"\r","\\t":" "},unescapes={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":" "},searchPromptDesc="(Javascript regexp)",ExCommandDispatcher=function(){this.buildCommandMap_()};ExCommandDispatcher.prototype={processCommand:function(cm,input,opt_params){var that=this;cm.operation(function(){cm.curOp.isVimOp=!0;that._processCommand(cm,input,opt_params)})},_processCommand:function(cm,input,opt_params){var vim=cm.state.vim,commandHistoryRegister=vimGlobalState.registerController.getRegister(":"),previousCommand=commandHistoryRegister.toString();vim.visualMode&&exitVisualMode(cm);var inputStream=new CodeMirror.StringStream(input);commandHistoryRegister.setText(input);var params=opt_params||{};params.input=input;try{this.parseInput_(cm,inputStream,params)}catch(e){showConfirm(cm,e);throw e}var command,commandName;if(params.commandName){command=this.matchCommand_(params.commandName);if(command){commandName=command.name;command.excludeFromCommandHistory&&commandHistoryRegister.setText(previousCommand);this.parseCommandArgs_(inputStream,params,command);if("exToKey"==command.type){for(var i=0;i<command.toKeys.length;i++)CodeMirror.Vim.handleKey(cm,command.toKeys[i],"mapping");return}if("exToEx"==command.type){this.processCommand(cm,command.toInput);return}}}else void 0!==params.line&&(commandName="move");if(commandName)try{exCommands[commandName](cm,params);command&&command.possiblyAsync||!params.callback||params.callback()}catch(e){showConfirm(cm,e);throw e}else showConfirm(cm,'Not an editor command ":'+input+'"')},parseInput_:function(cm,inputStream,result){inputStream.eatWhile(":");if(inputStream.eat("%")){result.line=cm.firstLine();result.lineEnd=cm.lastLine()}else{result.line=this.parseLineSpec_(cm,inputStream);
4
+ void 0!==result.line&&inputStream.eat(",")&&(result.lineEnd=this.parseLineSpec_(cm,inputStream))}var commandMatch=inputStream.match(/^(\w+)/);commandMatch?result.commandName=commandMatch[1]:result.commandName=inputStream.match(/.*/)[0];return result},parseLineSpec_:function(cm,inputStream){var numberMatch=inputStream.match(/^(\d+)/);if(numberMatch)return parseInt(numberMatch[1],10)-1;switch(inputStream.next()){case".":return cm.getCursor().line;case"$":return cm.lastLine();case"'":var mark=cm.state.vim.marks[inputStream.next()];if(mark&&mark.find())return mark.find().line;throw new Error("Mark not set");default:inputStream.backUp(1);return void 0}},parseCommandArgs_:function(inputStream,params,command){if(!inputStream.eol()){params.argString=inputStream.match(/.*/)[0];var delim=command.argDelimiter||/\s+/,args=trim(params.argString).split(delim);args.length&&args[0]&&(params.args=args)}},matchCommand_:function(commandName){for(var i=commandName.length;i>0;i--){var prefix=commandName.substring(0,i);if(this.commandMap_[prefix]){var command=this.commandMap_[prefix];if(0===command.name.indexOf(commandName))return command}}return null},buildCommandMap_:function(){this.commandMap_={};for(var i=0;i<defaultExCommandMap.length;i++){var command=defaultExCommandMap[i],key=command.shortName||command.name;this.commandMap_[key]=command}},map:function(lhs,rhs,ctx){if(":"!=lhs&&":"==lhs.charAt(0)){if(ctx)throw Error("Mode not supported for ex mappings");var commandName=lhs.substring(1);":"!=rhs&&":"==rhs.charAt(0)?this.commandMap_[commandName]={name:commandName,type:"exToEx",toInput:rhs.substring(1),user:!0}:this.commandMap_[commandName]={name:commandName,type:"exToKey",toKeys:rhs,user:!0}}else if(":"!=rhs&&":"==rhs.charAt(0)){var mapping={keys:lhs,type:"keyToEx",exArgs:{input:rhs.substring(1)},user:!0};ctx&&(mapping.context=ctx);defaultKeymap.unshift(mapping)}else{var mapping={keys:lhs,type:"keyToKey",toKeys:rhs,user:!0};ctx&&(mapping.context=ctx);defaultKeymap.unshift(mapping)}},unmap:function(lhs,ctx){if(":"!=lhs&&":"==lhs.charAt(0)){if(ctx)throw Error("Mode not supported for ex mappings");var commandName=lhs.substring(1);if(this.commandMap_[commandName]&&this.commandMap_[commandName].user){delete this.commandMap_[commandName];return}}else for(var keys=lhs,i=0;i<defaultKeymap.length;i++)if(keys==defaultKeymap[i].keys&&defaultKeymap[i].context===ctx&&defaultKeymap[i].user){defaultKeymap.splice(i,1);return}throw Error("No such mapping.")}};var exCommands={colorscheme:function(cm,params){!params.args||params.args.length<1?showConfirm(cm,cm.getOption("theme")):cm.setOption("theme",params.args[0])},map:function(cm,params,ctx){var mapArgs=params.args;!mapArgs||mapArgs.length<2?cm&&showConfirm(cm,"Invalid mapping: "+params.input):exCommandDispatcher.map(mapArgs[0],mapArgs[1],ctx)},imap:function(cm,params){this.map(cm,params,"insert")},nmap:function(cm,params){this.map(cm,params,"normal")},vmap:function(cm,params){this.map(cm,params,"visual")},unmap:function(cm,params,ctx){var mapArgs=params.args;!mapArgs||mapArgs.length<1?cm&&showConfirm(cm,"No such mapping: "+params.input):exCommandDispatcher.unmap(mapArgs[0],ctx)},move:function(cm,params){commandDispatcher.processCommand(cm,cm.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:params.line+1})},set:function(cm,params){var setArgs=params.args,setCfg=params.setCfg||{};if(!setArgs||setArgs.length<1)cm&&showConfirm(cm,"Invalid mapping: "+params.input);else{var expr=setArgs[0].split("="),optionName=expr[0],value=expr[1],forceGet=!1;if("?"==optionName.charAt(optionName.length-1)){if(value)throw Error("Trailing characters: "+params.argString);optionName=optionName.substring(0,optionName.length-1);forceGet=!0}if(void 0===value&&"no"==optionName.substring(0,2)){optionName=optionName.substring(2);value=!1}var optionIsBoolean=options[optionName]&&"boolean"==options[optionName].type;optionIsBoolean&&void 0==value&&(value=!0);if(!optionIsBoolean&&void 0===value||forceGet){var oldValue=getOption(optionName,cm,setCfg);oldValue===!0||oldValue===!1?showConfirm(cm," "+(oldValue?"":"no")+optionName):showConfirm(cm," "+optionName+"="+oldValue)}else setOption(optionName,value,cm,setCfg)}},setlocal:function(cm,params){params.setCfg={scope:"local"};this.set(cm,params)},setglobal:function(cm,params){params.setCfg={scope:"global"};this.set(cm,params)},registers:function(cm,params){var regArgs=params.args,registers=vimGlobalState.registerController.registers,regInfo="----------Registers----------<br><br>";if(regArgs){var registerName;regArgs=regArgs.join("");for(var i=0;i<regArgs.length;i++){registerName=regArgs.charAt(i);if(vimGlobalState.registerController.isValidRegister(registerName)){var register=registers[registerName]||new Register;regInfo+='"'+registerName+" "+register.toString()+"<br>"}}}else for(var registerName in registers){var text=registers[registerName].toString();text.length&&(regInfo+='"'+registerName+" "+text+"<br>")}showConfirm(cm,regInfo)},sort:function(cm,params){function parseArgs(){if(params.argString){var args=new CodeMirror.StringStream(params.argString);args.eat("!")&&(reverse=!0);if(args.eol())return;if(!args.eatSpace())return"Invalid arguments";var opts=args.match(/[a-z]+/);if(opts){opts=opts[0];ignoreCase=-1!=opts.indexOf("i");unique=-1!=opts.indexOf("u");var decimal=-1!=opts.indexOf("d")&&1,hex=-1!=opts.indexOf("x")&&1,octal=-1!=opts.indexOf("o")&&1;if(decimal+hex+octal>1)return"Invalid arguments";number=decimal&&"decimal"||hex&&"hex"||octal&&"octal"}if(args.match(/\/.*\//))return"patterns not supported"}}function compareFn(a,b){if(reverse){var tmp;tmp=a;a=b;b=tmp}if(ignoreCase){a=a.toLowerCase();b=b.toLowerCase()}var anum=number&&numberRegex.exec(a),bnum=number&&numberRegex.exec(b);if(!anum)return b>a?-1:1;anum=parseInt((anum[1]+anum[2]).toLowerCase(),radix);bnum=parseInt((bnum[1]+bnum[2]).toLowerCase(),radix);return anum-bnum}var reverse,ignoreCase,unique,number,err=parseArgs();if(err)showConfirm(cm,err+": "+params.argString);else{var lineStart=params.line||cm.firstLine(),lineEnd=params.lineEnd||params.line||cm.lastLine();if(lineStart!=lineEnd){var curStart=Pos(lineStart,0),curEnd=Pos(lineEnd,lineLength(cm,lineEnd)),text=cm.getRange(curStart,curEnd).split("\n"),numberRegex="decimal"==number?/(-?)([\d]+)/:"hex"==number?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==number?/([0-7]+)/:null,radix="decimal"==number?10:"hex"==number?16:"octal"==number?8:null,numPart=[],textPart=[];if(number)for(var i=0;i<text.length;i++)numberRegex.exec(text[i])?numPart.push(text[i]):textPart.push(text[i]);else textPart=text;numPart.sort(compareFn);textPart.sort(compareFn);text=reverse?numPart.concat(textPart):textPart.concat(numPart);if(unique){var lastLine,textOld=text;text=[];for(var i=0;i<textOld.length;i++){textOld[i]!=lastLine&&text.push(textOld[i]);lastLine=textOld[i]}}cm.replaceRange(text.join("\n"),curStart,curEnd)}}},global:function(cm,params){var argString=params.argString;if(argString){var cmd,lineStart=void 0!==params.line?params.line:cm.firstLine(),lineEnd=params.lineEnd||params.line||cm.lastLine(),tokens=splitBySlash(argString),regexPart=argString;if(tokens.length){regexPart=tokens[0];cmd=tokens.slice(1,tokens.length).join("/")}if(regexPart)try{updateSearchQuery(cm,regexPart,!0,!0)}catch(e){showConfirm(cm,"Invalid regex: "+regexPart);return}for(var query=getSearchState(cm).getQuery(),matchedLines=[],content="",i=lineStart;lineEnd>=i;i++){var matched=query.test(cm.getLine(i));if(matched){matchedLines.push(i+1);content+=cm.getLine(i)+"<br>"}}if(cmd){var index=0,nextCommand=function(){if(index<matchedLines.length){var command=matchedLines[index]+cmd;exCommandDispatcher.processCommand(cm,command,{callback:nextCommand})}index++};nextCommand()}else showConfirm(cm,content)}else showConfirm(cm,"Regular Expression missing from global")},substitute:function(cm,params){if(!cm.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var regexPart,trailing,flagsPart,count,argString=params.argString,tokens=argString?splitBySlash(argString):[],replacePart="",confirm=!1,global=!1;if(tokens.length){regexPart=tokens[0];replacePart=tokens[1];if(void 0!==replacePart){replacePart=getOption("pcre")?unescapeRegexReplace(replacePart):translateRegexReplace(replacePart);vimGlobalState.lastSubstituteReplacePart=replacePart}trailing=tokens[2]?tokens[2].split(" "):[]}else if(argString&&argString.length){showConfirm(cm,"Substitutions should be of the form :s/pattern/replace/");return}if(trailing){flagsPart=trailing[0];count=parseInt(trailing[1]);if(flagsPart){if(-1!=flagsPart.indexOf("c")){confirm=!0;flagsPart.replace("c","")}if(-1!=flagsPart.indexOf("g")){global=!0;flagsPart.replace("g","")}regexPart=regexPart+"/"+flagsPart}}if(regexPart)try{updateSearchQuery(cm,regexPart,!0,!0)}catch(e){showConfirm(cm,"Invalid regex: "+regexPart);return}replacePart=replacePart||vimGlobalState.lastSubstituteReplacePart;if(void 0!==replacePart){var state=getSearchState(cm),query=state.getQuery(),lineStart=void 0!==params.line?params.line:cm.getCursor().line,lineEnd=params.lineEnd||lineStart;lineStart==cm.firstLine()&&lineEnd==cm.lastLine()&&(lineEnd=1/0);if(count){lineStart=lineEnd;lineEnd=lineStart+count-1}var startPos=clipCursorToContent(cm,Pos(lineStart,0)),cursor=cm.getSearchCursor(query,startPos);doReplace(cm,confirm,global,lineStart,lineEnd,cursor,query,replacePart,params.callback)}else showConfirm(cm,"No previous substitute regular expression")},redo:CodeMirror.commands.redo,undo:CodeMirror.commands.undo,write:function(cm){CodeMirror.commands.save?CodeMirror.commands.save(cm):cm.save()},nohlsearch:function(cm){clearSearchHighlight(cm)},delmarks:function(cm,params){if(params.argString&&trim(params.argString))for(var state=cm.state.vim,stream=new CodeMirror.StringStream(trim(params.argString));!stream.eol();){stream.eatSpace();var count=stream.pos;if(!stream.match(/[a-zA-Z]/,!1)){showConfirm(cm,"Invalid argument: "+params.argString.substring(count));return}var sym=stream.next();if(stream.match("-",!0)){if(!stream.match(/[a-zA-Z]/,!1)){showConfirm(cm,"Invalid argument: "+params.argString.substring(count));return}var startMark=sym,finishMark=stream.next();if(!(isLowerCase(startMark)&&isLowerCase(finishMark)||isUpperCase(startMark)&&isUpperCase(finishMark))){showConfirm(cm,"Invalid argument: "+startMark+"-");return}var start=startMark.charCodeAt(0),finish=finishMark.charCodeAt(0);if(start>=finish){showConfirm(cm,"Invalid argument: "+params.argString.substring(count));return}for(var j=0;finish-start>=j;j++){var mark=String.fromCharCode(start+j);delete state.marks[mark]}}else delete state.marks[sym]}else showConfirm(cm,"Argument required")}},exCommandDispatcher=new ExCommandDispatcher;CodeMirror.keyMap.vim={attach:attachVimMap,detach:detachVimMap,call:cmKey};defineOption("insertModeEscKeysTimeout",200,"number");CodeMirror.keyMap["vim-insert"]={"Ctrl-N":"autocomplete","Ctrl-P":"autocomplete",Enter:function(cm){var fn=CodeMirror.commands.newlineAndIndentContinueComment||CodeMirror.commands.newlineAndIndent;fn(cm)},fallthrough:["default"],attach:attachVimMap,detach:detachVimMap,call:cmKey};CodeMirror.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:attachVimMap,detach:detachVimMap,call:cmKey};resetVimGlobalState();return vimApi};CodeMirror.Vim=Vim()});
js/esites_editor/dist/js/vendor/codemirror/lib/codemirror.css ADDED
@@ -0,0 +1 @@
 
1
+ .CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}
js/esites_editor/dist/js/vendor/codemirror/lib/codemirror.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ !function(mod){if("object"==typeof exports&&"object"==typeof module)module.exports=mod();else{if("function"==typeof define&&define.amd)return define([],mod);this.CodeMirror=mod()}}(function(){"use strict";function CodeMirror(place,options){if(!(this instanceof CodeMirror))return new CodeMirror(place,options);this.options=options=options?copyObj(options):{};copyObj(defaults,options,!1);setGuttersForLineNumbers(options);var doc=options.value;"string"==typeof doc&&(doc=new Doc(doc,options.mode,null,options.lineSeparator));this.doc=doc;var input=new CodeMirror.inputStyles[options.inputStyle](this),display=this.display=new Display(place,doc,input);display.wrapper.CodeMirror=this;updateGutters(this);themeChanged(this);options.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap");options.autofocus&&!mobile&&display.input.focus();initScrollbars(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Delayed,keySeq:null,specialChars:null};var cm=this;ie&&11>ie_version&&setTimeout(function(){cm.display.input.reset(!0)},20);registerEventHandlers(this);ensureGlobalHandlers();startOperation(this);this.curOp.forceUpdate=!0;attachDoc(this,doc);options.autofocus&&!mobile||cm.hasFocus()?setTimeout(bind(onFocus,this),20):onBlur(this);for(var opt in optionHandlers)optionHandlers.hasOwnProperty(opt)&&optionHandlers[opt](this,options[opt],Init);maybeUpdateLineNumberWidth(this);options.finishInit&&options.finishInit(this);for(var i=0;i<initHooks.length;++i)initHooks[i](this);endOperation(this);webkit&&options.lineWrapping&&"optimizelegibility"==getComputedStyle(display.lineDiv).textRendering&&(display.lineDiv.style.textRendering="auto")}function Display(place,doc,input){var d=this;this.input=input;d.scrollbarFiller=elt("div",null,"CodeMirror-scrollbar-filler");d.scrollbarFiller.setAttribute("cm-not-content","true");d.gutterFiller=elt("div",null,"CodeMirror-gutter-filler");d.gutterFiller.setAttribute("cm-not-content","true");d.lineDiv=elt("div",null,"CodeMirror-code");d.selectionDiv=elt("div",null,null,"position: relative; z-index: 1");d.cursorDiv=elt("div",null,"CodeMirror-cursors");d.measure=elt("div",null,"CodeMirror-measure");d.lineMeasure=elt("div",null,"CodeMirror-measure");d.lineSpace=elt("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none");d.mover=elt("div",[elt("div",[d.lineSpace],"CodeMirror-lines")],null,"position: relative");d.sizer=elt("div",[d.mover],"CodeMirror-sizer");d.sizerWidth=null;d.heightForcer=elt("div",null,null,"position: absolute; height: "+scrollerGap+"px; width: 1px;");d.gutters=elt("div",null,"CodeMirror-gutters");d.lineGutter=null;d.scroller=elt("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll");d.scroller.setAttribute("tabIndex","-1");d.wrapper=elt("div",[d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror");if(ie&&8>ie_version){d.gutters.style.zIndex=-1;d.scroller.style.paddingRight=0}webkit||gecko&&mobile||(d.scroller.draggable=!0);place&&(place.appendChild?place.appendChild(d.wrapper):place(d.wrapper));d.viewFrom=d.viewTo=doc.first;d.reportedViewFrom=d.reportedViewTo=doc.first;d.view=[];d.renderedView=null;d.externalMeasured=null;d.viewOffset=0;d.lastWrapHeight=d.lastWrapWidth=0;d.updateLineNumbers=null;d.nativeBarWidth=d.barHeight=d.barWidth=0;d.scrollbarsClipped=!1;d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null;d.alignWidgets=!1;d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null;d.maxLine=null;d.maxLineLength=0;d.maxLineChanged=!1;d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null;d.shift=!1;d.selForContextMenu=null;d.activeTouch=null;input.init(d)}function loadMode(cm){cm.doc.mode=CodeMirror.getMode(cm.options,cm.doc.modeOption);resetModeState(cm)}function resetModeState(cm){cm.doc.iter(function(line){line.stateAfter&&(line.stateAfter=null);line.styles&&(line.styles=null)});cm.doc.frontier=cm.doc.first;startWorker(cm,100);cm.state.modeGen++;cm.curOp&&regChange(cm)}function wrappingChanged(cm){if(cm.options.lineWrapping){addClass(cm.display.wrapper,"CodeMirror-wrap");cm.display.sizer.style.minWidth="";cm.display.sizerWidth=null}else{rmClass(cm.display.wrapper,"CodeMirror-wrap");findMaxLine(cm)}estimateLineHeights(cm);regChange(cm);clearCaches(cm);setTimeout(function(){updateScrollbars(cm)},100)}function estimateHeight(cm){var th=textHeight(cm.display),wrapping=cm.options.lineWrapping,perLine=wrapping&&Math.max(5,cm.display.scroller.clientWidth/charWidth(cm.display)-3);return function(line){if(lineIsHidden(cm.doc,line))return 0;var widgetsHeight=0;if(line.widgets)for(var i=0;i<line.widgets.length;i++)line.widgets[i].height&&(widgetsHeight+=line.widgets[i].height);return wrapping?widgetsHeight+(Math.ceil(line.text.length/perLine)||1)*th:widgetsHeight+th}}function estimateLineHeights(cm){var doc=cm.doc,est=estimateHeight(cm);doc.iter(function(line){var estHeight=est(line);estHeight!=line.height&&updateLineHeight(line,estHeight)})}function themeChanged(cm){cm.display.wrapper.className=cm.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+cm.options.theme.replace(/(^|\s)\s*/g," cm-s-");clearCaches(cm)}function guttersChanged(cm){updateGutters(cm);regChange(cm);setTimeout(function(){alignHorizontally(cm)},20)}function updateGutters(cm){var gutters=cm.display.gutters,specs=cm.options.gutters;removeChildren(gutters);for(var i=0;i<specs.length;++i){var gutterClass=specs[i],gElt=gutters.appendChild(elt("div",null,"CodeMirror-gutter "+gutterClass));if("CodeMirror-linenumbers"==gutterClass){cm.display.lineGutter=gElt;gElt.style.width=(cm.display.lineNumWidth||1)+"px"}}gutters.style.display=i?"":"none";updateGutterSpace(cm)}function updateGutterSpace(cm){var width=cm.display.gutters.offsetWidth;cm.display.sizer.style.marginLeft=width+"px"}function lineLength(line){if(0==line.height)return 0;for(var merged,len=line.text.length,cur=line;merged=collapsedSpanAtStart(cur);){var found=merged.find(0,!0);cur=found.from.line;len+=found.from.ch-found.to.ch}cur=line;for(;merged=collapsedSpanAtEnd(cur);){var found=merged.find(0,!0);len-=cur.text.length-found.from.ch;cur=found.to.line;len+=cur.text.length-found.to.ch}return len}function findMaxLine(cm){var d=cm.display,doc=cm.doc;d.maxLine=getLine(doc,doc.first);d.maxLineLength=lineLength(d.maxLine);d.maxLineChanged=!0;doc.iter(function(line){var len=lineLength(line);if(len>d.maxLineLength){d.maxLineLength=len;d.maxLine=line}})}function setGuttersForLineNumbers(options){var found=indexOf(options.gutters,"CodeMirror-linenumbers");if(-1==found&&options.lineNumbers)options.gutters=options.gutters.concat(["CodeMirror-linenumbers"]);else if(found>-1&&!options.lineNumbers){options.gutters=options.gutters.slice(0);options.gutters.splice(found,1)}}function measureForScrollbars(cm){var d=cm.display,gutterW=d.gutters.offsetWidth,docH=Math.round(cm.doc.height+paddingVert(cm.display));return{clientHeight:d.scroller.clientHeight,viewHeight:d.wrapper.clientHeight,scrollWidth:d.scroller.scrollWidth,clientWidth:d.scroller.clientWidth,viewWidth:d.wrapper.clientWidth,barLeft:cm.options.fixedGutter?gutterW:0,docHeight:docH,scrollHeight:docH+scrollGap(cm)+d.barHeight,nativeBarWidth:d.nativeBarWidth,gutterWidth:gutterW}}function NativeScrollbars(place,scroll,cm){this.cm=cm;var vert=this.vert=elt("div",[elt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),horiz=this.horiz=elt("div",[elt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");place(vert);place(horiz);on(vert,"scroll",function(){vert.clientHeight&&scroll(vert.scrollTop,"vertical")});on(horiz,"scroll",function(){horiz.clientWidth&&scroll(horiz.scrollLeft,"horizontal")});this.checkedOverlay=!1;ie&&8>ie_version&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function NullScrollbars(){}function initScrollbars(cm){if(cm.display.scrollbars){cm.display.scrollbars.clear();cm.display.scrollbars.addClass&&rmClass(cm.display.wrapper,cm.display.scrollbars.addClass)}cm.display.scrollbars=new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node){cm.display.wrapper.insertBefore(node,cm.display.scrollbarFiller);on(node,"mousedown",function(){cm.state.focused&&setTimeout(function(){cm.display.input.focus()},0)});node.setAttribute("cm-not-content","true")},function(pos,axis){"horizontal"==axis?setScrollLeft(cm,pos):setScrollTop(cm,pos)},cm);cm.display.scrollbars.addClass&&addClass(cm.display.wrapper,cm.display.scrollbars.addClass)}function updateScrollbars(cm,measure){measure||(measure=measureForScrollbars(cm));var startWidth=cm.display.barWidth,startHeight=cm.display.barHeight;updateScrollbarsInner(cm,measure);for(var i=0;4>i&&startWidth!=cm.display.barWidth||startHeight!=cm.display.barHeight;i++){startWidth!=cm.display.barWidth&&cm.options.lineWrapping&&updateHeightsInViewport(cm);updateScrollbarsInner(cm,measureForScrollbars(cm));startWidth=cm.display.barWidth;startHeight=cm.display.barHeight}}function updateScrollbarsInner(cm,measure){var d=cm.display,sizes=d.scrollbars.update(measure);d.sizer.style.paddingRight=(d.barWidth=sizes.right)+"px";d.sizer.style.paddingBottom=(d.barHeight=sizes.bottom)+"px";if(sizes.right&&sizes.bottom){d.scrollbarFiller.style.display="block";d.scrollbarFiller.style.height=sizes.bottom+"px";d.scrollbarFiller.style.width=sizes.right+"px"}else d.scrollbarFiller.style.display="";if(sizes.bottom&&cm.options.coverGutterNextToScrollbar&&cm.options.fixedGutter){d.gutterFiller.style.display="block";d.gutterFiller.style.height=sizes.bottom+"px";d.gutterFiller.style.width=measure.gutterWidth+"px"}else d.gutterFiller.style.display=""}function visibleLines(display,doc,viewport){var top=viewport&&null!=viewport.top?Math.max(0,viewport.top):display.scroller.scrollTop;top=Math.floor(top-paddingTop(display));var bottom=viewport&&null!=viewport.bottom?viewport.bottom:top+display.wrapper.clientHeight,from=lineAtHeight(doc,top),to=lineAtHeight(doc,bottom);if(viewport&&viewport.ensure){var ensureFrom=viewport.ensure.from.line,ensureTo=viewport.ensure.to.line;if(from>ensureFrom){from=ensureFrom;to=lineAtHeight(doc,heightAtLine(getLine(doc,ensureFrom))+display.wrapper.clientHeight)}else if(Math.min(ensureTo,doc.lastLine())>=to){from=lineAtHeight(doc,heightAtLine(getLine(doc,ensureTo))-display.wrapper.clientHeight);to=ensureTo}}return{from:from,to:Math.max(to,from+1)}}function alignHorizontally(cm){var display=cm.display,view=display.view;if(display.alignWidgets||display.gutters.firstChild&&cm.options.fixedGutter){for(var comp=compensateForHScroll(display)-display.scroller.scrollLeft+cm.doc.scrollLeft,gutterW=display.gutters.offsetWidth,left=comp+"px",i=0;i<view.length;i++)if(!view[i].hidden){cm.options.fixedGutter&&view[i].gutter&&(view[i].gutter.style.left=left);var align=view[i].alignable;if(align)for(var j=0;j<align.length;j++)align[j].style.left=left}cm.options.fixedGutter&&(display.gutters.style.left=comp+gutterW+"px")}}function maybeUpdateLineNumberWidth(cm){if(!cm.options.lineNumbers)return!1;var doc=cm.doc,last=lineNumberFor(cm.options,doc.first+doc.size-1),display=cm.display;if(last.length!=display.lineNumChars){var test=display.measure.appendChild(elt("div",[elt("div",last)],"CodeMirror-linenumber CodeMirror-gutter-elt")),innerW=test.firstChild.offsetWidth,padding=test.offsetWidth-innerW;display.lineGutter.style.width="";display.lineNumInnerWidth=Math.max(innerW,display.lineGutter.offsetWidth-padding)+1;display.lineNumWidth=display.lineNumInnerWidth+padding;display.lineNumChars=display.lineNumInnerWidth?last.length:-1;display.lineGutter.style.width=display.lineNumWidth+"px";updateGutterSpace(cm);return!0}return!1}function lineNumberFor(options,i){return String(options.lineNumberFormatter(i+options.firstLineNumber))}function compensateForHScroll(display){return display.scroller.getBoundingClientRect().left-display.sizer.getBoundingClientRect().left}function DisplayUpdate(cm,viewport,force){var display=cm.display;this.viewport=viewport;this.visible=visibleLines(display,cm.doc,viewport);this.editorIsHidden=!display.wrapper.offsetWidth;this.wrapperHeight=display.wrapper.clientHeight;this.wrapperWidth=display.wrapper.clientWidth;this.oldDisplayWidth=displayWidth(cm);this.force=force;this.dims=getDimensions(cm);this.events=[]}function maybeClipScrollbars(cm){var display=cm.display;if(!display.scrollbarsClipped&&display.scroller.offsetWidth){display.nativeBarWidth=display.scroller.offsetWidth-display.scroller.clientWidth;display.heightForcer.style.height=scrollGap(cm)+"px";display.sizer.style.marginBottom=-display.nativeBarWidth+"px";display.sizer.style.borderRightWidth=scrollGap(cm)+"px";display.scrollbarsClipped=!0}}function updateDisplayIfNeeded(cm,update){var display=cm.display,doc=cm.doc;if(update.editorIsHidden){resetView(cm);return!1}if(!update.force&&update.visible.from>=display.viewFrom&&update.visible.to<=display.viewTo&&(null==display.updateLineNumbers||display.updateLineNumbers>=display.viewTo)&&display.renderedView==display.view&&0==countDirtyView(cm))return!1;if(maybeUpdateLineNumberWidth(cm)){resetView(cm);update.dims=getDimensions(cm)}var end=doc.first+doc.size,from=Math.max(update.visible.from-cm.options.viewportMargin,doc.first),to=Math.min(end,update.visible.to+cm.options.viewportMargin);display.viewFrom<from&&from-display.viewFrom<20&&(from=Math.max(doc.first,display.viewFrom));display.viewTo>to&&display.viewTo-to<20&&(to=Math.min(end,display.viewTo));if(sawCollapsedSpans){from=visualLineNo(cm.doc,from);to=visualLineEndNo(cm.doc,to)}var different=from!=display.viewFrom||to!=display.viewTo||display.lastWrapHeight!=update.wrapperHeight||display.lastWrapWidth!=update.wrapperWidth;adjustView(cm,from,to);display.viewOffset=heightAtLine(getLine(cm.doc,display.viewFrom));cm.display.mover.style.top=display.viewOffset+"px";var toUpdate=countDirtyView(cm);if(!different&&0==toUpdate&&!update.force&&display.renderedView==display.view&&(null==display.updateLineNumbers||display.updateLineNumbers>=display.viewTo))return!1;var focused=activeElt();toUpdate>4&&(display.lineDiv.style.display="none");patchDisplay(cm,display.updateLineNumbers,update.dims);toUpdate>4&&(display.lineDiv.style.display="");display.renderedView=display.view;focused&&activeElt()!=focused&&focused.offsetHeight&&focused.focus();removeChildren(display.cursorDiv);removeChildren(display.selectionDiv);display.gutters.style.height=display.sizer.style.minHeight=0;if(different){display.lastWrapHeight=update.wrapperHeight;display.lastWrapWidth=update.wrapperWidth;startWorker(cm,400)}display.updateLineNumbers=null;return!0}function postUpdateDisplay(cm,update){for(var viewport=update.viewport,first=!0;;first=!1){if(!first||!cm.options.lineWrapping||update.oldDisplayWidth==displayWidth(cm)){viewport&&null!=viewport.top&&(viewport={top:Math.min(cm.doc.height+paddingVert(cm.display)-displayHeight(cm),viewport.top)});update.visible=visibleLines(cm.display,cm.doc,viewport);if(update.visible.from>=cm.display.viewFrom&&update.visible.to<=cm.display.viewTo)break}if(!updateDisplayIfNeeded(cm,update))break;updateHeightsInViewport(cm);var barMeasure=measureForScrollbars(cm);updateSelection(cm);setDocumentHeight(cm,barMeasure);updateScrollbars(cm,barMeasure)}update.signal(cm,"update",cm);if(cm.display.viewFrom!=cm.display.reportedViewFrom||cm.display.viewTo!=cm.display.reportedViewTo){update.signal(cm,"viewportChange",cm,cm.display.viewFrom,cm.display.viewTo);cm.display.reportedViewFrom=cm.display.viewFrom;cm.display.reportedViewTo=cm.display.viewTo}}function updateDisplaySimple(cm,viewport){var update=new DisplayUpdate(cm,viewport);if(updateDisplayIfNeeded(cm,update)){updateHeightsInViewport(cm);postUpdateDisplay(cm,update);var barMeasure=measureForScrollbars(cm);updateSelection(cm);setDocumentHeight(cm,barMeasure);updateScrollbars(cm,barMeasure);update.finish()}}function setDocumentHeight(cm,measure){cm.display.sizer.style.minHeight=measure.docHeight+"px";var total=measure.docHeight+cm.display.barHeight;cm.display.heightForcer.style.top=total+"px";cm.display.gutters.style.height=Math.max(total+scrollGap(cm),measure.clientHeight)+"px"}function updateHeightsInViewport(cm){for(var display=cm.display,prevBottom=display.lineDiv.offsetTop,i=0;i<display.view.length;i++){var height,cur=display.view[i];if(!cur.hidden){if(ie&&8>ie_version){var bot=cur.node.offsetTop+cur.node.offsetHeight;height=bot-prevBottom;prevBottom=bot}else{var box=cur.node.getBoundingClientRect();height=box.bottom-box.top}var diff=cur.line.height-height;2>height&&(height=textHeight(display));if(diff>.001||-.001>diff){updateLineHeight(cur.line,height);updateWidgetHeight(cur.line);if(cur.rest)for(var j=0;j<cur.rest.length;j++)updateWidgetHeight(cur.rest[j])}}}}function updateWidgetHeight(line){if(line.widgets)for(var i=0;i<line.widgets.length;++i)line.widgets[i].height=line.widgets[i].node.offsetHeight}function getDimensions(cm){for(var d=cm.display,left={},width={},gutterLeft=d.gutters.clientLeft,n=d.gutters.firstChild,i=0;n;n=n.nextSibling,++i){left[cm.options.gutters[i]]=n.offsetLeft+n.clientLeft+gutterLeft;width[cm.options.gutters[i]]=n.clientWidth}return{fixedPos:compensateForHScroll(d),gutterTotalWidth:d.gutters.offsetWidth,gutterLeft:left,gutterWidth:width,wrapperWidth:d.wrapper.clientWidth}}function patchDisplay(cm,updateNumbersFrom,dims){function rm(node){var next=node.nextSibling;webkit&&mac&&cm.display.currentWheelTarget==node?node.style.display="none":node.parentNode.removeChild(node);return next}for(var display=cm.display,lineNumbers=cm.options.lineNumbers,container=display.lineDiv,cur=container.firstChild,view=display.view,lineN=display.viewFrom,i=0;i<view.length;i++){var lineView=view[i];if(lineView.hidden);else if(lineView.node&&lineView.node.parentNode==container){for(;cur!=lineView.node;)cur=rm(cur);var updateNumber=lineNumbers&&null!=updateNumbersFrom&&lineN>=updateNumbersFrom&&lineView.lineNumber;if(lineView.changes){indexOf(lineView.changes,"gutter")>-1&&(updateNumber=!1);updateLineForChanges(cm,lineView,lineN,dims)}if(updateNumber){removeChildren(lineView.lineNumber);lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options,lineN)))}cur=lineView.node.nextSibling}else{var node=buildLineElement(cm,lineView,lineN,dims);container.insertBefore(node,cur)}lineN+=lineView.size}for(;cur;)cur=rm(cur)}function updateLineForChanges(cm,lineView,lineN,dims){for(var j=0;j<lineView.changes.length;j++){var type=lineView.changes[j];"text"==type?updateLineText(cm,lineView):"gutter"==type?updateLineGutter(cm,lineView,lineN,dims):"class"==type?updateLineClasses(lineView):"widget"==type&&updateLineWidgets(cm,lineView,dims)}lineView.changes=null}function ensureLineWrapped(lineView){if(lineView.node==lineView.text){lineView.node=elt("div",null,null,"position: relative");lineView.text.parentNode&&lineView.text.parentNode.replaceChild(lineView.node,lineView.text);lineView.node.appendChild(lineView.text);ie&&8>ie_version&&(lineView.node.style.zIndex=2)}return lineView.node}function updateLineBackground(lineView){var cls=lineView.bgClass?lineView.bgClass+" "+(lineView.line.bgClass||""):lineView.line.bgClass;cls&&(cls+=" CodeMirror-linebackground");if(lineView.background)if(cls)lineView.background.className=cls;else{lineView.background.parentNode.removeChild(lineView.background);lineView.background=null}else if(cls){var wrap=ensureLineWrapped(lineView);lineView.background=wrap.insertBefore(elt("div",null,cls),wrap.firstChild)}}function getLineContent(cm,lineView){var ext=cm.display.externalMeasured;if(ext&&ext.line==lineView.line){cm.display.externalMeasured=null;lineView.measure=ext.measure;return ext.built}return buildLineContent(cm,lineView)}function updateLineText(cm,lineView){var cls=lineView.text.className,built=getLineContent(cm,lineView);lineView.text==lineView.node&&(lineView.node=built.pre);lineView.text.parentNode.replaceChild(built.pre,lineView.text);lineView.text=built.pre;if(built.bgClass!=lineView.bgClass||built.textClass!=lineView.textClass){lineView.bgClass=built.bgClass;lineView.textClass=built.textClass;updateLineClasses(lineView)}else cls&&(lineView.text.className=cls)}function updateLineClasses(lineView){updateLineBackground(lineView);lineView.line.wrapClass?ensureLineWrapped(lineView).className=lineView.line.wrapClass:lineView.node!=lineView.text&&(lineView.node.className="");var textClass=lineView.textClass?lineView.textClass+" "+(lineView.line.textClass||""):lineView.line.textClass;lineView.text.className=textClass||""}function updateLineGutter(cm,lineView,lineN,dims){if(lineView.gutter){lineView.node.removeChild(lineView.gutter);lineView.gutter=null}if(lineView.gutterBackground){lineView.node.removeChild(lineView.gutterBackground);lineView.gutterBackground=null}if(lineView.line.gutterClass){var wrap=ensureLineWrapped(lineView);lineView.gutterBackground=elt("div",null,"CodeMirror-gutter-background "+lineView.line.gutterClass,"left: "+(cm.options.fixedGutter?dims.fixedPos:-dims.gutterTotalWidth)+"px; width: "+dims.gutterTotalWidth+"px");wrap.insertBefore(lineView.gutterBackground,lineView.text)}var markers=lineView.line.gutterMarkers;if(cm.options.lineNumbers||markers){var wrap=ensureLineWrapped(lineView),gutterWrap=lineView.gutter=elt("div",null,"CodeMirror-gutter-wrapper","left: "+(cm.options.fixedGutter?dims.fixedPos:-dims.gutterTotalWidth)+"px");cm.display.input.setUneditable(gutterWrap);wrap.insertBefore(gutterWrap,lineView.text);lineView.line.gutterClass&&(gutterWrap.className+=" "+lineView.line.gutterClass);!cm.options.lineNumbers||markers&&markers["CodeMirror-linenumbers"]||(lineView.lineNumber=gutterWrap.appendChild(elt("div",lineNumberFor(cm.options,lineN),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+dims.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+cm.display.lineNumInnerWidth+"px")));if(markers)for(var k=0;k<cm.options.gutters.length;++k){var id=cm.options.gutters[k],found=markers.hasOwnProperty(id)&&markers[id];found&&gutterWrap.appendChild(elt("div",[found],"CodeMirror-gutter-elt","left: "+dims.gutterLeft[id]+"px; width: "+dims.gutterWidth[id]+"px"))}}}function updateLineWidgets(cm,lineView,dims){lineView.alignable&&(lineView.alignable=null);for(var next,node=lineView.node.firstChild;node;node=next){var next=node.nextSibling;"CodeMirror-linewidget"==node.className&&lineView.node.removeChild(node)}insertLineWidgets(cm,lineView,dims)}function buildLineElement(cm,lineView,lineN,dims){var built=getLineContent(cm,lineView);lineView.text=lineView.node=built.pre;built.bgClass&&(lineView.bgClass=built.bgClass);built.textClass&&(lineView.textClass=built.textClass);updateLineClasses(lineView);updateLineGutter(cm,lineView,lineN,dims);insertLineWidgets(cm,lineView,dims);return lineView.node}function insertLineWidgets(cm,lineView,dims){insertLineWidgetsFor(cm,lineView.line,lineView,dims,!0);if(lineView.rest)for(var i=0;i<lineView.rest.length;i++)insertLineWidgetsFor(cm,lineView.rest[i],lineView,dims,!1)}function insertLineWidgetsFor(cm,line,lineView,dims,allowAbove){if(line.widgets)for(var wrap=ensureLineWrapped(lineView),i=0,ws=line.widgets;i<ws.length;++i){var widget=ws[i],node=elt("div",[widget.node],"CodeMirror-linewidget");widget.handleMouseEvents||node.setAttribute("cm-ignore-events","true");positionLineWidget(widget,node,lineView,dims);cm.display.input.setUneditable(node);allowAbove&&widget.above?wrap.insertBefore(node,lineView.gutter||lineView.text):wrap.appendChild(node);signalLater(widget,"redraw")}}function positionLineWidget(widget,node,lineView,dims){if(widget.noHScroll){(lineView.alignable||(lineView.alignable=[])).push(node);var width=dims.wrapperWidth;node.style.left=dims.fixedPos+"px";if(!widget.coverGutter){width-=dims.gutterTotalWidth;node.style.paddingLeft=dims.gutterTotalWidth+"px"}node.style.width=width+"px"}if(widget.coverGutter){node.style.zIndex=5;node.style.position="relative";widget.noHScroll||(node.style.marginLeft=-dims.gutterTotalWidth+"px")}}function copyPos(x){return Pos(x.line,x.ch)}function maxPos(a,b){return cmp(a,b)<0?b:a}function minPos(a,b){return cmp(a,b)<0?a:b}function ensureFocus(cm){if(!cm.state.focused){cm.display.input.focus();onFocus(cm)}}function isReadOnly(cm){return cm.options.readOnly||cm.doc.cantEdit}function applyTextInput(cm,inserted,deleted,sel,origin){var doc=cm.doc;cm.display.shift=!1;sel||(sel=doc.sel);var paste=cm.state.pasteIncoming||"paste"==origin,textLines=doc.splitLines(inserted),multiPaste=null;if(paste&&sel.ranges.length>1)if(lastCopied&&lastCopied.join("\n")==inserted){if(sel.ranges.length%lastCopied.length==0){multiPaste=[];for(var i=0;i<lastCopied.length;i++)multiPaste.push(doc.splitLines(lastCopied[i]))}}else textLines.length==sel.ranges.length&&(multiPaste=map(textLines,function(l){return[l]}));for(var i=sel.ranges.length-1;i>=0;i--){var range=sel.ranges[i],from=range.from(),to=range.to();range.empty()&&(deleted&&deleted>0?from=Pos(from.line,from.ch-deleted):cm.state.overwrite&&!paste&&(to=Pos(to.line,Math.min(getLine(doc,to.line).text.length,to.ch+lst(textLines).length))));var updateInput=cm.curOp.updateInput,changeEvent={from:from,to:to,text:multiPaste?multiPaste[i%multiPaste.length]:textLines,origin:origin||(paste?"paste":cm.state.cutIncoming?"cut":"+input")};makeChange(cm.doc,changeEvent);signalLater(cm,"inputRead",cm,changeEvent)}inserted&&!paste&&triggerElectric(cm,inserted);ensureCursorVisible(cm);cm.curOp.updateInput=updateInput;cm.curOp.typing=!0;cm.state.pasteIncoming=cm.state.cutIncoming=!1}function handlePaste(e,cm){var pasted=e.clipboardData&&e.clipboardData.getData("text/plain");if(pasted){e.preventDefault();isReadOnly(cm)||cm.options.disableInput||runInOp(cm,function(){applyTextInput(cm,pasted,0,null,"paste")});return!0}}function triggerElectric(cm,inserted){if(cm.options.electricChars&&cm.options.smartIndent)for(var sel=cm.doc.sel,i=sel.ranges.length-1;i>=0;i--){var range=sel.ranges[i];if(!(range.head.ch>100||i&&sel.ranges[i-1].head.line==range.head.line)){var mode=cm.getModeAt(range.head),indented=!1;if(mode.electricChars){for(var j=0;j<mode.electricChars.length;j++)if(inserted.indexOf(mode.electricChars.charAt(j))>-1){indented=indentLine(cm,range.head.line,"smart");break}}else mode.electricInput&&mode.electricInput.test(getLine(cm.doc,range.head.line).text.slice(0,range.head.ch))&&(indented=indentLine(cm,range.head.line,"smart"));indented&&signalLater(cm,"electricInput",cm,range.head.line)}}}function copyableRanges(cm){for(var text=[],ranges=[],i=0;i<cm.doc.sel.ranges.length;i++){var line=cm.doc.sel.ranges[i].head.line,lineRange={anchor:Pos(line,0),head:Pos(line+1,0)};ranges.push(lineRange);text.push(cm.getRange(lineRange.anchor,lineRange.head))}return{text:text,ranges:ranges}}function disableBrowserMagic(field){field.setAttribute("autocorrect","off");field.setAttribute("autocapitalize","off");field.setAttribute("spellcheck","false")}function TextareaInput(cm){this.cm=cm;this.prevInput="";this.pollingFast=!1;this.polling=new Delayed;this.inaccurateSelection=!1;this.hasSelection=!1;this.composing=null}function hiddenTextarea(){var te=elt("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),div=elt("div",[te],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");webkit?te.style.width="1000px":te.setAttribute("wrap","off");ios&&(te.style.border="1px solid black");disableBrowserMagic(te);return div}function ContentEditableInput(cm){this.cm=cm;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new Delayed;this.gracePeriod=!1}function posToDOM(cm,pos){var view=findViewForLine(cm,pos.line);if(!view||view.hidden)return null;var line=getLine(cm.doc,pos.line),info=mapFromLineView(view,line,pos.line),order=getOrder(line),side="left";if(order){var partPos=getBidiPartAt(order,pos.ch);side=partPos%2?"right":"left"}var result=nodeAndOffsetInLineMap(info.map,pos.ch,side);result.offset="right"==result.collapse?result.end:result.start;return result}function badPos(pos,bad){bad&&(pos.bad=!0);return pos}function domToPos(cm,node,offset){var lineNode;if(node==cm.display.lineDiv){lineNode=cm.display.lineDiv.childNodes[offset];if(!lineNode)return badPos(cm.clipPos(Pos(cm.display.viewTo-1)),!0);node=null;offset=0}else for(lineNode=node;;lineNode=lineNode.parentNode){if(!lineNode||lineNode==cm.display.lineDiv)return null;if(lineNode.parentNode&&lineNode.parentNode==cm.display.lineDiv)break}for(var i=0;i<cm.display.view.length;i++){var lineView=cm.display.view[i];if(lineView.node==lineNode)return locateNodeInLineView(lineView,node,offset)}}function locateNodeInLineView(lineView,node,offset){function find(textNode,topNode,offset){for(var i=-1;i<(maps?maps.length:0);i++)for(var map=0>i?measure.map:maps[i],j=0;j<map.length;j+=3){var curNode=map[j+2];if(curNode==textNode||curNode==topNode){var line=lineNo(0>i?lineView.line:lineView.rest[i]),ch=map[j]+offset;(0>offset||curNode!=textNode)&&(ch=map[j+(offset?1:0)]);return Pos(line,ch)}}}var wrapper=lineView.text.firstChild,bad=!1;if(!node||!contains(wrapper,node))return badPos(Pos(lineNo(lineView.line),0),!0);if(node==wrapper){bad=!0;node=wrapper.childNodes[offset];offset=0;if(!node){var line=lineView.rest?lst(lineView.rest):lineView.line;return badPos(Pos(lineNo(line),line.text.length),bad)}}var textNode=3==node.nodeType?node:null,topNode=node;if(!textNode&&1==node.childNodes.length&&3==node.firstChild.nodeType){textNode=node.firstChild;offset&&(offset=textNode.nodeValue.length)}for(;topNode.parentNode!=wrapper;)topNode=topNode.parentNode;var measure=lineView.measure,maps=measure.maps,found=find(textNode,topNode,offset);if(found)return badPos(found,bad);for(var after=topNode.nextSibling,dist=textNode?textNode.nodeValue.length-offset:0;after;after=after.nextSibling){found=find(after,after.firstChild,0);if(found)return badPos(Pos(found.line,found.ch-dist),bad);dist+=after.textContent.length}for(var before=topNode.previousSibling,dist=offset;before;before=before.previousSibling){found=find(before,before.firstChild,-1);if(found)return badPos(Pos(found.line,found.ch+dist),bad);dist+=after.textContent.length}}function domTextBetween(cm,from,to,fromLine,toLine){function recognizeMarker(id){return function(marker){return marker.id==id}}function walk(node){if(1==node.nodeType){var cmText=node.getAttribute("cm-text");if(null!=cmText){""==cmText&&(cmText=node.textContent.replace(/\u200b/g,""));text+=cmText;return}var range,markerID=node.getAttribute("cm-marker");if(markerID){var found=cm.findMarks(Pos(fromLine,0),Pos(toLine+1,0),recognizeMarker(+markerID));found.length&&(range=found[0].find())&&(text+=getBetween(cm.doc,range.from,range.to).join(lineSep));return}if("false"==node.getAttribute("contenteditable"))return;for(var i=0;i<node.childNodes.length;i++)walk(node.childNodes[i]);/^(pre|div|p)$/i.test(node.nodeName)&&(closing=!0)}else if(3==node.nodeType){var val=node.nodeValue;if(!val)return;if(closing){text+=lineSep;closing=!1}text+=val}}for(var text="",closing=!1,lineSep=cm.doc.lineSeparator();;){walk(from);if(from==to)break;from=from.nextSibling}return text}function Selection(ranges,primIndex){this.ranges=ranges;this.primIndex=primIndex}function Range(anchor,head){this.anchor=anchor;this.head=head}function normalizeSelection(ranges,primIndex){var prim=ranges[primIndex];ranges.sort(function(a,b){return cmp(a.from(),b.from())});primIndex=indexOf(ranges,prim);for(var i=1;i<ranges.length;i++){var cur=ranges[i],prev=ranges[i-1];if(cmp(prev.to(),cur.from())>=0){var from=minPos(prev.from(),cur.from()),to=maxPos(prev.to(),cur.to()),inv=prev.empty()?cur.from()==cur.head:prev.from()==prev.head;primIndex>=i&&--primIndex;ranges.splice(--i,2,new Range(inv?to:from,inv?from:to))}}return new Selection(ranges,primIndex)}function simpleSelection(anchor,head){return new Selection([new Range(anchor,head||anchor)],0)}function clipLine(doc,n){return Math.max(doc.first,Math.min(n,doc.first+doc.size-1))}function clipPos(doc,pos){if(pos.line<doc.first)return Pos(doc.first,0);
2
+ var last=doc.first+doc.size-1;return pos.line>last?Pos(last,getLine(doc,last).text.length):clipToLen(pos,getLine(doc,pos.line).text.length)}function clipToLen(pos,linelen){var ch=pos.ch;return null==ch||ch>linelen?Pos(pos.line,linelen):0>ch?Pos(pos.line,0):pos}function isLine(doc,l){return l>=doc.first&&l<doc.first+doc.size}function clipPosArray(doc,array){for(var out=[],i=0;i<array.length;i++)out[i]=clipPos(doc,array[i]);return out}function extendRange(doc,range,head,other){if(doc.cm&&doc.cm.display.shift||doc.extend){var anchor=range.anchor;if(other){var posBefore=cmp(head,anchor)<0;if(posBefore!=cmp(other,anchor)<0){anchor=head;head=other}else posBefore!=cmp(head,other)<0&&(head=other)}return new Range(anchor,head)}return new Range(other||head,head)}function extendSelection(doc,head,other,options){setSelection(doc,new Selection([extendRange(doc,doc.sel.primary(),head,other)],0),options)}function extendSelections(doc,heads,options){for(var out=[],i=0;i<doc.sel.ranges.length;i++)out[i]=extendRange(doc,doc.sel.ranges[i],heads[i],null);var newSel=normalizeSelection(out,doc.sel.primIndex);setSelection(doc,newSel,options)}function replaceOneSelection(doc,i,range,options){var ranges=doc.sel.ranges.slice(0);ranges[i]=range;setSelection(doc,normalizeSelection(ranges,doc.sel.primIndex),options)}function setSimpleSelection(doc,anchor,head,options){setSelection(doc,simpleSelection(anchor,head),options)}function filterSelectionChange(doc,sel){var obj={ranges:sel.ranges,update:function(ranges){this.ranges=[];for(var i=0;i<ranges.length;i++)this.ranges[i]=new Range(clipPos(doc,ranges[i].anchor),clipPos(doc,ranges[i].head))}};signal(doc,"beforeSelectionChange",doc,obj);doc.cm&&signal(doc.cm,"beforeSelectionChange",doc.cm,obj);return obj.ranges!=sel.ranges?normalizeSelection(obj.ranges,obj.ranges.length-1):sel}function setSelectionReplaceHistory(doc,sel,options){var done=doc.history.done,last=lst(done);if(last&&last.ranges){done[done.length-1]=sel;setSelectionNoUndo(doc,sel,options)}else setSelection(doc,sel,options)}function setSelection(doc,sel,options){setSelectionNoUndo(doc,sel,options);addSelectionToHistory(doc,doc.sel,doc.cm?doc.cm.curOp.id:NaN,options)}function setSelectionNoUndo(doc,sel,options){(hasHandler(doc,"beforeSelectionChange")||doc.cm&&hasHandler(doc.cm,"beforeSelectionChange"))&&(sel=filterSelectionChange(doc,sel));var bias=options&&options.bias||(cmp(sel.primary().head,doc.sel.primary().head)<0?-1:1);setSelectionInner(doc,skipAtomicInSelection(doc,sel,bias,!0));options&&options.scroll===!1||!doc.cm||ensureCursorVisible(doc.cm)}function setSelectionInner(doc,sel){if(!sel.equals(doc.sel)){doc.sel=sel;if(doc.cm){doc.cm.curOp.updateInput=doc.cm.curOp.selectionChanged=!0;signalCursorActivity(doc.cm)}signalLater(doc,"cursorActivity",doc)}}function reCheckSelection(doc){setSelectionInner(doc,skipAtomicInSelection(doc,doc.sel,null,!1),sel_dontScroll)}function skipAtomicInSelection(doc,sel,bias,mayClear){for(var out,i=0;i<sel.ranges.length;i++){var range=sel.ranges[i],newAnchor=skipAtomic(doc,range.anchor,bias,mayClear),newHead=skipAtomic(doc,range.head,bias,mayClear);if(out||newAnchor!=range.anchor||newHead!=range.head){out||(out=sel.ranges.slice(0,i));out[i]=new Range(newAnchor,newHead)}}return out?normalizeSelection(out,sel.primIndex):sel}function skipAtomic(doc,pos,bias,mayClear){var flipped=!1,curPos=pos,dir=bias||1;doc.cantEdit=!1;search:for(;;){var line=getLine(doc,curPos.line);if(line.markedSpans)for(var i=0;i<line.markedSpans.length;++i){var sp=line.markedSpans[i],m=sp.marker;if((null==sp.from||(m.inclusiveLeft?sp.from<=curPos.ch:sp.from<curPos.ch))&&(null==sp.to||(m.inclusiveRight?sp.to>=curPos.ch:sp.to>curPos.ch))){if(mayClear){signal(m,"beforeCursorEnter");if(m.explicitlyCleared){if(line.markedSpans){--i;continue}break}}if(!m.atomic)continue;var newPos=m.find(0>dir?-1:1);if(0==cmp(newPos,curPos)){newPos.ch+=dir;newPos.ch<0?newPos=newPos.line>doc.first?clipPos(doc,Pos(newPos.line-1)):null:newPos.ch>line.text.length&&(newPos=newPos.line<doc.first+doc.size-1?Pos(newPos.line+1,0):null);if(!newPos){if(flipped){if(!mayClear)return skipAtomic(doc,pos,bias,!0);doc.cantEdit=!0;return Pos(doc.first,0)}flipped=!0;newPos=pos;dir=-dir}}curPos=newPos;continue search}}return curPos}}function updateSelection(cm){cm.display.input.showSelection(cm.display.input.prepareSelection())}function prepareSelection(cm,primary){for(var doc=cm.doc,result={},curFragment=result.cursors=document.createDocumentFragment(),selFragment=result.selection=document.createDocumentFragment(),i=0;i<doc.sel.ranges.length;i++)if(primary!==!1||i!=doc.sel.primIndex){var range=doc.sel.ranges[i],collapsed=range.empty();(collapsed||cm.options.showCursorWhenSelecting)&&drawSelectionCursor(cm,range.head,curFragment);collapsed||drawSelectionRange(cm,range,selFragment)}return result}function drawSelectionCursor(cm,head,output){var pos=cursorCoords(cm,head,"div",null,null,!cm.options.singleCursorHeightPerLine),cursor=output.appendChild(elt("div"," ","CodeMirror-cursor"));cursor.style.left=pos.left+"px";cursor.style.top=pos.top+"px";cursor.style.height=Math.max(0,pos.bottom-pos.top)*cm.options.cursorHeight+"px";if(pos.other){var otherCursor=output.appendChild(elt("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));otherCursor.style.display="";otherCursor.style.left=pos.other.left+"px";otherCursor.style.top=pos.other.top+"px";otherCursor.style.height=.85*(pos.other.bottom-pos.other.top)+"px"}}function drawSelectionRange(cm,range,output){function add(left,top,width,bottom){0>top&&(top=0);top=Math.round(top);bottom=Math.round(bottom);fragment.appendChild(elt("div",null,"CodeMirror-selected","position: absolute; left: "+left+"px; top: "+top+"px; width: "+(null==width?rightSide-left:width)+"px; height: "+(bottom-top)+"px"))}function drawForLine(line,fromArg,toArg){function coords(ch,bias){return charCoords(cm,Pos(line,ch),"div",lineObj,bias)}var start,end,lineObj=getLine(doc,line),lineLen=lineObj.text.length;iterateBidiSections(getOrder(lineObj),fromArg||0,null==toArg?lineLen:toArg,function(from,to,dir){var rightPos,left,right,leftPos=coords(from,"left");if(from==to){rightPos=leftPos;left=right=leftPos.left}else{rightPos=coords(to-1,"right");if("rtl"==dir){var tmp=leftPos;leftPos=rightPos;rightPos=tmp}left=leftPos.left;right=rightPos.right}null==fromArg&&0==from&&(left=leftSide);if(rightPos.top-leftPos.top>3){add(left,leftPos.top,null,leftPos.bottom);left=leftSide;leftPos.bottom<rightPos.top&&add(left,leftPos.bottom,null,rightPos.top)}null==toArg&&to==lineLen&&(right=rightSide);(!start||leftPos.top<start.top||leftPos.top==start.top&&leftPos.left<start.left)&&(start=leftPos);(!end||rightPos.bottom>end.bottom||rightPos.bottom==end.bottom&&rightPos.right>end.right)&&(end=rightPos);leftSide+1>left&&(left=leftSide);add(left,rightPos.top,right-left,rightPos.bottom)});return{start:start,end:end}}var display=cm.display,doc=cm.doc,fragment=document.createDocumentFragment(),padding=paddingH(cm.display),leftSide=padding.left,rightSide=Math.max(display.sizerWidth,displayWidth(cm)-display.sizer.offsetLeft)-padding.right,sFrom=range.from(),sTo=range.to();if(sFrom.line==sTo.line)drawForLine(sFrom.line,sFrom.ch,sTo.ch);else{var fromLine=getLine(doc,sFrom.line),toLine=getLine(doc,sTo.line),singleVLine=visualLine(fromLine)==visualLine(toLine),leftEnd=drawForLine(sFrom.line,sFrom.ch,singleVLine?fromLine.text.length+1:null).end,rightStart=drawForLine(sTo.line,singleVLine?0:null,sTo.ch).start;if(singleVLine)if(leftEnd.top<rightStart.top-2){add(leftEnd.right,leftEnd.top,null,leftEnd.bottom);add(leftSide,rightStart.top,rightStart.left,rightStart.bottom)}else add(leftEnd.right,leftEnd.top,rightStart.left-leftEnd.right,leftEnd.bottom);leftEnd.bottom<rightStart.top&&add(leftSide,leftEnd.bottom,null,rightStart.top)}output.appendChild(fragment)}function restartBlink(cm){if(cm.state.focused){var display=cm.display;clearInterval(display.blinker);var on=!0;display.cursorDiv.style.visibility="";cm.options.cursorBlinkRate>0?display.blinker=setInterval(function(){display.cursorDiv.style.visibility=(on=!on)?"":"hidden"},cm.options.cursorBlinkRate):cm.options.cursorBlinkRate<0&&(display.cursorDiv.style.visibility="hidden")}}function startWorker(cm,time){cm.doc.mode.startState&&cm.doc.frontier<cm.display.viewTo&&cm.state.highlight.set(time,bind(highlightWorker,cm))}function highlightWorker(cm){var doc=cm.doc;doc.frontier<doc.first&&(doc.frontier=doc.first);if(!(doc.frontier>=cm.display.viewTo)){var end=+new Date+cm.options.workTime,state=copyState(doc.mode,getStateBefore(cm,doc.frontier)),changedLines=[];doc.iter(doc.frontier,Math.min(doc.first+doc.size,cm.display.viewTo+500),function(line){if(doc.frontier>=cm.display.viewFrom){var oldStyles=line.styles,tooLong=line.text.length>cm.options.maxHighlightLength,highlighted=highlightLine(cm,line,tooLong?copyState(doc.mode,state):state,!0);line.styles=highlighted.styles;var oldCls=line.styleClasses,newCls=highlighted.classes;newCls?line.styleClasses=newCls:oldCls&&(line.styleClasses=null);for(var ischange=!oldStyles||oldStyles.length!=line.styles.length||oldCls!=newCls&&(!oldCls||!newCls||oldCls.bgClass!=newCls.bgClass||oldCls.textClass!=newCls.textClass),i=0;!ischange&&i<oldStyles.length;++i)ischange=oldStyles[i]!=line.styles[i];ischange&&changedLines.push(doc.frontier);line.stateAfter=tooLong?state:copyState(doc.mode,state)}else{line.text.length<=cm.options.maxHighlightLength&&processLine(cm,line.text,state);line.stateAfter=doc.frontier%5==0?copyState(doc.mode,state):null}++doc.frontier;if(+new Date>end){startWorker(cm,cm.options.workDelay);return!0}});changedLines.length&&runInOp(cm,function(){for(var i=0;i<changedLines.length;i++)regLineChange(cm,changedLines[i],"text")})}}function findStartLine(cm,n,precise){for(var minindent,minline,doc=cm.doc,lim=precise?-1:n-(cm.doc.mode.innerMode?1e3:100),search=n;search>lim;--search){if(search<=doc.first)return doc.first;var line=getLine(doc,search-1);if(line.stateAfter&&(!precise||search<=doc.frontier))return search;var indented=countColumn(line.text,null,cm.options.tabSize);if(null==minline||minindent>indented){minline=search-1;minindent=indented}}return minline}function getStateBefore(cm,n,precise){var doc=cm.doc,display=cm.display;if(!doc.mode.startState)return!0;var pos=findStartLine(cm,n,precise),state=pos>doc.first&&getLine(doc,pos-1).stateAfter;state=state?copyState(doc.mode,state):startState(doc.mode);doc.iter(pos,n,function(line){processLine(cm,line.text,state);var save=pos==n-1||pos%5==0||pos>=display.viewFrom&&pos<display.viewTo;line.stateAfter=save?copyState(doc.mode,state):null;++pos});precise&&(doc.frontier=pos);return state}function paddingTop(display){return display.lineSpace.offsetTop}function paddingVert(display){return display.mover.offsetHeight-display.lineSpace.offsetHeight}function paddingH(display){if(display.cachedPaddingH)return display.cachedPaddingH;var e=removeChildrenAndAdd(display.measure,elt("pre","x")),style=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,data={left:parseInt(style.paddingLeft),right:parseInt(style.paddingRight)};isNaN(data.left)||isNaN(data.right)||(display.cachedPaddingH=data);return data}function scrollGap(cm){return scrollerGap-cm.display.nativeBarWidth}function displayWidth(cm){return cm.display.scroller.clientWidth-scrollGap(cm)-cm.display.barWidth}function displayHeight(cm){return cm.display.scroller.clientHeight-scrollGap(cm)-cm.display.barHeight}function ensureLineHeights(cm,lineView,rect){var wrapping=cm.options.lineWrapping,curWidth=wrapping&&displayWidth(cm);if(!lineView.measure.heights||wrapping&&lineView.measure.width!=curWidth){var heights=lineView.measure.heights=[];if(wrapping){lineView.measure.width=curWidth;for(var rects=lineView.text.firstChild.getClientRects(),i=0;i<rects.length-1;i++){var cur=rects[i],next=rects[i+1];Math.abs(cur.bottom-next.bottom)>2&&heights.push((cur.bottom+next.top)/2-rect.top)}}heights.push(rect.bottom-rect.top)}}function mapFromLineView(lineView,line,lineN){if(lineView.line==line)return{map:lineView.measure.map,cache:lineView.measure.cache};for(var i=0;i<lineView.rest.length;i++)if(lineView.rest[i]==line)return{map:lineView.measure.maps[i],cache:lineView.measure.caches[i]};for(var i=0;i<lineView.rest.length;i++)if(lineNo(lineView.rest[i])>lineN)return{map:lineView.measure.maps[i],cache:lineView.measure.caches[i],before:!0}}function updateExternalMeasurement(cm,line){line=visualLine(line);var lineN=lineNo(line),view=cm.display.externalMeasured=new LineView(cm.doc,line,lineN);view.lineN=lineN;var built=view.built=buildLineContent(cm,view);view.text=built.pre;removeChildrenAndAdd(cm.display.lineMeasure,built.pre);return view}function measureChar(cm,line,ch,bias){return measureCharPrepared(cm,prepareMeasureForLine(cm,line),ch,bias)}function findViewForLine(cm,lineN){if(lineN>=cm.display.viewFrom&&lineN<cm.display.viewTo)return cm.display.view[findViewIndex(cm,lineN)];var ext=cm.display.externalMeasured;return ext&&lineN>=ext.lineN&&lineN<ext.lineN+ext.size?ext:void 0}function prepareMeasureForLine(cm,line){var lineN=lineNo(line),view=findViewForLine(cm,lineN);if(view&&!view.text)view=null;else if(view&&view.changes){updateLineForChanges(cm,view,lineN,getDimensions(cm));cm.curOp.forceUpdate=!0}view||(view=updateExternalMeasurement(cm,line));var info=mapFromLineView(view,line,lineN);return{line:line,view:view,rect:null,map:info.map,cache:info.cache,before:info.before,hasHeights:!1}}function measureCharPrepared(cm,prepared,ch,bias,varHeight){prepared.before&&(ch=-1);var found,key=ch+(bias||"");if(prepared.cache.hasOwnProperty(key))found=prepared.cache[key];else{prepared.rect||(prepared.rect=prepared.view.text.getBoundingClientRect());if(!prepared.hasHeights){ensureLineHeights(cm,prepared.view,prepared.rect);prepared.hasHeights=!0}found=measureCharInner(cm,prepared,ch,bias);found.bogus||(prepared.cache[key]=found)}return{left:found.left,right:found.right,top:varHeight?found.rtop:found.top,bottom:varHeight?found.rbottom:found.bottom}}function nodeAndOffsetInLineMap(map,ch,bias){for(var node,start,end,collapse,i=0;i<map.length;i+=3){var mStart=map[i],mEnd=map[i+1];if(mStart>ch){start=0;end=1;collapse="left"}else if(mEnd>ch){start=ch-mStart;end=start+1}else if(i==map.length-3||ch==mEnd&&map[i+3]>ch){end=mEnd-mStart;start=end-1;ch>=mEnd&&(collapse="right")}if(null!=start){node=map[i+2];mStart==mEnd&&bias==(node.insertLeft?"left":"right")&&(collapse=bias);if("left"==bias&&0==start)for(;i&&map[i-2]==map[i-3]&&map[i-1].insertLeft;){node=map[(i-=3)+2];collapse="left"}if("right"==bias&&start==mEnd-mStart)for(;i<map.length-3&&map[i+3]==map[i+4]&&!map[i+5].insertLeft;){node=map[(i+=3)+2];collapse="right"}break}}return{node:node,start:start,end:end,collapse:collapse,coverStart:mStart,coverEnd:mEnd}}function measureCharInner(cm,prepared,ch,bias){var rect,place=nodeAndOffsetInLineMap(prepared.map,ch,bias),node=place.node,start=place.start,end=place.end,collapse=place.collapse;if(3==node.nodeType){for(var i=0;4>i;i++){for(;start&&isExtendingChar(prepared.line.text.charAt(place.coverStart+start));)--start;for(;place.coverStart+end<place.coverEnd&&isExtendingChar(prepared.line.text.charAt(place.coverStart+end));)++end;if(ie&&9>ie_version&&0==start&&end==place.coverEnd-place.coverStart)rect=node.parentNode.getBoundingClientRect();else if(ie&&cm.options.lineWrapping){var rects=range(node,start,end).getClientRects();rect=rects.length?rects["right"==bias?rects.length-1:0]:nullRect}else rect=range(node,start,end).getBoundingClientRect()||nullRect;if(rect.left||rect.right||0==start)break;end=start;start-=1;collapse="right"}ie&&11>ie_version&&(rect=maybeUpdateRectForZooming(cm.display.measure,rect))}else{start>0&&(collapse=bias="right");var rects;rect=cm.options.lineWrapping&&(rects=node.getClientRects()).length>1?rects["right"==bias?rects.length-1:0]:node.getBoundingClientRect()}if(ie&&9>ie_version&&!start&&(!rect||!rect.left&&!rect.right)){var rSpan=node.parentNode.getClientRects()[0];rect=rSpan?{left:rSpan.left,right:rSpan.left+charWidth(cm.display),top:rSpan.top,bottom:rSpan.bottom}:nullRect}for(var rtop=rect.top-prepared.rect.top,rbot=rect.bottom-prepared.rect.top,mid=(rtop+rbot)/2,heights=prepared.view.measure.heights,i=0;i<heights.length-1&&!(mid<heights[i]);i++);var top=i?heights[i-1]:0,bot=heights[i],result={left:("right"==collapse?rect.right:rect.left)-prepared.rect.left,right:("left"==collapse?rect.left:rect.right)-prepared.rect.left,top:top,bottom:bot};rect.left||rect.right||(result.bogus=!0);if(!cm.options.singleCursorHeightPerLine){result.rtop=rtop;result.rbottom=rbot}return result}function maybeUpdateRectForZooming(measure,rect){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!hasBadZoomedRects(measure))return rect;var scaleX=screen.logicalXDPI/screen.deviceXDPI,scaleY=screen.logicalYDPI/screen.deviceYDPI;return{left:rect.left*scaleX,right:rect.right*scaleX,top:rect.top*scaleY,bottom:rect.bottom*scaleY}}function clearLineMeasurementCacheFor(lineView){if(lineView.measure){lineView.measure.cache={};lineView.measure.heights=null;if(lineView.rest)for(var i=0;i<lineView.rest.length;i++)lineView.measure.caches[i]={}}}function clearLineMeasurementCache(cm){cm.display.externalMeasure=null;removeChildren(cm.display.lineMeasure);for(var i=0;i<cm.display.view.length;i++)clearLineMeasurementCacheFor(cm.display.view[i])}function clearCaches(cm){clearLineMeasurementCache(cm);cm.display.cachedCharWidth=cm.display.cachedTextHeight=cm.display.cachedPaddingH=null;cm.options.lineWrapping||(cm.display.maxLineChanged=!0);cm.display.lineNumChars=null}function pageScrollX(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pageScrollY(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function intoCoordSystem(cm,lineObj,rect,context){if(lineObj.widgets)for(var i=0;i<lineObj.widgets.length;++i)if(lineObj.widgets[i].above){var size=widgetHeight(lineObj.widgets[i]);rect.top+=size;rect.bottom+=size}if("line"==context)return rect;context||(context="local");var yOff=heightAtLine(lineObj);"local"==context?yOff+=paddingTop(cm.display):yOff-=cm.display.viewOffset;if("page"==context||"window"==context){var lOff=cm.display.lineSpace.getBoundingClientRect();yOff+=lOff.top+("window"==context?0:pageScrollY());var xOff=lOff.left+("window"==context?0:pageScrollX());rect.left+=xOff;rect.right+=xOff}rect.top+=yOff;rect.bottom+=yOff;return rect}function fromCoordSystem(cm,coords,context){if("div"==context)return coords;var left=coords.left,top=coords.top;if("page"==context){left-=pageScrollX();top-=pageScrollY()}else if("local"==context||!context){var localBox=cm.display.sizer.getBoundingClientRect();left+=localBox.left;top+=localBox.top}var lineSpaceBox=cm.display.lineSpace.getBoundingClientRect();return{left:left-lineSpaceBox.left,top:top-lineSpaceBox.top}}function charCoords(cm,pos,context,lineObj,bias){lineObj||(lineObj=getLine(cm.doc,pos.line));return intoCoordSystem(cm,lineObj,measureChar(cm,lineObj,pos.ch,bias),context)}function cursorCoords(cm,pos,context,lineObj,preparedMeasure,varHeight){function get(ch,right){var m=measureCharPrepared(cm,preparedMeasure,ch,right?"right":"left",varHeight);right?m.left=m.right:m.right=m.left;return intoCoordSystem(cm,lineObj,m,context)}function getBidi(ch,partPos){var part=order[partPos],right=part.level%2;if(ch==bidiLeft(part)&&partPos&&part.level<order[partPos-1].level){part=order[--partPos];ch=bidiRight(part)-(part.level%2?0:1);right=!0}else if(ch==bidiRight(part)&&partPos<order.length-1&&part.level<order[partPos+1].level){part=order[++partPos];ch=bidiLeft(part)-part.level%2;right=!1}return right&&ch==part.to&&ch>part.from?get(ch-1):get(ch,right)}lineObj=lineObj||getLine(cm.doc,pos.line);preparedMeasure||(preparedMeasure=prepareMeasureForLine(cm,lineObj));var order=getOrder(lineObj),ch=pos.ch;if(!order)return get(ch);var partPos=getBidiPartAt(order,ch),val=getBidi(ch,partPos);null!=bidiOther&&(val.other=getBidi(ch,bidiOther));return val}function estimateCoords(cm,pos){var left=0,pos=clipPos(cm.doc,pos);cm.options.lineWrapping||(left=charWidth(cm.display)*pos.ch);var lineObj=getLine(cm.doc,pos.line),top=heightAtLine(lineObj)+paddingTop(cm.display);return{left:left,right:left,top:top,bottom:top+lineObj.height}}function PosWithInfo(line,ch,outside,xRel){var pos=Pos(line,ch);pos.xRel=xRel;outside&&(pos.outside=!0);return pos}function coordsChar(cm,x,y){var doc=cm.doc;y+=cm.display.viewOffset;if(0>y)return PosWithInfo(doc.first,0,!0,-1);var lineN=lineAtHeight(doc,y),last=doc.first+doc.size-1;if(lineN>last)return PosWithInfo(doc.first+doc.size-1,getLine(doc,last).text.length,!0,1);0>x&&(x=0);for(var lineObj=getLine(doc,lineN);;){var found=coordsCharInner(cm,lineObj,lineN,x,y),merged=collapsedSpanAtEnd(lineObj),mergedPos=merged&&merged.find(0,!0);if(!merged||!(found.ch>mergedPos.from.ch||found.ch==mergedPos.from.ch&&found.xRel>0))return found;lineN=lineNo(lineObj=mergedPos.to.line)}}function coordsCharInner(cm,lineObj,lineNo,x,y){function getX(ch){var sp=cursorCoords(cm,Pos(lineNo,ch),"line",lineObj,preparedMeasure);wrongLine=!0;if(innerOff>sp.bottom)return sp.left-adjust;if(innerOff<sp.top)return sp.left+adjust;wrongLine=!1;return sp.left}var innerOff=y-heightAtLine(lineObj),wrongLine=!1,adjust=2*cm.display.wrapper.clientWidth,preparedMeasure=prepareMeasureForLine(cm,lineObj),bidi=getOrder(lineObj),dist=lineObj.text.length,from=lineLeft(lineObj),to=lineRight(lineObj),fromX=getX(from),fromOutside=wrongLine,toX=getX(to),toOutside=wrongLine;if(x>toX)return PosWithInfo(lineNo,to,toOutside,1);for(;;){if(bidi?to==from||to==moveVisually(lineObj,from,1):1>=to-from){for(var ch=fromX>x||toX-x>=x-fromX?from:to,xDiff=x-(ch==from?fromX:toX);isExtendingChar(lineObj.text.charAt(ch));)++ch;var pos=PosWithInfo(lineNo,ch,ch==from?fromOutside:toOutside,-1>xDiff?-1:xDiff>1?1:0);return pos}var step=Math.ceil(dist/2),middle=from+step;if(bidi){middle=from;for(var i=0;step>i;++i)middle=moveVisually(lineObj,middle,1)}var middleX=getX(middle);if(middleX>x){to=middle;toX=middleX;(toOutside=wrongLine)&&(toX+=1e3);dist=step}else{from=middle;fromX=middleX;fromOutside=wrongLine;dist-=step}}}function textHeight(display){if(null!=display.cachedTextHeight)return display.cachedTextHeight;if(null==measureText){measureText=elt("pre");for(var i=0;49>i;++i){measureText.appendChild(document.createTextNode("x"));measureText.appendChild(elt("br"))}measureText.appendChild(document.createTextNode("x"))}removeChildrenAndAdd(display.measure,measureText);var height=measureText.offsetHeight/50;height>3&&(display.cachedTextHeight=height);removeChildren(display.measure);return height||1}function charWidth(display){if(null!=display.cachedCharWidth)return display.cachedCharWidth;var anchor=elt("span","xxxxxxxxxx"),pre=elt("pre",[anchor]);removeChildrenAndAdd(display.measure,pre);var rect=anchor.getBoundingClientRect(),width=(rect.right-rect.left)/10;width>2&&(display.cachedCharWidth=width);return width||10}function startOperation(cm){cm.curOp={cm:cm,viewChanged:!1,startHeight:cm.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++nextOpId};operationGroup?operationGroup.ops.push(cm.curOp):cm.curOp.ownsGroup=operationGroup={ops:[cm.curOp],delayedCallbacks:[]}}function fireCallbacksForOps(group){var callbacks=group.delayedCallbacks,i=0;do{for(;i<callbacks.length;i++)callbacks[i].call(null);for(var j=0;j<group.ops.length;j++){var op=group.ops[j];if(op.cursorActivityHandlers)for(;op.cursorActivityCalled<op.cursorActivityHandlers.length;)op.cursorActivityHandlers[op.cursorActivityCalled++].call(null,op.cm)}}while(i<callbacks.length)}function endOperation(cm){var op=cm.curOp,group=op.ownsGroup;if(group)try{fireCallbacksForOps(group)}finally{operationGroup=null;for(var i=0;i<group.ops.length;i++)group.ops[i].cm.curOp=null;endOperations(group)}}function endOperations(group){for(var ops=group.ops,i=0;i<ops.length;i++)endOperation_R1(ops[i]);for(var i=0;i<ops.length;i++)endOperation_W1(ops[i]);for(var i=0;i<ops.length;i++)endOperation_R2(ops[i]);for(var i=0;i<ops.length;i++)endOperation_W2(ops[i]);for(var i=0;i<ops.length;i++)endOperation_finish(ops[i])}function endOperation_R1(op){var cm=op.cm,display=cm.display;maybeClipScrollbars(cm);op.updateMaxLine&&findMaxLine(cm);op.mustUpdate=op.viewChanged||op.forceUpdate||null!=op.scrollTop||op.scrollToPos&&(op.scrollToPos.from.line<display.viewFrom||op.scrollToPos.to.line>=display.viewTo)||display.maxLineChanged&&cm.options.lineWrapping;op.update=op.mustUpdate&&new DisplayUpdate(cm,op.mustUpdate&&{top:op.scrollTop,ensure:op.scrollToPos},op.forceUpdate)}function endOperation_W1(op){op.updatedDisplay=op.mustUpdate&&updateDisplayIfNeeded(op.cm,op.update)}function endOperation_R2(op){var cm=op.cm,display=cm.display;op.updatedDisplay&&updateHeightsInViewport(cm);op.barMeasure=measureForScrollbars(cm);if(display.maxLineChanged&&!cm.options.lineWrapping){op.adjustWidthTo=measureChar(cm,display.maxLine,display.maxLine.text.length).left+3;cm.display.sizerWidth=op.adjustWidthTo;op.barMeasure.scrollWidth=Math.max(display.scroller.clientWidth,display.sizer.offsetLeft+op.adjustWidthTo+scrollGap(cm)+cm.display.barWidth);op.maxScrollLeft=Math.max(0,display.sizer.offsetLeft+op.adjustWidthTo-displayWidth(cm))}(op.updatedDisplay||op.selectionChanged)&&(op.preparedSelection=display.input.prepareSelection())}function endOperation_W2(op){var cm=op.cm;if(null!=op.adjustWidthTo){cm.display.sizer.style.minWidth=op.adjustWidthTo+"px";op.maxScrollLeft<cm.doc.scrollLeft&&setScrollLeft(cm,Math.min(cm.display.scroller.scrollLeft,op.maxScrollLeft),!0);cm.display.maxLineChanged=!1}op.preparedSelection&&cm.display.input.showSelection(op.preparedSelection);op.updatedDisplay&&setDocumentHeight(cm,op.barMeasure);(op.updatedDisplay||op.startHeight!=cm.doc.height)&&updateScrollbars(cm,op.barMeasure);op.selectionChanged&&restartBlink(cm);cm.state.focused&&op.updateInput&&cm.display.input.reset(op.typing);op.focus&&op.focus==activeElt()&&ensureFocus(op.cm)}function endOperation_finish(op){var cm=op.cm,display=cm.display,doc=cm.doc;op.updatedDisplay&&postUpdateDisplay(cm,op.update);null==display.wheelStartX||null==op.scrollTop&&null==op.scrollLeft&&!op.scrollToPos||(display.wheelStartX=display.wheelStartY=null);if(null!=op.scrollTop&&(display.scroller.scrollTop!=op.scrollTop||op.forceScroll)){doc.scrollTop=Math.max(0,Math.min(display.scroller.scrollHeight-display.scroller.clientHeight,op.scrollTop));display.scrollbars.setScrollTop(doc.scrollTop);display.scroller.scrollTop=doc.scrollTop}if(null!=op.scrollLeft&&(display.scroller.scrollLeft!=op.scrollLeft||op.forceScroll)){doc.scrollLeft=Math.max(0,Math.min(display.scroller.scrollWidth-displayWidth(cm),op.scrollLeft));display.scrollbars.setScrollLeft(doc.scrollLeft);display.scroller.scrollLeft=doc.scrollLeft;alignHorizontally(cm)}if(op.scrollToPos){var coords=scrollPosIntoView(cm,clipPos(doc,op.scrollToPos.from),clipPos(doc,op.scrollToPos.to),op.scrollToPos.margin);op.scrollToPos.isCursor&&cm.state.focused&&maybeScrollWindow(cm,coords)}var hidden=op.maybeHiddenMarkers,unhidden=op.maybeUnhiddenMarkers;if(hidden)for(var i=0;i<hidden.length;++i)hidden[i].lines.length||signal(hidden[i],"hide");if(unhidden)for(var i=0;i<unhidden.length;++i)unhidden[i].lines.length&&signal(unhidden[i],"unhide");display.wrapper.offsetHeight&&(doc.scrollTop=cm.display.scroller.scrollTop);op.changeObjs&&signal(cm,"changes",cm,op.changeObjs);op.update&&op.update.finish()}function runInOp(cm,f){if(cm.curOp)return f();startOperation(cm);try{return f()}finally{endOperation(cm)}}function operation(cm,f){return function(){if(cm.curOp)return f.apply(cm,arguments);startOperation(cm);try{return f.apply(cm,arguments)}finally{endOperation(cm)}}}function methodOp(f){return function(){if(this.curOp)return f.apply(this,arguments);startOperation(this);try{return f.apply(this,arguments)}finally{endOperation(this)}}}function docMethodOp(f){return function(){var cm=this.cm;if(!cm||cm.curOp)return f.apply(this,arguments);startOperation(cm);try{return f.apply(this,arguments)}finally{endOperation(cm)}}}function LineView(doc,line,lineN){this.line=line;this.rest=visualLineContinued(line);this.size=this.rest?lineNo(lst(this.rest))-lineN+1:1;this.node=this.text=null;this.hidden=lineIsHidden(doc,line)}function buildViewArray(cm,from,to){for(var nextPos,array=[],pos=from;to>pos;pos=nextPos){var view=new LineView(cm.doc,getLine(cm.doc,pos),pos);nextPos=pos+view.size;array.push(view)}return array}function regChange(cm,from,to,lendiff){null==from&&(from=cm.doc.first);null==to&&(to=cm.doc.first+cm.doc.size);lendiff||(lendiff=0);var display=cm.display;lendiff&&to<display.viewTo&&(null==display.updateLineNumbers||display.updateLineNumbers>from)&&(display.updateLineNumbers=from);cm.curOp.viewChanged=!0;if(from>=display.viewTo)sawCollapsedSpans&&visualLineNo(cm.doc,from)<display.viewTo&&resetView(cm);else if(to<=display.viewFrom)if(sawCollapsedSpans&&visualLineEndNo(cm.doc,to+lendiff)>display.viewFrom)resetView(cm);else{display.viewFrom+=lendiff;display.viewTo+=lendiff}else if(from<=display.viewFrom&&to>=display.viewTo)resetView(cm);else if(from<=display.viewFrom){var cut=viewCuttingPoint(cm,to,to+lendiff,1);if(cut){display.view=display.view.slice(cut.index);display.viewFrom=cut.lineN;display.viewTo+=lendiff}else resetView(cm)}else if(to>=display.viewTo){var cut=viewCuttingPoint(cm,from,from,-1);if(cut){display.view=display.view.slice(0,cut.index);display.viewTo=cut.lineN}else resetView(cm)}else{var cutTop=viewCuttingPoint(cm,from,from,-1),cutBot=viewCuttingPoint(cm,to,to+lendiff,1);if(cutTop&&cutBot){display.view=display.view.slice(0,cutTop.index).concat(buildViewArray(cm,cutTop.lineN,cutBot.lineN)).concat(display.view.slice(cutBot.index));display.viewTo+=lendiff}else resetView(cm)}var ext=display.externalMeasured;ext&&(to<ext.lineN?ext.lineN+=lendiff:from<ext.lineN+ext.size&&(display.externalMeasured=null))}function regLineChange(cm,line,type){cm.curOp.viewChanged=!0;var display=cm.display,ext=cm.display.externalMeasured;ext&&line>=ext.lineN&&line<ext.lineN+ext.size&&(display.externalMeasured=null);if(!(line<display.viewFrom||line>=display.viewTo)){var lineView=display.view[findViewIndex(cm,line)];if(null!=lineView.node){var arr=lineView.changes||(lineView.changes=[]);-1==indexOf(arr,type)&&arr.push(type)}}}function resetView(cm){cm.display.viewFrom=cm.display.viewTo=cm.doc.first;cm.display.view=[];cm.display.viewOffset=0}function findViewIndex(cm,n){if(n>=cm.display.viewTo)return null;n-=cm.display.viewFrom;if(0>n)return null;for(var view=cm.display.view,i=0;i<view.length;i++){n-=view[i].size;if(0>n)return i}}function viewCuttingPoint(cm,oldN,newN,dir){var diff,index=findViewIndex(cm,oldN),view=cm.display.view;if(!sawCollapsedSpans||newN==cm.doc.first+cm.doc.size)return{index:index,lineN:newN};for(var i=0,n=cm.display.viewFrom;index>i;i++)n+=view[i].size;if(n!=oldN){if(dir>0){if(index==view.length-1)return null;diff=n+view[index].size-oldN;index++}else diff=n-oldN;oldN+=diff;newN+=diff}for(;visualLineNo(cm.doc,newN)!=newN;){if(index==(0>dir?0:view.length-1))return null;newN+=dir*view[index-(0>dir?1:0)].size;index+=dir}return{index:index,lineN:newN}}function adjustView(cm,from,to){var display=cm.display,view=display.view;if(0==view.length||from>=display.viewTo||to<=display.viewFrom){display.view=buildViewArray(cm,from,to);display.viewFrom=from}else{display.viewFrom>from?display.view=buildViewArray(cm,from,display.viewFrom).concat(display.view):display.viewFrom<from&&(display.view=display.view.slice(findViewIndex(cm,from)));display.viewFrom=from;display.viewTo<to?display.view=display.view.concat(buildViewArray(cm,display.viewTo,to)):display.viewTo>to&&(display.view=display.view.slice(0,findViewIndex(cm,to)))}display.viewTo=to}function countDirtyView(cm){for(var view=cm.display.view,dirty=0,i=0;i<view.length;i++){
3
+ var lineView=view[i];lineView.hidden||lineView.node&&!lineView.changes||++dirty}return dirty}function registerEventHandlers(cm){function finishTouch(){if(d.activeTouch){touchFinished=setTimeout(function(){d.activeTouch=null},1e3);prevTouch=d.activeTouch;prevTouch.end=+new Date}}function isMouseLikeTouchEvent(e){if(1!=e.touches.length)return!1;var touch=e.touches[0];return touch.radiusX<=1&&touch.radiusY<=1}function farAway(touch,other){if(null==other.left)return!0;var dx=other.left-touch.left,dy=other.top-touch.top;return dx*dx+dy*dy>400}var d=cm.display;on(d.scroller,"mousedown",operation(cm,onMouseDown));ie&&11>ie_version?on(d.scroller,"dblclick",operation(cm,function(e){if(!signalDOMEvent(cm,e)){var pos=posFromMouse(cm,e);if(pos&&!clickInGutter(cm,e)&&!eventInWidget(cm.display,e)){e_preventDefault(e);var word=cm.findWordAt(pos);extendSelection(cm.doc,word.anchor,word.head)}}})):on(d.scroller,"dblclick",function(e){signalDOMEvent(cm,e)||e_preventDefault(e)});captureRightClick||on(d.scroller,"contextmenu",function(e){onContextMenu(cm,e)});var touchFinished,prevTouch={end:0};on(d.scroller,"touchstart",function(e){if(!isMouseLikeTouchEvent(e)){clearTimeout(touchFinished);var now=+new Date;d.activeTouch={start:now,moved:!1,prev:now-prevTouch.end<=300?prevTouch:null};if(1==e.touches.length){d.activeTouch.left=e.touches[0].pageX;d.activeTouch.top=e.touches[0].pageY}}});on(d.scroller,"touchmove",function(){d.activeTouch&&(d.activeTouch.moved=!0)});on(d.scroller,"touchend",function(e){var touch=d.activeTouch;if(touch&&!eventInWidget(d,e)&&null!=touch.left&&!touch.moved&&new Date-touch.start<300){var range,pos=cm.coordsChar(d.activeTouch,"page");range=!touch.prev||farAway(touch,touch.prev)?new Range(pos,pos):!touch.prev.prev||farAway(touch,touch.prev.prev)?cm.findWordAt(pos):new Range(Pos(pos.line,0),clipPos(cm.doc,Pos(pos.line+1,0)));cm.setSelection(range.anchor,range.head);cm.focus();e_preventDefault(e)}finishTouch()});on(d.scroller,"touchcancel",finishTouch);on(d.scroller,"scroll",function(){if(d.scroller.clientHeight){setScrollTop(cm,d.scroller.scrollTop);setScrollLeft(cm,d.scroller.scrollLeft,!0);signal(cm,"scroll",cm)}});on(d.scroller,"mousewheel",function(e){onScrollWheel(cm,e)});on(d.scroller,"DOMMouseScroll",function(e){onScrollWheel(cm,e)});on(d.wrapper,"scroll",function(){d.wrapper.scrollTop=d.wrapper.scrollLeft=0});d.dragFunctions={enter:function(e){signalDOMEvent(cm,e)||e_stop(e)},over:function(e){if(!signalDOMEvent(cm,e)){onDragOver(cm,e);e_stop(e)}},start:function(e){onDragStart(cm,e)},drop:operation(cm,onDrop),leave:function(){clearDragCursor(cm)}};var inp=d.input.getField();on(inp,"keyup",function(e){onKeyUp.call(cm,e)});on(inp,"keydown",operation(cm,onKeyDown));on(inp,"keypress",operation(cm,onKeyPress));on(inp,"focus",bind(onFocus,cm));on(inp,"blur",bind(onBlur,cm))}function dragDropChanged(cm,value,old){var wasOn=old&&old!=CodeMirror.Init;if(!value!=!wasOn){var funcs=cm.display.dragFunctions,toggle=value?on:off;toggle(cm.display.scroller,"dragstart",funcs.start);toggle(cm.display.scroller,"dragenter",funcs.enter);toggle(cm.display.scroller,"dragover",funcs.over);toggle(cm.display.scroller,"dragleave",funcs.leave);toggle(cm.display.scroller,"drop",funcs.drop)}}function onResize(cm){var d=cm.display;if(d.lastWrapHeight!=d.wrapper.clientHeight||d.lastWrapWidth!=d.wrapper.clientWidth){d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null;d.scrollbarsClipped=!1;cm.setSize()}}function eventInWidget(display,e){for(var n=e_target(e);n!=display.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==display.sizer&&n!=display.mover)return!0}function posFromMouse(cm,e,liberal,forRect){var display=cm.display;if(!liberal&&"true"==e_target(e).getAttribute("cm-not-content"))return null;var x,y,space=display.lineSpace.getBoundingClientRect();try{x=e.clientX-space.left;y=e.clientY-space.top}catch(e){return null}var line,coords=coordsChar(cm,x,y);if(forRect&&1==coords.xRel&&(line=getLine(cm.doc,coords.line).text).length==coords.ch){var colDiff=countColumn(line,line.length,cm.options.tabSize)-line.length;coords=Pos(coords.line,Math.max(0,Math.round((x-paddingH(cm.display).left)/charWidth(cm.display))-colDiff))}return coords}function onMouseDown(e){var cm=this,display=cm.display;if(!(display.activeTouch&&display.input.supportsTouch()||signalDOMEvent(cm,e))){display.shift=e.shiftKey;if(eventInWidget(display,e)){if(!webkit){display.scroller.draggable=!1;setTimeout(function(){display.scroller.draggable=!0},100)}}else if(!clickInGutter(cm,e)){var start=posFromMouse(cm,e);window.focus();switch(e_button(e)){case 1:cm.state.selectingText?cm.state.selectingText(e):start?leftButtonDown(cm,e,start):e_target(e)==display.scroller&&e_preventDefault(e);break;case 2:webkit&&(cm.state.lastMiddleDown=+new Date);start&&extendSelection(cm.doc,start);setTimeout(function(){display.input.focus()},20);e_preventDefault(e);break;case 3:captureRightClick?onContextMenu(cm,e):delayBlurEvent(cm)}}}}function leftButtonDown(cm,e,start){ie?setTimeout(bind(ensureFocus,cm),0):cm.curOp.focus=activeElt();var type,now=+new Date;if(lastDoubleClick&&lastDoubleClick.time>now-400&&0==cmp(lastDoubleClick.pos,start))type="triple";else if(lastClick&&lastClick.time>now-400&&0==cmp(lastClick.pos,start)){type="double";lastDoubleClick={time:now,pos:start}}else{type="single";lastClick={time:now,pos:start}}var contained,sel=cm.doc.sel,modifier=mac?e.metaKey:e.ctrlKey;cm.options.dragDrop&&dragAndDrop&&!isReadOnly(cm)&&"single"==type&&(contained=sel.contains(start))>-1&&(cmp((contained=sel.ranges[contained]).from(),start)<0||start.xRel>0)&&(cmp(contained.to(),start)>0||start.xRel<0)?leftButtonStartDrag(cm,e,start,modifier):leftButtonSelect(cm,e,start,type,modifier)}function leftButtonStartDrag(cm,e,start,modifier){var display=cm.display,startTime=+new Date,dragEnd=operation(cm,function(e2){webkit&&(display.scroller.draggable=!1);cm.state.draggingText=!1;off(document,"mouseup",dragEnd);off(display.scroller,"drop",dragEnd);if(Math.abs(e.clientX-e2.clientX)+Math.abs(e.clientY-e2.clientY)<10){e_preventDefault(e2);!modifier&&+new Date-200<startTime&&extendSelection(cm.doc,start);webkit||ie&&9==ie_version?setTimeout(function(){document.body.focus();display.input.focus()},20):display.input.focus()}});webkit&&(display.scroller.draggable=!0);cm.state.draggingText=dragEnd;display.scroller.dragDrop&&display.scroller.dragDrop();on(document,"mouseup",dragEnd);on(display.scroller,"drop",dragEnd)}function leftButtonSelect(cm,e,start,type,addNew){function extendTo(pos){if(0!=cmp(lastPos,pos)){lastPos=pos;if("rect"==type){for(var ranges=[],tabSize=cm.options.tabSize,startCol=countColumn(getLine(doc,start.line).text,start.ch,tabSize),posCol=countColumn(getLine(doc,pos.line).text,pos.ch,tabSize),left=Math.min(startCol,posCol),right=Math.max(startCol,posCol),line=Math.min(start.line,pos.line),end=Math.min(cm.lastLine(),Math.max(start.line,pos.line));end>=line;line++){var text=getLine(doc,line).text,leftPos=findColumn(text,left,tabSize);left==right?ranges.push(new Range(Pos(line,leftPos),Pos(line,leftPos))):text.length>leftPos&&ranges.push(new Range(Pos(line,leftPos),Pos(line,findColumn(text,right,tabSize))))}ranges.length||ranges.push(new Range(start,start));setSelection(doc,normalizeSelection(startSel.ranges.slice(0,ourIndex).concat(ranges),ourIndex),{origin:"*mouse",scroll:!1});cm.scrollIntoView(pos)}else{var oldRange=ourRange,anchor=oldRange.anchor,head=pos;if("single"!=type){if("double"==type)var range=cm.findWordAt(pos);else var range=new Range(Pos(pos.line,0),clipPos(doc,Pos(pos.line+1,0)));if(cmp(range.anchor,anchor)>0){head=range.head;anchor=minPos(oldRange.from(),range.anchor)}else{head=range.anchor;anchor=maxPos(oldRange.to(),range.head)}}var ranges=startSel.ranges.slice(0);ranges[ourIndex]=new Range(clipPos(doc,anchor),head);setSelection(doc,normalizeSelection(ranges,ourIndex),sel_mouse)}}}function extend(e){var curCount=++counter,cur=posFromMouse(cm,e,!0,"rect"==type);if(cur)if(0!=cmp(cur,lastPos)){cm.curOp.focus=activeElt();extendTo(cur);var visible=visibleLines(display,doc);(cur.line>=visible.to||cur.line<visible.from)&&setTimeout(operation(cm,function(){counter==curCount&&extend(e)}),150)}else{var outside=e.clientY<editorSize.top?-20:e.clientY>editorSize.bottom?20:0;outside&&setTimeout(operation(cm,function(){if(counter==curCount){display.scroller.scrollTop+=outside;extend(e)}}),50)}}function done(e){cm.state.selectingText=!1;counter=1/0;e_preventDefault(e);display.input.focus();off(document,"mousemove",move);off(document,"mouseup",up);doc.history.lastSelOrigin=null}var display=cm.display,doc=cm.doc;e_preventDefault(e);var ourRange,ourIndex,startSel=doc.sel,ranges=startSel.ranges;if(addNew&&!e.shiftKey){ourIndex=doc.sel.contains(start);ourRange=ourIndex>-1?ranges[ourIndex]:new Range(start,start)}else{ourRange=doc.sel.primary();ourIndex=doc.sel.primIndex}if(e.altKey){type="rect";addNew||(ourRange=new Range(start,start));start=posFromMouse(cm,e,!0,!0);ourIndex=-1}else if("double"==type){var word=cm.findWordAt(start);ourRange=cm.display.shift||doc.extend?extendRange(doc,ourRange,word.anchor,word.head):word}else if("triple"==type){var line=new Range(Pos(start.line,0),clipPos(doc,Pos(start.line+1,0)));ourRange=cm.display.shift||doc.extend?extendRange(doc,ourRange,line.anchor,line.head):line}else ourRange=extendRange(doc,ourRange,start);if(addNew)if(-1==ourIndex){ourIndex=ranges.length;setSelection(doc,normalizeSelection(ranges.concat([ourRange]),ourIndex),{scroll:!1,origin:"*mouse"})}else if(ranges.length>1&&ranges[ourIndex].empty()&&"single"==type&&!e.shiftKey){setSelection(doc,normalizeSelection(ranges.slice(0,ourIndex).concat(ranges.slice(ourIndex+1)),0),{scroll:!1,origin:"*mouse"});startSel=doc.sel}else replaceOneSelection(doc,ourIndex,ourRange,sel_mouse);else{ourIndex=0;setSelection(doc,new Selection([ourRange],0),sel_mouse);startSel=doc.sel}var lastPos=start,editorSize=display.wrapper.getBoundingClientRect(),counter=0,move=operation(cm,function(e){e_button(e)?extend(e):done(e)}),up=operation(cm,done);cm.state.selectingText=up;on(document,"mousemove",move);on(document,"mouseup",up)}function gutterEvent(cm,e,type,prevent,signalfn){try{var mX=e.clientX,mY=e.clientY}catch(e){return!1}if(mX>=Math.floor(cm.display.gutters.getBoundingClientRect().right))return!1;prevent&&e_preventDefault(e);var display=cm.display,lineBox=display.lineDiv.getBoundingClientRect();if(mY>lineBox.bottom||!hasHandler(cm,type))return e_defaultPrevented(e);mY-=lineBox.top-display.viewOffset;for(var i=0;i<cm.options.gutters.length;++i){var g=display.gutters.childNodes[i];if(g&&g.getBoundingClientRect().right>=mX){var line=lineAtHeight(cm.doc,mY),gutter=cm.options.gutters[i];signalfn(cm,type,cm,line,gutter,e);return e_defaultPrevented(e)}}}function clickInGutter(cm,e){return gutterEvent(cm,e,"gutterClick",!0,signalLater)}function onDrop(e){var cm=this;clearDragCursor(cm);if(!signalDOMEvent(cm,e)&&!eventInWidget(cm.display,e)){e_preventDefault(e);ie&&(lastDrop=+new Date);var pos=posFromMouse(cm,e,!0),files=e.dataTransfer.files;if(pos&&!isReadOnly(cm))if(files&&files.length&&window.FileReader&&window.File)for(var n=files.length,text=Array(n),read=0,loadFile=function(file,i){if(!cm.options.allowDropFileTypes||-1!=indexOf(cm.options.allowDropFileTypes,file.type)){var reader=new FileReader;reader.onload=operation(cm,function(){var content=reader.result;/[\x00-\x08\x0e-\x1f]{2}/.test(content)&&(content="");text[i]=content;if(++read==n){pos=clipPos(cm.doc,pos);var change={from:pos,to:pos,text:cm.doc.splitLines(text.join(cm.doc.lineSeparator())),origin:"paste"};makeChange(cm.doc,change);setSelectionReplaceHistory(cm.doc,simpleSelection(pos,changeEnd(change)))}});reader.readAsText(file)}},i=0;n>i;++i)loadFile(files[i],i);else{if(cm.state.draggingText&&cm.doc.sel.contains(pos)>-1){cm.state.draggingText(e);setTimeout(function(){cm.display.input.focus()},20);return}try{var text=e.dataTransfer.getData("Text");if(text){if(cm.state.draggingText&&!(mac?e.altKey:e.ctrlKey))var selected=cm.listSelections();setSelectionNoUndo(cm.doc,simpleSelection(pos,pos));if(selected)for(var i=0;i<selected.length;++i)replaceRange(cm.doc,"",selected[i].anchor,selected[i].head,"drag");cm.replaceSelection(text,"around","paste");cm.display.input.focus()}}catch(e){}}}}function onDragStart(cm,e){if(ie&&(!cm.state.draggingText||+new Date-lastDrop<100))e_stop(e);else if(!signalDOMEvent(cm,e)&&!eventInWidget(cm.display,e)){e.dataTransfer.setData("Text",cm.getSelection());if(e.dataTransfer.setDragImage&&!safari){var img=elt("img",null,null,"position: fixed; left: 0; top: 0;");img.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(presto){img.width=img.height=1;cm.display.wrapper.appendChild(img);img._top=img.offsetTop}e.dataTransfer.setDragImage(img,0,0);presto&&img.parentNode.removeChild(img)}}}function onDragOver(cm,e){var pos=posFromMouse(cm,e);if(pos){var frag=document.createDocumentFragment();drawSelectionCursor(cm,pos,frag);if(!cm.display.dragCursor){cm.display.dragCursor=elt("div",null,"CodeMirror-cursors CodeMirror-dragcursors");cm.display.lineSpace.insertBefore(cm.display.dragCursor,cm.display.cursorDiv)}removeChildrenAndAdd(cm.display.dragCursor,frag)}}function clearDragCursor(cm){if(cm.display.dragCursor){cm.display.lineSpace.removeChild(cm.display.dragCursor);cm.display.dragCursor=null}}function setScrollTop(cm,val){if(!(Math.abs(cm.doc.scrollTop-val)<2)){cm.doc.scrollTop=val;gecko||updateDisplaySimple(cm,{top:val});cm.display.scroller.scrollTop!=val&&(cm.display.scroller.scrollTop=val);cm.display.scrollbars.setScrollTop(val);gecko&&updateDisplaySimple(cm);startWorker(cm,100)}}function setScrollLeft(cm,val,isScroller){if(!(isScroller?val==cm.doc.scrollLeft:Math.abs(cm.doc.scrollLeft-val)<2)){val=Math.min(val,cm.display.scroller.scrollWidth-cm.display.scroller.clientWidth);cm.doc.scrollLeft=val;alignHorizontally(cm);cm.display.scroller.scrollLeft!=val&&(cm.display.scroller.scrollLeft=val);cm.display.scrollbars.setScrollLeft(val)}}function onScrollWheel(cm,e){var delta=wheelEventDelta(e),dx=delta.x,dy=delta.y,display=cm.display,scroll=display.scroller,canScrollX=scroll.scrollWidth>scroll.clientWidth,canScrollY=scroll.scrollHeight>scroll.clientHeight;if(dx&&canScrollX||dy&&canScrollY){if(dy&&mac&&webkit)outer:for(var cur=e.target,view=display.view;cur!=scroll;cur=cur.parentNode)for(var i=0;i<view.length;i++)if(view[i].node==cur){cm.display.currentWheelTarget=cur;break outer}if(!dx||gecko||presto||null==wheelPixelsPerUnit){if(dy&&null!=wheelPixelsPerUnit){var pixels=dy*wheelPixelsPerUnit,top=cm.doc.scrollTop,bot=top+display.wrapper.clientHeight;0>pixels?top=Math.max(0,top+pixels-50):bot=Math.min(cm.doc.height,bot+pixels+50);updateDisplaySimple(cm,{top:top,bottom:bot})}if(20>wheelSamples)if(null==display.wheelStartX){display.wheelStartX=scroll.scrollLeft;display.wheelStartY=scroll.scrollTop;display.wheelDX=dx;display.wheelDY=dy;setTimeout(function(){if(null!=display.wheelStartX){var movedX=scroll.scrollLeft-display.wheelStartX,movedY=scroll.scrollTop-display.wheelStartY,sample=movedY&&display.wheelDY&&movedY/display.wheelDY||movedX&&display.wheelDX&&movedX/display.wheelDX;display.wheelStartX=display.wheelStartY=null;if(sample){wheelPixelsPerUnit=(wheelPixelsPerUnit*wheelSamples+sample)/(wheelSamples+1);++wheelSamples}}},200)}else{display.wheelDX+=dx;display.wheelDY+=dy}}else{dy&&canScrollY&&setScrollTop(cm,Math.max(0,Math.min(scroll.scrollTop+dy*wheelPixelsPerUnit,scroll.scrollHeight-scroll.clientHeight)));setScrollLeft(cm,Math.max(0,Math.min(scroll.scrollLeft+dx*wheelPixelsPerUnit,scroll.scrollWidth-scroll.clientWidth)));(!dy||dy&&canScrollY)&&e_preventDefault(e);display.wheelStartX=null}}}function doHandleBinding(cm,bound,dropShift){if("string"==typeof bound){bound=commands[bound];if(!bound)return!1}cm.display.input.ensurePolled();var prevShift=cm.display.shift,done=!1;try{isReadOnly(cm)&&(cm.state.suppressEdits=!0);dropShift&&(cm.display.shift=!1);done=bound(cm)!=Pass}finally{cm.display.shift=prevShift;cm.state.suppressEdits=!1}return done}function lookupKeyForEditor(cm,name,handle){for(var i=0;i<cm.state.keyMaps.length;i++){var result=lookupKey(name,cm.state.keyMaps[i],handle,cm);if(result)return result}return cm.options.extraKeys&&lookupKey(name,cm.options.extraKeys,handle,cm)||lookupKey(name,cm.options.keyMap,handle,cm)}function dispatchKey(cm,name,e,handle){var seq=cm.state.keySeq;if(seq){if(isModifierKey(name))return"handled";stopSeq.set(50,function(){if(cm.state.keySeq==seq){cm.state.keySeq=null;cm.display.input.reset()}});name=seq+" "+name}var result=lookupKeyForEditor(cm,name,handle);"multi"==result&&(cm.state.keySeq=name);"handled"==result&&signalLater(cm,"keyHandled",cm,name,e);if("handled"==result||"multi"==result){e_preventDefault(e);restartBlink(cm)}if(seq&&!result&&/\'$/.test(name)){e_preventDefault(e);return!0}return!!result}function handleKeyBinding(cm,e){var name=keyName(e,!0);return name?e.shiftKey&&!cm.state.keySeq?dispatchKey(cm,"Shift-"+name,e,function(b){return doHandleBinding(cm,b,!0)})||dispatchKey(cm,name,e,function(b){return("string"==typeof b?/^go[A-Z]/.test(b):b.motion)?doHandleBinding(cm,b):void 0}):dispatchKey(cm,name,e,function(b){return doHandleBinding(cm,b)}):!1}function handleCharBinding(cm,e,ch){return dispatchKey(cm,"'"+ch+"'",e,function(b){return doHandleBinding(cm,b,!0)})}function onKeyDown(e){var cm=this;cm.curOp.focus=activeElt();if(!signalDOMEvent(cm,e)){ie&&11>ie_version&&27==e.keyCode&&(e.returnValue=!1);var code=e.keyCode;cm.display.shift=16==code||e.shiftKey;var handled=handleKeyBinding(cm,e);if(presto){lastStoppedKey=handled?code:null;!handled&&88==code&&!hasCopyEvent&&(mac?e.metaKey:e.ctrlKey)&&cm.replaceSelection("",null,"cut")}18!=code||/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)||showCrossHair(cm)}}function showCrossHair(cm){function up(e){if(18==e.keyCode||!e.altKey){rmClass(lineDiv,"CodeMirror-crosshair");off(document,"keyup",up);off(document,"mouseover",up)}}var lineDiv=cm.display.lineDiv;addClass(lineDiv,"CodeMirror-crosshair");on(document,"keyup",up);on(document,"mouseover",up)}function onKeyUp(e){16==e.keyCode&&(this.doc.sel.shift=!1);signalDOMEvent(this,e)}function onKeyPress(e){var cm=this;if(!(eventInWidget(cm.display,e)||signalDOMEvent(cm,e)||e.ctrlKey&&!e.altKey||mac&&e.metaKey)){var keyCode=e.keyCode,charCode=e.charCode;if(presto&&keyCode==lastStoppedKey){lastStoppedKey=null;e_preventDefault(e)}else if(!presto||e.which&&!(e.which<10)||!handleKeyBinding(cm,e)){var ch=String.fromCharCode(null==charCode?keyCode:charCode);handleCharBinding(cm,e,ch)||cm.display.input.onKeyPress(e)}}}function delayBlurEvent(cm){cm.state.delayingBlurEvent=!0;setTimeout(function(){if(cm.state.delayingBlurEvent){cm.state.delayingBlurEvent=!1;onBlur(cm)}},100)}function onFocus(cm){cm.state.delayingBlurEvent&&(cm.state.delayingBlurEvent=!1);if("nocursor"!=cm.options.readOnly){if(!cm.state.focused){signal(cm,"focus",cm);cm.state.focused=!0;addClass(cm.display.wrapper,"CodeMirror-focused");if(!cm.curOp&&cm.display.selForContextMenu!=cm.doc.sel){cm.display.input.reset();webkit&&setTimeout(function(){cm.display.input.reset(!0)},20)}cm.display.input.receivedFocus()}restartBlink(cm)}}function onBlur(cm){if(!cm.state.delayingBlurEvent){if(cm.state.focused){signal(cm,"blur",cm);cm.state.focused=!1;rmClass(cm.display.wrapper,"CodeMirror-focused")}clearInterval(cm.display.blinker);setTimeout(function(){cm.state.focused||(cm.display.shift=!1)},150)}}function onContextMenu(cm,e){eventInWidget(cm.display,e)||contextMenuInGutter(cm,e)||signalDOMEvent(cm,e,"contextmenu")||cm.display.input.onContextMenu(e)}function contextMenuInGutter(cm,e){return hasHandler(cm,"gutterContextMenu")?gutterEvent(cm,e,"gutterContextMenu",!1,signal):!1}function adjustForChange(pos,change){if(cmp(pos,change.from)<0)return pos;if(cmp(pos,change.to)<=0)return changeEnd(change);var line=pos.line+change.text.length-(change.to.line-change.from.line)-1,ch=pos.ch;pos.line==change.to.line&&(ch+=changeEnd(change).ch-change.to.ch);return Pos(line,ch)}function computeSelAfterChange(doc,change){for(var out=[],i=0;i<doc.sel.ranges.length;i++){var range=doc.sel.ranges[i];out.push(new Range(adjustForChange(range.anchor,change),adjustForChange(range.head,change)))}return normalizeSelection(out,doc.sel.primIndex)}function offsetPos(pos,old,nw){return pos.line==old.line?Pos(nw.line,pos.ch-old.ch+nw.ch):Pos(nw.line+(pos.line-old.line),pos.ch)}function computeReplacedSel(doc,changes,hint){for(var out=[],oldPrev=Pos(doc.first,0),newPrev=oldPrev,i=0;i<changes.length;i++){var change=changes[i],from=offsetPos(change.from,oldPrev,newPrev),to=offsetPos(changeEnd(change),oldPrev,newPrev);oldPrev=change.to;newPrev=to;if("around"==hint){var range=doc.sel.ranges[i],inv=cmp(range.head,range.anchor)<0;out[i]=new Range(inv?to:from,inv?from:to)}else out[i]=new Range(from,from)}return new Selection(out,doc.sel.primIndex)}function filterChange(doc,change,update){var obj={canceled:!1,from:change.from,to:change.to,text:change.text,origin:change.origin,cancel:function(){this.canceled=!0}};update&&(obj.update=function(from,to,text,origin){from&&(this.from=clipPos(doc,from));to&&(this.to=clipPos(doc,to));text&&(this.text=text);void 0!==origin&&(this.origin=origin)});signal(doc,"beforeChange",doc,obj);doc.cm&&signal(doc.cm,"beforeChange",doc.cm,obj);return obj.canceled?null:{from:obj.from,to:obj.to,text:obj.text,origin:obj.origin}}function makeChange(doc,change,ignoreReadOnly){if(doc.cm){if(!doc.cm.curOp)return operation(doc.cm,makeChange)(doc,change,ignoreReadOnly);if(doc.cm.state.suppressEdits)return}if(hasHandler(doc,"beforeChange")||doc.cm&&hasHandler(doc.cm,"beforeChange")){change=filterChange(doc,change,!0);if(!change)return}var split=sawReadOnlySpans&&!ignoreReadOnly&&removeReadOnlyRanges(doc,change.from,change.to);if(split)for(var i=split.length-1;i>=0;--i)makeChangeInner(doc,{from:split[i].from,to:split[i].to,text:i?[""]:change.text});else makeChangeInner(doc,change)}function makeChangeInner(doc,change){if(1!=change.text.length||""!=change.text[0]||0!=cmp(change.from,change.to)){var selAfter=computeSelAfterChange(doc,change);addChangeToHistory(doc,change,selAfter,doc.cm?doc.cm.curOp.id:NaN);makeChangeSingleDoc(doc,change,selAfter,stretchSpansOverChange(doc,change));var rebased=[];linkedDocs(doc,function(doc,sharedHist){if(!sharedHist&&-1==indexOf(rebased,doc.history)){rebaseHist(doc.history,change);rebased.push(doc.history)}makeChangeSingleDoc(doc,change,null,stretchSpansOverChange(doc,change))})}}function makeChangeFromHistory(doc,type,allowSelectionOnly){if(!doc.cm||!doc.cm.state.suppressEdits){for(var event,hist=doc.history,selAfter=doc.sel,source="undo"==type?hist.done:hist.undone,dest="undo"==type?hist.undone:hist.done,i=0;i<source.length;i++){event=source[i];if(allowSelectionOnly?event.ranges&&!event.equals(doc.sel):!event.ranges)break}if(i!=source.length){hist.lastOrigin=hist.lastSelOrigin=null;for(;;){event=source.pop();if(!event.ranges)break;pushSelectionToHistory(event,dest);if(allowSelectionOnly&&!event.equals(doc.sel)){setSelection(doc,event,{clearRedo:!1});return}selAfter=event}var antiChanges=[];pushSelectionToHistory(selAfter,dest);dest.push({changes:antiChanges,generation:hist.generation});hist.generation=event.generation||++hist.maxGeneration;for(var filter=hasHandler(doc,"beforeChange")||doc.cm&&hasHandler(doc.cm,"beforeChange"),i=event.changes.length-1;i>=0;--i){var change=event.changes[i];change.origin=type;if(filter&&!filterChange(doc,change,!1)){source.length=0;return}antiChanges.push(historyChangeFromChange(doc,change));var after=i?computeSelAfterChange(doc,change):lst(source);makeChangeSingleDoc(doc,change,after,mergeOldSpans(doc,change));!i&&doc.cm&&doc.cm.scrollIntoView({from:change.from,to:changeEnd(change)});var rebased=[];linkedDocs(doc,function(doc,sharedHist){if(!sharedHist&&-1==indexOf(rebased,doc.history)){rebaseHist(doc.history,change);rebased.push(doc.history)}makeChangeSingleDoc(doc,change,null,mergeOldSpans(doc,change))})}}}}function shiftDoc(doc,distance){if(0!=distance){doc.first+=distance;doc.sel=new Selection(map(doc.sel.ranges,function(range){return new Range(Pos(range.anchor.line+distance,range.anchor.ch),Pos(range.head.line+distance,range.head.ch))}),doc.sel.primIndex);if(doc.cm){regChange(doc.cm,doc.first,doc.first-distance,distance);for(var d=doc.cm.display,l=d.viewFrom;l<d.viewTo;l++)regLineChange(doc.cm,l,"gutter")}}}function makeChangeSingleDoc(doc,change,selAfter,spans){if(doc.cm&&!doc.cm.curOp)return operation(doc.cm,makeChangeSingleDoc)(doc,change,selAfter,spans);if(change.to.line<doc.first)shiftDoc(doc,change.text.length-1-(change.to.line-change.from.line));else if(!(change.from.line>doc.lastLine())){if(change.from.line<doc.first){var shift=change.text.length-1-(doc.first-change.from.line);shiftDoc(doc,shift);change={from:Pos(doc.first,0),to:Pos(change.to.line+shift,change.to.ch),text:[lst(change.text)],origin:change.origin}}var last=doc.lastLine();change.to.line>last&&(change={from:change.from,to:Pos(last,getLine(doc,last).text.length),text:[change.text[0]],origin:change.origin});change.removed=getBetween(doc,change.from,change.to);selAfter||(selAfter=computeSelAfterChange(doc,change));doc.cm?makeChangeSingleDocInEditor(doc.cm,change,spans):updateDoc(doc,change,spans);setSelectionNoUndo(doc,selAfter,sel_dontScroll)}}function makeChangeSingleDocInEditor(cm,change,spans){var doc=cm.doc,display=cm.display,from=change.from,to=change.to,recomputeMaxLength=!1,checkWidthStart=from.line;if(!cm.options.lineWrapping){checkWidthStart=lineNo(visualLine(getLine(doc,from.line)));doc.iter(checkWidthStart,to.line+1,function(line){if(line==display.maxLine){recomputeMaxLength=!0;return!0}})}doc.sel.contains(change.from,change.to)>-1&&signalCursorActivity(cm);updateDoc(doc,change,spans,estimateHeight(cm));if(!cm.options.lineWrapping){doc.iter(checkWidthStart,from.line+change.text.length,function(line){var len=lineLength(line);if(len>display.maxLineLength){display.maxLine=line;display.maxLineLength=len;display.maxLineChanged=!0;recomputeMaxLength=!1}});recomputeMaxLength&&(cm.curOp.updateMaxLine=!0)}doc.frontier=Math.min(doc.frontier,from.line);startWorker(cm,400);var lendiff=change.text.length-(to.line-from.line)-1;change.full?regChange(cm):from.line!=to.line||1!=change.text.length||isWholeLineUpdate(cm.doc,change)?regChange(cm,from.line,to.line+1,lendiff):regLineChange(cm,from.line,"text");var changesHandler=hasHandler(cm,"changes"),changeHandler=hasHandler(cm,"change");if(changeHandler||changesHandler){var obj={from:from,to:to,text:change.text,removed:change.removed,origin:change.origin};changeHandler&&signalLater(cm,"change",cm,obj);changesHandler&&(cm.curOp.changeObjs||(cm.curOp.changeObjs=[])).push(obj)}cm.display.selForContextMenu=null}function replaceRange(doc,code,from,to,origin){to||(to=from);if(cmp(to,from)<0){var tmp=to;to=from;from=tmp}"string"==typeof code&&(code=doc.splitLines(code));makeChange(doc,{from:from,to:to,text:code,origin:origin})}function maybeScrollWindow(cm,coords){if(!signalDOMEvent(cm,"scrollCursorIntoView")){var display=cm.display,box=display.sizer.getBoundingClientRect(),doScroll=null;coords.top+box.top<0?doScroll=!0:coords.bottom+box.top>(window.innerHeight||document.documentElement.clientHeight)&&(doScroll=!1);if(null!=doScroll&&!phantom){var scrollNode=elt("div","​",null,"position: absolute; top: "+(coords.top-display.viewOffset-paddingTop(cm.display))+"px; height: "+(coords.bottom-coords.top+scrollGap(cm)+display.barHeight)+"px; left: "+coords.left+"px; width: 2px;");cm.display.lineSpace.appendChild(scrollNode);scrollNode.scrollIntoView(doScroll);cm.display.lineSpace.removeChild(scrollNode)}}}function scrollPosIntoView(cm,pos,end,margin){null==margin&&(margin=0);for(var limit=0;5>limit;limit++){var changed=!1,coords=cursorCoords(cm,pos),endCoords=end&&end!=pos?cursorCoords(cm,end):coords,scrollPos=calculateScrollPos(cm,Math.min(coords.left,endCoords.left),Math.min(coords.top,endCoords.top)-margin,Math.max(coords.left,endCoords.left),Math.max(coords.bottom,endCoords.bottom)+margin),startTop=cm.doc.scrollTop,startLeft=cm.doc.scrollLeft;if(null!=scrollPos.scrollTop){setScrollTop(cm,scrollPos.scrollTop);Math.abs(cm.doc.scrollTop-startTop)>1&&(changed=!0)}if(null!=scrollPos.scrollLeft){setScrollLeft(cm,scrollPos.scrollLeft);Math.abs(cm.doc.scrollLeft-startLeft)>1&&(changed=!0)}if(!changed)break}return coords}function scrollIntoView(cm,x1,y1,x2,y2){var scrollPos=calculateScrollPos(cm,x1,y1,x2,y2);null!=scrollPos.scrollTop&&setScrollTop(cm,scrollPos.scrollTop);null!=scrollPos.scrollLeft&&setScrollLeft(cm,scrollPos.scrollLeft)}function calculateScrollPos(cm,x1,y1,x2,y2){var display=cm.display,snapMargin=textHeight(cm.display);0>y1&&(y1=0);var screentop=cm.curOp&&null!=cm.curOp.scrollTop?cm.curOp.scrollTop:display.scroller.scrollTop,screen=displayHeight(cm),result={};y2-y1>screen&&(y2=y1+screen);var docBottom=cm.doc.height+paddingVert(display),atTop=snapMargin>y1,atBottom=y2>docBottom-snapMargin;if(screentop>y1)result.scrollTop=atTop?0:y1;else if(y2>screentop+screen){var newTop=Math.min(y1,(atBottom?docBottom:y2)-screen);newTop!=screentop&&(result.scrollTop=newTop)}var screenleft=cm.curOp&&null!=cm.curOp.scrollLeft?cm.curOp.scrollLeft:display.scroller.scrollLeft,screenw=displayWidth(cm)-(cm.options.fixedGutter?display.gutters.offsetWidth:0),tooWide=x2-x1>screenw;tooWide&&(x2=x1+screenw);10>x1?result.scrollLeft=0:screenleft>x1?result.scrollLeft=Math.max(0,x1-(tooWide?0:10)):x2>screenw+screenleft-3&&(result.scrollLeft=x2+(tooWide?0:10)-screenw);return result}function addToScrollPos(cm,left,top){(null!=left||null!=top)&&resolveScrollToPos(cm);null!=left&&(cm.curOp.scrollLeft=(null==cm.curOp.scrollLeft?cm.doc.scrollLeft:cm.curOp.scrollLeft)+left);null!=top&&(cm.curOp.scrollTop=(null==cm.curOp.scrollTop?cm.doc.scrollTop:cm.curOp.scrollTop)+top)}function ensureCursorVisible(cm){resolveScrollToPos(cm);var cur=cm.getCursor(),from=cur,to=cur;if(!cm.options.lineWrapping){from=cur.ch?Pos(cur.line,cur.ch-1):cur;to=Pos(cur.line,cur.ch+1)}cm.curOp.scrollToPos={from:from,to:to,margin:cm.options.cursorScrollMargin,isCursor:!0}}function resolveScrollToPos(cm){var range=cm.curOp.scrollToPos;if(range){cm.curOp.scrollToPos=null;var from=estimateCoords(cm,range.from),to=estimateCoords(cm,range.to),sPos=calculateScrollPos(cm,Math.min(from.left,to.left),Math.min(from.top,to.top)-range.margin,Math.max(from.right,to.right),Math.max(from.bottom,to.bottom)+range.margin);cm.scrollTo(sPos.scrollLeft,sPos.scrollTop)}}function indentLine(cm,n,how,aggressive){var state,doc=cm.doc;null==how&&(how="add");"smart"==how&&(doc.mode.indent?state=getStateBefore(cm,n):how="prev");var tabSize=cm.options.tabSize,line=getLine(doc,n),curSpace=countColumn(line.text,null,tabSize);line.stateAfter&&(line.stateAfter=null);var indentation,curSpaceString=line.text.match(/^\s*/)[0];if(aggressive||/\S/.test(line.text)){if("smart"==how){indentation=doc.mode.indent(state,line.text.slice(curSpaceString.length),line.text);if(indentation==Pass||indentation>150){if(!aggressive)return;how="prev"}}}else{indentation=0;how="not"}"prev"==how?indentation=n>doc.first?countColumn(getLine(doc,n-1).text,null,tabSize):0:"add"==how?indentation=curSpace+cm.options.indentUnit:"subtract"==how?indentation=curSpace-cm.options.indentUnit:"number"==typeof how&&(indentation=curSpace+how);indentation=Math.max(0,indentation);var indentString="",pos=0;if(cm.options.indentWithTabs)for(var i=Math.floor(indentation/tabSize);i;--i){pos+=tabSize;indentString+=" "}indentation>pos&&(indentString+=spaceStr(indentation-pos));if(indentString!=curSpaceString){replaceRange(doc,indentString,Pos(n,0),Pos(n,curSpaceString.length),"+input");line.stateAfter=null;return!0}for(var i=0;i<doc.sel.ranges.length;i++){var range=doc.sel.ranges[i];if(range.head.line==n&&range.head.ch<curSpaceString.length){var pos=Pos(n,curSpaceString.length);replaceOneSelection(doc,i,new Range(pos,pos));break;
4
+ }}}function changeLine(doc,handle,changeType,op){var no=handle,line=handle;"number"==typeof handle?line=getLine(doc,clipLine(doc,handle)):no=lineNo(handle);if(null==no)return null;op(line,no)&&doc.cm&&regLineChange(doc.cm,no,changeType);return line}function deleteNearSelection(cm,compute){for(var ranges=cm.doc.sel.ranges,kill=[],i=0;i<ranges.length;i++){for(var toKill=compute(ranges[i]);kill.length&&cmp(toKill.from,lst(kill).to)<=0;){var replaced=kill.pop();if(cmp(replaced.from,toKill.from)<0){toKill.from=replaced.from;break}}kill.push(toKill)}runInOp(cm,function(){for(var i=kill.length-1;i>=0;i--)replaceRange(cm.doc,"",kill[i].from,kill[i].to,"+delete");ensureCursorVisible(cm)})}function findPosH(doc,pos,dir,unit,visually){function findNextLine(){var l=line+dir;if(l<doc.first||l>=doc.first+doc.size)return possible=!1;line=l;return lineObj=getLine(doc,l)}function moveOnce(boundToLine){var next=(visually?moveVisually:moveLogically)(lineObj,ch,dir,!0);if(null==next){if(boundToLine||!findNextLine())return possible=!1;ch=visually?(0>dir?lineRight:lineLeft)(lineObj):0>dir?lineObj.text.length:0}else ch=next;return!0}var line=pos.line,ch=pos.ch,origDir=dir,lineObj=getLine(doc,line),possible=!0;if("char"==unit)moveOnce();else if("column"==unit)moveOnce(!0);else if("word"==unit||"group"==unit)for(var sawType=null,group="group"==unit,helper=doc.cm&&doc.cm.getHelper(pos,"wordChars"),first=!0;!(0>dir)||moveOnce(!first);first=!1){var cur=lineObj.text.charAt(ch)||"\n",type=isWordChar(cur,helper)?"w":group&&"\n"==cur?"n":!group||/\s/.test(cur)?null:"p";!group||first||type||(type="s");if(sawType&&sawType!=type){if(0>dir){dir=1;moveOnce()}break}type&&(sawType=type);if(dir>0&&!moveOnce(!first))break}var result=skipAtomic(doc,Pos(line,ch),origDir,!0);possible||(result.hitSide=!0);return result}function findPosV(cm,pos,dir,unit){var y,doc=cm.doc,x=pos.left;if("page"==unit){var pageSize=Math.min(cm.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);y=pos.top+dir*(pageSize-(0>dir?1.5:.5)*textHeight(cm.display))}else"line"==unit&&(y=dir>0?pos.bottom+3:pos.top-3);for(;;){var target=coordsChar(cm,x,y);if(!target.outside)break;if(0>dir?0>=y:y>=doc.height){target.hitSide=!0;break}y+=5*dir}return target}function option(name,deflt,handle,notOnInit){CodeMirror.defaults[name]=deflt;handle&&(optionHandlers[name]=notOnInit?function(cm,val,old){old!=Init&&handle(cm,val,old)}:handle)}function normalizeKeyName(name){for(var alt,ctrl,shift,cmd,parts=name.split(/-(?!$)/),name=parts[parts.length-1],i=0;i<parts.length-1;i++){var mod=parts[i];if(/^(cmd|meta|m)$/i.test(mod))cmd=!0;else if(/^a(lt)?$/i.test(mod))alt=!0;else if(/^(c|ctrl|control)$/i.test(mod))ctrl=!0;else{if(!/^s(hift)$/i.test(mod))throw new Error("Unrecognized modifier name: "+mod);shift=!0}}alt&&(name="Alt-"+name);ctrl&&(name="Ctrl-"+name);cmd&&(name="Cmd-"+name);shift&&(name="Shift-"+name);return name}function getKeyMap(val){return"string"==typeof val?keyMap[val]:val}function markText(doc,from,to,options,type){if(options&&options.shared)return markTextShared(doc,from,to,options,type);if(doc.cm&&!doc.cm.curOp)return operation(doc.cm,markText)(doc,from,to,options,type);var marker=new TextMarker(doc,type),diff=cmp(from,to);options&&copyObj(options,marker,!1);if(diff>0||0==diff&&marker.clearWhenEmpty!==!1)return marker;if(marker.replacedWith){marker.collapsed=!0;marker.widgetNode=elt("span",[marker.replacedWith],"CodeMirror-widget");options.handleMouseEvents||marker.widgetNode.setAttribute("cm-ignore-events","true");options.insertLeft&&(marker.widgetNode.insertLeft=!0)}if(marker.collapsed){if(conflictingCollapsedRange(doc,from.line,from,to,marker)||from.line!=to.line&&conflictingCollapsedRange(doc,to.line,from,to,marker))throw new Error("Inserting collapsed marker partially overlapping an existing one");sawCollapsedSpans=!0}marker.addToHistory&&addChangeToHistory(doc,{from:from,to:to,origin:"markText"},doc.sel,NaN);var updateMaxLine,curLine=from.line,cm=doc.cm;doc.iter(curLine,to.line+1,function(line){cm&&marker.collapsed&&!cm.options.lineWrapping&&visualLine(line)==cm.display.maxLine&&(updateMaxLine=!0);marker.collapsed&&curLine!=from.line&&updateLineHeight(line,0);addMarkedSpan(line,new MarkedSpan(marker,curLine==from.line?from.ch:null,curLine==to.line?to.ch:null));++curLine});marker.collapsed&&doc.iter(from.line,to.line+1,function(line){lineIsHidden(doc,line)&&updateLineHeight(line,0)});marker.clearOnEnter&&on(marker,"beforeCursorEnter",function(){marker.clear()});if(marker.readOnly){sawReadOnlySpans=!0;(doc.history.done.length||doc.history.undone.length)&&doc.clearHistory()}if(marker.collapsed){marker.id=++nextMarkerId;marker.atomic=!0}if(cm){updateMaxLine&&(cm.curOp.updateMaxLine=!0);if(marker.collapsed)regChange(cm,from.line,to.line+1);else if(marker.className||marker.title||marker.startStyle||marker.endStyle||marker.css)for(var i=from.line;i<=to.line;i++)regLineChange(cm,i,"text");marker.atomic&&reCheckSelection(cm.doc);signalLater(cm,"markerAdded",cm,marker)}return marker}function markTextShared(doc,from,to,options,type){options=copyObj(options);options.shared=!1;var markers=[markText(doc,from,to,options,type)],primary=markers[0],widget=options.widgetNode;linkedDocs(doc,function(doc){widget&&(options.widgetNode=widget.cloneNode(!0));markers.push(markText(doc,clipPos(doc,from),clipPos(doc,to),options,type));for(var i=0;i<doc.linked.length;++i)if(doc.linked[i].isParent)return;primary=lst(markers)});return new SharedTextMarker(markers,primary)}function findSharedMarkers(doc){return doc.findMarks(Pos(doc.first,0),doc.clipPos(Pos(doc.lastLine())),function(m){return m.parent})}function copySharedMarkers(doc,markers){for(var i=0;i<markers.length;i++){var marker=markers[i],pos=marker.find(),mFrom=doc.clipPos(pos.from),mTo=doc.clipPos(pos.to);if(cmp(mFrom,mTo)){var subMark=markText(doc,mFrom,mTo,marker.primary,marker.primary.type);marker.markers.push(subMark);subMark.parent=marker}}}function detachSharedMarkers(markers){for(var i=0;i<markers.length;i++){var marker=markers[i],linked=[marker.primary.doc];linkedDocs(marker.primary.doc,function(d){linked.push(d)});for(var j=0;j<marker.markers.length;j++){var subMarker=marker.markers[j];if(-1==indexOf(linked,subMarker.doc)){subMarker.parent=null;marker.markers.splice(j--,1)}}}}function MarkedSpan(marker,from,to){this.marker=marker;this.from=from;this.to=to}function getMarkedSpanFor(spans,marker){if(spans)for(var i=0;i<spans.length;++i){var span=spans[i];if(span.marker==marker)return span}}function removeMarkedSpan(spans,span){for(var r,i=0;i<spans.length;++i)spans[i]!=span&&(r||(r=[])).push(spans[i]);return r}function addMarkedSpan(line,span){line.markedSpans=line.markedSpans?line.markedSpans.concat([span]):[span];span.marker.attachLine(line)}function markedSpansBefore(old,startCh,isInsert){if(old)for(var nw,i=0;i<old.length;++i){var span=old[i],marker=span.marker,startsBefore=null==span.from||(marker.inclusiveLeft?span.from<=startCh:span.from<startCh);if(startsBefore||span.from==startCh&&"bookmark"==marker.type&&(!isInsert||!span.marker.insertLeft)){var endsAfter=null==span.to||(marker.inclusiveRight?span.to>=startCh:span.to>startCh);(nw||(nw=[])).push(new MarkedSpan(marker,span.from,endsAfter?null:span.to))}}return nw}function markedSpansAfter(old,endCh,isInsert){if(old)for(var nw,i=0;i<old.length;++i){var span=old[i],marker=span.marker,endsAfter=null==span.to||(marker.inclusiveRight?span.to>=endCh:span.to>endCh);if(endsAfter||span.from==endCh&&"bookmark"==marker.type&&(!isInsert||span.marker.insertLeft)){var startsBefore=null==span.from||(marker.inclusiveLeft?span.from<=endCh:span.from<endCh);(nw||(nw=[])).push(new MarkedSpan(marker,startsBefore?null:span.from-endCh,null==span.to?null:span.to-endCh))}}return nw}function stretchSpansOverChange(doc,change){if(change.full)return null;var oldFirst=isLine(doc,change.from.line)&&getLine(doc,change.from.line).markedSpans,oldLast=isLine(doc,change.to.line)&&getLine(doc,change.to.line).markedSpans;if(!oldFirst&&!oldLast)return null;var startCh=change.from.ch,endCh=change.to.ch,isInsert=0==cmp(change.from,change.to),first=markedSpansBefore(oldFirst,startCh,isInsert),last=markedSpansAfter(oldLast,endCh,isInsert),sameLine=1==change.text.length,offset=lst(change.text).length+(sameLine?startCh:0);if(first)for(var i=0;i<first.length;++i){var span=first[i];if(null==span.to){var found=getMarkedSpanFor(last,span.marker);found?sameLine&&(span.to=null==found.to?null:found.to+offset):span.to=startCh}}if(last)for(var i=0;i<last.length;++i){var span=last[i];null!=span.to&&(span.to+=offset);if(null==span.from){var found=getMarkedSpanFor(first,span.marker);if(!found){span.from=offset;sameLine&&(first||(first=[])).push(span)}}else{span.from+=offset;sameLine&&(first||(first=[])).push(span)}}first&&(first=clearEmptySpans(first));last&&last!=first&&(last=clearEmptySpans(last));var newMarkers=[first];if(!sameLine){var gapMarkers,gap=change.text.length-2;if(gap>0&&first)for(var i=0;i<first.length;++i)null==first[i].to&&(gapMarkers||(gapMarkers=[])).push(new MarkedSpan(first[i].marker,null,null));for(var i=0;gap>i;++i)newMarkers.push(gapMarkers);newMarkers.push(last)}return newMarkers}function clearEmptySpans(spans){for(var i=0;i<spans.length;++i){var span=spans[i];null!=span.from&&span.from==span.to&&span.marker.clearWhenEmpty!==!1&&spans.splice(i--,1)}return spans.length?spans:null}function mergeOldSpans(doc,change){var old=getOldSpans(doc,change),stretched=stretchSpansOverChange(doc,change);if(!old)return stretched;if(!stretched)return old;for(var i=0;i<old.length;++i){var oldCur=old[i],stretchCur=stretched[i];if(oldCur&&stretchCur)spans:for(var j=0;j<stretchCur.length;++j){for(var span=stretchCur[j],k=0;k<oldCur.length;++k)if(oldCur[k].marker==span.marker)continue spans;oldCur.push(span)}else stretchCur&&(old[i]=stretchCur)}return old}function removeReadOnlyRanges(doc,from,to){var markers=null;doc.iter(from.line,to.line+1,function(line){if(line.markedSpans)for(var i=0;i<line.markedSpans.length;++i){var mark=line.markedSpans[i].marker;!mark.readOnly||markers&&-1!=indexOf(markers,mark)||(markers||(markers=[])).push(mark)}});if(!markers)return null;for(var parts=[{from:from,to:to}],i=0;i<markers.length;++i)for(var mk=markers[i],m=mk.find(0),j=0;j<parts.length;++j){var p=parts[j];if(!(cmp(p.to,m.from)<0||cmp(p.from,m.to)>0)){var newParts=[j,1],dfrom=cmp(p.from,m.from),dto=cmp(p.to,m.to);(0>dfrom||!mk.inclusiveLeft&&!dfrom)&&newParts.push({from:p.from,to:m.from});(dto>0||!mk.inclusiveRight&&!dto)&&newParts.push({from:m.to,to:p.to});parts.splice.apply(parts,newParts);j+=newParts.length-1}}return parts}function detachMarkedSpans(line){var spans=line.markedSpans;if(spans){for(var i=0;i<spans.length;++i)spans[i].marker.detachLine(line);line.markedSpans=null}}function attachMarkedSpans(line,spans){if(spans){for(var i=0;i<spans.length;++i)spans[i].marker.attachLine(line);line.markedSpans=spans}}function extraLeft(marker){return marker.inclusiveLeft?-1:0}function extraRight(marker){return marker.inclusiveRight?1:0}function compareCollapsedMarkers(a,b){var lenDiff=a.lines.length-b.lines.length;if(0!=lenDiff)return lenDiff;var aPos=a.find(),bPos=b.find(),fromCmp=cmp(aPos.from,bPos.from)||extraLeft(a)-extraLeft(b);if(fromCmp)return-fromCmp;var toCmp=cmp(aPos.to,bPos.to)||extraRight(a)-extraRight(b);return toCmp?toCmp:b.id-a.id}function collapsedSpanAtSide(line,start){var found,sps=sawCollapsedSpans&&line.markedSpans;if(sps)for(var sp,i=0;i<sps.length;++i){sp=sps[i];sp.marker.collapsed&&null==(start?sp.from:sp.to)&&(!found||compareCollapsedMarkers(found,sp.marker)<0)&&(found=sp.marker)}return found}function collapsedSpanAtStart(line){return collapsedSpanAtSide(line,!0)}function collapsedSpanAtEnd(line){return collapsedSpanAtSide(line,!1)}function conflictingCollapsedRange(doc,lineNo,from,to,marker){var line=getLine(doc,lineNo),sps=sawCollapsedSpans&&line.markedSpans;if(sps)for(var i=0;i<sps.length;++i){var sp=sps[i];if(sp.marker.collapsed){var found=sp.marker.find(0),fromCmp=cmp(found.from,from)||extraLeft(sp.marker)-extraLeft(marker),toCmp=cmp(found.to,to)||extraRight(sp.marker)-extraRight(marker);if(!(fromCmp>=0&&0>=toCmp||0>=fromCmp&&toCmp>=0)&&(0>=fromCmp&&(cmp(found.to,from)>0||sp.marker.inclusiveRight&&marker.inclusiveLeft)||fromCmp>=0&&(cmp(found.from,to)<0||sp.marker.inclusiveLeft&&marker.inclusiveRight)))return!0}}}function visualLine(line){for(var merged;merged=collapsedSpanAtStart(line);)line=merged.find(-1,!0).line;return line}function visualLineContinued(line){for(var merged,lines;merged=collapsedSpanAtEnd(line);){line=merged.find(1,!0).line;(lines||(lines=[])).push(line)}return lines}function visualLineNo(doc,lineN){var line=getLine(doc,lineN),vis=visualLine(line);return line==vis?lineN:lineNo(vis)}function visualLineEndNo(doc,lineN){if(lineN>doc.lastLine())return lineN;var merged,line=getLine(doc,lineN);if(!lineIsHidden(doc,line))return lineN;for(;merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line;return lineNo(line)+1}function lineIsHidden(doc,line){var sps=sawCollapsedSpans&&line.markedSpans;if(sps)for(var sp,i=0;i<sps.length;++i){sp=sps[i];if(sp.marker.collapsed){if(null==sp.from)return!0;if(!sp.marker.widgetNode&&0==sp.from&&sp.marker.inclusiveLeft&&lineIsHiddenInner(doc,line,sp))return!0}}}function lineIsHiddenInner(doc,line,span){if(null==span.to){var end=span.marker.find(1,!0);return lineIsHiddenInner(doc,end.line,getMarkedSpanFor(end.line.markedSpans,span.marker))}if(span.marker.inclusiveRight&&span.to==line.text.length)return!0;for(var sp,i=0;i<line.markedSpans.length;++i){sp=line.markedSpans[i];if(sp.marker.collapsed&&!sp.marker.widgetNode&&sp.from==span.to&&(null==sp.to||sp.to!=span.from)&&(sp.marker.inclusiveLeft||span.marker.inclusiveRight)&&lineIsHiddenInner(doc,line,sp))return!0}}function adjustScrollWhenAboveVisible(cm,line,diff){heightAtLine(line)<(cm.curOp&&cm.curOp.scrollTop||cm.doc.scrollTop)&&addToScrollPos(cm,null,diff)}function widgetHeight(widget){if(null!=widget.height)return widget.height;var cm=widget.doc.cm;if(!cm)return 0;if(!contains(document.body,widget.node)){var parentStyle="position: relative;";widget.coverGutter&&(parentStyle+="margin-left: -"+cm.display.gutters.offsetWidth+"px;");widget.noHScroll&&(parentStyle+="width: "+cm.display.wrapper.clientWidth+"px;");removeChildrenAndAdd(cm.display.measure,elt("div",[widget.node],null,parentStyle))}return widget.height=widget.node.offsetHeight}function addLineWidget(doc,handle,node,options){var widget=new LineWidget(doc,node,options),cm=doc.cm;cm&&widget.noHScroll&&(cm.display.alignWidgets=!0);changeLine(doc,handle,"widget",function(line){var widgets=line.widgets||(line.widgets=[]);null==widget.insertAt?widgets.push(widget):widgets.splice(Math.min(widgets.length-1,Math.max(0,widget.insertAt)),0,widget);widget.line=line;if(cm&&!lineIsHidden(doc,line)){var aboveVisible=heightAtLine(line)<doc.scrollTop;updateLineHeight(line,line.height+widgetHeight(widget));aboveVisible&&addToScrollPos(cm,null,widget.height);cm.curOp.forceUpdate=!0}return!0});return widget}function updateLine(line,text,markedSpans,estimateHeight){line.text=text;line.stateAfter&&(line.stateAfter=null);line.styles&&(line.styles=null);null!=line.order&&(line.order=null);detachMarkedSpans(line);attachMarkedSpans(line,markedSpans);var estHeight=estimateHeight?estimateHeight(line):1;estHeight!=line.height&&updateLineHeight(line,estHeight)}function cleanUpLine(line){line.parent=null;detachMarkedSpans(line)}function extractLineClasses(type,output){if(type)for(;;){var lineClass=type.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!lineClass)break;type=type.slice(0,lineClass.index)+type.slice(lineClass.index+lineClass[0].length);var prop=lineClass[1]?"bgClass":"textClass";null==output[prop]?output[prop]=lineClass[2]:new RegExp("(?:^|s)"+lineClass[2]+"(?:$|s)").test(output[prop])||(output[prop]+=" "+lineClass[2])}return type}function callBlankLine(mode,state){if(mode.blankLine)return mode.blankLine(state);if(mode.innerMode){var inner=CodeMirror.innerMode(mode,state);return inner.mode.blankLine?inner.mode.blankLine(inner.state):void 0}}function readToken(mode,stream,state,inner){for(var i=0;10>i;i++){inner&&(inner[0]=CodeMirror.innerMode(mode,state).mode);var style=mode.token(stream,state);if(stream.pos>stream.start)return style}throw new Error("Mode "+mode.name+" failed to advance stream.")}function takeToken(cm,pos,precise,asArray){function getObj(copy){return{start:stream.start,end:stream.pos,string:stream.current(),type:style||null,state:copy?copyState(doc.mode,state):state}}var style,doc=cm.doc,mode=doc.mode;pos=clipPos(doc,pos);var tokens,line=getLine(doc,pos.line),state=getStateBefore(cm,pos.line,precise),stream=new StringStream(line.text,cm.options.tabSize);asArray&&(tokens=[]);for(;(asArray||stream.pos<pos.ch)&&!stream.eol();){stream.start=stream.pos;style=readToken(mode,stream,state);asArray&&tokens.push(getObj(!0))}return asArray?tokens:getObj()}function runMode(cm,text,mode,state,f,lineClasses,forceToEnd){var flattenSpans=mode.flattenSpans;null==flattenSpans&&(flattenSpans=cm.options.flattenSpans);var style,curStart=0,curStyle=null,stream=new StringStream(text,cm.options.tabSize),inner=cm.options.addModeClass&&[null];""==text&&extractLineClasses(callBlankLine(mode,state),lineClasses);for(;!stream.eol();){if(stream.pos>cm.options.maxHighlightLength){flattenSpans=!1;forceToEnd&&processLine(cm,text,state,stream.pos);stream.pos=text.length;style=null}else style=extractLineClasses(readToken(mode,stream,state,inner),lineClasses);if(inner){var mName=inner[0].name;mName&&(style="m-"+(style?mName+" "+style:mName))}if(!flattenSpans||curStyle!=style){for(;curStart<stream.start;){curStart=Math.min(stream.start,curStart+5e4);f(curStart,curStyle)}curStyle=style}stream.start=stream.pos}for(;curStart<stream.pos;){var pos=Math.min(stream.pos,curStart+5e4);f(pos,curStyle);curStart=pos}}function highlightLine(cm,line,state,forceToEnd){var st=[cm.state.modeGen],lineClasses={};runMode(cm,line.text,cm.doc.mode,state,function(end,style){st.push(end,style)},lineClasses,forceToEnd);for(var o=0;o<cm.state.overlays.length;++o){var overlay=cm.state.overlays[o],i=1,at=0;runMode(cm,line.text,overlay.mode,!0,function(end,style){for(var start=i;end>at;){var i_end=st[i];i_end>end&&st.splice(i,1,end,st[i+1],i_end);i+=2;at=Math.min(end,i_end)}if(style)if(overlay.opaque){st.splice(start,i-start,end,"cm-overlay "+style);i=start+2}else for(;i>start;start+=2){var cur=st[start+1];st[start+1]=(cur?cur+" ":"")+"cm-overlay "+style}},lineClasses)}return{styles:st,classes:lineClasses.bgClass||lineClasses.textClass?lineClasses:null}}function getLineStyles(cm,line,updateFrontier){if(!line.styles||line.styles[0]!=cm.state.modeGen){var state=getStateBefore(cm,lineNo(line)),result=highlightLine(cm,line,line.text.length>cm.options.maxHighlightLength?copyState(cm.doc.mode,state):state);line.stateAfter=state;line.styles=result.styles;result.classes?line.styleClasses=result.classes:line.styleClasses&&(line.styleClasses=null);updateFrontier===cm.doc.frontier&&cm.doc.frontier++}return line.styles}function processLine(cm,text,state,startAt){var mode=cm.doc.mode,stream=new StringStream(text,cm.options.tabSize);stream.start=stream.pos=startAt||0;""==text&&callBlankLine(mode,state);for(;!stream.eol();){readToken(mode,stream,state);stream.start=stream.pos}}function interpretTokenStyle(style,options){if(!style||/^\s*$/.test(style))return null;var cache=options.addModeClass?styleToClassCacheWithMode:styleToClassCache;return cache[style]||(cache[style]=style.replace(/\S+/g,"cm-$&"))}function buildLineContent(cm,lineView){var content=elt("span",null,null,webkit?"padding-right: .1px":null),builder={pre:elt("pre",[content],"CodeMirror-line"),content:content,col:0,pos:0,cm:cm,splitSpaces:(ie||webkit)&&cm.getOption("lineWrapping")};lineView.measure={};for(var i=0;i<=(lineView.rest?lineView.rest.length:0);i++){var order,line=i?lineView.rest[i-1]:lineView.line;builder.pos=0;builder.addToken=buildToken;hasBadBidiRects(cm.display.measure)&&(order=getOrder(line))&&(builder.addToken=buildTokenBadBidi(builder.addToken,order));builder.map=[];var allowFrontierUpdate=lineView!=cm.display.externalMeasured&&lineNo(line);insertLineContent(line,builder,getLineStyles(cm,line,allowFrontierUpdate));if(line.styleClasses){line.styleClasses.bgClass&&(builder.bgClass=joinClasses(line.styleClasses.bgClass,builder.bgClass||""));line.styleClasses.textClass&&(builder.textClass=joinClasses(line.styleClasses.textClass,builder.textClass||""))}0==builder.map.length&&builder.map.push(0,0,builder.content.appendChild(zeroWidthElement(cm.display.measure)));if(0==i){lineView.measure.map=builder.map;lineView.measure.cache={}}else{(lineView.measure.maps||(lineView.measure.maps=[])).push(builder.map);(lineView.measure.caches||(lineView.measure.caches=[])).push({})}}webkit&&/\bcm-tab\b/.test(builder.content.lastChild.className)&&(builder.content.className="cm-tab-wrap-hack");signal(cm,"renderLine",cm,lineView.line,builder.pre);builder.pre.className&&(builder.textClass=joinClasses(builder.pre.className,builder.textClass||""));return builder}function defaultSpecialCharPlaceholder(ch){var token=elt("span","•","cm-invalidchar");token.title="\\u"+ch.charCodeAt(0).toString(16);token.setAttribute("aria-label",token.title);return token}function buildToken(builder,text,style,startStyle,endStyle,title,css){if(text){var displayText=builder.splitSpaces?text.replace(/ {3,}/g,splitSpaces):text,special=builder.cm.state.specialChars,mustWrap=!1;if(special.test(text))for(var content=document.createDocumentFragment(),pos=0;;){special.lastIndex=pos;var m=special.exec(text),skipped=m?m.index-pos:text.length-pos;if(skipped){var txt=document.createTextNode(displayText.slice(pos,pos+skipped));ie&&9>ie_version?content.appendChild(elt("span",[txt])):content.appendChild(txt);builder.map.push(builder.pos,builder.pos+skipped,txt);builder.col+=skipped;builder.pos+=skipped}if(!m)break;pos+=skipped+1;if(" "==m[0]){var tabSize=builder.cm.options.tabSize,tabWidth=tabSize-builder.col%tabSize,txt=content.appendChild(elt("span",spaceStr(tabWidth),"cm-tab"));txt.setAttribute("role","presentation");txt.setAttribute("cm-text"," ");builder.col+=tabWidth}else if("\r"==m[0]||"\n"==m[0]){var txt=content.appendChild(elt("span","\r"==m[0]?"␍":"␤","cm-invalidchar"));txt.setAttribute("cm-text",m[0]);builder.col+=1}else{var txt=builder.cm.options.specialCharPlaceholder(m[0]);txt.setAttribute("cm-text",m[0]);ie&&9>ie_version?content.appendChild(elt("span",[txt])):content.appendChild(txt);builder.col+=1}builder.map.push(builder.pos,builder.pos+1,txt);builder.pos++}else{builder.col+=text.length;var content=document.createTextNode(displayText);builder.map.push(builder.pos,builder.pos+text.length,content);ie&&9>ie_version&&(mustWrap=!0);builder.pos+=text.length}if(style||startStyle||endStyle||mustWrap||css){var fullStyle=style||"";startStyle&&(fullStyle+=startStyle);endStyle&&(fullStyle+=endStyle);var token=elt("span",[content],fullStyle,css);title&&(token.title=title);return builder.content.appendChild(token)}builder.content.appendChild(content)}}function splitSpaces(old){for(var out=" ",i=0;i<old.length-2;++i)out+=i%2?" ":" ";out+=" ";return out}function buildTokenBadBidi(inner,order){return function(builder,text,style,startStyle,endStyle,title,css){style=style?style+" cm-force-border":"cm-force-border";for(var start=builder.pos,end=start+text.length;;){for(var i=0;i<order.length;i++){var part=order[i];if(part.to>start&&part.from<=start)break}if(part.to>=end)return inner(builder,text,style,startStyle,endStyle,title,css);inner(builder,text.slice(0,part.to-start),style,startStyle,null,title,css);startStyle=null;text=text.slice(part.to-start);start=part.to}}}function buildCollapsedSpan(builder,size,marker,ignoreWidget){var widget=!ignoreWidget&&marker.widgetNode;widget&&builder.map.push(builder.pos,builder.pos+size,widget);if(!ignoreWidget&&builder.cm.display.input.needsContentAttribute){widget||(widget=builder.content.appendChild(document.createElement("span")));widget.setAttribute("cm-marker",marker.id)}if(widget){builder.cm.display.input.setUneditable(widget);builder.content.appendChild(widget)}builder.pos+=size}function insertLineContent(line,builder,styles){var spans=line.markedSpans,allText=line.text,at=0;if(spans)for(var style,css,spanStyle,spanEndStyle,spanStartStyle,title,collapsed,len=allText.length,pos=0,i=1,text="",nextChange=0;;){if(nextChange==pos){spanStyle=spanEndStyle=spanStartStyle=title=css="";collapsed=null;nextChange=1/0;for(var foundBookmarks=[],j=0;j<spans.length;++j){var sp=spans[j],m=sp.marker;if("bookmark"==m.type&&sp.from==pos&&m.widgetNode)foundBookmarks.push(m);else if(sp.from<=pos&&(null==sp.to||sp.to>pos||m.collapsed&&sp.to==pos&&sp.from==pos)){if(null!=sp.to&&sp.to!=pos&&nextChange>sp.to){nextChange=sp.to;spanEndStyle=""}m.className&&(spanStyle+=" "+m.className);m.css&&(css=m.css);m.startStyle&&sp.from==pos&&(spanStartStyle+=" "+m.startStyle);m.endStyle&&sp.to==nextChange&&(spanEndStyle+=" "+m.endStyle);m.title&&!title&&(title=m.title);m.collapsed&&(!collapsed||compareCollapsedMarkers(collapsed.marker,m)<0)&&(collapsed=sp)}else sp.from>pos&&nextChange>sp.from&&(nextChange=sp.from)}if(collapsed&&(collapsed.from||0)==pos){buildCollapsedSpan(builder,(null==collapsed.to?len+1:collapsed.to)-pos,collapsed.marker,null==collapsed.from);if(null==collapsed.to)return;collapsed.to==pos&&(collapsed=!1)}if(!collapsed&&foundBookmarks.length)for(var j=0;j<foundBookmarks.length;++j)buildCollapsedSpan(builder,0,foundBookmarks[j])}if(pos>=len)break;for(var upto=Math.min(len,nextChange);;){if(text){var end=pos+text.length;if(!collapsed){var tokenText=end>upto?text.slice(0,upto-pos):text;builder.addToken(builder,tokenText,style?style+spanStyle:spanStyle,spanStartStyle,pos+tokenText.length==nextChange?spanEndStyle:"",title,css)}if(end>=upto){text=text.slice(upto-pos);pos=upto;break}pos=end;spanStartStyle=""}text=allText.slice(at,at=styles[i++]);style=interpretTokenStyle(styles[i++],builder.cm.options)}}else for(var i=1;i<styles.length;i+=2)builder.addToken(builder,allText.slice(at,at=styles[i]),interpretTokenStyle(styles[i+1],builder.cm.options))}function isWholeLineUpdate(doc,change){return 0==change.from.ch&&0==change.to.ch&&""==lst(change.text)&&(!doc.cm||doc.cm.options.wholeLineUpdateBefore)}function updateDoc(doc,change,markedSpans,estimateHeight){function spansFor(n){return markedSpans?markedSpans[n]:null}function update(line,text,spans){updateLine(line,text,spans,estimateHeight);signalLater(line,"change",line,change)}function linesFor(start,end){for(var i=start,result=[];end>i;++i)result.push(new Line(text[i],spansFor(i),estimateHeight));return result}var from=change.from,to=change.to,text=change.text,firstLine=getLine(doc,from.line),lastLine=getLine(doc,to.line),lastText=lst(text),lastSpans=spansFor(text.length-1),nlines=to.line-from.line;if(change.full){doc.insert(0,linesFor(0,text.length));doc.remove(text.length,doc.size-text.length)}else if(isWholeLineUpdate(doc,change)){var added=linesFor(0,text.length-1);update(lastLine,lastLine.text,lastSpans);nlines&&doc.remove(from.line,nlines);added.length&&doc.insert(from.line,added)}else if(firstLine==lastLine)if(1==text.length)update(firstLine,firstLine.text.slice(0,from.ch)+lastText+firstLine.text.slice(to.ch),lastSpans);else{var added=linesFor(1,text.length-1);added.push(new Line(lastText+firstLine.text.slice(to.ch),lastSpans,estimateHeight));update(firstLine,firstLine.text.slice(0,from.ch)+text[0],spansFor(0));doc.insert(from.line+1,added)}else if(1==text.length){update(firstLine,firstLine.text.slice(0,from.ch)+text[0]+lastLine.text.slice(to.ch),spansFor(0));doc.remove(from.line+1,nlines)}else{update(firstLine,firstLine.text.slice(0,from.ch)+text[0],spansFor(0));update(lastLine,lastText+lastLine.text.slice(to.ch),lastSpans);var added=linesFor(1,text.length-1);nlines>1&&doc.remove(from.line+1,nlines-1);doc.insert(from.line+1,added)}signalLater(doc,"change",doc,change)}function LeafChunk(lines){this.lines=lines;this.parent=null;for(var i=0,height=0;i<lines.length;++i){lines[i].parent=this;height+=lines[i].height}this.height=height}function BranchChunk(children){this.children=children;for(var size=0,height=0,i=0;i<children.length;++i){var ch=children[i];size+=ch.chunkSize();height+=ch.height;ch.parent=this}this.size=size;this.height=height;this.parent=null}function linkedDocs(doc,f,sharedHistOnly){function propagate(doc,skip,sharedHist){if(doc.linked)for(var i=0;i<doc.linked.length;++i){var rel=doc.linked[i];if(rel.doc!=skip){var shared=sharedHist&&rel.sharedHist;if(!sharedHistOnly||shared){f(rel.doc,shared);propagate(rel.doc,doc,shared)}}}}propagate(doc,null,!0)}function attachDoc(cm,doc){if(doc.cm)throw new Error("This document is already in use.");cm.doc=doc;doc.cm=cm;estimateLineHeights(cm);loadMode(cm);cm.options.lineWrapping||findMaxLine(cm);cm.options.mode=doc.modeOption;regChange(cm)}function getLine(doc,n){n-=doc.first;if(0>n||n>=doc.size)throw new Error("There is no line "+(n+doc.first)+" in the document.");for(var chunk=doc;!chunk.lines;)for(var i=0;;++i){var child=chunk.children[i],sz=child.chunkSize();if(sz>n){chunk=child;break}n-=sz}return chunk.lines[n]}function getBetween(doc,start,end){var out=[],n=start.line;doc.iter(start.line,end.line+1,function(line){var text=line.text;n==end.line&&(text=text.slice(0,end.ch));n==start.line&&(text=text.slice(start.ch));out.push(text);++n});return out}function getLines(doc,from,to){var out=[];doc.iter(from,to,function(line){out.push(line.text)});return out}function updateLineHeight(line,height){var diff=height-line.height;if(diff)for(var n=line;n;n=n.parent)n.height+=diff}function lineNo(line){if(null==line.parent)return null;for(var cur=line.parent,no=indexOf(cur.lines,line),chunk=cur.parent;chunk;cur=chunk,chunk=chunk.parent)for(var i=0;chunk.children[i]!=cur;++i)no+=chunk.children[i].chunkSize();return no+cur.first}function lineAtHeight(chunk,h){var n=chunk.first;outer:do{for(var i=0;i<chunk.children.length;++i){var child=chunk.children[i],ch=child.height;if(ch>h){chunk=child;continue outer}h-=ch;n+=child.chunkSize()}return n}while(!chunk.lines);for(var i=0;i<chunk.lines.length;++i){var line=chunk.lines[i],lh=line.height;if(lh>h)break;h-=lh}return n+i}function heightAtLine(lineObj){lineObj=visualLine(lineObj);for(var h=0,chunk=lineObj.parent,i=0;i<chunk.lines.length;++i){var line=chunk.lines[i];if(line==lineObj)break;h+=line.height}for(var p=chunk.parent;p;chunk=p,p=chunk.parent)for(var i=0;i<p.children.length;++i){var cur=p.children[i];if(cur==chunk)break;h+=cur.height}return h}function getOrder(line){var order=line.order;null==order&&(order=line.order=bidiOrdering(line.text));return order}function History(startGen){this.done=[];this.undone=[];this.undoDepth=1/0;this.lastModTime=this.lastSelTime=0;this.lastOp=this.lastSelOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=startGen||1}function historyChangeFromChange(doc,change){var histChange={from:copyPos(change.from),to:changeEnd(change),text:getBetween(doc,change.from,change.to)};attachLocalSpans(doc,histChange,change.from.line,change.to.line+1);linkedDocs(doc,function(doc){attachLocalSpans(doc,histChange,change.from.line,change.to.line+1)},!0);return histChange}function clearSelectionEvents(array){for(;array.length;){var last=lst(array);if(!last.ranges)break;array.pop()}}function lastChangeEvent(hist,force){if(force){clearSelectionEvents(hist.done);return lst(hist.done)}if(hist.done.length&&!lst(hist.done).ranges)return lst(hist.done);if(hist.done.length>1&&!hist.done[hist.done.length-2].ranges){hist.done.pop();return lst(hist.done)}}function addChangeToHistory(doc,change,selAfter,opId){var hist=doc.history;hist.undone.length=0;var cur,time=+new Date;if((hist.lastOp==opId||hist.lastOrigin==change.origin&&change.origin&&("+"==change.origin.charAt(0)&&doc.cm&&hist.lastModTime>time-doc.cm.options.historyEventDelay||"*"==change.origin.charAt(0)))&&(cur=lastChangeEvent(hist,hist.lastOp==opId))){
5
+ var last=lst(cur.changes);0==cmp(change.from,change.to)&&0==cmp(change.from,last.to)?last.to=changeEnd(change):cur.changes.push(historyChangeFromChange(doc,change))}else{var before=lst(hist.done);before&&before.ranges||pushSelectionToHistory(doc.sel,hist.done);cur={changes:[historyChangeFromChange(doc,change)],generation:hist.generation};hist.done.push(cur);for(;hist.done.length>hist.undoDepth;){hist.done.shift();hist.done[0].ranges||hist.done.shift()}}hist.done.push(selAfter);hist.generation=++hist.maxGeneration;hist.lastModTime=hist.lastSelTime=time;hist.lastOp=hist.lastSelOp=opId;hist.lastOrigin=hist.lastSelOrigin=change.origin;last||signal(doc,"historyAdded")}function selectionEventCanBeMerged(doc,origin,prev,sel){var ch=origin.charAt(0);return"*"==ch||"+"==ch&&prev.ranges.length==sel.ranges.length&&prev.somethingSelected()==sel.somethingSelected()&&new Date-doc.history.lastSelTime<=(doc.cm?doc.cm.options.historyEventDelay:500)}function addSelectionToHistory(doc,sel,opId,options){var hist=doc.history,origin=options&&options.origin;opId==hist.lastSelOp||origin&&hist.lastSelOrigin==origin&&(hist.lastModTime==hist.lastSelTime&&hist.lastOrigin==origin||selectionEventCanBeMerged(doc,origin,lst(hist.done),sel))?hist.done[hist.done.length-1]=sel:pushSelectionToHistory(sel,hist.done);hist.lastSelTime=+new Date;hist.lastSelOrigin=origin;hist.lastSelOp=opId;options&&options.clearRedo!==!1&&clearSelectionEvents(hist.undone)}function pushSelectionToHistory(sel,dest){var top=lst(dest);top&&top.ranges&&top.equals(sel)||dest.push(sel)}function attachLocalSpans(doc,change,from,to){var existing=change["spans_"+doc.id],n=0;doc.iter(Math.max(doc.first,from),Math.min(doc.first+doc.size,to),function(line){line.markedSpans&&((existing||(existing=change["spans_"+doc.id]={}))[n]=line.markedSpans);++n})}function removeClearedSpans(spans){if(!spans)return null;for(var out,i=0;i<spans.length;++i)spans[i].marker.explicitlyCleared?out||(out=spans.slice(0,i)):out&&out.push(spans[i]);return out?out.length?out:null:spans}function getOldSpans(doc,change){var found=change["spans_"+doc.id];if(!found)return null;for(var i=0,nw=[];i<change.text.length;++i)nw.push(removeClearedSpans(found[i]));return nw}function copyHistoryArray(events,newGroup,instantiateSel){for(var i=0,copy=[];i<events.length;++i){var event=events[i];if(event.ranges)copy.push(instantiateSel?Selection.prototype.deepCopy.call(event):event);else{var changes=event.changes,newChanges=[];copy.push({changes:newChanges});for(var j=0;j<changes.length;++j){var m,change=changes[j];newChanges.push({from:change.from,to:change.to,text:change.text});if(newGroup)for(var prop in change)if((m=prop.match(/^spans_(\d+)$/))&&indexOf(newGroup,Number(m[1]))>-1){lst(newChanges)[prop]=change[prop];delete change[prop]}}}}return copy}function rebaseHistSelSingle(pos,from,to,diff){if(to<pos.line)pos.line+=diff;else if(from<pos.line){pos.line=from;pos.ch=0}}function rebaseHistArray(array,from,to,diff){for(var i=0;i<array.length;++i){var sub=array[i],ok=!0;if(sub.ranges){if(!sub.copied){sub=array[i]=sub.deepCopy();sub.copied=!0}for(var j=0;j<sub.ranges.length;j++){rebaseHistSelSingle(sub.ranges[j].anchor,from,to,diff);rebaseHistSelSingle(sub.ranges[j].head,from,to,diff)}}else{for(var j=0;j<sub.changes.length;++j){var cur=sub.changes[j];if(to<cur.from.line){cur.from=Pos(cur.from.line+diff,cur.from.ch);cur.to=Pos(cur.to.line+diff,cur.to.ch)}else if(from<=cur.to.line){ok=!1;break}}if(!ok){array.splice(0,i+1);i=0}}}}function rebaseHist(hist,change){var from=change.from.line,to=change.to.line,diff=change.text.length-(to-from)-1;rebaseHistArray(hist.done,from,to,diff);rebaseHistArray(hist.undone,from,to,diff)}function e_defaultPrevented(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function e_target(e){return e.target||e.srcElement}function e_button(e){var b=e.which;null==b&&(1&e.button?b=1:2&e.button?b=3:4&e.button&&(b=2));mac&&e.ctrlKey&&1==b&&(b=3);return b}function getHandlers(emitter,type,copy){var arr=emitter._handlers&&emitter._handlers[type];return copy?arr&&arr.length>0?arr.slice():noHandlers:arr||noHandlers}function signalLater(emitter,type){function bnd(f){return function(){f.apply(null,args)}}var arr=getHandlers(emitter,type,!1);if(arr.length){var list,args=Array.prototype.slice.call(arguments,2);if(operationGroup)list=operationGroup.delayedCallbacks;else if(orphanDelayedCallbacks)list=orphanDelayedCallbacks;else{list=orphanDelayedCallbacks=[];setTimeout(fireOrphanDelayed,0)}for(var i=0;i<arr.length;++i)list.push(bnd(arr[i]))}}function fireOrphanDelayed(){var delayed=orphanDelayedCallbacks;orphanDelayedCallbacks=null;for(var i=0;i<delayed.length;++i)delayed[i]()}function signalDOMEvent(cm,e,override){"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}});signal(cm,override||e.type,cm,e);return e_defaultPrevented(e)||e.codemirrorIgnore}function signalCursorActivity(cm){var arr=cm._handlers&&cm._handlers.cursorActivity;if(arr)for(var set=cm.curOp.cursorActivityHandlers||(cm.curOp.cursorActivityHandlers=[]),i=0;i<arr.length;++i)-1==indexOf(set,arr[i])&&set.push(arr[i])}function hasHandler(emitter,type){return getHandlers(emitter,type).length>0}function eventMixin(ctor){ctor.prototype.on=function(type,f){on(this,type,f)};ctor.prototype.off=function(type,f){off(this,type,f)}}function Delayed(){this.id=null}function spaceStr(n){for(;spaceStrs.length<=n;)spaceStrs.push(lst(spaceStrs)+" ");return spaceStrs[n]}function lst(arr){return arr[arr.length-1]}function indexOf(array,elt){for(var i=0;i<array.length;++i)if(array[i]==elt)return i;return-1}function map(array,f){for(var out=[],i=0;i<array.length;i++)out[i]=f(array[i],i);return out}function nothing(){}function createObj(base,props){var inst;if(Object.create)inst=Object.create(base);else{nothing.prototype=base;inst=new nothing}props&&copyObj(props,inst);return inst}function copyObj(obj,target,overwrite){target||(target={});for(var prop in obj)!obj.hasOwnProperty(prop)||overwrite===!1&&target.hasOwnProperty(prop)||(target[prop]=obj[prop]);return target}function bind(f){var args=Array.prototype.slice.call(arguments,1);return function(){return f.apply(null,args)}}function isWordChar(ch,helper){return helper?helper.source.indexOf("\\w")>-1&&isWordCharBasic(ch)?!0:helper.test(ch):isWordCharBasic(ch)}function isEmpty(obj){for(var n in obj)if(obj.hasOwnProperty(n)&&obj[n])return!1;return!0}function isExtendingChar(ch){return ch.charCodeAt(0)>=768&&extendingChars.test(ch)}function elt(tag,content,className,style){var e=document.createElement(tag);className&&(e.className=className);style&&(e.style.cssText=style);if("string"==typeof content)e.appendChild(document.createTextNode(content));else if(content)for(var i=0;i<content.length;++i)e.appendChild(content[i]);return e}function removeChildren(e){for(var count=e.childNodes.length;count>0;--count)e.removeChild(e.firstChild);return e}function removeChildrenAndAdd(parent,e){return removeChildren(parent).appendChild(e)}function activeElt(){for(var activeElement=document.activeElement;activeElement&&activeElement.root&&activeElement.root.activeElement;)activeElement=activeElement.root.activeElement;return activeElement}function classTest(cls){return new RegExp("(^|\\s)"+cls+"(?:$|\\s)\\s*")}function joinClasses(a,b){for(var as=a.split(" "),i=0;i<as.length;i++)as[i]&&!classTest(as[i]).test(b)&&(b+=" "+as[i]);return b}function forEachCodeMirror(f){if(document.body.getElementsByClassName)for(var byClass=document.body.getElementsByClassName("CodeMirror"),i=0;i<byClass.length;i++){var cm=byClass[i].CodeMirror;cm&&f(cm)}}function ensureGlobalHandlers(){if(!globalsRegistered){registerGlobalHandlers();globalsRegistered=!0}}function registerGlobalHandlers(){var resizeTimer;on(window,"resize",function(){null==resizeTimer&&(resizeTimer=setTimeout(function(){resizeTimer=null;forEachCodeMirror(onResize)},100))});on(window,"blur",function(){forEachCodeMirror(onBlur)})}function zeroWidthElement(measure){if(null==zwspSupported){var test=elt("span","​");removeChildrenAndAdd(measure,elt("span",[test,document.createTextNode("x")]));0!=measure.firstChild.offsetHeight&&(zwspSupported=test.offsetWidth<=1&&test.offsetHeight>2&&!(ie&&8>ie_version))}var node=zwspSupported?elt("span","​"):elt("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");node.setAttribute("cm-text","");return node}function hasBadBidiRects(measure){if(null!=badBidiRects)return badBidiRects;var txt=removeChildrenAndAdd(measure,document.createTextNode("AخA")),r0=range(txt,0,1).getBoundingClientRect();if(!r0||r0.left==r0.right)return!1;var r1=range(txt,1,2).getBoundingClientRect();return badBidiRects=r1.right-r0.right<3}function hasBadZoomedRects(measure){if(null!=badZoomedRects)return badZoomedRects;var node=removeChildrenAndAdd(measure,elt("span","x")),normal=node.getBoundingClientRect(),fromRange=range(node,0,1).getBoundingClientRect();return badZoomedRects=Math.abs(normal.left-fromRange.left)>1}function iterateBidiSections(order,from,to,f){if(!order)return f(from,to,"ltr");for(var found=!1,i=0;i<order.length;++i){var part=order[i];if(part.from<to&&part.to>from||from==to&&part.to==from){f(Math.max(part.from,from),Math.min(part.to,to),1==part.level?"rtl":"ltr");found=!0}}found||f(from,to,"ltr")}function bidiLeft(part){return part.level%2?part.to:part.from}function bidiRight(part){return part.level%2?part.from:part.to}function lineLeft(line){var order=getOrder(line);return order?bidiLeft(order[0]):0}function lineRight(line){var order=getOrder(line);return order?bidiRight(lst(order)):line.text.length}function lineStart(cm,lineN){var line=getLine(cm.doc,lineN),visual=visualLine(line);visual!=line&&(lineN=lineNo(visual));var order=getOrder(visual),ch=order?order[0].level%2?lineRight(visual):lineLeft(visual):0;return Pos(lineN,ch)}function lineEnd(cm,lineN){for(var merged,line=getLine(cm.doc,lineN);merged=collapsedSpanAtEnd(line);){line=merged.find(1,!0).line;lineN=null}var order=getOrder(line),ch=order?order[0].level%2?lineLeft(line):lineRight(line):line.text.length;return Pos(null==lineN?lineNo(line):lineN,ch)}function lineStartSmart(cm,pos){var start=lineStart(cm,pos.line),line=getLine(cm.doc,start.line),order=getOrder(line);if(!order||0==order[0].level){var firstNonWS=Math.max(0,line.text.search(/\S/)),inWS=pos.line==start.line&&pos.ch<=firstNonWS&&pos.ch;return Pos(start.line,inWS?0:firstNonWS)}return start}function compareBidiLevel(order,a,b){var linedir=order[0].level;return a==linedir?!0:b==linedir?!1:b>a}function getBidiPartAt(order,pos){bidiOther=null;for(var found,i=0;i<order.length;++i){var cur=order[i];if(cur.from<pos&&cur.to>pos)return i;if(cur.from==pos||cur.to==pos){if(null!=found){if(compareBidiLevel(order,cur.level,order[found].level)){cur.from!=cur.to&&(bidiOther=found);return i}cur.from!=cur.to&&(bidiOther=i);return found}found=i}}return found}function moveInLine(line,pos,dir,byUnit){if(!byUnit)return pos+dir;do pos+=dir;while(pos>0&&isExtendingChar(line.text.charAt(pos)));return pos}function moveVisually(line,start,dir,byUnit){var bidi=getOrder(line);if(!bidi)return moveLogically(line,start,dir,byUnit);for(var pos=getBidiPartAt(bidi,start),part=bidi[pos],target=moveInLine(line,start,part.level%2?-dir:dir,byUnit);;){if(target>part.from&&target<part.to)return target;if(target==part.from||target==part.to){if(getBidiPartAt(bidi,target)==pos)return target;part=bidi[pos+=dir];return dir>0==part.level%2?part.to:part.from}part=bidi[pos+=dir];if(!part)return null;target=dir>0==part.level%2?moveInLine(line,part.to,-1,byUnit):moveInLine(line,part.from,1,byUnit)}}function moveLogically(line,start,dir,byUnit){var target=start+dir;if(byUnit)for(;target>0&&isExtendingChar(line.text.charAt(target));)target+=dir;return 0>target||target>line.text.length?null:target}var userAgent=navigator.userAgent,platform=navigator.platform,gecko=/gecko\/\d/i.test(userAgent),ie_upto10=/MSIE \d/.test(userAgent),ie_11up=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent),ie=ie_upto10||ie_11up,ie_version=ie&&(ie_upto10?document.documentMode||6:ie_11up[1]),webkit=/WebKit\//.test(userAgent),qtwebkit=webkit&&/Qt\/\d+\.\d+/.test(userAgent),chrome=/Chrome\//.test(userAgent),presto=/Opera\//.test(userAgent),safari=/Apple Computer/.test(navigator.vendor),mac_geMountainLion=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent),phantom=/PhantomJS/.test(userAgent),ios=/AppleWebKit/.test(userAgent)&&/Mobile\/\w+/.test(userAgent),mobile=ios||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent),mac=ios||/Mac/.test(platform),windows=/win/i.test(platform),presto_version=presto&&userAgent.match(/Version\/(\d*\.\d*)/);presto_version&&(presto_version=Number(presto_version[1]));if(presto_version&&presto_version>=15){presto=!1;webkit=!0}var flipCtrlCmd=mac&&(qtwebkit||presto&&(null==presto_version||12.11>presto_version)),captureRightClick=gecko||ie&&ie_version>=9,sawReadOnlySpans=!1,sawCollapsedSpans=!1;NativeScrollbars.prototype=copyObj({update:function(measure){var needsH=measure.scrollWidth>measure.clientWidth+1,needsV=measure.scrollHeight>measure.clientHeight+1,sWidth=measure.nativeBarWidth;if(needsV){this.vert.style.display="block";this.vert.style.bottom=needsH?sWidth+"px":"0";var totalHeight=measure.viewHeight-(needsH?sWidth:0);this.vert.firstChild.style.height=Math.max(0,measure.scrollHeight-measure.clientHeight+totalHeight)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(needsH){this.horiz.style.display="block";this.horiz.style.right=needsV?sWidth+"px":"0";this.horiz.style.left=measure.barLeft+"px";var totalWidth=measure.viewWidth-measure.barLeft-(needsV?sWidth:0);this.horiz.firstChild.style.width=measure.scrollWidth-measure.clientWidth+totalWidth+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedOverlay&&measure.clientHeight>0){0==sWidth&&this.overlayHack();this.checkedOverlay=!0}return{right:needsV?sWidth:0,bottom:needsH?sWidth:0}},setScrollLeft:function(pos){this.horiz.scrollLeft!=pos&&(this.horiz.scrollLeft=pos)},setScrollTop:function(pos){this.vert.scrollTop!=pos&&(this.vert.scrollTop=pos)},overlayHack:function(){var w=mac&&!mac_geMountainLion?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=w;var self=this,barMouseDown=function(e){e_target(e)!=self.vert&&e_target(e)!=self.horiz&&operation(self.cm,onMouseDown)(e)};on(this.vert,"mousedown",barMouseDown);on(this.horiz,"mousedown",barMouseDown)},clear:function(){var parent=this.horiz.parentNode;parent.removeChild(this.horiz);parent.removeChild(this.vert)}},NativeScrollbars.prototype);NullScrollbars.prototype=copyObj({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},NullScrollbars.prototype);CodeMirror.scrollbarModel={"native":NativeScrollbars,"null":NullScrollbars};DisplayUpdate.prototype.signal=function(emitter,type){hasHandler(emitter,type)&&this.events.push(arguments)};DisplayUpdate.prototype.finish=function(){for(var i=0;i<this.events.length;i++)signal.apply(null,this.events[i])};var Pos=CodeMirror.Pos=function(line,ch){if(!(this instanceof Pos))return new Pos(line,ch);this.line=line;this.ch=ch},cmp=CodeMirror.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch},lastCopied=null;TextareaInput.prototype=copyObj({init:function(display){function prepareCopyCut(e){if(cm.somethingSelected()){lastCopied=cm.getSelections();if(input.inaccurateSelection){input.prevInput="";input.inaccurateSelection=!1;te.value=lastCopied.join("\n");selectInput(te)}}else{if(!cm.options.lineWiseCopyCut)return;var ranges=copyableRanges(cm);lastCopied=ranges.text;if("cut"==e.type)cm.setSelections(ranges.ranges,null,sel_dontScroll);else{input.prevInput="";te.value=ranges.text.join("\n");selectInput(te)}}"cut"==e.type&&(cm.state.cutIncoming=!0)}var input=this,cm=this.cm,div=this.wrapper=hiddenTextarea(),te=this.textarea=div.firstChild;display.wrapper.insertBefore(div,display.wrapper.firstChild);ios&&(te.style.width="0px");on(te,"input",function(){ie&&ie_version>=9&&input.hasSelection&&(input.hasSelection=null);input.poll()});on(te,"paste",function(e){if(handlePaste(e,cm))return!0;cm.state.pasteIncoming=!0;input.fastPoll()});on(te,"cut",prepareCopyCut);on(te,"copy",prepareCopyCut);on(display.scroller,"paste",function(e){if(!eventInWidget(display,e)){cm.state.pasteIncoming=!0;input.focus()}});on(display.lineSpace,"selectstart",function(e){eventInWidget(display,e)||e_preventDefault(e)});on(te,"compositionstart",function(){var start=cm.getCursor("from");input.composing&&input.composing.range.clear();input.composing={start:start,range:cm.markText(start,cm.getCursor("to"),{className:"CodeMirror-composing"})}});on(te,"compositionend",function(){if(input.composing){input.poll();input.composing.range.clear();input.composing=null}})},prepareSelection:function(){var cm=this.cm,display=cm.display,doc=cm.doc,result=prepareSelection(cm);if(cm.options.moveInputWithCursor){var headPos=cursorCoords(cm,doc.sel.primary().head,"div"),wrapOff=display.wrapper.getBoundingClientRect(),lineOff=display.lineDiv.getBoundingClientRect();result.teTop=Math.max(0,Math.min(display.wrapper.clientHeight-10,headPos.top+lineOff.top-wrapOff.top));result.teLeft=Math.max(0,Math.min(display.wrapper.clientWidth-10,headPos.left+lineOff.left-wrapOff.left))}return result},showSelection:function(drawn){var cm=this.cm,display=cm.display;removeChildrenAndAdd(display.cursorDiv,drawn.cursors);removeChildrenAndAdd(display.selectionDiv,drawn.selection);if(null!=drawn.teTop){this.wrapper.style.top=drawn.teTop+"px";this.wrapper.style.left=drawn.teLeft+"px"}},reset:function(typing){if(!this.contextMenuPending){var minimal,selected,cm=this.cm,doc=cm.doc;if(cm.somethingSelected()){this.prevInput="";var range=doc.sel.primary();minimal=hasCopyEvent&&(range.to().line-range.from().line>100||(selected=cm.getSelection()).length>1e3);var content=minimal?"-":selected||cm.getSelection();this.textarea.value=content;cm.state.focused&&selectInput(this.textarea);ie&&ie_version>=9&&(this.hasSelection=content)}else if(!typing){this.prevInput=this.textarea.value="";ie&&ie_version>=9&&(this.hasSelection=null)}this.inaccurateSelection=minimal}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!mobile||activeElt()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var input=this;input.pollingFast||input.polling.set(this.cm.options.pollInterval,function(){input.poll();input.cm.state.focused&&input.slowPoll()})},fastPoll:function(){function p(){var changed=input.poll();if(changed||missed){input.pollingFast=!1;input.slowPoll()}else{missed=!0;input.polling.set(60,p)}}var missed=!1,input=this;input.pollingFast=!0;input.polling.set(20,p)},poll:function(){var cm=this.cm,input=this.textarea,prevInput=this.prevInput;if(this.contextMenuPending||!cm.state.focused||hasSelection(input)&&!prevInput&&!this.composing||isReadOnly(cm)||cm.options.disableInput||cm.state.keySeq)return!1;var text=input.value;if(text==prevInput&&!cm.somethingSelected())return!1;if(ie&&ie_version>=9&&this.hasSelection===text||mac&&/[\uf700-\uf7ff]/.test(text)){cm.display.input.reset();return!1}if(cm.doc.sel==cm.display.selForContextMenu){var first=text.charCodeAt(0);8203!=first||prevInput||(prevInput="​");if(8666==first){this.reset();return this.cm.execCommand("undo")}}for(var same=0,l=Math.min(prevInput.length,text.length);l>same&&prevInput.charCodeAt(same)==text.charCodeAt(same);)++same;var self=this;runInOp(cm,function(){applyTextInput(cm,text.slice(same),prevInput.length-same,null,self.composing?"*compose":null);text.length>1e3||text.indexOf("\n")>-1?input.value=self.prevInput="":self.prevInput=text;if(self.composing){self.composing.range.clear();self.composing.range=cm.markText(self.composing.start,cm.getCursor("to"),{className:"CodeMirror-composing"})}});return!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){ie&&ie_version>=9&&(this.hasSelection=null);this.fastPoll()},onContextMenu:function(e){function prepareSelectAllHack(){if(null!=te.selectionStart){var selected=cm.somethingSelected(),extval="​"+(selected?te.value:"");te.value="⇚";te.value=extval;input.prevInput=selected?"":"​";te.selectionStart=1;te.selectionEnd=extval.length;display.selForContextMenu=cm.doc.sel}}function rehide(){input.contextMenuPending=!1;input.wrapper.style.position="relative";te.style.cssText=oldCSS;ie&&9>ie_version&&display.scrollbars.setScrollTop(display.scroller.scrollTop=scrollPos);if(null!=te.selectionStart){(!ie||ie&&9>ie_version)&&prepareSelectAllHack();var i=0,poll=function(){display.selForContextMenu==cm.doc.sel&&0==te.selectionStart&&te.selectionEnd>0&&"​"==input.prevInput?operation(cm,commands.selectAll)(cm):i++<10?display.detectingSelectAll=setTimeout(poll,500):display.input.reset()};display.detectingSelectAll=setTimeout(poll,200)}}var input=this,cm=input.cm,display=cm.display,te=input.textarea,pos=posFromMouse(cm,e),scrollPos=display.scroller.scrollTop;if(pos&&!presto){var reset=cm.options.resetSelectionOnContextMenu;reset&&-1==cm.doc.sel.contains(pos)&&operation(cm,setSelection)(cm.doc,simpleSelection(pos),sel_dontScroll);var oldCSS=te.style.cssText;input.wrapper.style.position="absolute";te.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(ie?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";if(webkit)var oldScrollY=window.scrollY;display.input.focus();webkit&&window.scrollTo(null,oldScrollY);display.input.reset();cm.somethingSelected()||(te.value=input.prevInput=" ");input.contextMenuPending=!0;display.selForContextMenu=cm.doc.sel;clearTimeout(display.detectingSelectAll);ie&&ie_version>=9&&prepareSelectAllHack();if(captureRightClick){e_stop(e);var mouseup=function(){off(window,"mouseup",mouseup);setTimeout(rehide,20)};on(window,"mouseup",mouseup)}else setTimeout(rehide,50)}},readOnlyChanged:function(val){val||this.reset()},setUneditable:nothing,needsContentAttribute:!1},TextareaInput.prototype);ContentEditableInput.prototype=copyObj({init:function(display){function onCopyCut(e){if(cm.somethingSelected()){lastCopied=cm.getSelections();"cut"==e.type&&cm.replaceSelection("",null,"cut")}else{if(!cm.options.lineWiseCopyCut)return;var ranges=copyableRanges(cm);lastCopied=ranges.text;"cut"==e.type&&cm.operation(function(){cm.setSelections(ranges.ranges,0,sel_dontScroll);cm.replaceSelection("",null,"cut")})}if(e.clipboardData&&!ios){e.preventDefault();e.clipboardData.clearData();e.clipboardData.setData("text/plain",lastCopied.join("\n"))}else{var kludge=hiddenTextarea(),te=kludge.firstChild;cm.display.lineSpace.insertBefore(kludge,cm.display.lineSpace.firstChild);te.value=lastCopied.join("\n");var hadFocus=document.activeElement;selectInput(te);setTimeout(function(){cm.display.lineSpace.removeChild(kludge);hadFocus.focus()},50)}}var input=this,cm=input.cm,div=input.div=display.lineDiv;disableBrowserMagic(div);on(div,"paste",function(e){handlePaste(e,cm)});on(div,"compositionstart",function(e){var data=e.data;input.composing={sel:cm.doc.sel,data:data,startData:data};if(data){var prim=cm.doc.sel.primary(),line=cm.getLine(prim.head.line),found=line.indexOf(data,Math.max(0,prim.head.ch-data.length));found>-1&&found<=prim.head.ch&&(input.composing.sel=simpleSelection(Pos(prim.head.line,found),Pos(prim.head.line,found+data.length)))}});on(div,"compositionupdate",function(e){input.composing.data=e.data});on(div,"compositionend",function(e){var ours=input.composing;if(ours){e.data==ours.startData||/\u200b/.test(e.data)||(ours.data=e.data);setTimeout(function(){ours.handled||input.applyComposition(ours);input.composing==ours&&(input.composing=null)},50)}});on(div,"touchstart",function(){input.forceCompositionEnd()});on(div,"input",function(){input.composing||(isReadOnly(cm)||!input.pollContent())&&runInOp(input.cm,function(){regChange(cm)})});on(div,"copy",onCopyCut);on(div,"cut",onCopyCut)},prepareSelection:function(){var result=prepareSelection(this.cm,!1);result.focus=this.cm.state.focused;return result},showSelection:function(info){if(info&&this.cm.display.view.length){info.focus&&this.showPrimarySelection();this.showMultipleSelections(info)}},showPrimarySelection:function(){var sel=window.getSelection(),prim=this.cm.doc.sel.primary(),curAnchor=domToPos(this.cm,sel.anchorNode,sel.anchorOffset),curFocus=domToPos(this.cm,sel.focusNode,sel.focusOffset);if(!curAnchor||curAnchor.bad||!curFocus||curFocus.bad||0!=cmp(minPos(curAnchor,curFocus),prim.from())||0!=cmp(maxPos(curAnchor,curFocus),prim.to())){var start=posToDOM(this.cm,prim.from()),end=posToDOM(this.cm,prim.to());if(start||end){var view=this.cm.display.view,old=sel.rangeCount&&sel.getRangeAt(0);if(start){if(!end){var measure=view[view.length-1].measure,map=measure.maps?measure.maps[measure.maps.length-1]:measure.map;end={node:map[map.length-1],offset:map[map.length-2]-map[map.length-3]}}}else start={node:view[0].measure.map[2],offset:0};try{var rng=range(start.node,start.offset,end.offset,end.node)}catch(e){}if(rng){sel.removeAllRanges();sel.addRange(rng);old&&null==sel.anchorNode?sel.addRange(old):gecko&&this.startGracePeriod()}this.rememberSelection()}}},startGracePeriod:function(){var input=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){input.gracePeriod=!1;input.selectionChanged()&&input.cm.operation(function(){input.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(info){removeChildrenAndAdd(this.cm.display.cursorDiv,info.cursors);removeChildrenAndAdd(this.cm.display.selectionDiv,info.selection)},rememberSelection:function(){var sel=window.getSelection();this.lastAnchorNode=sel.anchorNode;this.lastAnchorOffset=sel.anchorOffset;this.lastFocusNode=sel.focusNode;this.lastFocusOffset=sel.focusOffset},selectionInEditor:function(){var sel=window.getSelection();if(!sel.rangeCount)return!1;var node=sel.getRangeAt(0).commonAncestorContainer;return contains(this.div,node)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function poll(){if(input.cm.state.focused){input.pollSelection();input.polling.set(input.cm.options.pollInterval,poll)}}var input=this;this.selectionInEditor()?this.pollSelection():runInOp(this.cm,function(){input.cm.curOp.selectionChanged=!0});this.polling.set(this.cm.options.pollInterval,poll)},selectionChanged:function(){var sel=window.getSelection();return sel.anchorNode!=this.lastAnchorNode||sel.anchorOffset!=this.lastAnchorOffset||sel.focusNode!=this.lastFocusNode||sel.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var sel=window.getSelection(),cm=this.cm;this.rememberSelection();var anchor=domToPos(cm,sel.anchorNode,sel.anchorOffset),head=domToPos(cm,sel.focusNode,sel.focusOffset);anchor&&head&&runInOp(cm,function(){setSelection(cm.doc,simpleSelection(anchor,head),sel_dontScroll);(anchor.bad||head.bad)&&(cm.curOp.selectionChanged=!0)})}},pollContent:function(){var cm=this.cm,display=cm.display,sel=cm.doc.sel.primary(),from=sel.from(),to=sel.to();if(from.line<display.viewFrom||to.line>display.viewTo-1)return!1;var fromIndex;if(from.line==display.viewFrom||0==(fromIndex=findViewIndex(cm,from.line)))var fromLine=lineNo(display.view[0].line),fromNode=display.view[0].node;else var fromLine=lineNo(display.view[fromIndex].line),fromNode=display.view[fromIndex-1].node.nextSibling;var toIndex=findViewIndex(cm,to.line);if(toIndex==display.view.length-1)var toLine=display.viewTo-1,toNode=display.lineDiv.lastChild;else var toLine=lineNo(display.view[toIndex+1].line)-1,toNode=display.view[toIndex+1].node.previousSibling;for(var newText=cm.doc.splitLines(domTextBetween(cm,fromNode,toNode,fromLine,toLine)),oldText=getBetween(cm.doc,Pos(fromLine,0),Pos(toLine,getLine(cm.doc,toLine).text.length));newText.length>1&&oldText.length>1;)if(lst(newText)==lst(oldText)){newText.pop();oldText.pop();toLine--}else{if(newText[0]!=oldText[0])break;newText.shift();oldText.shift();fromLine++}for(var cutFront=0,cutEnd=0,newTop=newText[0],oldTop=oldText[0],maxCutFront=Math.min(newTop.length,oldTop.length);maxCutFront>cutFront&&newTop.charCodeAt(cutFront)==oldTop.charCodeAt(cutFront);)++cutFront;for(var newBot=lst(newText),oldBot=lst(oldText),maxCutEnd=Math.min(newBot.length-(1==newText.length?cutFront:0),oldBot.length-(1==oldText.length?cutFront:0));maxCutEnd>cutEnd&&newBot.charCodeAt(newBot.length-cutEnd-1)==oldBot.charCodeAt(oldBot.length-cutEnd-1);)++cutEnd;newText[newText.length-1]=newBot.slice(0,newBot.length-cutEnd);newText[0]=newText[0].slice(cutFront);var chFrom=Pos(fromLine,cutFront),chTo=Pos(toLine,oldText.length?lst(oldText).length-cutEnd:0);if(newText.length>1||newText[0]||cmp(chFrom,chTo)){replaceRange(cm.doc,newText,chFrom,chTo,"+input");return!0}},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){if(this.composing&&!this.composing.handled){this.applyComposition(this.composing);this.composing.handled=!0;this.div.blur();this.div.focus()}},applyComposition:function(composing){isReadOnly(this.cm)?operation(this.cm,regChange)(this.cm):composing.data&&composing.data!=composing.startData&&operation(this.cm,applyTextInput)(this.cm,composing.data,0,composing.sel)},setUneditable:function(node){node.contentEditable="false"},onKeyPress:function(e){e.preventDefault();isReadOnly(this.cm)||operation(this.cm,applyTextInput)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(val){this.div.contentEditable=String("nocursor"!=val)},onContextMenu:nothing,resetPosition:nothing,needsContentAttribute:!0},ContentEditableInput.prototype);CodeMirror.inputStyles={textarea:TextareaInput,contenteditable:ContentEditableInput};Selection.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(other){if(other==this)return!0;if(other.primIndex!=this.primIndex||other.ranges.length!=this.ranges.length)return!1;for(var i=0;i<this.ranges.length;i++){var here=this.ranges[i],there=other.ranges[i];if(0!=cmp(here.anchor,there.anchor)||0!=cmp(here.head,there.head))return!1}return!0},deepCopy:function(){for(var out=[],i=0;i<this.ranges.length;i++)out[i]=new Range(copyPos(this.ranges[i].anchor),copyPos(this.ranges[i].head));return new Selection(out,this.primIndex)},somethingSelected:function(){for(var i=0;i<this.ranges.length;i++)if(!this.ranges[i].empty())return!0;return!1},contains:function(pos,end){end||(end=pos);for(var i=0;i<this.ranges.length;i++){var range=this.ranges[i];if(cmp(end,range.from())>=0&&cmp(pos,range.to())<=0)return i}return-1}};Range.prototype={from:function(){return minPos(this.anchor,this.head)},to:function(){return maxPos(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var measureText,lastClick,lastDoubleClick,nullRect={left:0,right:0,top:0,bottom:0},operationGroup=null,nextOpId=0,lastDrop=0,wheelSamples=0,wheelPixelsPerUnit=null;ie?wheelPixelsPerUnit=-.53:gecko?wheelPixelsPerUnit=15:chrome?wheelPixelsPerUnit=-.7:safari&&(wheelPixelsPerUnit=-1/3);var wheelEventDelta=function(e){var dx=e.wheelDeltaX,dy=e.wheelDeltaY;null==dx&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(dx=e.detail);null==dy&&e.detail&&e.axis==e.VERTICAL_AXIS?dy=e.detail:null==dy&&(dy=e.wheelDelta);return{x:dx,y:dy}};CodeMirror.wheelEventPixels=function(e){var delta=wheelEventDelta(e);delta.x*=wheelPixelsPerUnit;delta.y*=wheelPixelsPerUnit;return delta};var stopSeq=new Delayed,lastStoppedKey=null,changeEnd=CodeMirror.changeEnd=function(change){
6
+ return change.text?Pos(change.from.line+change.text.length-1,lst(change.text).length+(1==change.text.length?change.from.ch:0)):change.to};CodeMirror.prototype={constructor:CodeMirror,focus:function(){window.focus();this.display.input.focus()},setOption:function(option,value){var options=this.options,old=options[option];if(options[option]!=value||"mode"==option){options[option]=value;optionHandlers.hasOwnProperty(option)&&operation(this,optionHandlers[option])(this,value,old)}},getOption:function(option){return this.options[option]},getDoc:function(){return this.doc},addKeyMap:function(map,bottom){this.state.keyMaps[bottom?"push":"unshift"](getKeyMap(map))},removeKeyMap:function(map){for(var maps=this.state.keyMaps,i=0;i<maps.length;++i)if(maps[i]==map||maps[i].name==map){maps.splice(i,1);return!0}},addOverlay:methodOp(function(spec,options){var mode=spec.token?spec:CodeMirror.getMode(this.options,spec);if(mode.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:mode,modeSpec:spec,opaque:options&&options.opaque});this.state.modeGen++;regChange(this)}),removeOverlay:methodOp(function(spec){for(var overlays=this.state.overlays,i=0;i<overlays.length;++i){var cur=overlays[i].modeSpec;if(cur==spec||"string"==typeof spec&&cur.name==spec){overlays.splice(i,1);this.state.modeGen++;regChange(this);return}}}),indentLine:methodOp(function(n,dir,aggressive){"string"!=typeof dir&&"number"!=typeof dir&&(dir=null==dir?this.options.smartIndent?"smart":"prev":dir?"add":"subtract");isLine(this.doc,n)&&indentLine(this,n,dir,aggressive)}),indentSelection:methodOp(function(how){for(var ranges=this.doc.sel.ranges,end=-1,i=0;i<ranges.length;i++){var range=ranges[i];if(range.empty()){if(range.head.line>end){indentLine(this,range.head.line,how,!0);end=range.head.line;i==this.doc.sel.primIndex&&ensureCursorVisible(this)}}else{var from=range.from(),to=range.to(),start=Math.max(end,from.line);end=Math.min(this.lastLine(),to.line-(to.ch?0:1))+1;for(var j=start;end>j;++j)indentLine(this,j,how);var newRanges=this.doc.sel.ranges;0==from.ch&&ranges.length==newRanges.length&&newRanges[i].from().ch>0&&replaceOneSelection(this.doc,i,new Range(from,newRanges[i].to()),sel_dontScroll)}}}),getTokenAt:function(pos,precise){return takeToken(this,pos,precise)},getLineTokens:function(line,precise){return takeToken(this,Pos(line),precise,!0)},getTokenTypeAt:function(pos){pos=clipPos(this.doc,pos);var type,styles=getLineStyles(this,getLine(this.doc,pos.line)),before=0,after=(styles.length-1)/2,ch=pos.ch;if(0==ch)type=styles[2];else for(;;){var mid=before+after>>1;if((mid?styles[2*mid-1]:0)>=ch)after=mid;else{if(!(styles[2*mid+1]<ch)){type=styles[2*mid+2];break}before=mid+1}}var cut=type?type.indexOf("cm-overlay "):-1;return 0>cut?type:0==cut?null:type.slice(0,cut-1)},getModeAt:function(pos){var mode=this.doc.mode;return mode.innerMode?CodeMirror.innerMode(mode,this.getTokenAt(pos).state).mode:mode},getHelper:function(pos,type){return this.getHelpers(pos,type)[0]},getHelpers:function(pos,type){var found=[];if(!helpers.hasOwnProperty(type))return found;var help=helpers[type],mode=this.getModeAt(pos);if("string"==typeof mode[type])help[mode[type]]&&found.push(help[mode[type]]);else if(mode[type])for(var i=0;i<mode[type].length;i++){var val=help[mode[type][i]];val&&found.push(val)}else mode.helperType&&help[mode.helperType]?found.push(help[mode.helperType]):help[mode.name]&&found.push(help[mode.name]);for(var i=0;i<help._global.length;i++){var cur=help._global[i];cur.pred(mode,this)&&-1==indexOf(found,cur.val)&&found.push(cur.val)}return found},getStateAfter:function(line,precise){var doc=this.doc;line=clipLine(doc,null==line?doc.first+doc.size-1:line);return getStateBefore(this,line+1,precise)},cursorCoords:function(start,mode){var pos,range=this.doc.sel.primary();pos=null==start?range.head:"object"==typeof start?clipPos(this.doc,start):start?range.from():range.to();return cursorCoords(this,pos,mode||"page")},charCoords:function(pos,mode){return charCoords(this,clipPos(this.doc,pos),mode||"page")},coordsChar:function(coords,mode){coords=fromCoordSystem(this,coords,mode||"page");return coordsChar(this,coords.left,coords.top)},lineAtHeight:function(height,mode){height=fromCoordSystem(this,{top:height,left:0},mode||"page").top;return lineAtHeight(this.doc,height+this.display.viewOffset)},heightAtLine:function(line,mode){var lineObj,end=!1;if("number"==typeof line){var last=this.doc.first+this.doc.size-1;if(line<this.doc.first)line=this.doc.first;else if(line>last){line=last;end=!0}lineObj=getLine(this.doc,line)}else lineObj=line;return intoCoordSystem(this,lineObj,{top:0,left:0},mode||"page").top+(end?this.doc.height-heightAtLine(lineObj):0)},defaultTextHeight:function(){return textHeight(this.display)},defaultCharWidth:function(){return charWidth(this.display)},setGutterMarker:methodOp(function(line,gutterID,value){return changeLine(this.doc,line,"gutter",function(line){var markers=line.gutterMarkers||(line.gutterMarkers={});markers[gutterID]=value;!value&&isEmpty(markers)&&(line.gutterMarkers=null);return!0})}),clearGutter:methodOp(function(gutterID){var cm=this,doc=cm.doc,i=doc.first;doc.iter(function(line){if(line.gutterMarkers&&line.gutterMarkers[gutterID]){line.gutterMarkers[gutterID]=null;regLineChange(cm,i,"gutter");isEmpty(line.gutterMarkers)&&(line.gutterMarkers=null)}++i})}),lineInfo:function(line){if("number"==typeof line){if(!isLine(this.doc,line))return null;var n=line;line=getLine(this.doc,line);if(!line)return null}else{var n=lineNo(line);if(null==n)return null}return{line:n,handle:line,text:line.text,gutterMarkers:line.gutterMarkers,textClass:line.textClass,bgClass:line.bgClass,wrapClass:line.wrapClass,widgets:line.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(pos,node,scroll,vert,horiz){var display=this.display;pos=cursorCoords(this,clipPos(this.doc,pos));var top=pos.bottom,left=pos.left;node.style.position="absolute";node.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(node);display.sizer.appendChild(node);if("over"==vert)top=pos.top;else if("above"==vert||"near"==vert){var vspace=Math.max(display.wrapper.clientHeight,this.doc.height),hspace=Math.max(display.sizer.clientWidth,display.lineSpace.clientWidth);("above"==vert||pos.bottom+node.offsetHeight>vspace)&&pos.top>node.offsetHeight?top=pos.top-node.offsetHeight:pos.bottom+node.offsetHeight<=vspace&&(top=pos.bottom);left+node.offsetWidth>hspace&&(left=hspace-node.offsetWidth)}node.style.top=top+"px";node.style.left=node.style.right="";if("right"==horiz){left=display.sizer.clientWidth-node.offsetWidth;node.style.right="0px"}else{"left"==horiz?left=0:"middle"==horiz&&(left=(display.sizer.clientWidth-node.offsetWidth)/2);node.style.left=left+"px"}scroll&&scrollIntoView(this,left,top,left+node.offsetWidth,top+node.offsetHeight)},triggerOnKeyDown:methodOp(onKeyDown),triggerOnKeyPress:methodOp(onKeyPress),triggerOnKeyUp:onKeyUp,execCommand:function(cmd){return commands.hasOwnProperty(cmd)?commands[cmd].call(null,this):void 0},triggerElectric:methodOp(function(text){triggerElectric(this,text)}),findPosH:function(from,amount,unit,visually){var dir=1;if(0>amount){dir=-1;amount=-amount}for(var i=0,cur=clipPos(this.doc,from);amount>i;++i){cur=findPosH(this.doc,cur,dir,unit,visually);if(cur.hitSide)break}return cur},moveH:methodOp(function(dir,unit){var cm=this;cm.extendSelectionsBy(function(range){return cm.display.shift||cm.doc.extend||range.empty()?findPosH(cm.doc,range.head,dir,unit,cm.options.rtlMoveVisually):0>dir?range.from():range.to()},sel_move)}),deleteH:methodOp(function(dir,unit){var sel=this.doc.sel,doc=this.doc;sel.somethingSelected()?doc.replaceSelection("",null,"+delete"):deleteNearSelection(this,function(range){var other=findPosH(doc,range.head,dir,unit,!1);return 0>dir?{from:other,to:range.head}:{from:range.head,to:other}})}),findPosV:function(from,amount,unit,goalColumn){var dir=1,x=goalColumn;if(0>amount){dir=-1;amount=-amount}for(var i=0,cur=clipPos(this.doc,from);amount>i;++i){var coords=cursorCoords(this,cur,"div");null==x?x=coords.left:coords.left=x;cur=findPosV(this,coords,dir,unit);if(cur.hitSide)break}return cur},moveV:methodOp(function(dir,unit){var cm=this,doc=this.doc,goals=[],collapse=!cm.display.shift&&!doc.extend&&doc.sel.somethingSelected();doc.extendSelectionsBy(function(range){if(collapse)return 0>dir?range.from():range.to();var headPos=cursorCoords(cm,range.head,"div");null!=range.goalColumn&&(headPos.left=range.goalColumn);goals.push(headPos.left);var pos=findPosV(cm,headPos,dir,unit);"page"==unit&&range==doc.sel.primary()&&addToScrollPos(cm,null,charCoords(cm,pos,"div").top-headPos.top);return pos},sel_move);if(goals.length)for(var i=0;i<doc.sel.ranges.length;i++)doc.sel.ranges[i].goalColumn=goals[i]}),findWordAt:function(pos){var doc=this.doc,line=getLine(doc,pos.line).text,start=pos.ch,end=pos.ch;if(line){var helper=this.getHelper(pos,"wordChars");(pos.xRel<0||end==line.length)&&start?--start:++end;for(var startChar=line.charAt(start),check=isWordChar(startChar,helper)?function(ch){return isWordChar(ch,helper)}:/\s/.test(startChar)?function(ch){return/\s/.test(ch)}:function(ch){return!/\s/.test(ch)&&!isWordChar(ch)};start>0&&check(line.charAt(start-1));)--start;for(;end<line.length&&check(line.charAt(end));)++end}return new Range(Pos(pos.line,start),Pos(pos.line,end))},toggleOverwrite:function(value){if(null==value||value!=this.state.overwrite){(this.state.overwrite=!this.state.overwrite)?addClass(this.display.cursorDiv,"CodeMirror-overwrite"):rmClass(this.display.cursorDiv,"CodeMirror-overwrite");signal(this,"overwriteToggle",this,this.state.overwrite)}},hasFocus:function(){return this.display.input.getField()==activeElt()},scrollTo:methodOp(function(x,y){(null!=x||null!=y)&&resolveScrollToPos(this);null!=x&&(this.curOp.scrollLeft=x);null!=y&&(this.curOp.scrollTop=y)}),getScrollInfo:function(){var scroller=this.display.scroller;return{left:scroller.scrollLeft,top:scroller.scrollTop,height:scroller.scrollHeight-scrollGap(this)-this.display.barHeight,width:scroller.scrollWidth-scrollGap(this)-this.display.barWidth,clientHeight:displayHeight(this),clientWidth:displayWidth(this)}},scrollIntoView:methodOp(function(range,margin){if(null==range){range={from:this.doc.sel.primary().head,to:null};null==margin&&(margin=this.options.cursorScrollMargin)}else"number"==typeof range?range={from:Pos(range,0),to:null}:null==range.from&&(range={from:range,to:null});range.to||(range.to=range.from);range.margin=margin||0;if(null!=range.from.line){resolveScrollToPos(this);this.curOp.scrollToPos=range}else{var sPos=calculateScrollPos(this,Math.min(range.from.left,range.to.left),Math.min(range.from.top,range.to.top)-range.margin,Math.max(range.from.right,range.to.right),Math.max(range.from.bottom,range.to.bottom)+range.margin);this.scrollTo(sPos.scrollLeft,sPos.scrollTop)}}),setSize:methodOp(function(width,height){function interpret(val){return"number"==typeof val||/^\d+$/.test(String(val))?val+"px":val}var cm=this;null!=width&&(cm.display.wrapper.style.width=interpret(width));null!=height&&(cm.display.wrapper.style.height=interpret(height));cm.options.lineWrapping&&clearLineMeasurementCache(this);var lineNo=cm.display.viewFrom;cm.doc.iter(lineNo,cm.display.viewTo,function(line){if(line.widgets)for(var i=0;i<line.widgets.length;i++)if(line.widgets[i].noHScroll){regLineChange(cm,lineNo,"widget");break}++lineNo});cm.curOp.forceUpdate=!0;signal(cm,"refresh",this)}),operation:function(f){return runInOp(this,f)},refresh:methodOp(function(){var oldHeight=this.display.cachedTextHeight;regChange(this);this.curOp.forceUpdate=!0;clearCaches(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);updateGutterSpace(this);(null==oldHeight||Math.abs(oldHeight-textHeight(this.display))>.5)&&estimateLineHeights(this);signal(this,"refresh",this)}),swapDoc:methodOp(function(doc){var old=this.doc;old.cm=null;attachDoc(this,doc);clearCaches(this);this.display.input.reset();this.scrollTo(doc.scrollLeft,doc.scrollTop);this.curOp.forceScroll=!0;signalLater(this,"swapDoc",this,old);return old}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};eventMixin(CodeMirror);var defaults=CodeMirror.defaults={},optionHandlers=CodeMirror.optionHandlers={},Init=CodeMirror.Init={toString:function(){return"CodeMirror.Init"}};option("value","",function(cm,val){cm.setValue(val)},!0);option("mode",null,function(cm,val){cm.doc.modeOption=val;loadMode(cm)},!0);option("indentUnit",2,loadMode,!0);option("indentWithTabs",!1);option("smartIndent",!0);option("tabSize",4,function(cm){resetModeState(cm);clearCaches(cm);regChange(cm)},!0);option("lineSeparator",null,function(cm,val){cm.doc.lineSep=val;if(val){var newBreaks=[],lineNo=cm.doc.first;cm.doc.iter(function(line){for(var pos=0;;){var found=line.text.indexOf(val,pos);if(-1==found)break;pos=found+val.length;newBreaks.push(Pos(lineNo,found))}lineNo++});for(var i=newBreaks.length-1;i>=0;i--)replaceRange(cm.doc,val,newBreaks[i],Pos(newBreaks[i].line,newBreaks[i].ch+val.length))}});option("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(cm,val,old){cm.state.specialChars=new RegExp(val.source+(val.test(" ")?"":"| "),"g");old!=CodeMirror.Init&&cm.refresh()});option("specialCharPlaceholder",defaultSpecialCharPlaceholder,function(cm){cm.refresh()},!0);option("electricChars",!0);option("inputStyle",mobile?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0);option("rtlMoveVisually",!windows);option("wholeLineUpdateBefore",!0);option("theme","default",function(cm){themeChanged(cm);guttersChanged(cm)},!0);option("keyMap","default",function(cm,val,old){var next=getKeyMap(val),prev=old!=CodeMirror.Init&&getKeyMap(old);prev&&prev.detach&&prev.detach(cm,next);next.attach&&next.attach(cm,prev||null)});option("extraKeys",null);option("lineWrapping",!1,wrappingChanged,!0);option("gutters",[],function(cm){setGuttersForLineNumbers(cm.options);guttersChanged(cm)},!0);option("fixedGutter",!0,function(cm,val){cm.display.gutters.style.left=val?compensateForHScroll(cm.display)+"px":"0";cm.refresh()},!0);option("coverGutterNextToScrollbar",!1,function(cm){updateScrollbars(cm)},!0);option("scrollbarStyle","native",function(cm){initScrollbars(cm);updateScrollbars(cm);cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft)},!0);option("lineNumbers",!1,function(cm){setGuttersForLineNumbers(cm.options);guttersChanged(cm)},!0);option("firstLineNumber",1,guttersChanged,!0);option("lineNumberFormatter",function(integer){return integer},guttersChanged,!0);option("showCursorWhenSelecting",!1,updateSelection,!0);option("resetSelectionOnContextMenu",!0);option("lineWiseCopyCut",!0);option("readOnly",!1,function(cm,val){if("nocursor"==val){onBlur(cm);cm.display.input.blur();cm.display.disabled=!0}else cm.display.disabled=!1;cm.display.input.readOnlyChanged(val)});option("disableInput",!1,function(cm,val){val||cm.display.input.reset()},!0);option("dragDrop",!0,dragDropChanged);option("allowDropFileTypes",null);option("cursorBlinkRate",530);option("cursorScrollMargin",0);option("cursorHeight",1,updateSelection,!0);option("singleCursorHeightPerLine",!0,updateSelection,!0);option("workTime",100);option("workDelay",100);option("flattenSpans",!0,resetModeState,!0);option("addModeClass",!1,resetModeState,!0);option("pollInterval",100);option("undoDepth",200,function(cm,val){cm.doc.history.undoDepth=val});option("historyEventDelay",1250);option("viewportMargin",10,function(cm){cm.refresh()},!0);option("maxHighlightLength",1e4,resetModeState,!0);option("moveInputWithCursor",!0,function(cm,val){val||cm.display.input.resetPosition()});option("tabindex",null,function(cm,val){cm.display.input.getField().tabIndex=val||""});option("autofocus",null);var modes=CodeMirror.modes={},mimeModes=CodeMirror.mimeModes={};CodeMirror.defineMode=function(name,mode){CodeMirror.defaults.mode||"null"==name||(CodeMirror.defaults.mode=name);arguments.length>2&&(mode.dependencies=Array.prototype.slice.call(arguments,2));modes[name]=mode};CodeMirror.defineMIME=function(mime,spec){mimeModes[mime]=spec};CodeMirror.resolveMode=function(spec){if("string"==typeof spec&&mimeModes.hasOwnProperty(spec))spec=mimeModes[spec];else if(spec&&"string"==typeof spec.name&&mimeModes.hasOwnProperty(spec.name)){var found=mimeModes[spec.name];"string"==typeof found&&(found={name:found});spec=createObj(found,spec);spec.name=found.name}else if("string"==typeof spec&&/^[\w\-]+\/[\w\-]+\+xml$/.test(spec))return CodeMirror.resolveMode("application/xml");return"string"==typeof spec?{name:spec}:spec||{name:"null"}};CodeMirror.getMode=function(options,spec){var spec=CodeMirror.resolveMode(spec),mfactory=modes[spec.name];if(!mfactory)return CodeMirror.getMode(options,"text/plain");var modeObj=mfactory(options,spec);if(modeExtensions.hasOwnProperty(spec.name)){var exts=modeExtensions[spec.name];for(var prop in exts)if(exts.hasOwnProperty(prop)){modeObj.hasOwnProperty(prop)&&(modeObj["_"+prop]=modeObj[prop]);modeObj[prop]=exts[prop]}}modeObj.name=spec.name;spec.helperType&&(modeObj.helperType=spec.helperType);if(spec.modeProps)for(var prop in spec.modeProps)modeObj[prop]=spec.modeProps[prop];return modeObj};CodeMirror.defineMode("null",function(){return{token:function(stream){stream.skipToEnd()}}});CodeMirror.defineMIME("text/plain","null");var modeExtensions=CodeMirror.modeExtensions={};CodeMirror.extendMode=function(mode,properties){var exts=modeExtensions.hasOwnProperty(mode)?modeExtensions[mode]:modeExtensions[mode]={};copyObj(properties,exts)};CodeMirror.defineExtension=function(name,func){CodeMirror.prototype[name]=func};CodeMirror.defineDocExtension=function(name,func){Doc.prototype[name]=func};CodeMirror.defineOption=option;var initHooks=[];CodeMirror.defineInitHook=function(f){initHooks.push(f)};var helpers=CodeMirror.helpers={};CodeMirror.registerHelper=function(type,name,value){helpers.hasOwnProperty(type)||(helpers[type]=CodeMirror[type]={_global:[]});helpers[type][name]=value};CodeMirror.registerGlobalHelper=function(type,name,predicate,value){CodeMirror.registerHelper(type,name,value);helpers[type]._global.push({pred:predicate,val:value})};var copyState=CodeMirror.copyState=function(mode,state){if(state===!0)return state;if(mode.copyState)return mode.copyState(state);var nstate={};for(var n in state){var val=state[n];val instanceof Array&&(val=val.concat([]));nstate[n]=val}return nstate},startState=CodeMirror.startState=function(mode,a1,a2){return mode.startState?mode.startState(a1,a2):!0};CodeMirror.innerMode=function(mode,state){for(;mode.innerMode;){var info=mode.innerMode(state);if(!info||info.mode==mode)break;state=info.state;mode=info.mode}return info||{mode:mode,state:state}};var commands=CodeMirror.commands={selectAll:function(cm){cm.setSelection(Pos(cm.firstLine(),0),Pos(cm.lastLine()),sel_dontScroll)},singleSelection:function(cm){cm.setSelection(cm.getCursor("anchor"),cm.getCursor("head"),sel_dontScroll)},killLine:function(cm){deleteNearSelection(cm,function(range){if(range.empty()){var len=getLine(cm.doc,range.head.line).text.length;return range.head.ch==len&&range.head.line<cm.lastLine()?{from:range.head,to:Pos(range.head.line+1,0)}:{from:range.head,to:Pos(range.head.line,len)}}return{from:range.from(),to:range.to()}})},deleteLine:function(cm){deleteNearSelection(cm,function(range){return{from:Pos(range.from().line,0),to:clipPos(cm.doc,Pos(range.to().line+1,0))}})},delLineLeft:function(cm){deleteNearSelection(cm,function(range){return{from:Pos(range.from().line,0),to:range.from()}})},delWrappedLineLeft:function(cm){deleteNearSelection(cm,function(range){var top=cm.charCoords(range.head,"div").top+5,leftPos=cm.coordsChar({left:0,top:top},"div");return{from:leftPos,to:range.from()}})},delWrappedLineRight:function(cm){deleteNearSelection(cm,function(range){var top=cm.charCoords(range.head,"div").top+5,rightPos=cm.coordsChar({left:cm.display.lineDiv.offsetWidth+100,top:top},"div");return{from:range.from(),to:rightPos}})},undo:function(cm){cm.undo()},redo:function(cm){cm.redo()},undoSelection:function(cm){cm.undoSelection()},redoSelection:function(cm){cm.redoSelection()},goDocStart:function(cm){cm.extendSelection(Pos(cm.firstLine(),0))},goDocEnd:function(cm){cm.extendSelection(Pos(cm.lastLine()))},goLineStart:function(cm){cm.extendSelectionsBy(function(range){return lineStart(cm,range.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(cm){cm.extendSelectionsBy(function(range){return lineStartSmart(cm,range.head)},{origin:"+move",bias:1})},goLineEnd:function(cm){cm.extendSelectionsBy(function(range){return lineEnd(cm,range.head.line)},{origin:"+move",bias:-1})},goLineRight:function(cm){cm.extendSelectionsBy(function(range){var top=cm.charCoords(range.head,"div").top+5;return cm.coordsChar({left:cm.display.lineDiv.offsetWidth+100,top:top},"div")},sel_move)},goLineLeft:function(cm){cm.extendSelectionsBy(function(range){var top=cm.charCoords(range.head,"div").top+5;return cm.coordsChar({left:0,top:top},"div")},sel_move)},goLineLeftSmart:function(cm){cm.extendSelectionsBy(function(range){var top=cm.charCoords(range.head,"div").top+5,pos=cm.coordsChar({left:0,top:top},"div");return pos.ch<cm.getLine(pos.line).search(/\S/)?lineStartSmart(cm,range.head):pos},sel_move)},goLineUp:function(cm){cm.moveV(-1,"line")},goLineDown:function(cm){cm.moveV(1,"line")},goPageUp:function(cm){cm.moveV(-1,"page")},goPageDown:function(cm){cm.moveV(1,"page")},goCharLeft:function(cm){cm.moveH(-1,"char")},goCharRight:function(cm){cm.moveH(1,"char")},goColumnLeft:function(cm){cm.moveH(-1,"column")},goColumnRight:function(cm){cm.moveH(1,"column")},goWordLeft:function(cm){cm.moveH(-1,"word")},goGroupRight:function(cm){cm.moveH(1,"group")},goGroupLeft:function(cm){cm.moveH(-1,"group")},goWordRight:function(cm){cm.moveH(1,"word")},delCharBefore:function(cm){cm.deleteH(-1,"char")},delCharAfter:function(cm){cm.deleteH(1,"char")},delWordBefore:function(cm){cm.deleteH(-1,"word")},delWordAfter:function(cm){cm.deleteH(1,"word")},delGroupBefore:function(cm){cm.deleteH(-1,"group")},delGroupAfter:function(cm){cm.deleteH(1,"group")},indentAuto:function(cm){cm.indentSelection("smart")},indentMore:function(cm){cm.indentSelection("add")},indentLess:function(cm){cm.indentSelection("subtract")},insertTab:function(cm){cm.replaceSelection(" ")},insertSoftTab:function(cm){for(var spaces=[],ranges=cm.listSelections(),tabSize=cm.options.tabSize,i=0;i<ranges.length;i++){var pos=ranges[i].from(),col=countColumn(cm.getLine(pos.line),pos.ch,tabSize);spaces.push(new Array(tabSize-col%tabSize+1).join(" "))}cm.replaceSelections(spaces)},defaultTab:function(cm){cm.somethingSelected()?cm.indentSelection("add"):cm.execCommand("insertTab")},transposeChars:function(cm){runInOp(cm,function(){for(var ranges=cm.listSelections(),newSel=[],i=0;i<ranges.length;i++){var cur=ranges[i].head,line=getLine(cm.doc,cur.line).text;if(line){cur.ch==line.length&&(cur=new Pos(cur.line,cur.ch-1));if(cur.ch>0){cur=new Pos(cur.line,cur.ch+1);cm.replaceRange(line.charAt(cur.ch-1)+line.charAt(cur.ch-2),Pos(cur.line,cur.ch-2),cur,"+transpose")}else if(cur.line>cm.doc.first){var prev=getLine(cm.doc,cur.line-1).text;prev&&cm.replaceRange(line.charAt(0)+cm.doc.lineSeparator()+prev.charAt(prev.length-1),Pos(cur.line-1,prev.length-1),Pos(cur.line,1),"+transpose")}}newSel.push(new Range(cur,cur))}cm.setSelections(newSel)})},newlineAndIndent:function(cm){runInOp(cm,function(){for(var len=cm.listSelections().length,i=0;len>i;i++){var range=cm.listSelections()[i];cm.replaceRange(cm.doc.lineSeparator(),range.anchor,range.head,"+input");cm.indentLine(range.from().line+1,null,!0)}ensureCursorVisible(cm)})},toggleOverwrite:function(cm){cm.toggleOverwrite()}},keyMap=CodeMirror.keyMap={};keyMap.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};keyMap.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};keyMap.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};keyMap.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]};keyMap["default"]=mac?keyMap.macDefault:keyMap.pcDefault;CodeMirror.normalizeKeyMap=function(keymap){var copy={};for(var keyname in keymap)if(keymap.hasOwnProperty(keyname)){var value=keymap[keyname];if(/^(name|fallthrough|(de|at)tach)$/.test(keyname))continue;if("..."==value){delete keymap[keyname];continue}for(var keys=map(keyname.split(" "),normalizeKeyName),i=0;i<keys.length;i++){var val,name;if(i==keys.length-1){name=keys.join(" ");val=value}else{name=keys.slice(0,i+1).join(" ");val="..."}var prev=copy[name];if(prev){if(prev!=val)throw new Error("Inconsistent bindings for "+name)}else copy[name]=val}delete keymap[keyname]}for(var prop in copy)keymap[prop]=copy[prop];return keymap};var lookupKey=CodeMirror.lookupKey=function(key,map,handle,context){map=getKeyMap(map);var found=map.call?map.call(key,context):map[key];if(found===!1)return"nothing";if("..."===found)return"multi";if(null!=found&&handle(found))return"handled";if(map.fallthrough){if("[object Array]"!=Object.prototype.toString.call(map.fallthrough))return lookupKey(key,map.fallthrough,handle,context);for(var i=0;i<map.fallthrough.length;i++){var result=lookupKey(key,map.fallthrough[i],handle,context);if(result)return result}}},isModifierKey=CodeMirror.isModifierKey=function(value){var name="string"==typeof value?value:keyNames[value.keyCode];return"Ctrl"==name||"Alt"==name||"Shift"==name||"Mod"==name},keyName=CodeMirror.keyName=function(event,noShift){if(presto&&34==event.keyCode&&event["char"])return!1;var base=keyNames[event.keyCode],name=base;if(null==name||event.altGraphKey)return!1;event.altKey&&"Alt"!=base&&(name="Alt-"+name);(flipCtrlCmd?event.metaKey:event.ctrlKey)&&"Ctrl"!=base&&(name="Ctrl-"+name);(flipCtrlCmd?event.ctrlKey:event.metaKey)&&"Cmd"!=base&&(name="Cmd-"+name);!noShift&&event.shiftKey&&"Shift"!=base&&(name="Shift-"+name);return name};CodeMirror.fromTextArea=function(textarea,options){function save(){textarea.value=cm.getValue()}options=options?copyObj(options):{};options.value=textarea.value;!options.tabindex&&textarea.tabIndex&&(options.tabindex=textarea.tabIndex);!options.placeholder&&textarea.placeholder&&(options.placeholder=textarea.placeholder);if(null==options.autofocus){var hasFocus=activeElt();options.autofocus=hasFocus==textarea||null!=textarea.getAttribute("autofocus")&&hasFocus==document.body}if(textarea.form){on(textarea.form,"submit",save);if(!options.leaveSubmitMethodAlone){var form=textarea.form,realSubmit=form.submit;try{var wrappedSubmit=form.submit=function(){save();form.submit=realSubmit;form.submit();form.submit=wrappedSubmit}}catch(e){}}}options.finishInit=function(cm){cm.save=save;cm.getTextArea=function(){return textarea};cm.toTextArea=function(){cm.toTextArea=isNaN;save();textarea.parentNode.removeChild(cm.getWrapperElement());textarea.style.display="";if(textarea.form){off(textarea.form,"submit",save);"function"==typeof textarea.form.submit&&(textarea.form.submit=realSubmit)}}};textarea.style.display="none";var cm=CodeMirror(function(node){textarea.parentNode.insertBefore(node,textarea.nextSibling)},options);return cm};var StringStream=CodeMirror.StringStream=function(string,tabSize){this.pos=this.start=0;this.string=string;this.tabSize=tabSize||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};StringStream.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(match){var ch=this.string.charAt(this.pos);if("string"==typeof match)var ok=ch==match;else var ok=ch&&(match.test?match.test(ch):match(ch));if(ok){++this.pos;return ch}},eatWhile:function(match){for(var start=this.pos;this.eat(match););return this.pos>start},eatSpace:function(){for(var start=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>start},skipToEnd:function(){this.pos=this.string.length},skipTo:function(ch){var found=this.string.indexOf(ch,this.pos);if(found>-1){this.pos=found;return!0}},backUp:function(n){this.pos-=n},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=countColumn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return countColumn(this.string,null,this.tabSize)-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},match:function(pattern,consume,caseInsensitive){if("string"!=typeof pattern){var match=this.string.slice(this.pos).match(pattern);if(match&&match.index>0)return null;match&&consume!==!1&&(this.pos+=match[0].length);return match}var cased=function(str){return caseInsensitive?str.toLowerCase():str},substr=this.string.substr(this.pos,pattern.length);if(cased(substr)==cased(pattern)){consume!==!1&&(this.pos+=pattern.length);return!0}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(n,inner){this.lineStart+=n;try{return inner()}finally{this.lineStart-=n}}};var nextMarkerId=0,TextMarker=CodeMirror.TextMarker=function(doc,type){this.lines=[];this.type=type;this.doc=doc;this.id=++nextMarkerId};eventMixin(TextMarker);TextMarker.prototype.clear=function(){if(!this.explicitlyCleared){var cm=this.doc.cm,withOp=cm&&!cm.curOp;withOp&&startOperation(cm);if(hasHandler(this,"clear")){var found=this.find();found&&signalLater(this,"clear",found.from,found.to)}for(var min=null,max=null,i=0;i<this.lines.length;++i){var line=this.lines[i],span=getMarkedSpanFor(line.markedSpans,this);if(cm&&!this.collapsed)regLineChange(cm,lineNo(line),"text");else if(cm){
7
+ null!=span.to&&(max=lineNo(line));null!=span.from&&(min=lineNo(line))}line.markedSpans=removeMarkedSpan(line.markedSpans,span);null==span.from&&this.collapsed&&!lineIsHidden(this.doc,line)&&cm&&updateLineHeight(line,textHeight(cm.display))}if(cm&&this.collapsed&&!cm.options.lineWrapping)for(var i=0;i<this.lines.length;++i){var visual=visualLine(this.lines[i]),len=lineLength(visual);if(len>cm.display.maxLineLength){cm.display.maxLine=visual;cm.display.maxLineLength=len;cm.display.maxLineChanged=!0}}null!=min&&cm&&this.collapsed&&regChange(cm,min,max+1);this.lines.length=0;this.explicitlyCleared=!0;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=!1;cm&&reCheckSelection(cm.doc)}cm&&signalLater(cm,"markerCleared",cm,this);withOp&&endOperation(cm);this.parent&&this.parent.clear()}};TextMarker.prototype.find=function(side,lineObj){null==side&&"bookmark"==this.type&&(side=1);for(var from,to,i=0;i<this.lines.length;++i){var line=this.lines[i],span=getMarkedSpanFor(line.markedSpans,this);if(null!=span.from){from=Pos(lineObj?line:lineNo(line),span.from);if(-1==side)return from}if(null!=span.to){to=Pos(lineObj?line:lineNo(line),span.to);if(1==side)return to}}return from&&{from:from,to:to}};TextMarker.prototype.changed=function(){var pos=this.find(-1,!0),widget=this,cm=this.doc.cm;pos&&cm&&runInOp(cm,function(){var line=pos.line,lineN=lineNo(pos.line),view=findViewForLine(cm,lineN);if(view){clearLineMeasurementCacheFor(view);cm.curOp.selectionChanged=cm.curOp.forceUpdate=!0}cm.curOp.updateMaxLine=!0;if(!lineIsHidden(widget.doc,line)&&null!=widget.height){var oldHeight=widget.height;widget.height=null;var dHeight=widgetHeight(widget)-oldHeight;dHeight&&updateLineHeight(line,line.height+dHeight)}})};TextMarker.prototype.attachLine=function(line){if(!this.lines.length&&this.doc.cm){var op=this.doc.cm.curOp;op.maybeHiddenMarkers&&-1!=indexOf(op.maybeHiddenMarkers,this)||(op.maybeUnhiddenMarkers||(op.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(line)};TextMarker.prototype.detachLine=function(line){this.lines.splice(indexOf(this.lines,line),1);if(!this.lines.length&&this.doc.cm){var op=this.doc.cm.curOp;(op.maybeHiddenMarkers||(op.maybeHiddenMarkers=[])).push(this)}};var nextMarkerId=0,SharedTextMarker=CodeMirror.SharedTextMarker=function(markers,primary){this.markers=markers;this.primary=primary;for(var i=0;i<markers.length;++i)markers[i].parent=this};eventMixin(SharedTextMarker);SharedTextMarker.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var i=0;i<this.markers.length;++i)this.markers[i].clear();signalLater(this,"clear")}};SharedTextMarker.prototype.find=function(side,lineObj){return this.primary.find(side,lineObj)};var LineWidget=CodeMirror.LineWidget=function(doc,node,options){if(options)for(var opt in options)options.hasOwnProperty(opt)&&(this[opt]=options[opt]);this.doc=doc;this.node=node};eventMixin(LineWidget);LineWidget.prototype.clear=function(){var cm=this.doc.cm,ws=this.line.widgets,line=this.line,no=lineNo(line);if(null!=no&&ws){for(var i=0;i<ws.length;++i)ws[i]==this&&ws.splice(i--,1);ws.length||(line.widgets=null);var height=widgetHeight(this);updateLineHeight(line,Math.max(0,line.height-height));cm&&runInOp(cm,function(){adjustScrollWhenAboveVisible(cm,line,-height);regLineChange(cm,no,"widget")})}};LineWidget.prototype.changed=function(){var oldH=this.height,cm=this.doc.cm,line=this.line;this.height=null;var diff=widgetHeight(this)-oldH;if(diff){updateLineHeight(line,line.height+diff);cm&&runInOp(cm,function(){cm.curOp.forceUpdate=!0;adjustScrollWhenAboveVisible(cm,line,diff)})}};var Line=CodeMirror.Line=function(text,markedSpans,estimateHeight){this.text=text;attachMarkedSpans(this,markedSpans);this.height=estimateHeight?estimateHeight(this):1};eventMixin(Line);Line.prototype.lineNo=function(){return lineNo(this)};var styleToClassCache={},styleToClassCacheWithMode={};LeafChunk.prototype={chunkSize:function(){return this.lines.length},removeInner:function(at,n){for(var i=at,e=at+n;e>i;++i){var line=this.lines[i];this.height-=line.height;cleanUpLine(line);signalLater(line,"delete")}this.lines.splice(at,n)},collapse:function(lines){lines.push.apply(lines,this.lines)},insertInner:function(at,lines,height){this.height+=height;this.lines=this.lines.slice(0,at).concat(lines).concat(this.lines.slice(at));for(var i=0;i<lines.length;++i)lines[i].parent=this},iterN:function(at,n,op){for(var e=at+n;e>at;++at)if(op(this.lines[at]))return!0}};BranchChunk.prototype={chunkSize:function(){return this.size},removeInner:function(at,n){this.size-=n;for(var i=0;i<this.children.length;++i){var child=this.children[i],sz=child.chunkSize();if(sz>at){var rm=Math.min(n,sz-at),oldHeight=child.height;child.removeInner(at,rm);this.height-=oldHeight-child.height;if(sz==rm){this.children.splice(i--,1);child.parent=null}if(0==(n-=rm))break;at=0}else at-=sz}if(this.size-n<25&&(this.children.length>1||!(this.children[0]instanceof LeafChunk))){var lines=[];this.collapse(lines);this.children=[new LeafChunk(lines)];this.children[0].parent=this}},collapse:function(lines){for(var i=0;i<this.children.length;++i)this.children[i].collapse(lines)},insertInner:function(at,lines,height){this.size+=lines.length;this.height+=height;for(var i=0;i<this.children.length;++i){var child=this.children[i],sz=child.chunkSize();if(sz>=at){child.insertInner(at,lines,height);if(child.lines&&child.lines.length>50){for(;child.lines.length>50;){var spilled=child.lines.splice(child.lines.length-25,25),newleaf=new LeafChunk(spilled);child.height-=newleaf.height;this.children.splice(i+1,0,newleaf);newleaf.parent=this}this.maybeSpill()}break}at-=sz}},maybeSpill:function(){if(!(this.children.length<=10)){var me=this;do{var spilled=me.children.splice(me.children.length-5,5),sibling=new BranchChunk(spilled);if(me.parent){me.size-=sibling.size;me.height-=sibling.height;var myIndex=indexOf(me.parent.children,me);me.parent.children.splice(myIndex+1,0,sibling)}else{var copy=new BranchChunk(me.children);copy.parent=me;me.children=[copy,sibling];me=copy}sibling.parent=me.parent}while(me.children.length>10);me.parent.maybeSpill()}},iterN:function(at,n,op){for(var i=0;i<this.children.length;++i){var child=this.children[i],sz=child.chunkSize();if(sz>at){var used=Math.min(n,sz-at);if(child.iterN(at,used,op))return!0;if(0==(n-=used))break;at=0}else at-=sz}}};var nextDocId=0,Doc=CodeMirror.Doc=function(text,mode,firstLine,lineSep){if(!(this instanceof Doc))return new Doc(text,mode,firstLine,lineSep);null==firstLine&&(firstLine=0);BranchChunk.call(this,[new LeafChunk([new Line("",null)])]);this.first=firstLine;this.scrollTop=this.scrollLeft=0;this.cantEdit=!1;this.cleanGeneration=1;this.frontier=firstLine;var start=Pos(firstLine,0);this.sel=simpleSelection(start);this.history=new History(null);this.id=++nextDocId;this.modeOption=mode;this.lineSep=lineSep;"string"==typeof text&&(text=this.splitLines(text));updateDoc(this,{from:start,to:start,text:text});setSelection(this,simpleSelection(start),sel_dontScroll)};Doc.prototype=createObj(BranchChunk.prototype,{constructor:Doc,iter:function(from,to,op){op?this.iterN(from-this.first,to-from,op):this.iterN(this.first,this.first+this.size,from)},insert:function(at,lines){for(var height=0,i=0;i<lines.length;++i)height+=lines[i].height;this.insertInner(at-this.first,lines,height)},remove:function(at,n){this.removeInner(at-this.first,n)},getValue:function(lineSep){var lines=getLines(this,this.first,this.first+this.size);return lineSep===!1?lines:lines.join(lineSep||this.lineSeparator())},setValue:docMethodOp(function(code){var top=Pos(this.first,0),last=this.first+this.size-1;makeChange(this,{from:top,to:Pos(last,getLine(this,last).text.length),text:this.splitLines(code),origin:"setValue",full:!0},!0);setSelection(this,simpleSelection(top))}),replaceRange:function(code,from,to,origin){from=clipPos(this,from);to=to?clipPos(this,to):from;replaceRange(this,code,from,to,origin)},getRange:function(from,to,lineSep){var lines=getBetween(this,clipPos(this,from),clipPos(this,to));return lineSep===!1?lines:lines.join(lineSep||this.lineSeparator())},getLine:function(line){var l=this.getLineHandle(line);return l&&l.text},getLineHandle:function(line){return isLine(this,line)?getLine(this,line):void 0},getLineNumber:function(line){return lineNo(line)},getLineHandleVisualStart:function(line){"number"==typeof line&&(line=getLine(this,line));return visualLine(line)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(pos){return clipPos(this,pos)},getCursor:function(start){var pos,range=this.sel.primary();pos=null==start||"head"==start?range.head:"anchor"==start?range.anchor:"end"==start||"to"==start||start===!1?range.to():range.from();return pos},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:docMethodOp(function(line,ch,options){setSimpleSelection(this,clipPos(this,"number"==typeof line?Pos(line,ch||0):line),null,options)}),setSelection:docMethodOp(function(anchor,head,options){setSimpleSelection(this,clipPos(this,anchor),clipPos(this,head||anchor),options)}),extendSelection:docMethodOp(function(head,other,options){extendSelection(this,clipPos(this,head),other&&clipPos(this,other),options)}),extendSelections:docMethodOp(function(heads,options){extendSelections(this,clipPosArray(this,heads,options))}),extendSelectionsBy:docMethodOp(function(f,options){extendSelections(this,map(this.sel.ranges,f),options)}),setSelections:docMethodOp(function(ranges,primary,options){if(ranges.length){for(var i=0,out=[];i<ranges.length;i++)out[i]=new Range(clipPos(this,ranges[i].anchor),clipPos(this,ranges[i].head));null==primary&&(primary=Math.min(ranges.length-1,this.sel.primIndex));setSelection(this,normalizeSelection(out,primary),options)}}),addSelection:docMethodOp(function(anchor,head,options){var ranges=this.sel.ranges.slice(0);ranges.push(new Range(clipPos(this,anchor),clipPos(this,head||anchor)));setSelection(this,normalizeSelection(ranges,ranges.length-1),options)}),getSelection:function(lineSep){for(var lines,ranges=this.sel.ranges,i=0;i<ranges.length;i++){var sel=getBetween(this,ranges[i].from(),ranges[i].to());lines=lines?lines.concat(sel):sel}return lineSep===!1?lines:lines.join(lineSep||this.lineSeparator())},getSelections:function(lineSep){for(var parts=[],ranges=this.sel.ranges,i=0;i<ranges.length;i++){var sel=getBetween(this,ranges[i].from(),ranges[i].to());lineSep!==!1&&(sel=sel.join(lineSep||this.lineSeparator()));parts[i]=sel}return parts},replaceSelection:function(code,collapse,origin){for(var dup=[],i=0;i<this.sel.ranges.length;i++)dup[i]=code;this.replaceSelections(dup,collapse,origin||"+input")},replaceSelections:docMethodOp(function(code,collapse,origin){for(var changes=[],sel=this.sel,i=0;i<sel.ranges.length;i++){var range=sel.ranges[i];changes[i]={from:range.from(),to:range.to(),text:this.splitLines(code[i]),origin:origin}}for(var newSel=collapse&&"end"!=collapse&&computeReplacedSel(this,changes,collapse),i=changes.length-1;i>=0;i--)makeChange(this,changes[i]);newSel?setSelectionReplaceHistory(this,newSel):this.cm&&ensureCursorVisible(this.cm)}),undo:docMethodOp(function(){makeChangeFromHistory(this,"undo")}),redo:docMethodOp(function(){makeChangeFromHistory(this,"redo")}),undoSelection:docMethodOp(function(){makeChangeFromHistory(this,"undo",!0)}),redoSelection:docMethodOp(function(){makeChangeFromHistory(this,"redo",!0)}),setExtending:function(val){this.extend=val},getExtending:function(){return this.extend},historySize:function(){for(var hist=this.history,done=0,undone=0,i=0;i<hist.done.length;i++)hist.done[i].ranges||++done;for(var i=0;i<hist.undone.length;i++)hist.undone[i].ranges||++undone;return{undo:done,redo:undone}},clearHistory:function(){this.history=new History(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(forceSplit){forceSplit&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null);return this.history.generation},isClean:function(gen){return this.history.generation==(gen||this.cleanGeneration)},getHistory:function(){return{done:copyHistoryArray(this.history.done),undone:copyHistoryArray(this.history.undone)}},setHistory:function(histData){var hist=this.history=new History(this.history.maxGeneration);hist.done=copyHistoryArray(histData.done.slice(0),null,!0);hist.undone=copyHistoryArray(histData.undone.slice(0),null,!0)},addLineClass:docMethodOp(function(handle,where,cls){return changeLine(this,handle,"gutter"==where?"gutter":"class",function(line){var prop="text"==where?"textClass":"background"==where?"bgClass":"gutter"==where?"gutterClass":"wrapClass";if(line[prop]){if(classTest(cls).test(line[prop]))return!1;line[prop]+=" "+cls}else line[prop]=cls;return!0})}),removeLineClass:docMethodOp(function(handle,where,cls){return changeLine(this,handle,"gutter"==where?"gutter":"class",function(line){var prop="text"==where?"textClass":"background"==where?"bgClass":"gutter"==where?"gutterClass":"wrapClass",cur=line[prop];if(!cur)return!1;if(null==cls)line[prop]=null;else{var found=cur.match(classTest(cls));if(!found)return!1;var end=found.index+found[0].length;line[prop]=cur.slice(0,found.index)+(found.index&&end!=cur.length?" ":"")+cur.slice(end)||null}return!0})}),addLineWidget:docMethodOp(function(handle,node,options){return addLineWidget(this,handle,node,options)}),removeLineWidget:function(widget){widget.clear()},markText:function(from,to,options){return markText(this,clipPos(this,from),clipPos(this,to),options,options&&options.type||"range")},setBookmark:function(pos,options){var realOpts={replacedWith:options&&(null==options.nodeType?options.widget:options),insertLeft:options&&options.insertLeft,clearWhenEmpty:!1,shared:options&&options.shared,handleMouseEvents:options&&options.handleMouseEvents};pos=clipPos(this,pos);return markText(this,pos,pos,realOpts,"bookmark")},findMarksAt:function(pos){pos=clipPos(this,pos);var markers=[],spans=getLine(this,pos.line).markedSpans;if(spans)for(var i=0;i<spans.length;++i){var span=spans[i];(null==span.from||span.from<=pos.ch)&&(null==span.to||span.to>=pos.ch)&&markers.push(span.marker.parent||span.marker)}return markers},findMarks:function(from,to,filter){from=clipPos(this,from);to=clipPos(this,to);var found=[],lineNo=from.line;this.iter(from.line,to.line+1,function(line){var spans=line.markedSpans;if(spans)for(var i=0;i<spans.length;i++){var span=spans[i];lineNo==from.line&&from.ch>span.to||null==span.from&&lineNo!=from.line||lineNo==to.line&&span.from>to.ch||filter&&!filter(span.marker)||found.push(span.marker.parent||span.marker)}++lineNo});return found},getAllMarks:function(){var markers=[];this.iter(function(line){var sps=line.markedSpans;if(sps)for(var i=0;i<sps.length;++i)null!=sps[i].from&&markers.push(sps[i].marker)});return markers},posFromIndex:function(off){var ch,lineNo=this.first;this.iter(function(line){var sz=line.text.length+1;if(sz>off){ch=off;return!0}off-=sz;++lineNo});return clipPos(this,Pos(lineNo,ch))},indexFromPos:function(coords){coords=clipPos(this,coords);var index=coords.ch;if(coords.line<this.first||coords.ch<0)return 0;this.iter(this.first,coords.line,function(line){index+=line.text.length+1});return index},copy:function(copyHistory){var doc=new Doc(getLines(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);doc.scrollTop=this.scrollTop;doc.scrollLeft=this.scrollLeft;doc.sel=this.sel;doc.extend=!1;if(copyHistory){doc.history.undoDepth=this.history.undoDepth;doc.setHistory(this.getHistory())}return doc},linkedDoc:function(options){options||(options={});var from=this.first,to=this.first+this.size;null!=options.from&&options.from>from&&(from=options.from);null!=options.to&&options.to<to&&(to=options.to);var copy=new Doc(getLines(this,from,to),options.mode||this.modeOption,from,this.lineSep);options.sharedHist&&(copy.history=this.history);(this.linked||(this.linked=[])).push({doc:copy,sharedHist:options.sharedHist});copy.linked=[{doc:this,isParent:!0,sharedHist:options.sharedHist}];copySharedMarkers(copy,findSharedMarkers(this));return copy},unlinkDoc:function(other){other instanceof CodeMirror&&(other=other.doc);if(this.linked)for(var i=0;i<this.linked.length;++i){var link=this.linked[i];if(link.doc==other){this.linked.splice(i,1);other.unlinkDoc(this);detachSharedMarkers(findSharedMarkers(this));break}}if(other.history==this.history){var splitIds=[other.id];linkedDocs(other,function(doc){splitIds.push(doc.id)},!0);other.history=new History(null);other.history.done=copyHistoryArray(this.history.done,splitIds);other.history.undone=copyHistoryArray(this.history.undone,splitIds)}},iterLinkedDocs:function(f){linkedDocs(this,f)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(str){return this.lineSep?str.split(this.lineSep):splitLinesAuto(str)},lineSeparator:function(){return this.lineSep||"\n"}});Doc.prototype.eachLine=Doc.prototype.iter;var dontDelegate="iter insert remove copy getEditor constructor".split(" ");for(var prop in Doc.prototype)Doc.prototype.hasOwnProperty(prop)&&indexOf(dontDelegate,prop)<0&&(CodeMirror.prototype[prop]=function(method){return function(){return method.apply(this.doc,arguments)}}(Doc.prototype[prop]));eventMixin(Doc);var e_preventDefault=CodeMirror.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},e_stopPropagation=CodeMirror.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},e_stop=CodeMirror.e_stop=function(e){e_preventDefault(e);e_stopPropagation(e)},on=CodeMirror.on=function(emitter,type,f){if(emitter.addEventListener)emitter.addEventListener(type,f,!1);else if(emitter.attachEvent)emitter.attachEvent("on"+type,f);else{var map=emitter._handlers||(emitter._handlers={}),arr=map[type]||(map[type]=[]);arr.push(f)}},noHandlers=[],off=CodeMirror.off=function(emitter,type,f){if(emitter.removeEventListener)emitter.removeEventListener(type,f,!1);else if(emitter.detachEvent)emitter.detachEvent("on"+type,f);else for(var handlers=getHandlers(emitter,type,!1),i=0;i<handlers.length;++i)if(handlers[i]==f){handlers.splice(i,1);break}},signal=CodeMirror.signal=function(emitter,type){var handlers=getHandlers(emitter,type,!0);if(handlers.length)for(var args=Array.prototype.slice.call(arguments,2),i=0;i<handlers.length;++i)handlers[i].apply(null,args)},orphanDelayedCallbacks=null,scrollerGap=30,Pass=CodeMirror.Pass={toString:function(){return"CodeMirror.Pass"}},sel_dontScroll={scroll:!1},sel_mouse={origin:"*mouse"},sel_move={origin:"+move"};Delayed.prototype.set=function(ms,f){clearTimeout(this.id);this.id=setTimeout(f,ms)};var countColumn=CodeMirror.countColumn=function(string,end,tabSize,startIndex,startValue){if(null==end){end=string.search(/[^\s\u00a0]/);-1==end&&(end=string.length)}for(var i=startIndex||0,n=startValue||0;;){var nextTab=string.indexOf(" ",i);if(0>nextTab||nextTab>=end)return n+(end-i);n+=nextTab-i;n+=tabSize-n%tabSize;i=nextTab+1}},findColumn=CodeMirror.findColumn=function(string,goal,tabSize){for(var pos=0,col=0;;){var nextTab=string.indexOf(" ",pos);-1==nextTab&&(nextTab=string.length);var skipped=nextTab-pos;if(nextTab==string.length||col+skipped>=goal)return pos+Math.min(skipped,goal-col);col+=nextTab-pos;col+=tabSize-col%tabSize;pos=nextTab+1;if(col>=goal)return pos}},spaceStrs=[""],selectInput=function(node){node.select()};ios?selectInput=function(node){node.selectionStart=0;node.selectionEnd=node.value.length}:ie&&(selectInput=function(node){try{node.select()}catch(_e){}});var range,nonASCIISingleCaseWordChar=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,isWordCharBasic=CodeMirror.isWordChar=function(ch){return/\w/.test(ch)||ch>"€"&&(ch.toUpperCase()!=ch.toLowerCase()||nonASCIISingleCaseWordChar.test(ch))},extendingChars=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;range=document.createRange?function(node,start,end,endNode){var r=document.createRange();r.setEnd(endNode||node,end);r.setStart(node,start);return r}:function(node,start,end){var r=document.body.createTextRange();try{r.moveToElementText(node.parentNode)}catch(e){return r}r.collapse(!0);r.moveEnd("character",end);r.moveStart("character",start);return r};var contains=CodeMirror.contains=function(parent,child){3==child.nodeType&&(child=child.parentNode);if(parent.contains)return parent.contains(child);do{11==child.nodeType&&(child=child.host);if(child==parent)return!0}while(child=child.parentNode)};ie&&11>ie_version&&(activeElt=function(){try{return document.activeElement}catch(e){return document.body}});var zwspSupported,badBidiRects,rmClass=CodeMirror.rmClass=function(node,cls){var current=node.className,match=classTest(cls).exec(current);if(match){var after=current.slice(match.index+match[0].length);node.className=current.slice(0,match.index)+(after?match[1]+after:"")}},addClass=CodeMirror.addClass=function(node,cls){var current=node.className;classTest(cls).test(current)||(node.className+=(current?" ":"")+cls)},globalsRegistered=!1,dragAndDrop=function(){if(ie&&9>ie_version)return!1;var div=elt("div");return"draggable"in div||"dragDrop"in div}(),splitLinesAuto=CodeMirror.splitLines=3!="\n\nb".split(/\n/).length?function(string){for(var pos=0,result=[],l=string.length;l>=pos;){var nl=string.indexOf("\n",pos);-1==nl&&(nl=string.length);var line=string.slice(pos,"\r"==string.charAt(nl-1)?nl-1:nl),rt=line.indexOf("\r");if(-1!=rt){result.push(line.slice(0,rt));pos+=rt+1}else{result.push(line);pos=nl+1}}return result}:function(string){return string.split(/\r\n?|\n/)},hasSelection=window.getSelection?function(te){try{return te.selectionStart!=te.selectionEnd}catch(e){return!1}}:function(te){try{var range=te.ownerDocument.selection.createRange()}catch(e){}return range&&range.parentElement()==te?0!=range.compareEndPoints("StartToEnd",range):!1},hasCopyEvent=function(){var e=elt("div");if("oncopy"in e)return!0;e.setAttribute("oncopy","return;");return"function"==typeof e.oncopy}(),badZoomedRects=null,keyNames=CodeMirror.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var i=0;10>i;i++)keyNames[i+48]=keyNames[i+96]=String(i);for(var i=65;90>=i;i++)keyNames[i]=String.fromCharCode(i);for(var i=1;12>=i;i++)keyNames[i+111]=keyNames[i+63235]="F"+i}();var bidiOther,bidiOrdering=function(){function charType(code){return 247>=code?lowTypes.charAt(code):code>=1424&&1524>=code?"R":code>=1536&&1773>=code?arabicTypes.charAt(code-1536):code>=1774&&2220>=code?"r":code>=8192&&8203>=code?"w":8204==code?"b":"L"}function BidiSpan(level,from,to){this.level=level;this.from=from;this.to=to}var lowTypes="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",arabicTypes="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",bidiRE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,isNeutral=/[stwN]/,isStrong=/[LRr]/,countsAsLeft=/[Lb1n]/,countsAsNum=/[1n]/,outerType="L";return function(str){if(!bidiRE.test(str))return!1;for(var type,len=str.length,types=[],i=0;len>i;++i)types.push(type=charType(str.charCodeAt(i)));for(var i=0,prev=outerType;len>i;++i){var type=types[i];"m"==type?types[i]=prev:prev=type}for(var i=0,cur=outerType;len>i;++i){var type=types[i];if("1"==type&&"r"==cur)types[i]="n";else if(isStrong.test(type)){cur=type;"r"==type&&(types[i]="R")}}for(var i=1,prev=types[0];len-1>i;++i){var type=types[i];"+"==type&&"1"==prev&&"1"==types[i+1]?types[i]="1":","!=type||prev!=types[i+1]||"1"!=prev&&"n"!=prev||(types[i]=prev);prev=type}for(var i=0;len>i;++i){var type=types[i];if(","==type)types[i]="N";else if("%"==type){for(var end=i+1;len>end&&"%"==types[end];++end);for(var replace=i&&"!"==types[i-1]||len>end&&"1"==types[end]?"1":"N",j=i;end>j;++j)types[j]=replace;i=end-1}}for(var i=0,cur=outerType;len>i;++i){var type=types[i];"L"==cur&&"1"==type?types[i]="L":isStrong.test(type)&&(cur=type)}for(var i=0;len>i;++i)if(isNeutral.test(types[i])){for(var end=i+1;len>end&&isNeutral.test(types[end]);++end);for(var before="L"==(i?types[i-1]:outerType),after="L"==(len>end?types[end]:outerType),replace=before||after?"L":"R",j=i;end>j;++j)types[j]=replace;i=end-1}for(var m,order=[],i=0;len>i;)if(countsAsLeft.test(types[i])){var start=i;for(++i;len>i&&countsAsLeft.test(types[i]);++i);order.push(new BidiSpan(0,start,i))}else{var pos=i,at=order.length;for(++i;len>i&&"L"!=types[i];++i);for(var j=pos;i>j;)if(countsAsNum.test(types[j])){j>pos&&order.splice(at,0,new BidiSpan(1,pos,j));var nstart=j;for(++j;i>j&&countsAsNum.test(types[j]);++j);order.splice(at,0,new BidiSpan(2,nstart,j));pos=j}else++j;i>pos&&order.splice(at,0,new BidiSpan(1,pos,i))}if(1==order[0].level&&(m=str.match(/^\s+/))){order[0].from=m[0].length;order.unshift(new BidiSpan(0,0,m[0].length))}if(1==lst(order).level&&(m=str.match(/\s+$/))){lst(order).to-=m[0].length;order.push(new BidiSpan(0,len-m[0].length,len))}2==order[0].level&&order.unshift(new BidiSpan(1,order[0].to,order[0].to));order[0].level!=lst(order).level&&order.push(new BidiSpan(order[0].level,len,len));return order}}();CodeMirror.version="5.8.0";return CodeMirror});
js/esites_editor/dist/js/vendor/codemirror/mode/css/css.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";function keySet(array){for(var keys={},i=0;i<array.length;++i)keys[array[i]]=!0;return keys}function tokenCComment(stream,state){for(var ch,maybeEnd=!1;null!=(ch=stream.next());){if(maybeEnd&&"/"==ch){state.tokenize=null;break}maybeEnd="*"==ch}return["comment","comment"]}CodeMirror.defineMode("css",function(config,parserConfig){function ret(style,tp){type=tp;return style}function tokenBase(stream,state){var ch=stream.next();if(tokenHooks[ch]){var result=tokenHooks[ch](stream,state);if(result!==!1)return result}if("@"==ch){stream.eatWhile(/[\w\\\-]/);return ret("def",stream.current())}if("="==ch||("~"==ch||"|"==ch)&&stream.eat("="))return ret(null,"compare");if('"'==ch||"'"==ch){state.tokenize=tokenString(ch);return state.tokenize(stream,state)}if("#"==ch){stream.eatWhile(/[\w\\\-]/);return ret("atom","hash")}if("!"==ch){stream.match(/^\s*\w*/);return ret("keyword","important")}if(/\d/.test(ch)||"."==ch&&stream.eat(/\d/)){stream.eatWhile(/[\w.%]/);return ret("number","unit")}if("-"!==ch){if(/[,+>*\/]/.test(ch))return ret(null,"select-op");if("."==ch&&stream.match(/^-?[_a-z][_a-z0-9-]*/i))return ret("qualifier","qualifier");if(/[:;{}\[\]\(\)]/.test(ch))return ret(null,ch);if("u"==ch&&stream.match(/rl(-prefix)?\(/)||"d"==ch&&stream.match("omain(")||"r"==ch&&stream.match("egexp(")){stream.backUp(1);state.tokenize=tokenParenthesized;return ret("property","word")}if(/[\w\\\-]/.test(ch)){stream.eatWhile(/[\w\\\-]/);return ret("property","word")}return ret(null,null)}if(/[\d.]/.test(stream.peek())){stream.eatWhile(/[\w.%]/);return ret("number","unit")}if(stream.match(/^-[\w\\\-]+/)){stream.eatWhile(/[\w\\\-]/);return stream.match(/^\s*:/,!1)?ret("variable-2","variable-definition"):ret("variable-2","variable")}return stream.match(/^\w+-/)?ret("meta","meta"):void 0}function tokenString(quote){return function(stream,state){for(var ch,escaped=!1;null!=(ch=stream.next());){if(ch==quote&&!escaped){")"==quote&&stream.backUp(1);break}escaped=!escaped&&"\\"==ch}(ch==quote||!escaped&&")"!=quote)&&(state.tokenize=null);return ret("string","string")}}function tokenParenthesized(stream,state){stream.next();stream.match(/\s*[\"\')]/,!1)?state.tokenize=null:state.tokenize=tokenString(")");return ret(null,"(")}function Context(type,indent,prev){this.type=type;this.indent=indent;this.prev=prev}function pushContext(state,stream,type,indent){state.context=new Context(type,stream.indentation()+(indent===!1?0:indentUnit),state.context);return type}function popContext(state){state.context.prev&&(state.context=state.context.prev);return state.context.type}function pass(type,stream,state){return states[state.context.type](type,stream,state)}function popAndPass(type,stream,state,n){for(var i=n||1;i>0;i--)state.context=state.context.prev;return pass(type,stream,state)}function wordAsValue(stream){var word=stream.current().toLowerCase();override=valueKeywords.hasOwnProperty(word)?"atom":colorKeywords.hasOwnProperty(word)?"keyword":"variable"}var provided=parserConfig;parserConfig.propertyKeywords||(parserConfig=CodeMirror.resolveMode("text/css"));parserConfig.inline=provided.inline;var type,override,indentUnit=config.indentUnit,tokenHooks=parserConfig.tokenHooks,documentTypes=parserConfig.documentTypes||{},mediaTypes=parserConfig.mediaTypes||{},mediaFeatures=parserConfig.mediaFeatures||{},mediaValueKeywords=parserConfig.mediaValueKeywords||{},propertyKeywords=parserConfig.propertyKeywords||{},nonStandardPropertyKeywords=parserConfig.nonStandardPropertyKeywords||{},fontProperties=parserConfig.fontProperties||{},counterDescriptors=parserConfig.counterDescriptors||{},colorKeywords=parserConfig.colorKeywords||{},valueKeywords=parserConfig.valueKeywords||{},allowNested=parserConfig.allowNested,supportsAtComponent=parserConfig.supportsAtComponent===!0,states={};states.top=function(type,stream,state){if("{"==type)return pushContext(state,stream,"block");if("}"==type&&state.context.prev)return popContext(state);if(supportsAtComponent&&/@component/.test(type))return pushContext(state,stream,"atComponentBlock");if(/^@(-moz-)?document$/.test(type))return pushContext(state,stream,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(type))return pushContext(state,stream,"atBlock");if(/^@(font-face|counter-style)/.test(type)){state.stateArg=type;return"restricted_atBlock_before"}if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(type))return"keyframes";if(type&&"@"==type.charAt(0))return pushContext(state,stream,"at");if("hash"==type)override="builtin";else if("word"==type)override="tag";else{if("variable-definition"==type)return"maybeprop";if("interpolation"==type)return pushContext(state,stream,"interpolation");if(":"==type)return"pseudo";if(allowNested&&"("==type)return pushContext(state,stream,"parens")}return state.context.type};states.block=function(type,stream,state){if("word"==type){var word=stream.current().toLowerCase();if(propertyKeywords.hasOwnProperty(word)){override="property";return"maybeprop"}if(nonStandardPropertyKeywords.hasOwnProperty(word)){override="string-2";return"maybeprop"}if(allowNested){override=stream.match(/^\s*:(?:\s|$)/,!1)?"property":"tag";return"block"}override+=" error";return"maybeprop"}if("meta"==type)return"block";if(allowNested||"hash"!=type&&"qualifier"!=type)return states.top(type,stream,state);override="error";return"block"};states.maybeprop=function(type,stream,state){return":"==type?pushContext(state,stream,"prop"):pass(type,stream,state)};states.prop=function(type,stream,state){if(";"==type)return popContext(state);if("{"==type&&allowNested)return pushContext(state,stream,"propBlock");if("}"==type||"{"==type)return popAndPass(type,stream,state);if("("==type)return pushContext(state,stream,"parens");if("hash"!=type||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(stream.current())){if("word"==type)wordAsValue(stream);else if("interpolation"==type)return pushContext(state,stream,"interpolation")}else override+=" error";return"prop"};states.propBlock=function(type,_stream,state){if("}"==type)return popContext(state);if("word"==type){override="property";return"maybeprop"}return state.context.type};states.parens=function(type,stream,state){if("{"==type||"}"==type)return popAndPass(type,stream,state);if(")"==type)return popContext(state);if("("==type)return pushContext(state,stream,"parens");if("interpolation"==type)return pushContext(state,stream,"interpolation");"word"==type&&wordAsValue(stream);return"parens"};states.pseudo=function(type,stream,state){if("word"==type){override="variable-3";return state.context.type}return pass(type,stream,state)};states.documentTypes=function(type,stream,state){if("word"==type&&documentTypes.hasOwnProperty(stream.current())){override="tag";return state.context.type}return states.atBlock(type,stream,state)};states.atBlock=function(type,stream,state){if("("==type)return pushContext(state,stream,"atBlock_parens");if("}"==type||";"==type)return popAndPass(type,stream,state);if("{"==type)return popContext(state)&&pushContext(state,stream,allowNested?"block":"top");if("interpolation"==type)return pushContext(state,stream,"interpolation");if("word"==type){var word=stream.current().toLowerCase();override="only"==word||"not"==word||"and"==word||"or"==word?"keyword":mediaTypes.hasOwnProperty(word)?"attribute":mediaFeatures.hasOwnProperty(word)?"property":mediaValueKeywords.hasOwnProperty(word)?"keyword":propertyKeywords.hasOwnProperty(word)?"property":nonStandardPropertyKeywords.hasOwnProperty(word)?"string-2":valueKeywords.hasOwnProperty(word)?"atom":colorKeywords.hasOwnProperty(word)?"keyword":"error"}return state.context.type};states.atComponentBlock=function(type,stream,state){if("}"==type)return popAndPass(type,stream,state);if("{"==type)return popContext(state)&&pushContext(state,stream,allowNested?"block":"top",!1);"word"==type&&(override="error");return state.context.type};states.atBlock_parens=function(type,stream,state){return")"==type?popContext(state):"{"==type||"}"==type?popAndPass(type,stream,state,2):states.atBlock(type,stream,state)};states.restricted_atBlock_before=function(type,stream,state){if("{"==type)return pushContext(state,stream,"restricted_atBlock");if("word"==type&&"@counter-style"==state.stateArg){override="variable";return"restricted_atBlock_before"}return pass(type,stream,state)};states.restricted_atBlock=function(type,stream,state){if("}"==type){state.stateArg=null;return popContext(state)}if("word"==type){override="@font-face"==state.stateArg&&!fontProperties.hasOwnProperty(stream.current().toLowerCase())||"@counter-style"==state.stateArg&&!counterDescriptors.hasOwnProperty(stream.current().toLowerCase())?"error":"property";return"maybeprop"}return"restricted_atBlock"};states.keyframes=function(type,stream,state){if("word"==type){override="variable";return"keyframes"}return"{"==type?pushContext(state,stream,"top"):pass(type,stream,state)};states.at=function(type,stream,state){if(";"==type)return popContext(state);if("{"==type||"}"==type)return popAndPass(type,stream,state);"word"==type?override="tag":"hash"==type&&(override="builtin");return"at"};states.interpolation=function(type,stream,state){if("}"==type)return popContext(state);if("{"==type||";"==type)return popAndPass(type,stream,state);"word"==type?override="variable":"variable"!=type&&"("!=type&&")"!=type&&(override="error");return"interpolation"};return{startState:function(base){return{tokenize:null,state:parserConfig.inline?"block":"top",stateArg:null,context:new Context(parserConfig.inline?"block":"top",base||0,null)}},token:function(stream,state){if(!state.tokenize&&stream.eatSpace())return null;var style=(state.tokenize||tokenBase)(stream,state);if(style&&"object"==typeof style){type=style[1];style=style[0]}override=style;state.state=states[state.state](type,stream,state);return override},indent:function(state,textAfter){var cx=state.context,ch=textAfter&&textAfter.charAt(0),indent=cx.indent;"prop"!=cx.type||"}"!=ch&&")"!=ch||(cx=cx.prev);if(cx.prev)if("}"!=ch||"block"!=cx.type&&"top"!=cx.type&&"interpolation"!=cx.type&&"restricted_atBlock"!=cx.type){if(")"==ch&&("parens"==cx.type||"atBlock_parens"==cx.type)||"{"==ch&&("at"==cx.type||"atBlock"==cx.type)){indent=Math.max(0,cx.indent-indentUnit);cx=cx.prev}}else{cx=cx.prev;indent=cx.indent}return indent},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var documentTypes_=["domain","regexp","url","url-prefix"],documentTypes=keySet(documentTypes_),mediaTypes_=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],mediaTypes=keySet(mediaTypes_),mediaFeatures_=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],mediaFeatures=keySet(mediaFeatures_),mediaValueKeywords_=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],mediaValueKeywords=keySet(mediaValueKeywords_),propertyKeywords_=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","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","cue-after","cue-before","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","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","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","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],propertyKeywords=keySet(propertyKeywords_),nonStandardPropertyKeywords_=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],nonStandardPropertyKeywords=keySet(nonStandardPropertyKeywords_),fontProperties_=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],fontProperties=keySet(fontProperties_),counterDescriptors_=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],counterDescriptors=keySet(counterDescriptors_),colorKeywords_=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],colorKeywords=keySet(colorKeywords_),valueKeywords_=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],valueKeywords=keySet(valueKeywords_),allWords=documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_).concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_).concat(valueKeywords_);CodeMirror.registerHelper("hintWords","css",allWords);CodeMirror.defineMIME("text/css",{documentTypes:documentTypes,mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,mediaValueKeywords:mediaValueKeywords,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,fontProperties:fontProperties,counterDescriptors:counterDescriptors,colorKeywords:colorKeywords,valueKeywords:valueKeywords,tokenHooks:{"/":function(stream,state){if(!stream.eat("*"))return!1;state.tokenize=tokenCComment;return tokenCComment(stream,state)}},name:"css"});CodeMirror.defineMIME("text/x-scss",{mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,mediaValueKeywords:mediaValueKeywords,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,colorKeywords:colorKeywords,valueKeywords:valueKeywords,fontProperties:fontProperties,allowNested:!0,tokenHooks:{"/":function(stream,state){if(stream.eat("/")){stream.skipToEnd();return["comment","comment"]}if(stream.eat("*")){state.tokenize=tokenCComment;return tokenCComment(stream,state)}return["operator","operator"]},":":function(stream){return stream.match(/\s*\{/)?[null,"{"]:!1},$:function(stream){stream.match(/^[\w-]+/);return stream.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(stream){return stream.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"});CodeMirror.defineMIME("text/x-less",{mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,mediaValueKeywords:mediaValueKeywords,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,colorKeywords:colorKeywords,valueKeywords:valueKeywords,fontProperties:fontProperties,allowNested:!0,tokenHooks:{"/":function(stream,state){if(stream.eat("/")){stream.skipToEnd();return["comment","comment"]}if(stream.eat("*")){state.tokenize=tokenCComment;return tokenCComment(stream,state)}return["operator","operator"]},"@":function(stream){if(stream.eat("{"))return[null,"interpolation"];if(stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1))return!1;stream.eatWhile(/[\w\\\-]/);return stream.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});CodeMirror.defineMIME("text/x-gss",{documentTypes:documentTypes,mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,fontProperties:fontProperties,counterDescriptors:counterDescriptors,colorKeywords:colorKeywords,valueKeywords:valueKeywords,supportsAtComponent:!0,tokenHooks:{"/":function(stream,state){if(!stream.eat("*"))return!1;state.tokenize=tokenCComment;return tokenCComment(stream,state)}},name:"css",helperType:"gss"})});
js/esites_editor/dist/js/vendor/codemirror/mode/handlebars/handlebars.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";CodeMirror.defineSimpleMode("handlebars",{start:[{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\]|\\.)*?"/,token:"string"},{regex:/'(?:[^\\]|\\.)*?'/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}]});CodeMirror.defineMIME("text/x-handlebars-template","handlebars")});
js/esites_editor/dist/js/vendor/codemirror/mode/htmlmixed/htmlmixed.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";function maybeBackup(stream,pat,style){var cur=stream.current(),close=cur.search(pat);if(close>-1)stream.backUp(cur.length-close);else if(cur.match(/<\/?$/)){stream.backUp(cur.length);stream.match(pat,!1)||stream.match(cur)}return style}function getAttrRegexp(attr){var regexp=attrRegexpCache[attr];return regexp?regexp:attrRegexpCache[attr]=new RegExp("\\s+"+attr+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function getAttrValue(stream,attr){for(var match,pos=stream.pos;pos>=0&&"<"!==stream.string.charAt(pos);)pos--;return 0>pos?pos:(match=stream.string.slice(pos,stream.pos).match(getAttrRegexp(attr)))?match[2]:""}function getTagRegexp(tagName,anchored){return new RegExp((anchored?"^":"")+"</s*"+tagName+"s*>","i")}function addTags(from,to){for(var tag in from)for(var dest=to[tag]||(to[tag]=[]),source=from[tag],i=source.length-1;i>=0;i--)dest.unshift(source[i])}function findMatchingMode(tagInfo,stream){for(var i=0;i<tagInfo.length;i++){var spec=tagInfo[i];if(!spec[0]||spec[1].test(getAttrValue(stream,spec[0])))return spec[2]}}var defaultTags={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},attrRegexpCache={};CodeMirror.defineMode("htmlmixed",function(config,parserConfig){function html(stream,state){var modeSpec,tagName=state.htmlState.tagName&&state.htmlState.tagName.toLowerCase(),tagInfo=tagName&&tags.hasOwnProperty(tagName)&&tags[tagName],style=htmlMode.token(stream,state.htmlState);if(tagInfo&&/\btag\b/.test(style)&&">"===stream.current()&&(modeSpec=findMatchingMode(tagInfo,stream))){var mode=CodeMirror.getMode(config,modeSpec),endTagA=getTagRegexp(tagName,!0),endTag=getTagRegexp(tagName,!1);state.token=function(stream,state){if(stream.match(endTagA,!1)){state.token=html;state.localState=state.localMode=null;return null}return maybeBackup(stream,endTag,state.localMode.token(stream,state.localState))};state.localMode=mode;state.localState=CodeMirror.startState(mode,htmlMode.indent(state.htmlState,""))}return style}var htmlMode=CodeMirror.getMode(config,{name:"xml",htmlMode:!0,multilineTagIndentFactor:parserConfig.multilineTagIndentFactor,multilineTagIndentPastTag:parserConfig.multilineTagIndentPastTag}),tags={},configTags=parserConfig&&parserConfig.tags,configScript=parserConfig&&parserConfig.scriptTypes;addTags(defaultTags,tags);configTags&&addTags(configTags,tags);if(configScript)for(var i=configScript.length-1;i>=0;i--)tags.script.unshift(["type",configScript[i].matches,configScript[i].mode]);return{startState:function(){var state=htmlMode.startState();return{token:html,localMode:null,localState:null,htmlState:state}},copyState:function(state){var local;state.localState&&(local=CodeMirror.copyState(state.localMode,state.localState));return{token:state.token,localMode:state.localMode,localState:local,htmlState:CodeMirror.copyState(htmlMode,state.htmlState)}},token:function(stream,state){return state.token(stream,state)},indent:function(state,textAfter){return!state.localMode||/^\s*<\//.test(textAfter)?htmlMode.indent(state.htmlState,textAfter):state.localMode.indent?state.localMode.indent(state.localState,textAfter):CodeMirror.Pass},innerMode:function(state){return{state:state.localState||state.htmlState,mode:state.localMode||htmlMode}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed")});
js/esites_editor/dist/js/vendor/codemirror/mode/javascript/javascript.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";CodeMirror.defineMode("javascript",function(config,parserConfig){function readRegexp(stream){for(var next,escaped=!1,inSet=!1;null!=(next=stream.next());){if(!escaped){if("/"==next&&!inSet)return;"["==next?inSet=!0:inSet&&"]"==next&&(inSet=!1)}escaped=!escaped&&"\\"==next}}function ret(tp,style,cont){type=tp;content=cont;return style}function tokenBase(stream,state){var ch=stream.next();if('"'==ch||"'"==ch){state.tokenize=tokenString(ch);return state.tokenize(stream,state)}if("."==ch&&stream.match(/^\d+(?:[eE][+\-]?\d+)?/))return ret("number","number");if("."==ch&&stream.match(".."))return ret("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ch))return ret(ch);if("="==ch&&stream.eat(">"))return ret("=>","operator");if("0"==ch&&stream.eat(/x/i)){stream.eatWhile(/[\da-f]/i);return ret("number","number")}if("0"==ch&&stream.eat(/o/i)){stream.eatWhile(/[0-7]/i);return ret("number","number")}if("0"==ch&&stream.eat(/b/i)){stream.eatWhile(/[01]/i);return ret("number","number")}if(/\d/.test(ch)){stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return ret("number","number")}if("/"==ch){if(stream.eat("*")){state.tokenize=tokenComment;return tokenComment(stream,state)}if(stream.eat("/")){stream.skipToEnd();return ret("comment","comment")}if("operator"==state.lastType||"keyword c"==state.lastType||"sof"==state.lastType||/^[\[{}\(,;:]$/.test(state.lastType)){readRegexp(stream);stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return ret("regexp","string-2")}stream.eatWhile(isOperatorChar);return ret("operator","operator",stream.current())}if("`"==ch){state.tokenize=tokenQuasi;return tokenQuasi(stream,state)}if("#"==ch){stream.skipToEnd();return ret("error","error")}if(isOperatorChar.test(ch)){stream.eatWhile(isOperatorChar);return ret("operator","operator",stream.current())}if(wordRE.test(ch)){stream.eatWhile(wordRE);var word=stream.current(),known=keywords.propertyIsEnumerable(word)&&keywords[word];return known&&"."!=state.lastType?ret(known.type,known.style,word):ret("variable","variable",word)}}function tokenString(quote){return function(stream,state){var next,escaped=!1;if(jsonldMode&&"@"==stream.peek()&&stream.match(isJsonldKeyword)){state.tokenize=tokenBase;return ret("jsonld-keyword","meta")}for(;null!=(next=stream.next())&&(next!=quote||escaped);)escaped=!escaped&&"\\"==next;escaped||(state.tokenize=tokenBase);return ret("string","string")}}function tokenComment(stream,state){for(var ch,maybeEnd=!1;ch=stream.next();){if("/"==ch&&maybeEnd){state.tokenize=tokenBase;break}maybeEnd="*"==ch}return ret("comment","comment")}function tokenQuasi(stream,state){for(var next,escaped=!1;null!=(next=stream.next());){if(!escaped&&("`"==next||"$"==next&&stream.eat("{"))){state.tokenize=tokenBase;break}escaped=!escaped&&"\\"==next}return ret("quasi","string-2",stream.current())}function findFatArrow(stream,state){state.fatArrowAt&&(state.fatArrowAt=null);var arrow=stream.string.indexOf("=>",stream.start);if(!(0>arrow)){for(var depth=0,sawSomething=!1,pos=arrow-1;pos>=0;--pos){var ch=stream.string.charAt(pos),bracket=brackets.indexOf(ch);if(bracket>=0&&3>bracket){if(!depth){++pos;break}if(0==--depth)break}else if(bracket>=3&&6>bracket)++depth;else if(wordRE.test(ch))sawSomething=!0;else{if(/["'\/]/.test(ch))return;if(sawSomething&&!depth){++pos;break}}}sawSomething&&!depth&&(state.fatArrowAt=pos)}}function JSLexical(indented,column,type,align,prev,info){this.indented=indented;this.column=column;this.type=type;this.prev=prev;this.info=info;null!=align&&(this.align=align)}function inScope(state,varname){for(var v=state.localVars;v;v=v.next)if(v.name==varname)return!0;for(var cx=state.context;cx;cx=cx.prev)for(var v=cx.vars;v;v=v.next)if(v.name==varname)return!0}function parseJS(state,style,type,content,stream){var cc=state.cc;cx.state=state;cx.stream=stream;cx.marked=null,cx.cc=cc;cx.style=style;state.lexical.hasOwnProperty("align")||(state.lexical.align=!0);for(;;){var combinator=cc.length?cc.pop():jsonMode?expression:statement;if(combinator(type,content)){for(;cc.length&&cc[cc.length-1].lex;)cc.pop()();return cx.marked?cx.marked:"variable"==type&&inScope(state,content)?"variable-2":style}}}function pass(){for(var i=arguments.length-1;i>=0;i--)cx.cc.push(arguments[i])}function cont(){pass.apply(null,arguments);return!0}function register(varname){function inList(list){for(var v=list;v;v=v.next)if(v.name==varname)return!0;return!1}var state=cx.state;cx.marked="def";if(state.context){if(inList(state.localVars))return;state.localVars={name:varname,next:state.localVars}}else{if(inList(state.globalVars))return;parserConfig.globalVars&&(state.globalVars={name:varname,next:state.globalVars})}}function pushcontext(){cx.state.context={prev:cx.state.context,vars:cx.state.localVars};cx.state.localVars=defaultVars}function popcontext(){cx.state.localVars=cx.state.context.vars;cx.state.context=cx.state.context.prev}function pushlex(type,info){var result=function(){var state=cx.state,indent=state.indented;if("stat"==state.lexical.type)indent=state.lexical.indented;else for(var outer=state.lexical;outer&&")"==outer.type&&outer.align;outer=outer.prev)indent=outer.indented;state.lexical=new JSLexical(indent,cx.stream.column(),type,null,state.lexical,info)};result.lex=!0;return result}function poplex(){var state=cx.state;if(state.lexical.prev){")"==state.lexical.type&&(state.indented=state.lexical.indented);state.lexical=state.lexical.prev}}function expect(wanted){function exp(type){return type==wanted?cont():";"==wanted?pass():cont(exp)}return exp}function statement(type,value){if("var"==type)return cont(pushlex("vardef",value.length),vardef,expect(";"),poplex);if("keyword a"==type)return cont(pushlex("form"),expression,statement,poplex);if("keyword b"==type)return cont(pushlex("form"),statement,poplex);if("{"==type)return cont(pushlex("}"),block,poplex);if(";"==type)return cont();if("if"==type){"else"==cx.state.lexical.info&&cx.state.cc[cx.state.cc.length-1]==poplex&&cx.state.cc.pop()();return cont(pushlex("form"),expression,statement,poplex,maybeelse)}return"function"==type?cont(functiondef):"for"==type?cont(pushlex("form"),forspec,statement,poplex):"variable"==type?cont(pushlex("stat"),maybelabel):"switch"==type?cont(pushlex("form"),expression,pushlex("}","switch"),expect("{"),block,poplex,poplex):"case"==type?cont(expression,expect(":")):"default"==type?cont(expect(":")):"catch"==type?cont(pushlex("form"),pushcontext,expect("("),funarg,expect(")"),statement,poplex,popcontext):"class"==type?cont(pushlex("form"),className,poplex):"export"==type?cont(pushlex("stat"),afterExport,poplex):"import"==type?cont(pushlex("stat"),afterImport,poplex):pass(pushlex("stat"),expression,expect(";"),poplex)}function expression(type){return expressionInner(type,!1)}function expressionNoComma(type){return expressionInner(type,!0)}function expressionInner(type,noComma){if(cx.state.fatArrowAt==cx.stream.start){var body=noComma?arrowBodyNoComma:arrowBody;if("("==type)return cont(pushcontext,pushlex(")"),commasep(pattern,")"),poplex,expect("=>"),body,popcontext);if("variable"==type)return pass(pushcontext,pattern,expect("=>"),body,popcontext)}var maybeop=noComma?maybeoperatorNoComma:maybeoperatorComma;return atomicTypes.hasOwnProperty(type)?cont(maybeop):"async"==type?cont(expression):"function"==type?cont(functiondef,maybeop):"keyword c"==type?cont(noComma?maybeexpressionNoComma:maybeexpression):"("==type?cont(pushlex(")"),maybeexpression,comprehension,expect(")"),poplex,maybeop):"operator"==type||"spread"==type?cont(noComma?expressionNoComma:expression):"["==type?cont(pushlex("]"),arrayLiteral,poplex,maybeop):"{"==type?contCommasep(objprop,"}",null,maybeop):"quasi"==type?pass(quasi,maybeop):"new"==type?cont(maybeTarget(noComma)):cont()}function maybeexpression(type){return type.match(/[;\}\)\],]/)?pass():pass(expression)}function maybeexpressionNoComma(type){return type.match(/[;\}\)\],]/)?pass():pass(expressionNoComma)}function maybeoperatorComma(type,value){return","==type?cont(expression):maybeoperatorNoComma(type,value,!1)}function maybeoperatorNoComma(type,value,noComma){var me=0==noComma?maybeoperatorComma:maybeoperatorNoComma,expr=0==noComma?expression:expressionNoComma;return"=>"==type?cont(pushcontext,noComma?arrowBodyNoComma:arrowBody,popcontext):"operator"==type?/\+\+|--/.test(value)?cont(me):"?"==value?cont(expression,expect(":"),expr):cont(expr):"quasi"==type?pass(quasi,me):";"!=type?"("==type?contCommasep(expressionNoComma,")","call",me):"."==type?cont(property,me):"["==type?cont(pushlex("]"),maybeexpression,expect("]"),poplex,me):void 0:void 0}function quasi(type,value){return"quasi"!=type?pass():"${"!=value.slice(value.length-2)?cont(quasi):cont(expression,continueQuasi)}function continueQuasi(type){if("}"==type){cx.marked="string-2";cx.state.tokenize=tokenQuasi;return cont(quasi)}}function arrowBody(type){findFatArrow(cx.stream,cx.state);return pass("{"==type?statement:expression)}function arrowBodyNoComma(type){findFatArrow(cx.stream,cx.state);return pass("{"==type?statement:expressionNoComma)}function maybeTarget(noComma){return function(type){return"."==type?cont(noComma?targetNoComma:target):pass(noComma?expressionNoComma:expression)}}function target(_,value){if("target"==value){cx.marked="keyword";return cont(maybeoperatorComma)}}function targetNoComma(_,value){if("target"==value){cx.marked="keyword";return cont(maybeoperatorNoComma)}}function maybelabel(type){return":"==type?cont(poplex,statement):pass(maybeoperatorComma,expect(";"),poplex)}function property(type){if("variable"==type){cx.marked="property";return cont()}}function objprop(type,value){if("async"==type)return cont(objprop);if("variable"==type||"keyword"==cx.style){cx.marked="property";return cont("get"==value||"set"==value?getterSetter:afterprop)}if("number"==type||"string"==type){cx.marked=jsonldMode?"property":cx.style+" property";return cont(afterprop)}return"jsonld-keyword"==type?cont(afterprop):"["==type?cont(expression,expect("]"),afterprop):void 0}function getterSetter(type){if("variable"!=type)return pass(afterprop);cx.marked="property";return cont(functiondef)}function afterprop(type){return":"==type?cont(expressionNoComma):"("==type?pass(functiondef):void 0}function commasep(what,end){function proceed(type){if(","==type){var lex=cx.state.lexical;"call"==lex.info&&(lex.pos=(lex.pos||0)+1);return cont(what,proceed)}return type==end?cont():cont(expect(end))}return function(type){return type==end?cont():pass(what,proceed)}}function contCommasep(what,end,info){for(var i=3;i<arguments.length;i++)cx.cc.push(arguments[i]);return cont(pushlex(end,info),commasep(what,end),poplex)}function block(type){return"}"==type?cont():pass(statement,block)}function maybetype(type){return isTS&&":"==type?cont(typedef):void 0}function maybedefault(_,value){return"="==value?cont(expressionNoComma):void 0}function typedef(type){if("variable"==type){cx.marked="variable-3";return cont()}}function vardef(){return pass(pattern,maybetype,maybeAssign,vardefCont)}function pattern(type,value){if("variable"==type){register(value);return cont()}return"spread"==type?cont(pattern):"["==type?contCommasep(pattern,"]"):"{"==type?contCommasep(proppattern,"}"):void 0}function proppattern(type,value){if("variable"==type&&!cx.stream.match(/^\s*:/,!1)){register(value);return cont(maybeAssign)}"variable"==type&&(cx.marked="property");return"spread"==type?cont(pattern):cont(expect(":"),pattern,maybeAssign)}function maybeAssign(_type,value){return"="==value?cont(expressionNoComma):void 0}function vardefCont(type){return","==type?cont(vardef):void 0}function maybeelse(type,value){return"keyword b"==type&&"else"==value?cont(pushlex("form","else"),statement,poplex):void 0}function forspec(type){return"("==type?cont(pushlex(")"),forspec1,expect(")"),poplex):void 0}function forspec1(type){return"var"==type?cont(vardef,expect(";"),forspec2):";"==type?cont(forspec2):"variable"==type?cont(formaybeinof):pass(expression,expect(";"),forspec2)}function formaybeinof(_type,value){if("in"==value||"of"==value){cx.marked="keyword";return cont(expression)}return cont(maybeoperatorComma,forspec2)}function forspec2(type,value){if(";"==type)return cont(forspec3);if("in"==value||"of"==value){cx.marked="keyword";return cont(expression)}return pass(expression,expect(";"),forspec3)}function forspec3(type){")"!=type&&cont(expression)}function functiondef(type,value){if("*"==value){cx.marked="keyword";return cont(functiondef)}if("variable"==type){register(value);return cont(functiondef)}return"("==type?cont(pushcontext,pushlex(")"),commasep(funarg,")"),poplex,statement,popcontext):void 0}function funarg(type){return"spread"==type?cont(funarg):pass(pattern,maybetype,maybedefault)}function className(type,value){if("variable"==type){register(value);return cont(classNameAfter)}}function classNameAfter(type,value){return"extends"==value?cont(expression,classNameAfter):"{"==type?cont(pushlex("}"),classBody,poplex):void 0}function classBody(type,value){if("variable"==type||"keyword"==cx.style){if("static"==value){cx.marked="keyword";return cont(classBody)}cx.marked="property";return"get"==value||"set"==value?cont(classGetterSetter,functiondef,classBody):cont(functiondef,classBody)}if("*"==value){cx.marked="keyword";return cont(classBody)}return";"==type?cont(classBody):"}"==type?cont():void 0}function classGetterSetter(type){if("variable"!=type)return pass();cx.marked="property";return cont()}function afterExport(_type,value){if("*"==value){cx.marked="keyword";return cont(maybeFrom,expect(";"))}if("default"==value){cx.marked="keyword";return cont(expression,expect(";"))}return pass(statement)}function afterImport(type){return"string"==type?cont():pass(importSpec,maybeFrom)}function importSpec(type,value){if("{"==type)return contCommasep(importSpec,"}");"variable"==type&&register(value);"*"==value&&(cx.marked="keyword");return cont(maybeAs)}function maybeAs(_type,value){if("as"==value){cx.marked="keyword";return cont(importSpec)}}function maybeFrom(_type,value){if("from"==value){cx.marked="keyword";return cont(expression)}}function arrayLiteral(type){return"]"==type?cont():pass(expressionNoComma,maybeArrayComprehension)}function maybeArrayComprehension(type){return"for"==type?pass(comprehension,expect("]")):","==type?cont(commasep(maybeexpressionNoComma,"]")):pass(commasep(expressionNoComma,"]"))}function comprehension(type){return"for"==type?cont(forspec,comprehension):"if"==type?cont(expression,comprehension):void 0}function isContinuedStatement(state,textAfter){return"operator"==state.lastType||","==state.lastType||isOperatorChar.test(textAfter.charAt(0))||/[,.]/.test(textAfter.charAt(0))}var type,content,indentUnit=config.indentUnit,statementIndent=parserConfig.statementIndent,jsonldMode=parserConfig.jsonld,jsonMode=parserConfig.json||jsonldMode,isTS=parserConfig.typescript,wordRE=parserConfig.wordCharacters||/[\w$\xa1-\uffff]/,keywords=function(){function kw(type){return{type:type,style:"keyword"}}var A=kw("keyword a"),B=kw("keyword b"),C=kw("keyword c"),operator=kw("operator"),atom={type:"atom",style:"atom"},jsKeywords={"if":kw("if"),"while":A,"with":A,"else":B,"do":B,"try":B,"finally":B,"return":C,"break":C,"continue":C,"new":kw("new"),"delete":C,"throw":C,"debugger":C,"var":kw("var"),"const":kw("var"),let:kw("var"),async:kw("async"),"function":kw("function"),"catch":kw("catch"),"for":kw("for"),"switch":kw("switch"),"case":kw("case"),"default":kw("default"),"in":operator,"typeof":operator,"instanceof":operator,"true":atom,"false":atom,"null":atom,undefined:atom,NaN:atom,Infinity:atom,"this":kw("this"),"class":kw("class"),"super":kw("atom"),await:C,"yield":C,"export":kw("export"),"import":kw("import"),"extends":C};if(isTS){var type={type:"variable",style:"variable-3"},tsKeywords={"interface":kw("interface"),"extends":kw("extends"),constructor:kw("constructor"),"public":kw("public"),"private":kw("private"),"protected":kw("protected"),"static":kw("static"),string:type,number:type,"boolean":type,any:type};for(var attr in tsKeywords)jsKeywords[attr]=tsKeywords[attr]}return jsKeywords}(),isOperatorChar=/[+\-*&%=<>!?|~^]/,isJsonldKeyword=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,brackets="([{}])",atomicTypes={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},cx={state:null,column:null,marked:null,cc:null},defaultVars={name:"this",next:{name:"arguments"}};poplex.lex=!0;return{startState:function(basecolumn){var state={tokenize:tokenBase,lastType:"sof",cc:[],lexical:new JSLexical((basecolumn||0)-indentUnit,0,"block",!1),localVars:parserConfig.localVars,context:parserConfig.localVars&&{vars:parserConfig.localVars},indented:0};parserConfig.globalVars&&"object"==typeof parserConfig.globalVars&&(state.globalVars=parserConfig.globalVars);return state},token:function(stream,state){if(stream.sol()){state.lexical.hasOwnProperty("align")||(state.lexical.align=!1);state.indented=stream.indentation();findFatArrow(stream,state)}if(state.tokenize!=tokenComment&&stream.eatSpace())return null;var style=state.tokenize(stream,state);if("comment"==type)return style;state.lastType="operator"!=type||"++"!=content&&"--"!=content?type:"incdec";return parseJS(state,style,type,content,stream)},indent:function(state,textAfter){if(state.tokenize==tokenComment)return CodeMirror.Pass;if(state.tokenize!=tokenBase)return 0;var firstChar=textAfter&&textAfter.charAt(0),lexical=state.lexical;if(!/^\s*else\b/.test(textAfter))for(var i=state.cc.length-1;i>=0;--i){var c=state.cc[i];if(c==poplex)lexical=lexical.prev;else if(c!=maybeelse)break}"stat"==lexical.type&&"}"==firstChar&&(lexical=lexical.prev);statementIndent&&")"==lexical.type&&"stat"==lexical.prev.type&&(lexical=lexical.prev);var type=lexical.type,closing=firstChar==type;return"vardef"==type?lexical.indented+("operator"==state.lastType||","==state.lastType?lexical.info+1:0):"form"==type&&"{"==firstChar?lexical.indented:"form"==type?lexical.indented+indentUnit:"stat"==type?lexical.indented+(isContinuedStatement(state,textAfter)?statementIndent||indentUnit:0):"switch"!=lexical.info||closing||0==parserConfig.doubleIndentSwitch?lexical.align?lexical.column+(closing?0:1):lexical.indented+(closing?0:indentUnit):lexical.indented+(/^(?:case|default)\b/.test(textAfter)?indentUnit:2*indentUnit)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:jsonMode?null:"/*",blockCommentEnd:jsonMode?null:"*/",lineComment:jsonMode?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:jsonMode?"json":"javascript",jsonldMode:jsonldMode,jsonMode:jsonMode}});CodeMirror.registerHelper("wordChars","javascript",/[\w$]/);CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/x-javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:!0});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0});CodeMirror.defineMIME("application/ld+json",{name:"javascript",jsonld:!0});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0})});
js/esites_editor/dist/js/vendor/codemirror/mode/xml/xml.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";CodeMirror.defineMode("xml",function(config,parserConfig){function inText(stream,state){function chain(parser){state.tokenize=parser;return parser(stream,state)}var ch=stream.next();if("<"==ch){if(stream.eat("!")){if(stream.eat("["))return stream.match("CDATA[")?chain(inBlock("atom","]]>")):null;if(stream.match("--"))return chain(inBlock("comment","-->"));if(stream.match("DOCTYPE",!0,!0)){stream.eatWhile(/[\w\._\-]/);return chain(doctype(1))}return null}if(stream.eat("?")){stream.eatWhile(/[\w\._\-]/);state.tokenize=inBlock("meta","?>");return"meta"}type=stream.eat("/")?"closeTag":"openTag";state.tokenize=inTag;return"tag bracket"}if("&"==ch){var ok;ok=stream.eat("#")?stream.eat("x")?stream.eatWhile(/[a-fA-F\d]/)&&stream.eat(";"):stream.eatWhile(/[\d]/)&&stream.eat(";"):stream.eatWhile(/[\w\.\-:]/)&&stream.eat(";");return ok?"atom":"error"}stream.eatWhile(/[^&<]/);return null}function inTag(stream,state){var ch=stream.next();if(">"==ch||"/"==ch&&stream.eat(">")){state.tokenize=inText;type=">"==ch?"endTag":"selfcloseTag";return"tag bracket"}if("="==ch){type="equals";return null}if("<"==ch){state.tokenize=inText;state.state=baseState;state.tagName=state.tagStart=null;var next=state.tokenize(stream,state);return next?next+" tag error":"tag error"}if(/[\'\"]/.test(ch)){state.tokenize=inAttribute(ch);state.stringStartCol=stream.column();return state.tokenize(stream,state)}stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}function inAttribute(quote){var closure=function(stream,state){for(;!stream.eol();)if(stream.next()==quote){state.tokenize=inTag;break}return"string"};closure.isInAttribute=!0;return closure}function inBlock(style,terminator){return function(stream,state){for(;!stream.eol();){if(stream.match(terminator)){state.tokenize=inText;break}stream.next()}return style}}function doctype(depth){return function(stream,state){for(var ch;null!=(ch=stream.next());){if("<"==ch){state.tokenize=doctype(depth+1);return state.tokenize(stream,state)}if(">"==ch){if(1==depth){state.tokenize=inText;break}state.tokenize=doctype(depth-1);return state.tokenize(stream,state)}}return"meta"}}function Context(state,tagName,startOfLine){this.prev=state.context;this.tagName=tagName;this.indent=state.indented;this.startOfLine=startOfLine;(Kludges.doNotIndent.hasOwnProperty(tagName)||state.context&&state.context.noIndent)&&(this.noIndent=!0)}function popContext(state){state.context&&(state.context=state.context.prev)}function maybePopContext(state,nextTagName){for(var parentTagName;;){if(!state.context)return;parentTagName=state.context.tagName;if(!Kludges.contextGrabbers.hasOwnProperty(parentTagName)||!Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName))return;popContext(state)}}function baseState(type,stream,state){if("openTag"==type){state.tagStart=stream.column();return tagNameState}return"closeTag"==type?closeTagNameState:baseState}function tagNameState(type,stream,state){if("word"==type){state.tagName=stream.current();setStyle="tag";return attrState}setStyle="error";return tagNameState}function closeTagNameState(type,stream,state){if("word"==type){var tagName=stream.current();state.context&&state.context.tagName!=tagName&&Kludges.implicitlyClosed.hasOwnProperty(state.context.tagName)&&popContext(state);if(state.context&&state.context.tagName==tagName){setStyle="tag";return closeState}setStyle="tag error";return closeStateErr}setStyle="error";return closeStateErr}function closeState(type,_stream,state){if("endTag"!=type){setStyle="error";return closeState}popContext(state);return baseState}function closeStateErr(type,stream,state){setStyle="error";return closeState(type,stream,state)}function attrState(type,_stream,state){if("word"==type){setStyle="attribute";return attrEqState}if("endTag"==type||"selfcloseTag"==type){var tagName=state.tagName,tagStart=state.tagStart;state.tagName=state.tagStart=null;if("selfcloseTag"==type||Kludges.autoSelfClosers.hasOwnProperty(tagName))maybePopContext(state,tagName);else{maybePopContext(state,tagName);state.context=new Context(state,tagName,tagStart==state.indented)}return baseState}setStyle="error";return attrState}function attrEqState(type,stream,state){if("equals"==type)return attrValueState;Kludges.allowMissing||(setStyle="error");return attrState(type,stream,state)}function attrValueState(type,stream,state){if("string"==type)return attrContinuedState;if("word"==type&&Kludges.allowUnquoted){setStyle="string";return attrState}setStyle="error";return attrState(type,stream,state)}function attrContinuedState(type,stream,state){return"string"==type?attrContinuedState:attrState(type,stream,state)}var indentUnit=config.indentUnit,multilineTagIndentFactor=parserConfig.multilineTagIndentFactor||1,multilineTagIndentPastTag=parserConfig.multilineTagIndentPastTag;null==multilineTagIndentPastTag&&(multilineTagIndentPastTag=!0);var type,setStyle,Kludges=parserConfig.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},alignCDATA=parserConfig.alignCDATA;inText.isInText=!0;return{startState:function(){return{tokenize:inText,state:baseState,indented:0,tagName:null,tagStart:null,context:null}},token:function(stream,state){!state.tagName&&stream.sol()&&(state.indented=stream.indentation());if(stream.eatSpace())return null;type=null;var style=state.tokenize(stream,state);if((style||type)&&"comment"!=style){setStyle=null;state.state=state.state(type||style,stream,state);setStyle&&(style="error"==setStyle?style+" error":setStyle)}return style},indent:function(state,textAfter,fullLine){var context=state.context;if(state.tokenize.isInAttribute)return state.tagStart==state.indented?state.stringStartCol+1:state.indented+indentUnit;if(context&&context.noIndent)return CodeMirror.Pass;if(state.tokenize!=inTag&&state.tokenize!=inText)return fullLine?fullLine.match(/^(\s*)/)[0].length:0;if(state.tagName)return multilineTagIndentPastTag?state.tagStart+state.tagName.length+2:state.tagStart+indentUnit*multilineTagIndentFactor;if(alignCDATA&&/<!\[CDATA\[/.test(textAfter))return 0;var tagAfter=textAfter&&/^<(\/)?([\w_:\.-]*)/.exec(textAfter);if(tagAfter&&tagAfter[1])for(;context;){if(context.tagName==tagAfter[2]){context=context.prev;break}if(!Kludges.implicitlyClosed.hasOwnProperty(context.tagName))break;context=context.prev}else if(tagAfter)for(;context;){var grabbers=Kludges.contextGrabbers[context.tagName];if(!grabbers||!grabbers.hasOwnProperty(tagAfter[2]))break;context=context.prev}for(;context&&!context.startOfLine;)context=context.prev;return context?context.indent+indentUnit:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:parserConfig.htmlMode?"html":"xml",helperType:parserConfig.htmlMode?"html":"xml"}});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0})});
js/esites_editor/dist/js/vendor/codemirror/theme/3024-day.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-3024-day.CodeMirror{background:#f7f7f7;color:#3a3432}.cm-s-3024-day .CodeMirror-line::selection,.cm-s-3024-day .CodeMirror-line>span::selection,.cm-s-3024-day .CodeMirror-line>span>span::selection,.cm-s-3024-day div.CodeMirror-selected{background:#d6d5d4}.cm-s-3024-day .CodeMirror-line::-moz-selection,.cm-s-3024-day .CodeMirror-line>span::-moz-selection,.cm-s-3024-day .CodeMirror-line>span>span::selection{background:#d9d9d9}.cm-s-3024-day .CodeMirror-gutters{background:#f7f7f7;border-right:0}.cm-s-3024-day .CodeMirror-guttermarker{color:#db2d20}.cm-s-3024-day .CodeMirror-guttermarker-subtle,.cm-s-3024-day .CodeMirror-linenumber{color:#807d7c}.cm-s-3024-day .CodeMirror-cursor{border-left:1px solid #5c5855}.cm-s-3024-day span.cm-comment{color:#cdab53}.cm-s-3024-day span.cm-atom,.cm-s-3024-day span.cm-number{color:#a16a94}.cm-s-3024-day span.cm-attribute,.cm-s-3024-day span.cm-property{color:#01a252}.cm-s-3024-day span.cm-keyword{color:#db2d20}.cm-s-3024-day span.cm-string{color:#fded02}.cm-s-3024-day span.cm-variable{color:#01a252}.cm-s-3024-day span.cm-variable-2{color:#01a0e4}.cm-s-3024-day span.cm-def{color:#e8bbd0}.cm-s-3024-day span.cm-bracket{color:#3a3432}.cm-s-3024-day span.cm-tag{color:#db2d20}.cm-s-3024-day span.cm-link{color:#a16a94}.cm-s-3024-day span.cm-error{background:#db2d20;color:#5c5855}.cm-s-3024-day .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-3024-day .CodeMirror-matchingbracket{text-decoration:underline;color:#a16a94!important}
js/esites_editor/dist/js/vendor/codemirror/theme/3024-night.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-3024-night.CodeMirror{background:#090300;color:#d6d5d4}.cm-s-3024-night div.CodeMirror-selected{background:#3a3432}.cm-s-3024-night .CodeMirror-line::selection,.cm-s-3024-night .CodeMirror-line>span::selection,.cm-s-3024-night .CodeMirror-line>span>span::selection{background:rgba(58,52,50,.99)}.cm-s-3024-night .CodeMirror-line::-moz-selection,.cm-s-3024-night .CodeMirror-line>span::-moz-selection,.cm-s-3024-night .CodeMirror-line>span>span::-moz-selection{background:rgba(58,52,50,.99)}.cm-s-3024-night .CodeMirror-gutters{background:#090300;border-right:0}.cm-s-3024-night .CodeMirror-guttermarker{color:#db2d20}.cm-s-3024-night .CodeMirror-guttermarker-subtle,.cm-s-3024-night .CodeMirror-linenumber{color:#5c5855}.cm-s-3024-night .CodeMirror-cursor{border-left:1px solid #807d7c}.cm-s-3024-night span.cm-comment{color:#cdab53}.cm-s-3024-night span.cm-atom,.cm-s-3024-night span.cm-number{color:#a16a94}.cm-s-3024-night span.cm-attribute,.cm-s-3024-night span.cm-property{color:#01a252}.cm-s-3024-night span.cm-keyword{color:#db2d20}.cm-s-3024-night span.cm-string{color:#fded02}.cm-s-3024-night span.cm-variable{color:#01a252}.cm-s-3024-night span.cm-variable-2{color:#01a0e4}.cm-s-3024-night span.cm-def{color:#e8bbd0}.cm-s-3024-night span.cm-bracket{color:#d6d5d4}.cm-s-3024-night span.cm-tag{color:#db2d20}.cm-s-3024-night span.cm-link{color:#a16a94}.cm-s-3024-night span.cm-error{background:#db2d20;color:#807d7c}.cm-s-3024-night .CodeMirror-activeline-background{background:#2F2F2F}.cm-s-3024-night .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/abcdef.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-abcdef.CodeMirror{background:#0f0f0f;color:#defdef}.cm-s-abcdef div.CodeMirror-selected{background:#515151}.cm-s-abcdef .CodeMirror-line::selection,.cm-s-abcdef .CodeMirror-line>span::selection,.cm-s-abcdef .CodeMirror-line>span>span::selection{background:rgba(56,56,56,.99)}.cm-s-abcdef .CodeMirror-line::-moz-selection,.cm-s-abcdef .CodeMirror-line>span::-moz-selection,.cm-s-abcdef .CodeMirror-line>span>span::-moz-selection{background:rgba(56,56,56,.99)}.cm-s-abcdef .CodeMirror-gutters{background:#555;border-right:2px solid #314151}.cm-s-abcdef .CodeMirror-guttermarker{color:#222}.cm-s-abcdef .CodeMirror-guttermarker-subtle{color:azure}.cm-s-abcdef .CodeMirror-linenumber{color:#FFF}.cm-s-abcdef .CodeMirror-cursor{border-left:1px solid #0F0}.cm-s-abcdef span.cm-keyword{color:#b8860b;font-weight:700}.cm-s-abcdef span.cm-atom{color:#77F}.cm-s-abcdef span.cm-number{color:violet}.cm-s-abcdef span.cm-def{color:#fffabc}.cm-s-abcdef span.cm-variable{color:#abcdef}.cm-s-abcdef span.cm-variable-2{color:#cacbcc}.cm-s-abcdef span.cm-variable-3{color:#def}.cm-s-abcdef span.cm-property{color:#fedcba}.cm-s-abcdef span.cm-operator{color:#ff0}.cm-s-abcdef span.cm-comment{color:#7a7b7c;font-style:italic}.cm-s-abcdef span.cm-string{color:#2b4}.cm-s-abcdef span.cm-meta{color:#C9F}.cm-s-abcdef span.cm-qualifier{color:#FFF700}.cm-s-abcdef span.cm-builtin{color:#30aabc}.cm-s-abcdef span.cm-bracket{color:#8a8a8a}.cm-s-abcdef span.cm-tag{color:#FD4}.cm-s-abcdef span.cm-attribute{color:#DF0}.cm-s-abcdef span.cm-error{color:red}.cm-s-abcdef span.cm-header{color:#7fffd4;font-weight:700}.cm-s-abcdef span.cm-link{color:#8a2be2}.cm-s-abcdef .CodeMirror-activeline-background{background:#314151}
js/esites_editor/dist/js/vendor/codemirror/theme/ambiance-mobile.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-ambiance.CodeMirror{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}
js/esites_editor/dist/js/vendor/codemirror/theme/ambiance.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-ambiance .cm-header{color:#00f}.cm-s-ambiance .cm-quote{color:#24C2C7}.cm-s-ambiance .cm-keyword{color:#cda869}.cm-s-ambiance .cm-atom{color:#CF7EA9}.cm-s-ambiance .cm-number{color:#78CF8A}.cm-s-ambiance .cm-def{color:#aac6e3}.cm-s-ambiance .cm-variable{color:#ffb795}.cm-s-ambiance .cm-variable-2{color:#eed1b3}.cm-s-ambiance .cm-variable-3{color:#faded3}.cm-s-ambiance .cm-property{color:#eed1b3}.cm-s-ambiance .cm-operator{color:#fa8d6a}.cm-s-ambiance .cm-comment{color:#555;font-style:italic}.cm-s-ambiance .cm-string{color:#8f9d6a}.cm-s-ambiance .cm-string-2{color:#9d937c}.cm-s-ambiance .cm-meta{color:#D2A8A1}.cm-s-ambiance .cm-qualifier{color:#ff0}.cm-s-ambiance .cm-builtin{color:#99c}.cm-s-ambiance .cm-bracket{color:#24C2C7}.cm-s-ambiance .cm-tag{color:#fee4ff}.cm-s-ambiance .cm-attribute{color:#9B859D}.cm-s-ambiance .cm-hr{color:pink}.cm-s-ambiance .cm-link{color:#F4C20B}.cm-s-ambiance .cm-special{color:#FF9D00}.cm-s-ambiance .cm-error{color:#AF2018}.cm-s-ambiance .CodeMirror-matchingbracket{color:#0f0}.cm-s-ambiance .CodeMirror-nonmatchingbracket{color:#f22}.cm-s-ambiance div.CodeMirror-selected{background:rgba(255,255,255,.15)}.cm-s-ambiance .CodeMirror-line::selection,.cm-s-ambiance .CodeMirror-line>span::selection,.cm-s-ambiance .CodeMirror-line>span>span::selection,.cm-s-ambiance.CodeMirror-focused div.CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-ambiance .CodeMirror-line::-moz-selection,.cm-s-ambiance .CodeMirror-line>span::-moz-selection,.cm-s-ambiance .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-ambiance.CodeMirror{line-height:1.4em;color:#E6E1DC;background-color:#202020;-webkit-box-shadow:inset 0 0 10px #000;-moz-box-shadow:inset 0 0 10px #000;box-shadow:inset 0 0 10px #000}.cm-s-ambiance .CodeMirror-gutters{background:#3D3D3D;border-right:1px solid #4D4D4D;box-shadow:0 10px 20px #000}.cm-s-ambiance .CodeMirror-linenumber{text-shadow:0 1px 1px #4d4d4d;color:#111;padding:0 5px}.cm-s-ambiance .CodeMirror-guttermarker{color:#aaa}.cm-s-ambiance .CodeMirror-guttermarker-subtle{color:#111}.cm-s-ambiance .CodeMirror-cursor{border-left:1px solid #7991E8}.cm-s-ambiance .CodeMirror-activeline-background{background:rgba(255,255,255,.031)}.cm-s-ambiance .CodeMirror-gutters,.cm-s-ambiance.CodeMirror{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC)}
js/esites_editor/dist/js/vendor/codemirror/theme/base16-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-base16-dark.CodeMirror{background:#151515;color:#e0e0e0}.cm-s-base16-dark div.CodeMirror-selected{background:#303030}.cm-s-base16-dark .CodeMirror-line::selection,.cm-s-base16-dark .CodeMirror-line>span::selection,.cm-s-base16-dark .CodeMirror-line>span>span::selection{background:rgba(48,48,48,.99)}.cm-s-base16-dark .CodeMirror-line::-moz-selection,.cm-s-base16-dark .CodeMirror-line>span::-moz-selection,.cm-s-base16-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(48,48,48,.99)}.cm-s-base16-dark .CodeMirror-gutters{background:#151515;border-right:0}.cm-s-base16-dark .CodeMirror-guttermarker{color:#ac4142}.cm-s-base16-dark .CodeMirror-guttermarker-subtle,.cm-s-base16-dark .CodeMirror-linenumber{color:#505050}.cm-s-base16-dark .CodeMirror-cursor{border-left:1px solid #b0b0b0}.cm-s-base16-dark span.cm-comment{color:#8f5536}.cm-s-base16-dark span.cm-atom,.cm-s-base16-dark span.cm-number{color:#aa759f}.cm-s-base16-dark span.cm-attribute,.cm-s-base16-dark span.cm-property{color:#90a959}.cm-s-base16-dark span.cm-keyword{color:#ac4142}.cm-s-base16-dark span.cm-string{color:#f4bf75}.cm-s-base16-dark span.cm-variable{color:#90a959}.cm-s-base16-dark span.cm-variable-2{color:#6a9fb5}.cm-s-base16-dark span.cm-def{color:#d28445}.cm-s-base16-dark span.cm-bracket{color:#e0e0e0}.cm-s-base16-dark span.cm-tag{color:#ac4142}.cm-s-base16-dark span.cm-link{color:#aa759f}.cm-s-base16-dark span.cm-error{background:#ac4142;color:#b0b0b0}.cm-s-base16-dark .CodeMirror-activeline-background{background:#202020}.cm-s-base16-dark .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/base16-light.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-base16-light.CodeMirror{background:#f5f5f5;color:#202020}.cm-s-base16-light .CodeMirror-line::selection,.cm-s-base16-light .CodeMirror-line>span::selection,.cm-s-base16-light .CodeMirror-line>span>span::selection,.cm-s-base16-light div.CodeMirror-selected{background:#e0e0e0}.cm-s-base16-light .CodeMirror-line::-moz-selection,.cm-s-base16-light .CodeMirror-line>span::-moz-selection,.cm-s-base16-light .CodeMirror-line>span>span::-moz-selection{background:#e0e0e0}.cm-s-base16-light .CodeMirror-gutters{background:#f5f5f5;border-right:0}.cm-s-base16-light .CodeMirror-guttermarker{color:#ac4142}.cm-s-base16-light .CodeMirror-guttermarker-subtle,.cm-s-base16-light .CodeMirror-linenumber{color:#b0b0b0}.cm-s-base16-light .CodeMirror-cursor{border-left:1px solid #505050}.cm-s-base16-light span.cm-comment{color:#8f5536}.cm-s-base16-light span.cm-atom,.cm-s-base16-light span.cm-number{color:#aa759f}.cm-s-base16-light span.cm-attribute,.cm-s-base16-light span.cm-property{color:#90a959}.cm-s-base16-light span.cm-keyword{color:#ac4142}.cm-s-base16-light span.cm-string{color:#f4bf75}.cm-s-base16-light span.cm-variable{color:#90a959}.cm-s-base16-light span.cm-variable-2{color:#6a9fb5}.cm-s-base16-light span.cm-def{color:#d28445}.cm-s-base16-light span.cm-bracket{color:#202020}.cm-s-base16-light span.cm-tag{color:#ac4142}.cm-s-base16-light span.cm-link{color:#aa759f}.cm-s-base16-light span.cm-error{background:#ac4142;color:#505050}.cm-s-base16-light .CodeMirror-activeline-background{background:#DDDCDC}.cm-s-base16-light .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/bespin.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-bespin.CodeMirror{background:#28211c;color:#9d9b97}.cm-s-bespin div.CodeMirror-selected{background:#36312e!important}.cm-s-bespin .CodeMirror-gutters{background:#28211c;border-right:0}.cm-s-bespin .CodeMirror-linenumber{color:#666}.cm-s-bespin .CodeMirror-cursor{border-left:1px solid #797977!important}.cm-s-bespin span.cm-comment{color:#937121}.cm-s-bespin span.cm-atom,.cm-s-bespin span.cm-number{color:#9b859d}.cm-s-bespin span.cm-attribute,.cm-s-bespin span.cm-property{color:#54be0d}.cm-s-bespin span.cm-keyword{color:#cf6a4c}.cm-s-bespin span.cm-string{color:#f9ee98}.cm-s-bespin span.cm-variable{color:#54be0d}.cm-s-bespin span.cm-variable-2{color:#5ea6ea}.cm-s-bespin span.cm-def{color:#cf7d34}.cm-s-bespin span.cm-error{background:#cf6a4c;color:#797977}.cm-s-bespin span.cm-bracket{color:#9d9b97}.cm-s-bespin span.cm-tag{color:#cf6a4c}.cm-s-bespin span.cm-link{color:#9b859d}.cm-s-bespin .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-bespin .CodeMirror-activeline-background{background:#404040}
js/esites_editor/dist/js/vendor/codemirror/theme/blackboard.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-blackboard.CodeMirror{background:#0C1021;color:#F8F8F8}.cm-s-blackboard div.CodeMirror-selected{background:#253B76}.cm-s-blackboard .CodeMirror-line::selection,.cm-s-blackboard .CodeMirror-line>span::selection,.cm-s-blackboard .CodeMirror-line>span>span::selection{background:rgba(37,59,118,.99)}.cm-s-blackboard .CodeMirror-line::-moz-selection,.cm-s-blackboard .CodeMirror-line>span::-moz-selection,.cm-s-blackboard .CodeMirror-line>span>span::-moz-selection{background:rgba(37,59,118,.99)}.cm-s-blackboard .CodeMirror-gutters{background:#0C1021;border-right:0}.cm-s-blackboard .CodeMirror-guttermarker{color:#FBDE2D}.cm-s-blackboard .CodeMirror-guttermarker-subtle,.cm-s-blackboard .CodeMirror-linenumber{color:#888}.cm-s-blackboard .CodeMirror-cursor{border-left:1px solid #A7A7A7}.cm-s-blackboard .cm-keyword{color:#FBDE2D}.cm-s-blackboard .cm-atom,.cm-s-blackboard .cm-number{color:#D8FA3C}.cm-s-blackboard .cm-def{color:#8DA6CE}.cm-s-blackboard .cm-variable{color:#FF6400}.cm-s-blackboard .cm-operator{color:#FBDE2D}.cm-s-blackboard .cm-comment{color:#AEAEAE}.cm-s-blackboard .cm-string,.cm-s-blackboard .cm-string-2{color:#61CE3C}.cm-s-blackboard .cm-meta{color:#D8FA3C}.cm-s-blackboard .cm-attribute,.cm-s-blackboard .cm-builtin,.cm-s-blackboard .cm-tag{color:#8DA6CE}.cm-s-blackboard .cm-header{color:#FF6400}.cm-s-blackboard .cm-hr{color:#AEAEAE}.cm-s-blackboard .cm-link{color:#8DA6CE}.cm-s-blackboard .cm-error{background:#9D1E15;color:#F8F8F8}.cm-s-blackboard .CodeMirror-activeline-background{background:#3C3636}.cm-s-blackboard .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/cobalt.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-cobalt.CodeMirror{background:#002240;color:#fff}.cm-s-cobalt div.CodeMirror-selected{background:#b36539}.cm-s-cobalt .CodeMirror-line::selection,.cm-s-cobalt .CodeMirror-line>span::selection,.cm-s-cobalt .CodeMirror-line>span>span::selection{background:rgba(179,101,57,.99)}.cm-s-cobalt .CodeMirror-line::-moz-selection,.cm-s-cobalt .CodeMirror-line>span::-moz-selection,.cm-s-cobalt .CodeMirror-line>span>span::-moz-selection{background:rgba(179,101,57,.99)}.cm-s-cobalt .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-cobalt .CodeMirror-guttermarker{color:#ffee80}.cm-s-cobalt .CodeMirror-guttermarker-subtle,.cm-s-cobalt .CodeMirror-linenumber{color:#d0d0d0}.cm-s-cobalt .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-cobalt span.cm-comment{color:#08f}.cm-s-cobalt span.cm-atom{color:#845dc4}.cm-s-cobalt span.cm-attribute,.cm-s-cobalt span.cm-number{color:#ff80e1}.cm-s-cobalt span.cm-keyword{color:#ffee80}.cm-s-cobalt span.cm-string{color:#3ad900}.cm-s-cobalt span.cm-meta{color:#ff9d00}.cm-s-cobalt span.cm-tag,.cm-s-cobalt span.cm-variable-2{color:#9effff}.cm-s-cobalt span.cm-def,.cm-s-cobalt span.cm-variable-3{color:#fff}.cm-s-cobalt span.cm-bracket{color:#d8d8d8}.cm-s-cobalt span.cm-builtin,.cm-s-cobalt span.cm-special{color:#ff9e59}.cm-s-cobalt span.cm-link{color:#845dc4}.cm-s-cobalt span.cm-error{color:#9d1e15}.cm-s-cobalt .CodeMirror-activeline-background{background:#002D57}.cm-s-cobalt .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/colorforth.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-colorforth.CodeMirror{background:#000;color:#f8f8f8}.cm-s-colorforth .CodeMirror-gutters{background:#0a001f;border-right:1px solid #aaa}.cm-s-colorforth .CodeMirror-guttermarker{color:#FFBD40}.cm-s-colorforth .CodeMirror-guttermarker-subtle{color:#78846f}.cm-s-colorforth .CodeMirror-linenumber{color:#bababa}.cm-s-colorforth .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-colorforth span.cm-comment{color:#ededed}.cm-s-colorforth span.cm-def{color:#ff1c1c;font-weight:700}.cm-s-colorforth span.cm-keyword{color:#ffd900}.cm-s-colorforth span.cm-builtin{color:#00d95a}.cm-s-colorforth span.cm-variable{color:#73ff00}.cm-s-colorforth span.cm-string{color:#007bff}.cm-s-colorforth span.cm-number{color:#00c4ff}.cm-s-colorforth span.cm-atom{color:#606060}.cm-s-colorforth span.cm-variable-2{color:#EEE}.cm-s-colorforth span.cm-variable-3{color:#DDD}.cm-s-colorforth span.cm-meta{color:#ff0}.cm-s-colorforth span.cm-qualifier{color:#FFF700}.cm-s-colorforth span.cm-bracket{color:#cc7}.cm-s-colorforth span.cm-tag{color:#FFBD40}.cm-s-colorforth span.cm-attribute{color:#FFF700}.cm-s-colorforth span.cm-error{color:red}.cm-s-colorforth div.CodeMirror-selected{background:#333d53}.cm-s-colorforth span.cm-compilation{background:rgba(255,255,255,.12)}.cm-s-colorforth .CodeMirror-activeline-background{background:#253540}
js/esites_editor/dist/js/vendor/codemirror/theme/dracula.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-dracula .CodeMirror-gutters,.cm-s-dracula.CodeMirror{background-color:#282a36!important;color:#f8f8f2!important;border:none}.cm-s-dracula .CodeMirror-gutters{color:#282a36}.cm-s-dracula .CodeMirror-cursor{border-left:solid thin #f8f8f0}.cm-s-dracula .CodeMirror-linenumber{color:#6D8A88}.cm-s-dracula .CodeMirror-line::selection,.cm-s-dracula .CodeMirror-line>span::selection,.cm-s-dracula .CodeMirror-line>span>span::selection,.cm-s-dracula.CodeMirror-focused div.CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-dracula .CodeMirror-line::-moz-selection,.cm-s-dracula .CodeMirror-line>span::-moz-selection,.cm-s-dracula .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-dracula span.cm-comment{color:#6272a4}.cm-s-dracula span.cm-string,.cm-s-dracula span.cm-string-2{color:#f1fa8c}.cm-s-dracula span.cm-number{color:#bd93f9}.cm-s-dracula span.cm-variable{color:#50fa7b}.cm-s-dracula span.cm-variable-2{color:#fff}.cm-s-dracula span.cm-def{color:#ffb86c}.cm-s-dracula span.cm-keyword,.cm-s-dracula span.cm-operator{color:#ff79c6}.cm-s-dracula span.cm-atom{color:#bd93f9}.cm-s-dracula span.cm-meta{color:#f8f8f2}.cm-s-dracula span.cm-tag{color:#ff79c6}.cm-s-dracula span.cm-attribute,.cm-s-dracula span.cm-qualifier{color:#50fa7b}.cm-s-dracula span.cm-property{color:#66d9ef}.cm-s-dracula span.cm-builtin,.cm-s-dracula span.cm-variable-3{color:#50fa7b}.cm-s-dracula .CodeMirror-activeline-background{background:rgba(255,255,255,.1)}.cm-s-dracula .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/eclipse.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-eclipse span.cm-meta{color:#FF1717}.cm-s-eclipse span.cm-keyword{line-height:1em;font-weight:700;color:#7F0055}.cm-s-eclipse span.cm-atom{color:#219}.cm-s-eclipse span.cm-number{color:#164}.cm-s-eclipse span.cm-def{color:#00f}.cm-s-eclipse span.cm-variable{color:#000}.cm-s-eclipse span.cm-variable-2,.cm-s-eclipse span.cm-variable-3{color:#0000C0}.cm-s-eclipse span.cm-operator,.cm-s-eclipse span.cm-property{color:#000}.cm-s-eclipse span.cm-comment{color:#3F7F5F}.cm-s-eclipse span.cm-string{color:#2A00FF}.cm-s-eclipse span.cm-string-2{color:#f50}.cm-s-eclipse span.cm-qualifier{color:#555}.cm-s-eclipse span.cm-builtin{color:#30a}.cm-s-eclipse span.cm-bracket{color:#cc7}.cm-s-eclipse span.cm-tag{color:#170}.cm-s-eclipse span.cm-attribute{color:#00c}.cm-s-eclipse span.cm-link{color:#219}.cm-s-eclipse span.cm-error{color:red}.cm-s-eclipse .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-eclipse .CodeMirror-matchingbracket{outline:grey solid 1px;color:#000!important}
js/esites_editor/dist/js/vendor/codemirror/theme/elegant.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-elegant span.cm-atom,.cm-s-elegant span.cm-number,.cm-s-elegant span.cm-string{color:#762}.cm-s-elegant span.cm-comment{color:#262;font-style:italic;line-height:1em}.cm-s-elegant span.cm-meta{color:#555;font-style:italic;line-height:1em}.cm-s-elegant span.cm-variable{color:#000}.cm-s-elegant span.cm-variable-2{color:#b11}.cm-s-elegant span.cm-qualifier{color:#555}.cm-s-elegant span.cm-keyword{color:#730}.cm-s-elegant span.cm-builtin{color:#30a}.cm-s-elegant span.cm-link{color:#762}.cm-s-elegant span.cm-error{background-color:#fdd}.cm-s-elegant .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-elegant .CodeMirror-matchingbracket{outline:grey solid 1px;color:#000!important}
js/esites_editor/dist/js/vendor/codemirror/theme/erlang-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-erlang-dark.CodeMirror{background:#002240;color:#fff}.cm-s-erlang-dark div.CodeMirror-selected{background:#b36539}.cm-s-erlang-dark .CodeMirror-line::selection,.cm-s-erlang-dark .CodeMirror-line>span::selection,.cm-s-erlang-dark .CodeMirror-line>span>span::selection{background:rgba(179,101,57,.99)}.cm-s-erlang-dark .CodeMirror-line::-moz-selection,.cm-s-erlang-dark .CodeMirror-line>span::-moz-selection,.cm-s-erlang-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(179,101,57,.99)}.cm-s-erlang-dark .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-erlang-dark .CodeMirror-guttermarker{color:#fff}.cm-s-erlang-dark .CodeMirror-guttermarker-subtle,.cm-s-erlang-dark .CodeMirror-linenumber{color:#d0d0d0}.cm-s-erlang-dark .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-erlang-dark span.cm-quote{color:#ccc}.cm-s-erlang-dark span.cm-atom{color:#f133f1}.cm-s-erlang-dark span.cm-attribute{color:#ff80e1}.cm-s-erlang-dark span.cm-bracket{color:#ff9d00}.cm-s-erlang-dark span.cm-builtin{color:#eaa}.cm-s-erlang-dark span.cm-comment{color:#77f}.cm-s-erlang-dark span.cm-def{color:#e7a}.cm-s-erlang-dark span.cm-keyword{color:#ffee80}.cm-s-erlang-dark span.cm-meta{color:#50fefe}.cm-s-erlang-dark span.cm-number{color:#ffd0d0}.cm-s-erlang-dark span.cm-operator{color:#d55}.cm-s-erlang-dark span.cm-property,.cm-s-erlang-dark span.cm-qualifier{color:#ccc}.cm-s-erlang-dark span.cm-special{color:#fbb}.cm-s-erlang-dark span.cm-string{color:#3ad900}.cm-s-erlang-dark span.cm-string-2{color:#ccc}.cm-s-erlang-dark span.cm-tag{color:#9effff}.cm-s-erlang-dark span.cm-variable{color:#50fe50}.cm-s-erlang-dark span.cm-variable-2{color:#e0e}.cm-s-erlang-dark span.cm-variable-3{color:#ccc}.cm-s-erlang-dark span.cm-error{color:#9d1e15}.cm-s-erlang-dark .CodeMirror-activeline-background{background:#013461}.cm-s-erlang-dark .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/hopscotch.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42!important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498!important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom,.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-attribute,.cm-s-hopscotch span.cm-property{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}
js/esites_editor/dist/js/vendor/codemirror/theme/icecoder.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-icecoder{color:#666;background:#141612}.cm-s-icecoder span.cm-keyword{color:#eee;font-weight:700}.cm-s-icecoder span.cm-atom{color:#e1c76e}.cm-s-icecoder span.cm-number{color:#6cb5d9}.cm-s-icecoder span.cm-def{color:#b9ca4a}.cm-s-icecoder span.cm-variable{color:#6cb5d9}.cm-s-icecoder span.cm-variable-2{color:#cc1e5c}.cm-s-icecoder span.cm-variable-3{color:#f9602c}.cm-s-icecoder span.cm-property{color:#eee}.cm-s-icecoder span.cm-operator{color:#9179bb}.cm-s-icecoder span.cm-comment{color:#97a3aa}.cm-s-icecoder span.cm-string{color:#b9ca4a}.cm-s-icecoder span.cm-string-2{color:#6cb5d9}.cm-s-icecoder span.cm-meta,.cm-s-icecoder span.cm-qualifier{color:#555}.cm-s-icecoder span.cm-builtin{color:#214e7b}.cm-s-icecoder span.cm-bracket{color:#cc7}.cm-s-icecoder span.cm-tag{color:#e8e8e8}.cm-s-icecoder span.cm-attribute{color:#099}.cm-s-icecoder span.cm-header{color:#6a0d6a}.cm-s-icecoder span.cm-quote{color:#186718}.cm-s-icecoder span.cm-hr{color:#888}.cm-s-icecoder span.cm-link{color:#e1c76e}.cm-s-icecoder span.cm-error{color:#d00}.cm-s-icecoder .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-icecoder div.CodeMirror-selected{color:#fff;background:#037}.cm-s-icecoder .CodeMirror-gutters{background:#141612;min-width:41px;border-right:0}.cm-s-icecoder .CodeMirror-linenumber{color:#555;cursor:default}.cm-s-icecoder .CodeMirror-matchingbracket{border:1px solid grey;color:#000!important}.cm-s-icecoder .CodeMirror-activeline-background{background:#000}
js/esites_editor/dist/js/vendor/codemirror/theme/isotope.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-isotope.CodeMirror{background:#000;color:#e0e0e0}.cm-s-isotope div.CodeMirror-selected{background:#404040!important}.cm-s-isotope .CodeMirror-gutters{background:#000;border-right:0}.cm-s-isotope .CodeMirror-linenumber{color:grey}.cm-s-isotope .CodeMirror-cursor{border-left:1px solid silver!important}.cm-s-isotope span.cm-comment{color:#30f}.cm-s-isotope span.cm-atom,.cm-s-isotope span.cm-number{color:#c0f}.cm-s-isotope span.cm-attribute,.cm-s-isotope span.cm-property{color:#3f0}.cm-s-isotope span.cm-keyword{color:red}.cm-s-isotope span.cm-string{color:#f09}.cm-s-isotope span.cm-variable{color:#3f0}.cm-s-isotope span.cm-variable-2{color:#06f}.cm-s-isotope span.cm-def{color:#f90}.cm-s-isotope span.cm-error{background:red;color:silver}.cm-s-isotope span.cm-bracket{color:#e0e0e0}.cm-s-isotope span.cm-tag{color:red}.cm-s-isotope span.cm-link{color:#c0f}.cm-s-isotope .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-isotope .CodeMirror-activeline-background{background:#202020}
js/esites_editor/dist/js/vendor/codemirror/theme/lesser-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-lesser-dark{line-height:1.3em}.cm-s-lesser-dark.CodeMirror{background:#262626;color:#EBEFE7;text-shadow:0 -1px 1px #262626}.cm-s-lesser-dark div.CodeMirror-selected{background:#45443B}.cm-s-lesser-dark .CodeMirror-line::selection,.cm-s-lesser-dark .CodeMirror-line>span::selection,.cm-s-lesser-dark .CodeMirror-line>span>span::selection{background:rgba(69,68,59,.99)}.cm-s-lesser-dark .CodeMirror-line::-moz-selection,.cm-s-lesser-dark .CodeMirror-line>span::-moz-selection,.cm-s-lesser-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(69,68,59,.99)}.cm-s-lesser-dark .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-lesser-dark pre{padding:0 8px}.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket{color:#7EFC7E}.cm-s-lesser-dark .CodeMirror-gutters{background:#262626;border-right:1px solid #aaa}.cm-s-lesser-dark .CodeMirror-guttermarker{color:#599eff}.cm-s-lesser-dark .CodeMirror-guttermarker-subtle,.cm-s-lesser-dark .CodeMirror-linenumber{color:#777}.cm-s-lesser-dark span.cm-header{color:#a0a}.cm-s-lesser-dark span.cm-quote{color:#090}.cm-s-lesser-dark span.cm-keyword{color:#599eff}.cm-s-lesser-dark span.cm-atom{color:#C2B470}.cm-s-lesser-dark span.cm-number{color:#B35E4D}.cm-s-lesser-dark span.cm-def{color:#fff}.cm-s-lesser-dark span.cm-variable{color:#D9BF8C}.cm-s-lesser-dark span.cm-variable-2{color:#669199}.cm-s-lesser-dark span.cm-variable-3{color:#fff}.cm-s-lesser-dark span.cm-operator,.cm-s-lesser-dark span.cm-property{color:#92A75C}.cm-s-lesser-dark span.cm-comment{color:#666}.cm-s-lesser-dark span.cm-string{color:#BCD279}.cm-s-lesser-dark span.cm-string-2{color:#f50}.cm-s-lesser-dark span.cm-meta{color:#738C73}.cm-s-lesser-dark span.cm-qualifier{color:#555}.cm-s-lesser-dark span.cm-builtin{color:#ff9e59}.cm-s-lesser-dark span.cm-bracket{color:#EBEFE7}.cm-s-lesser-dark span.cm-tag{color:#669199}.cm-s-lesser-dark span.cm-attribute{color:#00c}.cm-s-lesser-dark span.cm-hr{color:#999}.cm-s-lesser-dark span.cm-link{color:#00c}.cm-s-lesser-dark span.cm-error{color:#9d1e15}.cm-s-lesser-dark .CodeMirror-activeline-background{background:#3C3A3A}.cm-s-lesser-dark .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/liquibyte.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-liquibyte.CodeMirror{background-color:#000;color:#fff;line-height:1.2em;font-size:1em}.cm-s-liquibyte .CodeMirror-focused .cm-matchhighlight{text-decoration:underline;text-decoration-color:#0f0;text-decoration-style:wavy}.cm-s-liquibyte .cm-trailingspace{text-decoration:line-through;text-decoration-color:red;text-decoration-style:dotted}.cm-s-liquibyte .cm-tab{text-decoration:line-through;text-decoration-color:#404040;text-decoration-style:dotted}.cm-s-liquibyte .CodeMirror-gutters{background-color:#262626;border-right:1px solid #505050;padding-right:.8em}.cm-s-liquibyte .CodeMirror-gutter-elt div{font-size:1.2em}.cm-s-liquibyte .CodeMirror-linenumber{color:#606060;padding-left:0}.cm-s-liquibyte .CodeMirror-cursor{border-left:1px solid #eee}.cm-s-liquibyte span.cm-comment{color:green}.cm-s-liquibyte span.cm-def{color:#ffaf40;font-weight:700}.cm-s-liquibyte span.cm-keyword{color:#c080ff;font-weight:700}.cm-s-liquibyte span.cm-builtin{color:#ffaf40;font-weight:700}.cm-s-liquibyte span.cm-variable{color:#5967ff;font-weight:700}.cm-s-liquibyte span.cm-string{color:#ff8000}.cm-s-liquibyte span.cm-number{color:#0f0;font-weight:700}.cm-s-liquibyte span.cm-atom{color:#bf3030;font-weight:700}.cm-s-liquibyte span.cm-variable-2{color:#007f7f;font-weight:700}.cm-s-liquibyte span.cm-variable-3{color:#c080ff;font-weight:700}.cm-s-liquibyte span.cm-property{color:#999;font-weight:700}.cm-s-liquibyte span.cm-operator{color:#fff}.cm-s-liquibyte span.cm-meta{color:#0f0}.cm-s-liquibyte span.cm-qualifier{color:#fff700;font-weight:700}.cm-s-liquibyte span.cm-bracket{color:#cc7}.cm-s-liquibyte span.cm-tag{color:#ff0;font-weight:700}.cm-s-liquibyte span.cm-attribute{color:#c080ff;font-weight:700}.cm-s-liquibyte span.cm-error{color:red}.cm-s-liquibyte div.CodeMirror-selected{background-color:rgba(255,0,0,.25)}.cm-s-liquibyte span.cm-compilation{background-color:rgba(255,255,255,.12)}.cm-s-liquibyte .CodeMirror-activeline-background{background-color:rgba(0,255,0,.15)}.cm-s-liquibyte .CodeMirror span.CodeMirror-matchingbracket{color:#0f0;font-weight:700}.cm-s-liquibyte .CodeMirror span.CodeMirror-nonmatchingbracket{color:red;font-weight:700}.CodeMirror-matchingtag{background-color:rgba(150,255,0,.3)}.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div:hover,div.CodeMirror-simplescroll-vertical div:hover{background-color:rgba(80,80,80,.7)}.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div,div.CodeMirror-simplescroll-vertical div{background-color:rgba(80,80,80,.3);border:1px solid #404040;border-radius:5px}.cm-s-liquibyte div.CodeMirror-simplescroll-vertical div{border-top:1px solid #404040;border-bottom:1px solid #404040}.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div{border-left:1px solid #404040;border-right:1px solid #404040}.cm-s-liquibyte div.CodeMirror-simplescroll-vertical{background-color:#262626}.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal{background-color:#262626;border-top:1px solid #404040}.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div,div.CodeMirror-overlayscroll-vertical div{background-color:#404040;border-radius:5px}.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div,.cm-s-liquibyte div.CodeMirror-overlayscroll-vertical div{border:1px solid #404040}
js/esites_editor/dist/js/vendor/codemirror/theme/material.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-material{background-color:#263238;color:rgba(233,237,237,1)}.cm-s-material .CodeMirror-gutters{background:#263238;color:#537f7e;border:none}.cm-s-material .CodeMirror-guttermarker,.cm-s-material .CodeMirror-guttermarker-subtle,.cm-s-material .CodeMirror-linenumber{color:#537f7e}.cm-s-material .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-material div.CodeMirror-selected{background:rgba(255,255,255,.15)}.cm-s-material .CodeMirror-line::selection,.cm-s-material .CodeMirror-line>span::selection,.cm-s-material .CodeMirror-line>span>span::selection,.cm-s-material.CodeMirror-focused div.CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-material .CodeMirror-line::-moz-selection,.cm-s-material .CodeMirror-line>span::-moz-selection,.cm-s-material .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-material .CodeMirror-activeline-background{background:0 0}.cm-s-material .cm-keyword{color:rgba(199,146,234,1)}.cm-s-material .cm-operator{color:rgba(233,237,237,1)}.cm-s-material .cm-variable-2{color:#80CBC4}.cm-s-material .cm-builtin{color:#DECB6B}.cm-s-material .cm-atom,.cm-s-material .cm-number{color:#F77669}.cm-s-material .cm-def{color:rgba(233,237,237,1)}.cm-s-material .cm-error{color:rgba(255,255,255,1);background-color:#EC5F67}.cm-s-material .cm-string{color:#C3E88D}.cm-s-material .cm-string-2{color:#80CBC4}.cm-s-material .cm-comment{color:#546E7A}.cm-s-material .cm-variable{color:#82B1FF}.cm-s-material .cm-meta,.cm-s-material .cm-tag{color:#80CBC4}.cm-s-material .cm-attribute{color:#FFCB6B}.cm-s-material .cm-property{color:#80CBAE}.cm-s-material .cm-qualifier,.cm-s-material .cm-variable-3{color:#DECB6B}.cm-s-material .cm-tag{color:rgba(255,83,112,1)}.cm-s-material .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/mbo.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-mbo.CodeMirror{background:#2c2c2c;color:#ffffec}.cm-s-mbo div.CodeMirror-selected{background:#716C62}.cm-s-mbo .CodeMirror-line::selection,.cm-s-mbo .CodeMirror-line>span::selection,.cm-s-mbo .CodeMirror-line>span>span::selection{background:rgba(113,108,98,.99)}.cm-s-mbo .CodeMirror-line::-moz-selection,.cm-s-mbo .CodeMirror-line>span::-moz-selection,.cm-s-mbo .CodeMirror-line>span>span::-moz-selection{background:rgba(113,108,98,.99)}.cm-s-mbo .CodeMirror-gutters{background:#4e4e4e;border-right:0}.cm-s-mbo .CodeMirror-guttermarker{color:#fff}.cm-s-mbo .CodeMirror-guttermarker-subtle{color:grey}.cm-s-mbo .CodeMirror-linenumber{color:#dadada}.cm-s-mbo .CodeMirror-cursor{border-left:1px solid #ffffec}.cm-s-mbo span.cm-comment{color:#95958a}.cm-s-mbo span.cm-atom,.cm-s-mbo span.cm-number{color:#00a8c6}.cm-s-mbo span.cm-attribute,.cm-s-mbo span.cm-property{color:#9ddfe9}.cm-s-mbo span.cm-keyword{color:#ffb928}.cm-s-mbo span.cm-string{color:#ffcf6c}.cm-s-mbo span.cm-string.cm-property,.cm-s-mbo span.cm-variable{color:#ffffec}.cm-s-mbo span.cm-variable-2{color:#00a8c6}.cm-s-mbo span.cm-def{color:#ffffec}.cm-s-mbo span.cm-bracket{color:#fffffc;font-weight:700}.cm-s-mbo span.cm-tag{color:#9ddfe9}.cm-s-mbo span.cm-link{color:#f54b07}.cm-s-mbo span.cm-error{border-bottom:#636363;color:#ffffec}.cm-s-mbo span.cm-qualifier{color:#ffffec}.cm-s-mbo .CodeMirror-activeline-background{background:#494b41}.cm-s-mbo .CodeMirror-matchingbracket{color:#222!important}.cm-s-mbo .CodeMirror-matchingtag{background:rgba(255,255,255,.37)}
js/esites_editor/dist/js/vendor/codemirror/theme/mdn-like.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-mdn-like.CodeMirror{color:#999;background-color:#fff}.cm-s-mdn-like .CodeMirror-line::selection,.cm-s-mdn-like .CodeMirror-line>span::selection,.cm-s-mdn-like .CodeMirror-line>span>span::selection,.cm-s-mdn-like div.CodeMirror-selected{background:#cfc}.cm-s-mdn-like .CodeMirror-line::-moz-selection,.cm-s-mdn-like .CodeMirror-line>span::-moz-selection,.cm-s-mdn-like .CodeMirror-line>span>span::-moz-selection{background:#cfc}.cm-s-mdn-like .CodeMirror-gutters{background:#f8f8f8;border-left:6px solid rgba(0,83,159,.65);color:#333}.cm-s-mdn-like .CodeMirror-linenumber{color:#aaa;padding-left:8px}.cm-s-mdn-like .CodeMirror-cursor{border-left:2px solid #222}.cm-s-mdn-like .cm-keyword{color:#6262FF}.cm-s-mdn-like .cm-atom{color:#F90}.cm-s-mdn-like .cm-number{color:#ca7841}.cm-s-mdn-like .cm-def{color:#8DA6CE}.cm-s-mdn-like span.cm-tag,.cm-s-mdn-like span.cm-variable-2{color:#690}.cm-s-mdn-like .cm-variable,.cm-s-mdn-like span.cm-def,.cm-s-mdn-like span.cm-variable-3{color:#07a}.cm-s-mdn-like .cm-property{color:#905}.cm-s-mdn-like .cm-qualifier{color:#690}.cm-s-mdn-like .cm-operator{color:#cda869}.cm-s-mdn-like .cm-comment{color:#777;font-weight:400}.cm-s-mdn-like .cm-string{color:#07a;font-style:italic}.cm-s-mdn-like .cm-string-2{color:#bd6b18}.cm-s-mdn-like .cm-meta{color:#000}.cm-s-mdn-like .cm-builtin{color:#9B7536}.cm-s-mdn-like .cm-tag{color:#997643}.cm-s-mdn-like .cm-attribute{color:#d6bb6d}.cm-s-mdn-like .cm-header{color:#FF6400}.cm-s-mdn-like .cm-hr{color:#AEAEAE}.cm-s-mdn-like .cm-link{color:#ad9361;font-style:italic;text-decoration:none}.cm-s-mdn-like .cm-error{border-bottom:1px solid red}div.cm-s-mdn-like .CodeMirror-activeline-background{background:#efefff}div.cm-s-mdn-like span.CodeMirror-matchingbracket{outline:grey solid 1px;color:inherit}.cm-s-mdn-like.CodeMirror{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQa0M5kTgiAAqM3ShXLgu8XMqcrQBvJ0CL5pnTsfMB13oB8athpAq2XOQmcGmoACCLydx7nToa23ATaSIY2ichfOdPTGxlasXMLaL0MLZAOwAKIM+y8CmicobGdCcbbK9DzN+yYGVoNNI5iUKTMyYOjPse4A8SM1MmcXgU0toOq1yO/v8FOxlASyc7TgeYaAMBJHcY1CcCwGI/TK4AmDbDyKYBBtFUkRwto8gygiQEaByFgJ00BH2M8JWwQS1nafDXQCidWyOI8AcjDCSjCLk8ngObuAm3JAHAdubAmOaK06V8MNEsKPJOhobSprwQa6gD7DclRQdqcwL4zxqgBrQcabUiBLclRDKAlWp+etPkBaNMA0AKlrHwTdEByZAA4GM+SNluSY6wAzcMNewxmgig5Ks0nkrSpBvSaQHMdKTBAnLojOdYyGpQ254602ZILPdTD1hdlggdIm74jbTp8vDwF5ZYUeLWGJpWsh6XNyXgcYwVoJQTEhhTYkxzZjiU5npU2TaB979TQehlaAVq4kaGpiPwwwLkYUuBbQwocyQTv1tA0+1UFWoJF3iv1oq+qoSk8EQdJmwHkziIF7oOZk14EGitibAdjLYYK78H5vZOhtWpoI0ATGHs0Q8OMb4Ey+2bU2UYztCtA0wFAs7TplGLRVQCcqaFdGSPCeTI1QNIC52iWNzof6Uib7xjEp07mNNoUYmVosVItHrHzRlLgBn9LFyRHaQCtVUMbtTNhoXWiTOO9k/V8BdAc1Oq0ArSQs6/5SU0hckNy9NnXqQY0PGYo5dWJ7nINaN6o958FWin27aBaWRka1r5myvLOAm0j30eBJqCxHLReVclxhxOEN2JfDWjxBtAC7MIH1fVaGdoOp4qJYDgKtKPSFNID2gSnGldrCqkFZ+5UeQXQBIRrSwocbdZYQT/2LwRahBPBXoHrB8nxaGROST62DKUbQOMMzZIC9abkuELfQzQALWTnDNAm8KHWFOJgJ5+SHIvTPcmx1xQyZRhNL5Qci689aXMEaN/uNIWkEwDAvFpOZmgsBaaGnbs1NPa1Jm32gBZAIh1pCtG7TSH4aE0y1uVY4uqoFPisGlpP2rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=)}
js/esites_editor/dist/js/vendor/codemirror/theme/midnight.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-midnight span.CodeMirror-matchhighlight{background:#494949}.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight{background:#314D67!important}.cm-s-midnight .CodeMirror-activeline-background{background:#253540}.cm-s-midnight.CodeMirror{background:#0F192A;color:#D1EDFF;border-top:1px solid #000;border-bottom:1px solid #000}.cm-s-midnight div.CodeMirror-selected{background:#314D67}.cm-s-midnight .CodeMirror-line::selection,.cm-s-midnight .CodeMirror-line>span::selection,.cm-s-midnight .CodeMirror-line>span>span::selection{background:rgba(49,77,103,.99)}.cm-s-midnight .CodeMirror-line::-moz-selection,.cm-s-midnight .CodeMirror-line>span::-moz-selection,.cm-s-midnight .CodeMirror-line>span>span::-moz-selection{background:rgba(49,77,103,.99)}.cm-s-midnight .CodeMirror-gutters{background:#0F192A;border-right:1px solid}.cm-s-midnight .CodeMirror-guttermarker{color:#fff}.cm-s-midnight .CodeMirror-guttermarker-subtle{color:#d0d0d0}.cm-s-midnight .CodeMirror-linenumber{color:#D0D0D0}.cm-s-midnight .CodeMirror-cursor{border-left:1px solid #F8F8F0}.cm-s-midnight span.cm-comment{color:#428BDD}.cm-s-midnight span.cm-atom{color:#AE81FF}.cm-s-midnight span.cm-number{color:#D1EDFF}.cm-s-midnight span.cm-attribute,.cm-s-midnight span.cm-property{color:#A6E22E}.cm-s-midnight span.cm-keyword{color:#E83737}.cm-s-midnight span.cm-string{color:#1DC116}.cm-s-midnight span.cm-variable,.cm-s-midnight span.cm-variable-2{color:#FFAA3E}.cm-s-midnight span.cm-def{color:#4DD}.cm-s-midnight span.cm-bracket{color:#D1EDFF}.cm-s-midnight span.cm-tag{color:#449}.cm-s-midnight span.cm-link{color:#AE81FF}.cm-s-midnight span.cm-error{background:#F92672;color:#F8F8F0}.cm-s-midnight .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/monokai.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483E}.cm-s-monokai .CodeMirror-line::selection,.cm-s-monokai .CodeMirror-line>span::selection,.cm-s-monokai .CodeMirror-line>span>span::selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-line::-moz-selection,.cm-s-monokai .CodeMirror-line>span::-moz-selection,.cm-s-monokai .CodeMirror-line>span>span::-moz-selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-guttermarker{color:#fff}.cm-s-monokai .CodeMirror-guttermarker-subtle,.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom,.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-attribute,.cm-s-monokai span.cm-property{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#f8f8f2}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-variable-3{color:#66d9ef}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-header,.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/neat.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-neat span.cm-comment{color:#a86}.cm-s-neat span.cm-keyword{line-height:1em;font-weight:700;color:#00f}.cm-s-neat span.cm-string{color:#a22}.cm-s-neat span.cm-builtin{line-height:1em;font-weight:700;color:#077}.cm-s-neat span.cm-special{line-height:1em;font-weight:700;color:#0aa}.cm-s-neat span.cm-variable{color:#000}.cm-s-neat span.cm-atom,.cm-s-neat span.cm-number{color:#3a3}.cm-s-neat span.cm-meta{color:#555}.cm-s-neat span.cm-link{color:#3a3}.cm-s-neat .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-neat .CodeMirror-matchingbracket{outline:grey solid 1px;color:#000!important}
js/esites_editor/dist/js/vendor/codemirror/theme/neo.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-neo.CodeMirror{background-color:#fff;color:#2e383c;line-height:1.4375}.cm-s-neo .cm-comment{color:#75787b}.cm-s-neo .cm-keyword,.cm-s-neo .cm-property{color:#1d75b3}.cm-s-neo .cm-atom,.cm-s-neo .cm-number{color:#75438a}.cm-s-neo .cm-node,.cm-s-neo .cm-tag{color:#9c3328}.cm-s-neo .cm-string{color:#b35e14}.cm-s-neo .cm-qualifier,.cm-s-neo .cm-variable{color:#047d65}.cm-s-neo pre{padding:0}.cm-s-neo .CodeMirror-gutters{border:none;border-right:10px solid transparent;background-color:transparent}.cm-s-neo .CodeMirror-linenumber{padding:0;color:#e0e2e5}.cm-s-neo .CodeMirror-guttermarker{color:#1d75b3}.cm-s-neo .CodeMirror-guttermarker-subtle{color:#e0e2e5}.cm-s-neo .CodeMirror-cursor{width:auto;border:0;background:rgba(155,157,162,.37);z-index:1}
js/esites_editor/dist/js/vendor/codemirror/theme/night.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-night.CodeMirror{background:#0a001f;color:#f8f8f8}.cm-s-night div.CodeMirror-selected{background:#447}.cm-s-night .CodeMirror-line::selection,.cm-s-night .CodeMirror-line>span::selection,.cm-s-night .CodeMirror-line>span>span::selection{background:rgba(68,68,119,.99)}.cm-s-night .CodeMirror-line::-moz-selection,.cm-s-night .CodeMirror-line>span::-moz-selection,.cm-s-night .CodeMirror-line>span>span::-moz-selection{background:rgba(68,68,119,.99)}.cm-s-night .CodeMirror-gutters{background:#0a001f;border-right:1px solid #aaa}.cm-s-night .CodeMirror-guttermarker{color:#fff}.cm-s-night .CodeMirror-guttermarker-subtle{color:#bbb}.cm-s-night .CodeMirror-linenumber{color:#f8f8f8}.cm-s-night .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-night span.cm-atom{color:#845dc4}.cm-s-night span.cm-attribute,.cm-s-night span.cm-number{color:#ffd500}.cm-s-night span.cm-keyword{color:#599eff}.cm-s-night span.cm-string{color:#37f14a}.cm-s-night span.cm-meta{color:#7678e2}.cm-s-night span.cm-tag,.cm-s-night span.cm-variable-2{color:#99b2ff}.cm-s-night span.cm-def,.cm-s-night span.cm-variable-3{color:#fff}.cm-s-night span.cm-bracket{color:#8da6ce}.cm-s-night span.cm-comment{color:#6900a1}.cm-s-night span.cm-builtin,.cm-s-night span.cm-special{color:#ff9e59}.cm-s-night span.cm-link{color:#845dc4}.cm-s-night span.cm-error{color:#9d1e15}.cm-s-night .CodeMirror-activeline-background{background:#1C005A}.cm-s-night .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/paraiso-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-paraiso-dark.CodeMirror{background:#2f1e2e;color:#b9b6b0}.cm-s-paraiso-dark div.CodeMirror-selected{background:#41323f}.cm-s-paraiso-dark .CodeMirror-line::selection,.cm-s-paraiso-dark .CodeMirror-line>span::selection,.cm-s-paraiso-dark .CodeMirror-line>span>span::selection{background:rgba(65,50,63,.99)}.cm-s-paraiso-dark .CodeMirror-line::-moz-selection,.cm-s-paraiso-dark .CodeMirror-line>span::-moz-selection,.cm-s-paraiso-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(65,50,63,.99)}.cm-s-paraiso-dark .CodeMirror-gutters{background:#2f1e2e;border-right:0}.cm-s-paraiso-dark .CodeMirror-guttermarker{color:#ef6155}.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle,.cm-s-paraiso-dark .CodeMirror-linenumber{color:#776e71}.cm-s-paraiso-dark .CodeMirror-cursor{border-left:1px solid #8d8687}.cm-s-paraiso-dark span.cm-comment{color:#e96ba8}.cm-s-paraiso-dark span.cm-atom,.cm-s-paraiso-dark span.cm-number{color:#815ba4}.cm-s-paraiso-dark span.cm-attribute,.cm-s-paraiso-dark span.cm-property{color:#48b685}.cm-s-paraiso-dark span.cm-keyword{color:#ef6155}.cm-s-paraiso-dark span.cm-string{color:#fec418}.cm-s-paraiso-dark span.cm-variable{color:#48b685}.cm-s-paraiso-dark span.cm-variable-2{color:#06b6ef}.cm-s-paraiso-dark span.cm-def{color:#f99b15}.cm-s-paraiso-dark span.cm-bracket{color:#b9b6b0}.cm-s-paraiso-dark span.cm-tag{color:#ef6155}.cm-s-paraiso-dark span.cm-link{color:#815ba4}.cm-s-paraiso-dark span.cm-error{background:#ef6155;color:#8d8687}.cm-s-paraiso-dark .CodeMirror-activeline-background{background:#4D344A}.cm-s-paraiso-dark .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/paraiso-light.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-paraiso-light.CodeMirror{background:#e7e9db;color:#41323f}.cm-s-paraiso-light .CodeMirror-line::selection,.cm-s-paraiso-light .CodeMirror-line>span::selection,.cm-s-paraiso-light .CodeMirror-line>span>span::selection,.cm-s-paraiso-light div.CodeMirror-selected{background:#b9b6b0}.cm-s-paraiso-light .CodeMirror-line::-moz-selection,.cm-s-paraiso-light .CodeMirror-line>span::-moz-selection,.cm-s-paraiso-light .CodeMirror-line>span>span::-moz-selection{background:#b9b6b0}.cm-s-paraiso-light .CodeMirror-gutters{background:#e7e9db;border-right:0}.cm-s-paraiso-light .CodeMirror-guttermarker{color:#000}.cm-s-paraiso-light .CodeMirror-guttermarker-subtle,.cm-s-paraiso-light .CodeMirror-linenumber{color:#8d8687}.cm-s-paraiso-light .CodeMirror-cursor{border-left:1px solid #776e71}.cm-s-paraiso-light span.cm-comment{color:#e96ba8}.cm-s-paraiso-light span.cm-atom,.cm-s-paraiso-light span.cm-number{color:#815ba4}.cm-s-paraiso-light span.cm-attribute,.cm-s-paraiso-light span.cm-property{color:#48b685}.cm-s-paraiso-light span.cm-keyword{color:#ef6155}.cm-s-paraiso-light span.cm-string{color:#fec418}.cm-s-paraiso-light span.cm-variable{color:#48b685}.cm-s-paraiso-light span.cm-variable-2{color:#06b6ef}.cm-s-paraiso-light span.cm-def{color:#f99b15}.cm-s-paraiso-light span.cm-bracket{color:#41323f}.cm-s-paraiso-light span.cm-tag{color:#ef6155}.cm-s-paraiso-light span.cm-link{color:#815ba4}.cm-s-paraiso-light span.cm-error{background:#ef6155;color:#776e71}.cm-s-paraiso-light .CodeMirror-activeline-background{background:#CFD1C4}.cm-s-paraiso-light .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/pastel-on-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-pastel-on-dark.CodeMirror{background:#2c2827;color:#8F938F;line-height:1.5;font-size:14px}.cm-s-pastel-on-dark .CodeMirror-line::selection,.cm-s-pastel-on-dark .CodeMirror-line>span::selection,.cm-s-pastel-on-dark .CodeMirror-line>span>span::selection,.cm-s-pastel-on-dark div.CodeMirror-selected{background:rgba(221,240,255,.2)}.cm-s-pastel-on-dark .CodeMirror-line::-moz-selection,.cm-s-pastel-on-dark .CodeMirror-line>span::-moz-selection,.cm-s-pastel-on-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(221,240,255,.2)}.cm-s-pastel-on-dark .CodeMirror-gutters{background:#34302f;border-right:0;padding:0 3px}.cm-s-pastel-on-dark .CodeMirror-guttermarker{color:#fff}.cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle,.cm-s-pastel-on-dark .CodeMirror-linenumber{color:#8F938F}.cm-s-pastel-on-dark .CodeMirror-cursor{border-left:1px solid #A7A7A7}.cm-s-pastel-on-dark span.cm-comment{color:#A6C6FF}.cm-s-pastel-on-dark span.cm-atom{color:#DE8E30}.cm-s-pastel-on-dark span.cm-number{color:#CCC}.cm-s-pastel-on-dark span.cm-property{color:#8F938F}.cm-s-pastel-on-dark span.cm-attribute{color:#a6e22e}.cm-s-pastel-on-dark span.cm-keyword{color:#AEB2F8}.cm-s-pastel-on-dark span.cm-string{color:#66A968}.cm-s-pastel-on-dark span.cm-variable{color:#AEB2F8}.cm-s-pastel-on-dark span.cm-variable-2{color:#BEBF55}.cm-s-pastel-on-dark span.cm-variable-3{color:#DE8E30}.cm-s-pastel-on-dark span.cm-def{color:#757aD8}.cm-s-pastel-on-dark span.cm-bracket{color:#f8f8f2}.cm-s-pastel-on-dark span.cm-tag{color:#C1C144}.cm-s-pastel-on-dark span.cm-link{color:#ae81ff}.cm-s-pastel-on-dark span.cm-builtin,.cm-s-pastel-on-dark span.cm-qualifier{color:#C1C144}.cm-s-pastel-on-dark span.cm-error{background:#757aD8;color:#f8f8f0}.cm-s-pastel-on-dark .CodeMirror-activeline-background{background:rgba(255,255,255,.031)}.cm-s-pastel-on-dark .CodeMirror-matchingbracket{border:1px solid rgba(255,255,255,.25);color:#8F938F!important;margin:-1px -1px 0}
js/esites_editor/dist/js/vendor/codemirror/theme/railscasts.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-railscasts.CodeMirror{background:#2b2b2b;color:#f4f1ed}.cm-s-railscasts div.CodeMirror-selected{background:#272935!important}.cm-s-railscasts .CodeMirror-gutters{background:#2b2b2b;border-right:0}.cm-s-railscasts .CodeMirror-linenumber{color:#5a647e}.cm-s-railscasts .CodeMirror-cursor{border-left:1px solid #d4cfc9!important}.cm-s-railscasts span.cm-comment{color:#bc9458}.cm-s-railscasts span.cm-atom,.cm-s-railscasts span.cm-number{color:#b6b3eb}.cm-s-railscasts span.cm-attribute,.cm-s-railscasts span.cm-property{color:#a5c261}.cm-s-railscasts span.cm-keyword{color:#da4939}.cm-s-railscasts span.cm-string{color:#ffc66d}.cm-s-railscasts span.cm-variable{color:#a5c261}.cm-s-railscasts span.cm-variable-2{color:#6d9cbe}.cm-s-railscasts span.cm-def{color:#cc7833}.cm-s-railscasts span.cm-error{background:#da4939;color:#d4cfc9}.cm-s-railscasts span.cm-bracket{color:#f4f1ed}.cm-s-railscasts span.cm-tag{color:#da4939}.cm-s-railscasts span.cm-link{color:#b6b3eb}.cm-s-railscasts .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-railscasts .CodeMirror-activeline-background{background:#303040}
js/esites_editor/dist/js/vendor/codemirror/theme/rubyblue.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-rubyblue.CodeMirror{background:#112435;color:#fff}.cm-s-rubyblue div.CodeMirror-selected{background:#38566F}.cm-s-rubyblue .CodeMirror-line::selection,.cm-s-rubyblue .CodeMirror-line>span::selection,.cm-s-rubyblue .CodeMirror-line>span>span::selection{background:rgba(56,86,111,.99)}.cm-s-rubyblue .CodeMirror-line::-moz-selection,.cm-s-rubyblue .CodeMirror-line>span::-moz-selection,.cm-s-rubyblue .CodeMirror-line>span>span::-moz-selection{background:rgba(56,86,111,.99)}.cm-s-rubyblue .CodeMirror-gutters{background:#1F4661;border-right:7px solid #3E7087}.cm-s-rubyblue .CodeMirror-guttermarker{color:#fff}.cm-s-rubyblue .CodeMirror-guttermarker-subtle{color:#3E7087}.cm-s-rubyblue .CodeMirror-linenumber{color:#fff}.cm-s-rubyblue .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-rubyblue span.cm-comment{color:#999;font-style:italic;line-height:1em}.cm-s-rubyblue span.cm-atom{color:#F4C20B}.cm-s-rubyblue span.cm-attribute,.cm-s-rubyblue span.cm-number{color:#82C6E0}.cm-s-rubyblue span.cm-keyword{color:#F0F}.cm-s-rubyblue span.cm-string{color:#F08047}.cm-s-rubyblue span.cm-meta{color:#F0F}.cm-s-rubyblue span.cm-tag,.cm-s-rubyblue span.cm-variable-2{color:#7BD827}.cm-s-rubyblue span.cm-def,.cm-s-rubyblue span.cm-variable-3{color:#fff}.cm-s-rubyblue span.cm-bracket{color:#F0F}.cm-s-rubyblue span.cm-link{color:#F4C20B}.cm-s-rubyblue span.CodeMirror-matchingbracket{color:#F0F!important}.cm-s-rubyblue span.cm-builtin,.cm-s-rubyblue span.cm-special{color:#FF9D00}.cm-s-rubyblue span.cm-error{color:#AF2018}.cm-s-rubyblue .CodeMirror-activeline-background{background:#173047}
js/esites_editor/dist/js/vendor/codemirror/theme/seti.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-seti.CodeMirror{background-color:#151718!important;color:#CFD2D1!important;border:none}.cm-s-seti .CodeMirror-gutters{color:#404b53;background-color:#0E1112;border:none}.cm-s-seti .CodeMirror-cursor{border-left:solid thin #f8f8f0}.cm-s-seti .CodeMirror-linenumber{color:#6D8A88}.cm-s-seti .CodeMirror-line::selection,.cm-s-seti .CodeMirror-line>span::selection,.cm-s-seti .CodeMirror-line>span>span::selection,.cm-s-seti.CodeMirror-focused div.CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-seti .CodeMirror-line::-moz-selection,.cm-s-seti .CodeMirror-line>span::-moz-selection,.cm-s-seti .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-seti span.cm-comment{color:#41535b}.cm-s-seti span.cm-string,.cm-s-seti span.cm-string-2{color:#55b5db}.cm-s-seti span.cm-number{color:#cd3f45}.cm-s-seti span.cm-variable{color:#55b5db}.cm-s-seti span.cm-variable-2{color:#a074c4}.cm-s-seti span.cm-def{color:#55b5db}.cm-s-seti span.cm-operator{color:#9fca56}.cm-s-seti span.cm-keyword{color:#e6cd69}.cm-s-seti span.cm-atom{color:#cd3f45}.cm-s-seti span.cm-meta,.cm-s-seti span.cm-tag{color:#55b5db}.cm-s-seti span.cm-attribute,.cm-s-seti span.cm-qualifier{color:#9fca56}.cm-s-seti span.cm-property{color:#a074c4}.cm-s-seti span.cm-builtin,.cm-s-seti span.cm-variable-3{color:#9fca56}.cm-s-seti .CodeMirror-activeline-background{background:#101213}.cm-s-seti .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/solarized.css ADDED
@@ -0,0 +1 @@
 
1
+ .solarized.base03{color:#002b36}.solarized.base02{color:#073642}.solarized.base01{color:#586e75}.solarized.base00{color:#657b83}.solarized.base0{color:#839496}.solarized.base1{color:#93a1a1}.solarized.base2{color:#eee8d5}.solarized.base3{color:#fdf6e3}.solarized.solar-yellow{color:#b58900}.solarized.solar-orange{color:#cb4b16}.solarized.solar-red{color:#dc322f}.solarized.solar-magenta{color:#d33682}.solarized.solar-violet{color:#6c71c4}.solarized.solar-blue{color:#268bd2}.solarized.solar-cyan{color:#2aa198}.solarized.solar-green{color:#859900}.cm-s-solarized{line-height:1.45em;color-profile:sRGB;rendering-intent:auto}.cm-s-solarized.cm-s-dark{color:#839496;background-color:#002b36;text-shadow:#002b36 0 1px}.cm-s-solarized.cm-s-light{background-color:#fdf6e3;color:#657b83;text-shadow:#eee8d5 0 1px}.cm-s-solarized .CodeMirror-widget{text-shadow:none}.cm-s-solarized .cm-header{color:#586e75}.cm-s-solarized .cm-quote{color:#93a1a1}.cm-s-solarized .cm-keyword{color:#cb4b16}.cm-s-solarized .cm-atom,.cm-s-solarized .cm-number{color:#d33682}.cm-s-solarized .cm-def{color:#2aa198}.cm-s-solarized .cm-variable{color:#839496}.cm-s-solarized .cm-variable-2{color:#b58900}.cm-s-solarized .cm-variable-3{color:#6c71c4}.cm-s-solarized .cm-property{color:#2aa198}.cm-s-solarized .cm-operator{color:#6c71c4}.cm-s-solarized .cm-comment{color:#586e75;font-style:italic}.cm-s-solarized .cm-string{color:#859900}.cm-s-solarized .cm-string-2{color:#b58900}.cm-s-solarized .cm-meta{color:#859900}.cm-s-solarized .cm-qualifier{color:#b58900}.cm-s-solarized .cm-builtin{color:#d33682}.cm-s-solarized .cm-bracket{color:#cb4b16}.cm-s-solarized .CodeMirror-matchingbracket{color:#859900}.cm-s-solarized .CodeMirror-nonmatchingbracket{color:#dc322f}.cm-s-solarized .cm-tag{color:#93a1a1}.cm-s-solarized .cm-attribute{color:#2aa198}.cm-s-solarized .cm-hr{color:transparent;border-top:1px solid #586e75;display:block}.cm-s-solarized .cm-link{color:#93a1a1;cursor:pointer}.cm-s-solarized .cm-special{color:#6c71c4}.cm-s-solarized .cm-em{color:#999;text-decoration:underline;text-decoration-style:dotted}.cm-s-solarized .cm-strong{color:#eee}.cm-s-solarized .cm-error,.cm-s-solarized .cm-invalidchar{color:#586e75;border-bottom:1px dotted #dc322f}.cm-s-solarized.cm-s-dark div.CodeMirror-selected{background:#073642}.cm-s-solarized.cm-s-dark.CodeMirror ::selection{background:rgba(7,54,66,.99)}.cm-s-dark .CodeMirror-line>span::-moz-selection,.cm-s-dark .CodeMirror-line>span>span::-moz-selection,.cm-s-solarized.cm-s-dark .CodeMirror-line::-moz-selection{background:rgba(7,54,66,.99)}.cm-s-light .CodeMirror-line>span::selection,.cm-s-light .CodeMirror-line>span>span::selection,.cm-s-solarized.cm-s-light .CodeMirror-line::selection,.cm-s-solarized.cm-s-light div.CodeMirror-selected{background:#eee8d5}.cm-s-ligh .CodeMirror-line>span::-moz-selection,.cm-s-ligh .CodeMirror-line>span>span::-moz-selection,.cm-s-solarized.cm-s-light .CodeMirror-line::-moz-selection{background:#eee8d5}.cm-s-solarized.CodeMirror{-moz-box-shadow:inset 7px 0 12px -6px #000;-webkit-box-shadow:inset 7px 0 12px -6px #000;box-shadow:inset 7px 0 12px -6px #000}.cm-s-solarized .CodeMirror-gutters{border-right:1px solid}.cm-s-solarized.cm-s-dark .CodeMirror-gutters{background-color:#002b36;border-color:#00232c}.cm-s-solarized.cm-s-dark .CodeMirror-linenumber{text-shadow:#021014 0 -1px}.cm-s-solarized.cm-s-light .CodeMirror-gutters{background-color:#fdf6e3;border-color:#eee8d5}.cm-s-solarized .CodeMirror-linenumber{color:#586e75;padding:0 5px}.cm-s-solarized .CodeMirror-guttermarker-subtle{color:#586e75}.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker{color:#ddd}.cm-s-solarized.cm-s-light .CodeMirror-guttermarker{color:#cb4b16}.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text{color:#586e75}.cm-s-solarized .CodeMirror-cursor{border-left:1px solid #819090}.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background{background:rgba(255,255,255,.1)}.cm-s-solarized.cm-s-light .CodeMirror-activeline-background{background:rgba(0,0,0,.1)}
js/esites_editor/dist/js/vendor/codemirror/theme/the-matrix.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-the-matrix.CodeMirror{background:#000;color:#0F0}.cm-s-the-matrix div.CodeMirror-selected{background:#2D2D2D}.cm-s-the-matrix .CodeMirror-line::selection,.cm-s-the-matrix .CodeMirror-line>span::selection,.cm-s-the-matrix .CodeMirror-line>span>span::selection{background:rgba(45,45,45,.99)}.cm-s-the-matrix .CodeMirror-line::-moz-selection,.cm-s-the-matrix .CodeMirror-line>span::-moz-selection,.cm-s-the-matrix .CodeMirror-line>span>span::-moz-selection{background:rgba(45,45,45,.99)}.cm-s-the-matrix .CodeMirror-gutters{background:#060;border-right:2px solid #0F0}.cm-s-the-matrix .CodeMirror-guttermarker{color:#0f0}.cm-s-the-matrix .CodeMirror-guttermarker-subtle{color:#fff}.cm-s-the-matrix .CodeMirror-linenumber{color:#FFF}.cm-s-the-matrix .CodeMirror-cursor{border-left:1px solid #0F0}.cm-s-the-matrix span.cm-keyword{color:#008803;font-weight:700}.cm-s-the-matrix span.cm-atom{color:#3FF}.cm-s-the-matrix span.cm-number{color:#FFB94F}.cm-s-the-matrix span.cm-def{color:#99C}.cm-s-the-matrix span.cm-variable{color:#F6C}.cm-s-the-matrix span.cm-variable-2{color:#C6F}.cm-s-the-matrix span.cm-variable-3{color:#96F}.cm-s-the-matrix span.cm-property{color:#62FFA0}.cm-s-the-matrix span.cm-operator{color:#999}.cm-s-the-matrix span.cm-comment{color:#CCC}.cm-s-the-matrix span.cm-string{color:#39C}.cm-s-the-matrix span.cm-meta{color:#C9F}.cm-s-the-matrix span.cm-qualifier{color:#FFF700}.cm-s-the-matrix span.cm-builtin{color:#30a}.cm-s-the-matrix span.cm-bracket{color:#cc7}.cm-s-the-matrix span.cm-tag{color:#FFBD40}.cm-s-the-matrix span.cm-attribute{color:#FFF700}.cm-s-the-matrix span.cm-error{color:red}.cm-s-the-matrix .CodeMirror-activeline-background{background:#040}
js/esites_editor/dist/js/vendor/codemirror/theme/tomorrow-night-bright.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-tomorrow-night-bright.CodeMirror{background:#000;color:#eaeaea}.cm-s-tomorrow-night-bright div.CodeMirror-selected{background:#424242}.cm-s-tomorrow-night-bright .CodeMirror-gutters{background:#000;border-right:0}.cm-s-tomorrow-night-bright .CodeMirror-guttermarker{color:#e78c45}.cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle{color:#777}.cm-s-tomorrow-night-bright .CodeMirror-linenumber{color:#424242}.cm-s-tomorrow-night-bright .CodeMirror-cursor{border-left:1px solid #6A6A6A}.cm-s-tomorrow-night-bright span.cm-comment{color:#d27b53}.cm-s-tomorrow-night-bright span.cm-atom,.cm-s-tomorrow-night-bright span.cm-number{color:#a16a94}.cm-s-tomorrow-night-bright span.cm-attribute,.cm-s-tomorrow-night-bright span.cm-property{color:#9c9}.cm-s-tomorrow-night-bright span.cm-keyword{color:#d54e53}.cm-s-tomorrow-night-bright span.cm-string{color:#e7c547}.cm-s-tomorrow-night-bright span.cm-variable{color:#b9ca4a}.cm-s-tomorrow-night-bright span.cm-variable-2{color:#7aa6da}.cm-s-tomorrow-night-bright span.cm-def{color:#e78c45}.cm-s-tomorrow-night-bright span.cm-bracket{color:#eaeaea}.cm-s-tomorrow-night-bright span.cm-tag{color:#d54e53}.cm-s-tomorrow-night-bright span.cm-link{color:#a16a94}.cm-s-tomorrow-night-bright span.cm-error{background:#d54e53;color:#6A6A6A}.cm-s-tomorrow-night-bright .CodeMirror-activeline-background{background:#2a2a2a}.cm-s-tomorrow-night-bright .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/tomorrow-night-eighties.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-tomorrow-night-eighties.CodeMirror{background:#000;color:#CCC}.cm-s-tomorrow-night-eighties div.CodeMirror-selected{background:#2D2D2D}.cm-s-tomorrow-night-eighties .CodeMirror-line::selection,.cm-s-tomorrow-night-eighties .CodeMirror-line>span::selection,.cm-s-tomorrow-night-eighties .CodeMirror-line>span>span::selection{background:rgba(45,45,45,.99)}.cm-s-tomorrow-night-eighties .CodeMirror-line::-moz-selection,.cm-s-tomorrow-night-eighties .CodeMirror-line>span::-moz-selection,.cm-s-tomorrow-night-eighties .CodeMirror-line>span>span::-moz-selection{background:rgba(45,45,45,.99)}.cm-s-tomorrow-night-eighties .CodeMirror-gutters{background:#000;border-right:0}.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker{color:#f2777a}.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle{color:#777}.cm-s-tomorrow-night-eighties .CodeMirror-linenumber{color:#515151}.cm-s-tomorrow-night-eighties .CodeMirror-cursor{border-left:1px solid #6A6A6A}.cm-s-tomorrow-night-eighties span.cm-comment{color:#d27b53}.cm-s-tomorrow-night-eighties span.cm-atom,.cm-s-tomorrow-night-eighties span.cm-number{color:#a16a94}.cm-s-tomorrow-night-eighties span.cm-attribute,.cm-s-tomorrow-night-eighties span.cm-property{color:#9c9}.cm-s-tomorrow-night-eighties span.cm-keyword{color:#f2777a}.cm-s-tomorrow-night-eighties span.cm-string{color:#fc6}.cm-s-tomorrow-night-eighties span.cm-variable{color:#9c9}.cm-s-tomorrow-night-eighties span.cm-variable-2{color:#69c}.cm-s-tomorrow-night-eighties span.cm-def{color:#f99157}.cm-s-tomorrow-night-eighties span.cm-bracket{color:#CCC}.cm-s-tomorrow-night-eighties span.cm-tag{color:#f2777a}.cm-s-tomorrow-night-eighties span.cm-link{color:#a16a94}.cm-s-tomorrow-night-eighties span.cm-error{background:#f2777a;color:#6A6A6A}.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background{background:#343600}.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/ttcn.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-ttcn .cm-quote{color:#090}.cm-s-ttcn .cm-header,.cm-strong{font-weight:700}.cm-s-ttcn .cm-header{color:#00f;font-weight:700}.cm-s-ttcn .cm-atom{color:#219}.cm-s-ttcn .cm-attribute{color:#00c}.cm-s-ttcn .cm-bracket{color:#997}.cm-s-ttcn .cm-comment{color:#333}.cm-s-ttcn .cm-def{color:#00f}.cm-s-ttcn .cm-em{font-style:italic}.cm-s-ttcn .cm-error{color:red}.cm-s-ttcn .cm-hr{color:#999}.cm-s-ttcn .cm-keyword{font-weight:700}.cm-s-ttcn .cm-link{color:#00c;text-decoration:underline}.cm-s-ttcn .cm-meta{color:#555}.cm-s-ttcn .cm-negative{color:#d44}.cm-s-ttcn .cm-positive{color:#292}.cm-s-ttcn .cm-qualifier{color:#555}.cm-s-ttcn .cm-strikethrough{text-decoration:line-through}.cm-s-ttcn .cm-string{color:#006400}.cm-s-ttcn .cm-string-2{color:#f50}.cm-s-ttcn .cm-strong{font-weight:700}.cm-s-ttcn .cm-tag{color:#170}.cm-s-ttcn .cm-variable{color:#8B2252}.cm-s-ttcn .cm-variable-2{color:#05a}.cm-s-ttcn .cm-variable-3{color:#085}.cm-s-ttcn .cm-invalidchar{color:red}.cm-s-ttcn .cm-accessTypes,.cm-s-ttcn .cm-compareTypes{color:#27408B}.cm-s-ttcn .cm-cmipVerbs{color:#8B2252}.cm-s-ttcn .cm-modifier{color:#D2691E}.cm-s-ttcn .cm-status{color:#8B4545}.cm-s-ttcn .cm-storage{color:#A020F0}.cm-s-ttcn .cm-tags{color:#006400}.cm-s-ttcn .cm-externalCommands{color:#8B4545;font-weight:700}.cm-s-ttcn .cm-fileNCtrlMaskOptions,.cm-s-ttcn .cm-sectionTitle{color:#2E8B57;font-weight:700}.cm-s-ttcn .cm-booleanConsts,.cm-s-ttcn .cm-otherConsts,.cm-s-ttcn .cm-verdictConsts{color:#006400}.cm-s-ttcn .cm-configOps,.cm-s-ttcn .cm-functionOps,.cm-s-ttcn .cm-portOps,.cm-s-ttcn .cm-sutOps,.cm-s-ttcn .cm-timerOps,.cm-s-ttcn .cm-verdictOps{color:#00F}.cm-s-ttcn .cm-preprocessor,.cm-s-ttcn .cm-templateMatch,.cm-s-ttcn .cm-ttcn3Macros{color:#27408B}.cm-s-ttcn .cm-types{color:brown;font-weight:700}.cm-s-ttcn .cm-visibilityModifiers{font-weight:700}
js/esites_editor/dist/js/vendor/codemirror/theme/twilight.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-twilight.CodeMirror{background:#141414;color:#f7f7f7}.cm-s-twilight div.CodeMirror-selected{background:#323232}.cm-s-twilight .CodeMirror-line::selection,.cm-s-twilight .CodeMirror-line>span::selection,.cm-s-twilight .CodeMirror-line>span>span::selection{background:rgba(50,50,50,.99)}.cm-s-twilight .CodeMirror-line::-moz-selection,.cm-s-twilight .CodeMirror-line>span::-moz-selection,.cm-s-twilight .CodeMirror-line>span>span::-moz-selection{background:rgba(50,50,50,.99)}.cm-s-twilight .CodeMirror-gutters{background:#222;border-right:1px solid #aaa}.cm-s-twilight .CodeMirror-guttermarker{color:#fff}.cm-s-twilight .CodeMirror-guttermarker-subtle,.cm-s-twilight .CodeMirror-linenumber{color:#aaa}.cm-s-twilight .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-twilight .cm-keyword{color:#f9ee98}.cm-s-twilight .cm-atom{color:#FC0}.cm-s-twilight .cm-number{color:#ca7841}.cm-s-twilight .cm-def{color:#8DA6CE}.cm-s-twilight span.cm-def,.cm-s-twilight span.cm-tag,.cm-s-twilight span.cm-variable-2,.cm-s-twilight span.cm-variable-3{color:#607392}.cm-s-twilight .cm-operator{color:#cda869}.cm-s-twilight .cm-comment{color:#777;font-style:italic;font-weight:400}.cm-s-twilight .cm-string{color:#8f9d6a;font-style:italic}.cm-s-twilight .cm-string-2{color:#bd6b18}.cm-s-twilight .cm-meta{background-color:#141414;color:#f7f7f7}.cm-s-twilight .cm-builtin{color:#cda869}.cm-s-twilight .cm-tag{color:#997643}.cm-s-twilight .cm-attribute{color:#d6bb6d}.cm-s-twilight .cm-header{color:#FF6400}.cm-s-twilight .cm-hr{color:#AEAEAE}.cm-s-twilight .cm-link{color:#ad9361;font-style:italic;text-decoration:none}.cm-s-twilight .cm-error{border-bottom:1px solid red}.cm-s-twilight .CodeMirror-activeline-background{background:#27282E}.cm-s-twilight .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/vibrant-ink.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-vibrant-ink.CodeMirror{background:#000;color:#fff}.cm-s-vibrant-ink div.CodeMirror-selected{background:#35493c}.cm-s-vibrant-ink .CodeMirror-line::selection,.cm-s-vibrant-ink .CodeMirror-line>span::selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::selection{background:rgba(53,73,60,.99)}.cm-s-vibrant-ink .CodeMirror-line::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::-moz-selection{background:rgba(53,73,60,.99)}.cm-s-vibrant-ink .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-vibrant-ink .CodeMirror-guttermarker{color:#fff}.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle,.cm-s-vibrant-ink .CodeMirror-linenumber{color:#d0d0d0}.cm-s-vibrant-ink .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-vibrant-ink .cm-keyword{color:#CC7832}.cm-s-vibrant-ink .cm-atom{color:#FC0}.cm-s-vibrant-ink .cm-number{color:#FFEE98}.cm-s-vibrant-ink .cm-def{color:#8DA6CE}.cm-s-vibrant span.cm-def,.cm-s-vibrant span.cm-tag,.cm-s-vibrant-ink span.cm-variable-2,.cm-s-vibrant-ink span.cm-variable-3{color:#FFC66D}.cm-s-vibrant-ink .cm-operator{color:#888}.cm-s-vibrant-ink .cm-comment{color:gray;font-weight:700}.cm-s-vibrant-ink .cm-string{color:#A5C25C}.cm-s-vibrant-ink .cm-string-2{color:red}.cm-s-vibrant-ink .cm-meta{color:#D8FA3C}.cm-s-vibrant-ink .cm-attribute,.cm-s-vibrant-ink .cm-builtin,.cm-s-vibrant-ink .cm-tag{color:#8DA6CE}.cm-s-vibrant-ink .cm-header{color:#FF6400}.cm-s-vibrant-ink .cm-hr{color:#AEAEAE}.cm-s-vibrant-ink .cm-link{color:#00f}.cm-s-vibrant-ink .cm-error{border-bottom:1px solid red}.cm-s-vibrant-ink .CodeMirror-activeline-background{background:#27282E}.cm-s-vibrant-ink .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/xq-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-xq-dark.CodeMirror{background:#0a001f;color:#f8f8f8}.cm-s-xq-dark div.CodeMirror-selected{background:#27007A}.cm-s-xq-dark .CodeMirror-line::selection,.cm-s-xq-dark .CodeMirror-line>span::selection,.cm-s-xq-dark .CodeMirror-line>span>span::selection{background:rgba(39,0,122,.99)}.cm-s-xq-dark .CodeMirror-line::-moz-selection,.cm-s-xq-dark .CodeMirror-line>span::-moz-selection,.cm-s-xq-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(39,0,122,.99)}.cm-s-xq-dark .CodeMirror-gutters{background:#0a001f;border-right:1px solid #aaa}.cm-s-xq-dark .CodeMirror-guttermarker{color:#FFBD40}.cm-s-xq-dark .CodeMirror-guttermarker-subtle,.cm-s-xq-dark .CodeMirror-linenumber{color:#f8f8f8}.cm-s-xq-dark .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-xq-dark span.cm-keyword{color:#FFBD40}.cm-s-xq-dark span.cm-atom{color:#6C8CD5}.cm-s-xq-dark span.cm-number{color:#164}.cm-s-xq-dark span.cm-def{color:#FFF;text-decoration:underline}.cm-s-xq-dark span.cm-variable{color:#FFF}.cm-s-xq-dark span.cm-variable-2{color:#EEE}.cm-s-xq-dark span.cm-variable-3{color:#DDD}.cm-s-xq-dark span.cm-comment{color:gray}.cm-s-xq-dark span.cm-string{color:#9FEE00}.cm-s-xq-dark span.cm-meta{color:#ff0}.cm-s-xq-dark span.cm-qualifier{color:#FFF700}.cm-s-xq-dark span.cm-builtin{color:#30a}.cm-s-xq-dark span.cm-bracket{color:#cc7}.cm-s-xq-dark span.cm-tag{color:#FFBD40}.cm-s-xq-dark span.cm-attribute{color:#FFF700}.cm-s-xq-dark span.cm-error{color:red}.cm-s-xq-dark .CodeMirror-activeline-background{background:#27282E}.cm-s-xq-dark .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}
js/esites_editor/dist/js/vendor/codemirror/theme/xq-light.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-xq-light span.cm-keyword{line-height:1em;font-weight:700;color:#5A5CAD}.cm-s-xq-light span.cm-atom{color:#6C8CD5}.cm-s-xq-light span.cm-number{color:#164}.cm-s-xq-light span.cm-def{text-decoration:underline}.cm-s-xq-light span.cm-variable,.cm-s-xq-light span.cm-variable-2,.cm-s-xq-light span.cm-variable-3{color:#000}.cm-s-xq-light span.cm-comment{color:#0080FF;font-style:italic}.cm-s-xq-light span.cm-string{color:red}.cm-s-xq-light span.cm-meta{color:#ff0}.cm-s-xq-light span.cm-qualifier{color:grey}.cm-s-xq-light span.cm-builtin{color:#7EA656}.cm-s-xq-light span.cm-bracket{color:#cc7}.cm-s-xq-light span.cm-tag{color:#3F7F7F}.cm-s-xq-light span.cm-attribute{color:#7F007F}.cm-s-xq-light span.cm-error{color:red}.cm-s-xq-light .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-xq-light .CodeMirror-matchingbracket{outline:grey solid 1px;color:#000!important;background:#ff0}
js/esites_editor/dist/js/vendor/codemirror/theme/yeti.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-yeti.CodeMirror{background-color:#ECEAE8!important;color:#d1c9c0!important;border:none}.cm-s-yeti .CodeMirror-gutters{color:#adaba6;background-color:#E5E1DB;border:none}.cm-s-yeti .CodeMirror-cursor{border-left:solid thin #d1c9c0}.cm-s-yeti .CodeMirror-linenumber{color:#adaba6}.cm-s-yeti .CodeMirror-line::selection,.cm-s-yeti .CodeMirror-line>span::selection,.cm-s-yeti .CodeMirror-line>span>span::selection,.cm-s-yeti.CodeMirror-focused div.CodeMirror-selected{background:#DCD8D2}.cm-s-yeti .CodeMirror-line::-moz-selection,.cm-s-yeti .CodeMirror-line>span::-moz-selection,.cm-s-yeti .CodeMirror-line>span>span::-moz-selection{background:#DCD8D2}.cm-s-yeti span.cm-comment{color:#d4c8be}.cm-s-yeti span.cm-string,.cm-s-yeti span.cm-string-2{color:#96c0d8}.cm-s-yeti span.cm-number{color:#a074c4}.cm-s-yeti span.cm-variable{color:#55b5db}.cm-s-yeti span.cm-variable-2{color:#a074c4}.cm-s-yeti span.cm-def{color:#55b5db}.cm-s-yeti span.cm-keyword,.cm-s-yeti span.cm-operator{color:#9fb96e}.cm-s-yeti span.cm-atom{color:#a074c4}.cm-s-yeti span.cm-meta,.cm-s-yeti span.cm-tag{color:#96c0d8}.cm-s-yeti span.cm-attribute{color:#9fb96e}.cm-s-yeti span.cm-qualifier{color:#96c0d8}.cm-s-yeti span.cm-builtin,.cm-s-yeti span.cm-property{color:#a074c4}.cm-s-yeti span.cm-variable-3{color:#96c0d8}.cm-s-yeti .CodeMirror-activeline-background{background:#E7E4E0}.cm-s-yeti .CodeMirror-matchingbracket{text-decoration:underline}
js/esites_editor/dist/js/vendor/codemirror/theme/zenburn.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-zenburn .CodeMirror-gutters{background:#3f3f3f!important}.CodeMirror-foldgutter-folded,.cm-s-zenburn .CodeMirror-foldgutter-open{color:#999}.cm-s-zenburn .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-zenburn{background-color:#3f3f3f;color:#dcdccc}.cm-s-zenburn span.cm-builtin{color:#dcdccc;font-weight:700}.cm-s-zenburn span.cm-comment{color:#7f9f7f}.cm-s-zenburn span.cm-keyword{color:#f0dfaf;font-weight:700}.cm-s-zenburn span.cm-atom{color:#bfebbf}.cm-s-zenburn span.cm-def{color:#dcdccc}.cm-s-zenburn span.cm-variable{color:#dfaf8f}.cm-s-zenburn span.cm-variable-2{color:#dcdccc}.cm-s-zenburn span.cm-string,.cm-s-zenburn span.cm-string-2{color:#cc9393}.cm-s-zenburn span.cm-number{color:#dcdccc}.cm-s-zenburn span.cm-tag{color:#93e0e3}.cm-s-zenburn span.cm-attribute,.cm-s-zenburn span.cm-property{color:#dfaf8f}.cm-s-zenburn span.cm-qualifier{color:#7cb8bb}.cm-s-zenburn span.cm-meta{color:#f0dfaf}.cm-s-zenburn span.cm-header,.cm-s-zenburn span.cm-operator{color:#f0efd0}.cm-s-zenburn span.CodeMirror-matchingbracket{box-sizing:border-box;background:0 0;border-bottom:1px solid}.cm-s-zenburn span.CodeMirror-nonmatchingbracket{border-bottom:1px solid;background:0 0}.cm-s-zenburn .CodeMirror-activeline,.cm-s-zenburn .CodeMirror-activeline-background{background:#000}.cm-s-zenburn div.CodeMirror-selected{background:#545454}.cm-s-zenburn .CodeMirror-focused div.CodeMirror-selected{background:#4f4f4f}
js/esites_editor/dist/js/vendor/emmet-codemirror/dist/emmet.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self),o.emmetCodeMirror=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";function posToIndex(cm,pos){arguments.length>2&&"object"!=typeof pos&&(pos={line:arguments[1],ch:arguments[2]});return cm.indexFromPos(pos)}function indexToPos(cm,ix){return cm.posFromIndex(ix)}var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj},_createClass=function(){function defineProperties(target,props){for(var key in props){var prop=props[key];prop.configurable=!0;prop.value&&(prop.writable=!0)}Object.defineProperties(target,props)}return function(Constructor,protoProps,staticProps){protoProps&&defineProperties(Constructor.prototype,protoProps);staticProps&&defineProperties(Constructor,staticProps);return Constructor}}(),_classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")};Object.defineProperty(exports,"__esModule",{value:!0});var emmet=_interopRequire(require("./emmet")),modeMap={"text/html":"html","application/xml":"xml","text/xsl":"xsl","text/css":"css","text/x-less":"less","text/x-scss":"scss","text/x-sass":"sass"};exports.modeMap=modeMap;var EmmetEditor=function(){function EmmetEditor(ctx){var selIndex=void 0===arguments[1]?0:arguments[1];_classCallCheck(this,EmmetEditor);this.context=ctx;this.selectionIndex=selIndex||0}_createClass(EmmetEditor,{selectionList:{value:function(){var cm=this.context;return cm.listSelections().map(function(sel){var anchor=posToIndex(cm,sel.anchor),head=posToIndex(cm,sel.head);return{start:Math.min(anchor,head),end:Math.max(anchor,head)}})}},getCaretPos:{value:function(){return this.getSelectionRange().start}},setCaretPos:{value:function(pos){this.createSelection(pos)}},getSelectionRange:{value:function(){return this.selectionList()[this.selectionIndex]}},createSelection:{value:function(start,end){"undefined"==typeof end&&(end=start);var sels=this.selectionList(),cm=this.context;sels[this.selectionIndex]={start:start,end:end};this.context.setSelections(sels.map(function(sel){return{head:indexToPos(cm,sel.start),anchor:indexToPos(cm,sel.end)}}))}},getSelection:{value:function(){var sel=this.getSelectionRange();sel.start=indexToPos(this.context,sel.start);sel.end=indexToPos(this.context,sel.end);return this.context.getRange(sel.start,sel.end)}},getCurrentLineRange:{value:function(){var caret=indexToPos(this.context,this.getCaretPos());return{start:posToIndex(this.context,caret.line,0),end:posToIndex(this.context,caret.line,this.context.getLine(caret.line).length)}}},getCurrentLine:{value:function(){var caret=indexToPos(this.context,this.getCaretPos());return this.context.getLine(caret.line)||""}},replaceContent:{value:function(value,start,end,noIndent){"undefined"==typeof end&&(end="undefined"==typeof start?this.getContent().length:start);"undefined"==typeof start&&(start=0);value=this.normalize(value);noIndent||(value=emmet.utils.common.padString(value,emmet.utils.common.getLinePaddingFromPosition(this.getContent(),start)));var tabstopData=emmet.tabStops.extract(value,{escape:function(ch){return ch}});value=tabstopData.text;var firstTabStop=tabstopData.tabstops[0]||{start:value.length,end:value.length};firstTabStop.start+=start;firstTabStop.end+=start;this.context.replaceRange(value,indexToPos(this.context,start),indexToPos(this.context,end));this.createSelection(firstTabStop.start,firstTabStop.end)}},normalize:{value:function(str){var indent=" ",ctx=this.context;ctx.getOption("indentWithTabs")||(indent=emmet.utils.common.repeatString(" ",ctx.getOption("indentUnit")));return emmet.utils.editor.normalize(str,{indentation:indent})}},getContent:{value:function(){return this.context.getValue()}},getSyntax:{value:function(){var editor=this.context,mode=(editor.posFromIndex(this.getCaretPos()),editor.getModeAt(editor.getCursor())),syntax=mode.name;"xml"===syntax&&mode.configuration&&(syntax=mode.configuration);return syntax||emmet.utils.action.detectSyntax(this,syntax)}},getProfileName:{value:function(){return this.context.getOption("profile")?this.context.getOption("profile"):emmet.utils.action.detectProfile(this)}},prompt:{value:function(_prompt){var _promptWrapper=function(_x){return _prompt.apply(this,arguments)};_promptWrapper.toString=function(){return _prompt.toString()};return _promptWrapper}(function(title){return prompt(title)})},getFilePath:{value:function(){return location.href}},isValidSyntax:{value:function(){return emmet.resources.hasSyntax(this.getSyntax())}}});return EmmetEditor}();exports["default"]=EmmetEditor},{"./emmet":2}],2:[function(require,module,exports){"use strict";var _interopRequire=function(obj){return obj&&obj.__esModule?obj["default"]:obj},emmet=_interopRequire(require("emmet"));require("emmet/bundles/snippets");require("emmet/bundles/caniuse");module.exports=emmet},{emmet:39,"emmet/bundles/caniuse":3,"emmet/bundles/snippets":4}],3:[function(require,module,exports){var ciu=require("../lib/assets/caniuse"),db=require("../lib/caniuse.json");ciu.load(db,!0)},{"../lib/assets/caniuse":23,"../lib/caniuse.json":35}],4:[function(require,module,exports){var res=require("../lib/assets/resources"),snippets=require("../lib/snippets.json");res.setVocabulary(snippets,"system")},{"../lib/assets/resources":31,"../lib/snippets.json":68}],5:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function last(arr){return arr[arr.length-1]}function balanceHTML(editor,direction){var info=editorUtils.outputInfo(editor),content=info.content,sel=range(editor.getSelectionRange());lastMatch&&!lastMatch.range.equal(sel)&&(lastMatch=null);if(lastMatch&&sel.length())if("in"==direction){if("tag"==lastMatch.type&&!lastMatch.close)return!1;if(lastMatch.range.equal(lastMatch.outerRange))lastMatch.range=lastMatch.innerRange;else{var narrowed=utils.narrowToNonSpace(content,lastMatch.innerRange);lastMatch=htmlMatcher.find(content,narrowed.start+1);lastMatch&&lastMatch.range.equal(sel)&&lastMatch.outerRange.equal(sel)&&(lastMatch.range=lastMatch.innerRange)}}else if(!lastMatch.innerRange.equal(lastMatch.outerRange)&&lastMatch.range.equal(lastMatch.innerRange)&&sel.equal(lastMatch.range))lastMatch.range=lastMatch.outerRange;else{lastMatch=htmlMatcher.find(content,sel.start);lastMatch&&lastMatch.range.equal(sel)&&lastMatch.innerRange.equal(sel)&&(lastMatch.range=lastMatch.outerRange)}else lastMatch=htmlMatcher.find(content,sel.start);if(lastMatch){lastMatch.innerRange.equal(sel)&&(lastMatch.range=lastMatch.outerRange);if(!lastMatch.range.equal(sel)){editor.createSelection(lastMatch.range.start,lastMatch.range.end);return!0}}lastMatch=null;return!1}function rangesForCSSRule(rule,pos){var ranges=[rule.range(!0)];ranges.push(rule.valueRange(!0));var nestedSections=cssSections.nestedSectionsInRule(rule),items=rule.list();if(items.length||nestedSections.length){var start=Number.POSITIVE_INFINITY,end=-1;if(items.length){start=items[0].namePosition(!0);end=last(items).range(!0).end}if(nestedSections.length){nestedSections[0].start<start&&(start=nestedSections[0].start);last(nestedSections).end>end&&(end=last(nestedSections).end)}ranges.push(range.create2(start,end))}ranges=ranges.concat(nestedSections);var prop=cssEditTree.propertyFromPosition(rule,pos)||items[0];if(prop){ranges.push(prop.range(!0));var valueRange=prop.valueRange(!0);prop.end()||(valueRange._unterminated=!0);ranges.push(valueRange)}return ranges}function getCSSRanges(content,pos){var rule;if("string"==typeof content){var ruleRange=cssSections.matchEnclosingRule(content,pos);ruleRange&&(rule=cssEditTree.parse(ruleRange.substring(content),{offset:ruleRange.start}))}else rule=content;if(!rule)return null;var ranges=rangesForCSSRule(rule,pos);ranges=ranges.filter(function(item){return!!item.length});return utils.unique(ranges,function(item){return item.valueOf()})}function balanceCSS(editor,direction){var info=editorUtils.outputInfo(editor),content=info.content,sel=range(editor.getSelectionRange()),ranges=getCSSRanges(info.content,sel.start);if(!ranges&&sel.length())try{var rule=cssEditTree.parse(sel.substring(info.content),{offset:sel.start});ranges=getCSSRanges(rule,sel.start)}catch(e){}if(!ranges)return!1;ranges=range.sort(ranges,!0);var bestMatch=utils.find(ranges,function(r){return r.equal(sel)});bestMatch||(bestMatch=utils.find(ranges,function(r){return r._unterminated?r.include(sel.start):r.inside(sel.start)}));if(!bestMatch)return!1;var bestMatchIx=ranges.indexOf(bestMatch);bestMatch.equal(sel)&&(bestMatchIx+="out"==direction?1:-1);if(0>bestMatchIx||bestMatchIx>=ranges.length)if(bestMatchIx>=ranges.length&&"out"==direction){pos=bestMatch.start-1;var outerRanges=getCSSRanges(content,pos);outerRanges&&(bestMatch=last(outerRanges.filter(function(r){return r.inside(pos)})))}else bestMatch=null;else bestMatch=ranges[bestMatchIx];if(bestMatch){editor.createSelection(bestMatch.start,bestMatch.end);return!0}return!1}var htmlMatcher=require("../assets/htmlMatcher"),utils=require("../utils/common"),editorUtils=require("../utils/editor"),actionUtils=require("../utils/action"),range=require("../assets/range"),cssEditTree=require("../editTree/css"),cssSections=require("../utils/cssSections"),lastMatch=null;return{balance:function(editor,direction){direction=String((direction||"out").toLowerCase());var info=editorUtils.outputInfo(editor);return actionUtils.isSupportedCSS(info.syntax)?balanceCSS(editor,direction):balanceHTML(editor,direction)},balanceInwardAction:function(editor){return this.balance(editor,"in")},balanceOutwardAction:function(editor){return this.balance(editor,"out")},goToMatchingPairAction:function(editor){var content=String(editor.getContent()),caretPos=editor.getCaretPos();"<"==content.charAt(caretPos)&&caretPos++;var tag=htmlMatcher.tag(content,caretPos);if(tag&&tag.close){tag.open.range.inside(caretPos)?editor.setCaretPos(tag.close.range.start):editor.setCaretPos(tag.open.range.start);return!0}return!1}}})},{"../assets/htmlMatcher":26,"../assets/range":30,"../editTree/css":37,"../utils/action":70,"../utils/common":73,"../utils/cssSections":74,"../utils/editor":75}],6:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function startsWith(token,text,pos){pos=pos||0;return text.charAt(pos)==token.charAt(0)&&text.substr(pos,token.length)==token}function encodeToBase64(editor,imgPath,pos){var editorFile=editor.getFilePath(),defaultMimeType="application/octet-stream";if(null===editorFile)throw"You should save your file before using this action";var realImgPath=file.locateFile(editorFile,imgPath);if(null===realImgPath)throw"Can't find "+imgPath+" file";file.read(realImgPath,function(err,content){if(err)throw"Unable to read "+realImgPath+": "+err;var b64=base64.encode(String(content));if(!b64)throw"Can't encode file content to base64";b64="data:"+(actionUtils.mimeTypes[String(file.getExt(realImgPath))]||defaultMimeType)+";base64,"+b64;editor.replaceContent("$0"+b64,pos,pos+imgPath.length)});return!0}function decodeFromBase64(editor,data,pos){var filePath=String(editor.prompt("Enter path to file (absolute or relative)"));if(!filePath)return!1;var absPath=file.createPath(editor.getFilePath(),filePath);if(!absPath)throw"Can't save file";file.save(absPath,base64.decode(data.replace(/^data\:.+?;.+?,/,"")));editor.replaceContent("$0"+filePath,pos,pos+data.length);return!0}var file=require("../plugin/file"),base64=require("../utils/base64"),actionUtils=require("../utils/action"),editorUtils=require("../utils/editor");return{encodeDecodeDataUrlAction:function(editor){var data=String(editor.getSelection()),caretPos=editor.getCaretPos(),info=editorUtils.outputInfo(editor);if(!data)for(var m,text=info.content;caretPos-->=0;){if(startsWith("src=",text,caretPos)){if(m=text.substr(caretPos).match(/^(src=(["'])?)([^'"<>\s]+)\1?/)){data=m[3];caretPos+=m[1].length}break}if(startsWith("url(",text,caretPos)){if(m=text.substr(caretPos).match(/^(url\((['"])?)([^'"\)\s]+)\1?/)){data=m[3];caretPos+=m[1].length}break}}return data?startsWith("data:",data)?decodeFromBase64(editor,data,caretPos):encodeToBase64(editor,data,caretPos):!1}}})},{"../plugin/file":63,"../utils/action":70,"../utils/base64":71,"../utils/editor":75}],7:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function findNewEditPoint(editor,inc,offset){function getLine(ix){for(var start=ix;start>=0;){var c=content.charAt(start);if("\n"==c||"\r"==c)break;start--}return content.substring(start,ix)}inc=inc||1;offset=offset||0;for(var curPoint=editor.getCaretPos()+offset,content=String(editor.getContent()),maxLen=content.length,nextPoint=-1,reEmptyLine=/^\s+$/;maxLen>=curPoint&&curPoint>=0;){curPoint+=inc;var curChar=content.charAt(curPoint),nextChar=content.charAt(curPoint+1),prevChar=content.charAt(curPoint-1);switch(curChar){case'"':case"'":nextChar==curChar&&"="==prevChar&&(nextPoint=curPoint+1);break;case">":"<"==nextChar&&(nextPoint=curPoint+1);break;case"\n":case"\r":reEmptyLine.test(getLine(curPoint-1))&&(nextPoint=curPoint)}if(-1!=nextPoint)break}return nextPoint}return{previousEditPointAction:function(editor,syntax,profile){var curPos=editor.getCaretPos(),newPoint=findNewEditPoint(editor,-1);newPoint==curPos&&(newPoint=findNewEditPoint(editor,-1,-2));if(-1!=newPoint){editor.setCaretPos(newPoint);return!0}return!1},nextEditPointAction:function(editor,syntax,profile){var newPoint=findNewEditPoint(editor,1);if(-1!=newPoint){editor.setCaretPos(newPoint);return!0}return!1}}})},{}],8:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var actionUtils=require("../utils/action"),utils=require("../utils/common"),math=require("../utils/math"),range=require("../assets/range");return{evaluateMathAction:function(editor){var content=editor.getContent(),chars=".+-*/\\",sel=range(editor.getSelectionRange());sel.length()||(sel=actionUtils.findExpressionBounds(editor,function(ch){return utils.isNumeric(ch)||-1!=chars.indexOf(ch)}));if(sel&&sel.length()){var expr=sel.substring(content);expr=expr.replace(/([\d\.\-]+)\\([\d\.\-]+)/g,"round($1/$2)");try{var result=utils.prettifyNumber(math.evaluate(expr));editor.replaceContent(result,sel.start,sel.end);editor.setCaretPos(sel.start+result.length);return!0}catch(e){}}return!1}}})},{"../assets/range":30,"../utils/action":70,"../utils/common":73,"../utils/math":76}],9:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function findAbbreviation(editor){var r=range(editor.getSelectionRange()),content=String(editor.getContent());if(r.length())return r.substring(content);var curLine=editor.getCurrentLineRange();return actionUtils.extractAbbreviation(content.substring(curLine.start,r.start))}var handlerList=require("../assets/handlerList"),range=require("../assets/range"),prefs=require("../assets/preferences"),utils=require("../utils/common"),editorUtils=require("../utils/editor"),actionUtils=require("../utils/action"),cssGradient=require("../resolver/cssGradient"),parser=require("../parser/abbreviation"),handlers=handlerList.create();handlers.add(function(editor,syntax,profile){var caretPos=editor.getSelectionRange().end,abbr=findAbbreviation(editor);if(abbr){var content=parser.expand(abbr,{syntax:syntax,profile:profile,contextNode:actionUtils.captureContext(editor)});if(content){var replaceFrom=caretPos-abbr.length,replaceTo=caretPos,cssSyntaxes=prefs.getArray("css.syntaxes");if(cssSyntaxes&&~cssSyntaxes.indexOf(syntax)){var curContent=editor.getContent();";"==curContent.charAt(caretPos)&&";"==content.charAt(content.length-1)&&replaceTo++}editor.replaceContent(content,replaceFrom,replaceTo);return!0}}return!1},{order:-1});handlers.add(cssGradient.expandAbbreviationHandler.bind(cssGradient));return{expandAbbreviationAction:function(editor,syntax,profile){var args=utils.toArray(arguments),info=editorUtils.outputInfo(editor,syntax,profile);args[1]=info.syntax;args[2]=info.profile;return handlers.exec(!1,args)},expandAbbreviationWithTabAction:function(editor,syntax,profile){var sel=editor.getSelection(),indent=" ";if(sel){var selRange=range(editor.getSelectionRange()),content=utils.padString(sel,indent);editor.replaceContent(indent+"${0}",editor.getCaretPos());var replaceRange=range(editor.getCaretPos(),selRange.length());editor.replaceContent(content,replaceRange.start,replaceRange.end,!0);editor.createSelection(replaceRange.start,replaceRange.start+content.length);return!0}this.expandAbbreviationAction(editor,syntax,profile)||editor.replaceContent(indent,editor.getCaretPos());return!0},_defaultHandler:function(editor,syntax,profile){var caretPos=editor.getSelectionRange().end,abbr=this.findAbbreviation(editor);if(abbr){var ctx=actionUtils.captureContext(editor),content=parser.expand(abbr,syntax,profile,ctx);if(content){editor.replaceContent(content,caretPos-abbr.length,caretPos);return!0}}return!1},addHandler:function(fn,options){handlers.add(fn,options)},removeHandler:function(fn){handlers.remove(fn)},findAbbreviation:findAbbreviation}})},{"../assets/handlerList":25,"../assets/preferences":28,"../assets/range":30,"../parser/abbreviation":55,"../resolver/cssGradient":65,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],10:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function intLength(num){num=num.replace(/^\-/,"");return~num.indexOf(".")?num.split(".")[0].length:num.length}var utils=require("../utils/common"),actionUtils=require("../utils/action");return{increment01Action:function(editor){return this.incrementNumber(editor,.1)},increment1Action:function(editor){return this.incrementNumber(editor,1)},increment10Action:function(editor){return this.incrementNumber(editor,10)},decrement01Action:function(editor){return this.incrementNumber(editor,-.1)},decrement1Action:function(editor){return this.incrementNumber(editor,-1)},decrement10Action:function(editor){return this.incrementNumber(editor,-10)},incrementNumber:function(editor,step){var hasSign=!1,hasDecimal=!1,r=actionUtils.findExpressionBounds(editor,function(ch,pos,content){return utils.isNumeric(ch)?!0:"."==ch?utils.isNumeric(content.charAt(pos+1))?hasDecimal?!1:hasDecimal=!0:!1:"-"==ch?hasSign?!1:hasSign=!0:!1});if(r&&r.length()){var strNum=r.substring(String(editor.getContent())),num=parseFloat(strNum);if(!isNaN(num)){num=utils.prettifyNumber(num+step);if(/^(\-?)0+[1-9]/.test(strNum)){var minus="";if(RegExp.$1){minus="-";num=num.substring(1)}var parts=num.split(".");parts[0]=utils.zeroPadString(parts[0],intLength(strNum));num=minus+parts.join(".")}editor.replaceContent(num,r.start,r.end);editor.createSelection(r.start,r.start+num.length);return!0}}return!1}}})},{"../utils/action":70,"../utils/common":73}],11:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var prefs=require("../assets/preferences"),utils=require("../utils/common"),htmlMatcher=(require("../assets/resources"),require("../assets/htmlMatcher")),editorUtils=require("../utils/editor"),xmlSyntaxes=["html","xml","xsl"];prefs.define("css.closeBraceIndentation","\n","Indentation before closing brace of CSS rule. Some users prefere indented closing brace of CSS rule for better readability. This preference’s value will be automatically inserted before closing brace when user adds newline in newly created CSS rule (e.g. when “Insert formatted linebreak” action will be performed in CSS file). If you’re such user, you may want to write put a value like <code>\\n\\t</code> in this preference.");return{insertLineBreakAction:function(editor){if(!this.insertLineBreakOnlyAction(editor)){for(var ch,curPadding=editorUtils.getCurrentLinePadding(editor),content=String(editor.getContent()),caretPos=editor.getCaretPos(),len=content.length,nl="\n",lineRange=editor.getCurrentLineRange(),nextPadding="",i=lineRange.end+1;len>i;i++){ch=content.charAt(i);if(" "!=ch&&" "!=ch)break;nextPadding+=ch}nextPadding.length>curPadding.length?editor.replaceContent(nl+nextPadding,caretPos,caretPos,!0):editor.replaceContent(nl,caretPos)}return!0},insertLineBreakOnlyAction:function(editor){var info=editorUtils.outputInfo(editor),caretPos=editor.getCaretPos(),nl="\n",pad=" ";if(~xmlSyntaxes.indexOf(info.syntax)){var tag=htmlMatcher.tag(info.content,caretPos);if(tag&&!tag.innerRange.length()){editor.replaceContent(nl+pad+utils.getCaretPlaceholder()+nl,caretPos);return!0}}else if("css"==info.syntax){var content=info.content;if(caretPos&&"{"==content.charAt(caretPos-1)){var append=prefs.get("css.closeBraceIndentation"),hasCloseBrace="}"==content.charAt(caretPos);if(!hasCloseBrace)for(var ch,i=caretPos,il=content.length;il>i;i++){ch=content.charAt(i);if("{"==ch)break;if("}"==ch){append="";hasCloseBrace=!0;break}}hasCloseBrace||(append+="}");var insValue=nl+pad+utils.getCaretPlaceholder()+append;editor.replaceContent(insValue,caretPos);return!0}}return!1}}})},{"../assets/htmlMatcher":26,"../assets/preferences":28,"../assets/resources":31,"../utils/common":73,"../utils/editor":75}],12:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function addAction(name,fn,options){name=name.toLowerCase();options=options||{};"string"==typeof options&&(options={label:options});options.label||(options.label=humanizeActionName(name));actions[name]={name:name,fn:fn,options:options}}function humanizeActionName(name){return utils.trim(name.charAt(0).toUpperCase()+name.substring(1).replace(/_[a-z]/g,function(str){return" "+str.charAt(1).toUpperCase()}))}var utils=require("../utils/common"),actions={},actionModules={base64:require("./base64"),editPoints:require("./editPoints"),evaluateMath:require("./evaluateMath"),expandAbbreviation:require("./expandAbbreviation"),incrementDecrement:require("./incrementDecrement"),lineBreaks:require("./lineBreaks"),balance:require("./balance"),mergeLines:require("./mergeLines"),reflectCSSValue:require("./reflectCSSValue"),removeTag:require("./removeTag"),selectItem:require("./selectItem"),selectLine:require("./selectLine"),splitJoinTag:require("./splitJoinTag"),toggleComment:require("./toggleComment"),updateImageSize:require("./updateImageSize"),wrapWithAbbreviation:require("./wrapWithAbbreviation"),updateTag:require("./updateTag")},bind=function(name,method){var m=actionModules[name];return m[method].bind(m)};addAction("encode_decode_data_url",bind("base64","encodeDecodeDataUrlAction"),"Encode\\Decode data:URL image");addAction("prev_edit_point",bind("editPoints","previousEditPointAction"),"Previous Edit Point");addAction("next_edit_point",bind("editPoints","nextEditPointAction"),"Next Edit Point");addAction("evaluate_math_expression",bind("evaluateMath","evaluateMathAction"),"Numbers/Evaluate Math Expression");addAction("expand_abbreviation_with_tab",bind("expandAbbreviation","expandAbbreviationWithTabAction"),{hidden:!0});addAction("expand_abbreviation",bind("expandAbbreviation","expandAbbreviationAction"),"Expand Abbreviation");addAction("insert_formatted_line_break_only",bind("lineBreaks","insertLineBreakOnlyAction"),{hidden:!0});addAction("insert_formatted_line_break",bind("lineBreaks","insertLineBreakAction"),{hidden:!0});addAction("balance_inward",bind("balance","balanceInwardAction"),"Balance (inward)");addAction("balance_outward",bind("balance","balanceOutwardAction"),"Balance (outward)");addAction("matching_pair",bind("balance","goToMatchingPairAction"),"HTML/Go To Matching Tag Pair");addAction("merge_lines",bind("mergeLines","mergeLinesAction"),"Merge Lines");addAction("reflect_css_value",bind("reflectCSSValue","reflectCSSValueAction"),"CSS/Reflect Value");addAction("remove_tag",bind("removeTag","removeTagAction"),"HTML/Remove Tag");addAction("select_next_item",bind("selectItem","selectNextItemAction"),"Select Next Item");addAction("select_previous_item",bind("selectItem","selectPreviousItemAction"),"Select Previous Item");addAction("split_join_tag",bind("splitJoinTag","splitJoinTagAction"),"HTML/Split\\Join Tag Declaration");addAction("toggle_comment",bind("toggleComment","toggleCommentAction"),"Toggle Comment");addAction("update_image_size",bind("updateImageSize","updateImageSizeAction"),"Update Image Size");addAction("wrap_with_abbreviation",bind("wrapWithAbbreviation","wrapWithAbbreviationAction"),"Wrap With Abbreviation");addAction("update_tag",bind("updateTag","updateTagAction"),"HTML/Update Tag");[1,-1,10,-10,.1,-.1].forEach(function(num){var prefix=num>0?"increment":"decrement",suffix=String(Math.abs(num)).replace(".","").substring(0,2),actionId=prefix+"_number_by_"+suffix,actionMethod=prefix+suffix+"Action",actionLabel="Numbers/"+prefix.charAt(0).toUpperCase()+prefix.substring(1)+" number by "+Math.abs(num);addAction(actionId,bind("incrementDecrement",actionMethod),actionLabel)});return{add:addAction,get:function(name){return actions[name.toLowerCase()]},run:function(name,args){Array.isArray(args)||(args=utils.toArray(arguments,1));var action=this.get(name);if(!action)throw new Error('Action "'+name+'" is not defined');return action.fn.apply(action,args)},getAll:function(){return actions},getList:function(){var all=this.getAll();return Object.keys(all).map(function(key){return all[key]})},getMenu:function(skipActions){var result=[];skipActions=skipActions||[];this.getList().forEach(function(action){if(!action.options.hidden&&!~skipActions.indexOf(action.name)){var actionName=humanizeActionName(action.name),ctx=result;if(action.options.label){var parts=action.options.label.split("/");actionName=parts.pop();for(var menuName,submenu;menuName=parts.shift();){submenu=utils.find(ctx,function(item){return"submenu"==item.type&&item.name==menuName});if(!submenu){submenu={name:menuName,type:"submenu",items:[]};ctx.push(submenu)}ctx=submenu.items}}ctx.push({type:"action",name:action.name,label:actionName})}});return result},getActionNameForMenuTitle:function(title,menu){return utils.find(menu||this.getMenu(),function(val){return"action"!=val.type?this.getActionNameForMenuTitle(title,val.items):val.label==title||val.name==title?val.name:void 0},this)}}})},{"../utils/common":73,"./balance":5,"./base64":6,"./editPoints":7,"./evaluateMath":8,"./expandAbbreviation":9,"./incrementDecrement":10,"./lineBreaks":11,"./mergeLines":13,"./reflectCSSValue":14,"./removeTag":15,"./selectItem":16,"./selectLine":17,"./splitJoinTag":18,"./toggleComment":19,"./updateImageSize":20,"./updateTag":21,"./wrapWithAbbreviation":22}],13:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var htmlMatcher=require("../assets/htmlMatcher"),utils=require("../utils/common"),editorUtils=require("../utils/editor"),range=require("../assets/range");return{mergeLinesAction:function(editor){var info=editorUtils.outputInfo(editor),selection=range(editor.getSelectionRange());if(!selection.length()){var pair=htmlMatcher.find(info.content,editor.getCaretPos());pair&&(selection=pair.outerRange)}if(selection.length()){for(var text=selection.substring(info.content),lines=utils.splitByLines(text),i=1;i<lines.length;i++)lines[i]=lines[i].replace(/^\s+/,"");text=lines.join("").replace(/\s{2,}/," ");var textLen=text.length;text=utils.escapeText(text);editor.replaceContent(text,selection.start,selection.end);editor.createSelection(selection.start,selection.start+textLen);return!0}return!1}}})},{"../assets/htmlMatcher":26,"../assets/range":30,"../utils/common":73,"../utils/editor":75}],14:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function doCSSReflection(editor){var outputInfo=editorUtils.outputInfo(editor),caretPos=editor.getCaretPos(),cssRule=cssEditTree.parseFromPosition(outputInfo.content,caretPos);if(cssRule){var property=cssRule.itemFromPosition(caretPos,!0);if(property){var oldRule=cssRule.source,offset=cssRule.options.offset,caretDelta=caretPos-offset-property.range().start;handlers.exec(!1,[property]);return oldRule!==cssRule.source?{data:cssRule.source,start:offset,end:offset+oldRule.length,caret:offset+property.range().start+caretDelta}:void 0}}}function getReflectedCSSName(name){name=cssEditTree.baseName(name);var m,vendorPrefix="^(?:\\-\\w+\\-)?";return"opacity"!=name&&"filter"!=name||!prefs.get("css.reflect.oldIEOpacity")?(m=name.match(/^border-radius-(top|bottom)(left|right)/))?new RegExp(vendorPrefix+"(?:"+name+"|border-"+m[1]+"-"+m[2]+"-radius)$"):(m=name.match(/^border-(top|bottom)-(left|right)-radius/))?new RegExp(vendorPrefix+"(?:"+name+"|border-radius-"+m[1]+m[2]+")$"):new RegExp(vendorPrefix+name+"$"):new RegExp(vendorPrefix+"(?:opacity|filter)$")}function reflectValueParts(name,value){var reVendor=/^\-(\w+)\-/,propPrefix=reVendor.test(name)?RegExp.$1.toLowerCase():"",parts=cssEditTree.findParts(value);parts.reverse();parts.forEach(function(part){var partValue=part.substring(value).replace(reVendor,""),prefixes=cssResolver.vendorPrefixes(partValue);if(prefixes){propPrefix&&~prefixes.indexOf(propPrefix)&&(partValue="-"+propPrefix+"-"+partValue);value=utils.replaceSubstring(value,partValue,part)}});return value}function reflectValue(donor,receiver){var value=getReflectedValue(donor.name(),donor.value(),receiver.name(),receiver.value());value=reflectValueParts(receiver.name(),value);receiver.value(value)}function getReflectedValue(curName,curValue,refName,refValue){curName=cssEditTree.baseName(curName);refName=cssEditTree.baseName(refName);if("opacity"==curName&&"filter"==refName)return refValue.replace(/opacity=[^)]*/i,"opacity="+Math.floor(100*parseFloat(curValue)));if("filter"==curName&&"opacity"==refName){var m=curValue.match(/opacity=([^)]*)/i);return m?utils.prettifyNumber(parseInt(m[1],10)/100):refValue}return curValue}var handlerList=require("../assets/handlerList"),prefs=require("../assets/preferences"),cssResolver=require("../resolver/css"),cssEditTree=require("../editTree/css"),utils=require("../utils/common"),actionUtils=require("../utils/action"),editorUtils=require("../utils/editor"),cssGradient=require("../resolver/cssGradient");prefs.define("css.reflect.oldIEOpacity",!1,"Support IE6/7/8 opacity notation, e.g. <code>filter:alpha(opacity=...)</code>. Note that CSS3 and SVG also provides <code>filter</code> property so this option is disabled by default.");
2
+ var handlers=handlerList.create();module=module||{};module.exports={reflectCSSValueAction:function(editor){return"css"!=editor.getSyntax()?!1:actionUtils.compoundUpdate(editor,doCSSReflection(editor))},_defaultHandler:function(property){var reName=getReflectedCSSName(property.name());property.parent.list().forEach(function(p){reName.test(p.name())&&reflectValue(property,p)})},addHandler:function(fn,options){handlers.add(fn,options)},removeHandler:function(fn){handlers.remove(fn)}};handlers.add(module.exports._defaultHandler.bind(module.exports),{order:-1});handlers.add(cssGradient.reflectValueHandler.bind(cssGradient));return module.exports})},{"../assets/handlerList":25,"../assets/preferences":28,"../editTree/css":37,"../resolver/css":64,"../resolver/cssGradient":65,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],15:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var utils=require("../utils/common"),editorUtils=require("../utils/editor"),htmlMatcher=require("../assets/htmlMatcher");return{removeTagAction:function(editor){var info=editorUtils.outputInfo(editor),tag=htmlMatcher.tag(info.content,editor.getCaretPos());if(tag){if(tag.close){var tagContentRange=utils.narrowToNonSpace(info.content,tag.innerRange),startLineBounds=utils.findNewlineBounds(info.content,tagContentRange.start),startLinePad=utils.getLinePadding(startLineBounds.substring(info.content)),tagContent=tagContentRange.substring(info.content);tagContent=utils.unindentString(tagContent,startLinePad);editor.replaceContent(utils.getCaretPlaceholder()+utils.escapeText(tagContent),tag.outerRange.start,tag.outerRange.end)}else editor.replaceContent(utils.getCaretPlaceholder(),tag.range.start,tag.range.end);return!0}return!1}}})},{"../assets/htmlMatcher":26,"../utils/common":73,"../utils/editor":75}],16:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function findItem(editor,isBackward,extractFn,rangeFn){for(var itemRange,rng,content=editorUtils.outputInfo(editor).content,contentLength=content.length,prevRange=range(-1,0),sel=range(editor.getSelectionRange()),searchPos=sel.start,loop=1e5;searchPos>=0&&contentLength>searchPos&&--loop>0;){if(itemRange=extractFn(content,searchPos,isBackward)){if(prevRange.equal(itemRange))break;prevRange=itemRange.clone();rng=rangeFn(itemRange.substring(content),itemRange.start,sel.clone());if(rng){editor.createSelection(rng.start,rng.end);return!0}searchPos=isBackward?itemRange.start:itemRange.end-1}searchPos+=isBackward?-1:1}return!1}function findNextHTMLItem(editor){var isFirst=!0;return findItem(editor,!1,function(content,searchPos){if(isFirst){isFirst=!1;return findOpeningTagFromPosition(content,searchPos)}return getOpeningTagFromPosition(content,searchPos)},function(tag,offset,selRange){return getRangeForHTMLItem(tag,offset,selRange,!1)})}function findPrevHTMLItem(editor){return findItem(editor,!0,getOpeningTagFromPosition,function(tag,offset,selRange){return getRangeForHTMLItem(tag,offset,selRange,!0)})}function makePossibleRangesHTML(source,tokens,offset){offset=offset||0;var attrValueRange,tagName,result=[],attrStart=-1,attrName="",attrValue="";tokens.forEach(function(tok){switch(tok.type){case"tag":tagName=source.substring(tok.start,tok.end);/^<[\w\:\-]/.test(tagName)&&result.push(range({start:tok.start+1,end:tok.end}));break;case"attribute":attrStart=tok.start;attrName=source.substring(tok.start,tok.end);break;case"string":result.push(range(attrStart,tok.end-attrStart));attrValueRange=range(tok);attrValue=attrValueRange.substring(source);isQuote(attrValue.charAt(0))&&attrValueRange.start++;isQuote(attrValue.charAt(attrValue.length-1))&&attrValueRange.end--;result.push(attrValueRange);"class"==attrName&&(result=result.concat(classNameRanges(attrValueRange.substring(source),attrValueRange.start)))}});result=result.filter(function(item){if(item.length()){item.shift(offset);return!0}});return utils.unique(result,function(item){return item.toString()})}function classNameRanges(className,offset){offset=offset||0;var result=[],stream=stringStream.create(className);stream.eatSpace();stream.start=stream.pos;for(var ch;ch=stream.next();)if(/[\s\u00a0]/.test(ch)){result.push(range(stream.start+offset,stream.pos-stream.start-1));stream.eatSpace();stream.start=stream.pos}result.push(range(stream.start+offset,stream.pos-stream.start));return result}function getRangeForHTMLItem(tag,offset,selRange,isBackward){var ranges=makePossibleRangesHTML(tag,xmlParser.parse(tag),offset);isBackward&&ranges.reverse();var curRange=utils.find(ranges,function(r){return r.equal(selRange)});if(curRange){var ix=ranges.indexOf(curRange);return ix<ranges.length-1?ranges[ix+1]:null}if(isBackward)return utils.find(ranges,function(r){return r.start<selRange.start});if(!curRange){var matchedRanges=ranges.filter(function(r){return r.inside(selRange.end)});if(matchedRanges.length>1)return matchedRanges[1]}return utils.find(ranges,function(r){return r.end>selRange.end})}function findOpeningTagFromPosition(html,pos){for(var tag;pos>=0;){if(tag=getOpeningTagFromPosition(html,pos))return tag;pos--}return null}function getOpeningTagFromPosition(html,pos){var m;return"<"==html.charAt(pos)&&(m=html.substring(pos,html.length).match(startTag))?range(pos,m[0]):void 0}function isQuote(ch){return'"'==ch||"'"==ch}function findInnerRanges(rule){var ranges=[rule.nameRange(!0)],nestedSections=cssSections.nestedSectionsInRule(rule);nestedSections.forEach(function(section){ranges.push(range.create2(section.start,section._selectorEnd))});rule.list().forEach(function(property){ranges=ranges.concat(makePossibleRangesCSS(property))});ranges=range.sort(ranges);ranges=ranges.filter(function(item){return!!item.length()});return utils.unique(ranges,function(item){return item.toString()})}function makePossibleRangesCSS(property){var valueRange=property.valueRange(!0),result=[property.range(!0),valueRange],value=property.value();property.valueParts().forEach(function(r){var clone=r.clone();result.push(clone.shift(valueRange.start));var stream=stringStream.create(r.substring(value));if(stream.match(/^[\w\-]+\(/,!0)){stream.start=stream.pos;stream.backUp(1);stream.skipToPair("(",")");stream.backUp(1);var fnBody=stream.current();result.push(range(clone.start+stream.start,fnBody));cssEditTree.findParts(fnBody).forEach(function(part){result.push(range(clone.start+stream.start+part.start,part.substring(fnBody)))})}});return result}function matchedRangeForCSSProperty(rule,selRange,isBackward){var ranges=findInnerRanges(rule);isBackward&&ranges.reverse();var r=utils.find(ranges,function(item){return item.equal(selRange)});if(r)return ranges[ranges.indexOf(r)+1];var nested=ranges.filter(function(item){return item.inside(selRange.end)});if(nested.length)return nested.sort(function(a,b){return a.length()-b.length()})[0];r=utils.find(ranges,isBackward?function(item){return item.end<selRange.start}:function(item){return item.end>selRange.start});r||(r=ranges[0]);return r}function findNextCSSItem(editor){return findItem(editor,!1,cssSections.locateRule.bind(cssSections),getRangeForNextItemInCSS)}function findPrevCSSItem(editor){return findItem(editor,!0,cssSections.locateRule.bind(cssSections),getRangeForPrevItemInCSS)}function getRangeForNextItemInCSS(rule,offset,selRange){var tree=cssEditTree.parse(rule,{offset:offset});return matchedRangeForCSSProperty(tree,selRange,!1)}function getRangeForPrevItemInCSS(rule,offset,selRange){var tree=cssEditTree.parse(rule,{offset:offset});return matchedRangeForCSSProperty(tree,selRange,!0)}var range=require("../assets/range"),utils=require("../utils/common"),editorUtils=require("../utils/editor"),actionUtils=require("../utils/action"),stringStream=require("../assets/stringStream"),xmlParser=require("../parser/xml"),cssEditTree=require("../editTree/css"),cssSections=require("../utils/cssSections"),startTag=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;return{selectNextItemAction:function(editor){return actionUtils.isSupportedCSS(editor.getSyntax())?findNextCSSItem(editor):findNextHTMLItem(editor)},selectPreviousItemAction:function(editor){return actionUtils.isSupportedCSS(editor.getSyntax())?findPrevCSSItem(editor):findPrevHTMLItem(editor)}}})},{"../assets/range":30,"../assets/stringStream":32,"../editTree/css":37,"../parser/xml":62,"../utils/action":70,"../utils/common":73,"../utils/cssSections":74,"../utils/editor":75}],17:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){return{selectLineAction:function(editor){var range=editor.getCurrentLineRange();editor.createSelection(range.start,range.end);return!0}}})},{}],18:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function joinTag(editor,profile,tag){var slash=profile.selfClosing()||" /",content=tag.open.range.substring(tag.source).replace(/\s*>$/,slash+">"),caretPos=editor.getCaretPos();content.length+tag.outerRange.start<caretPos&&(caretPos=content.length+tag.outerRange.start);content=utils.escapeText(content);editor.replaceContent(content,tag.outerRange.start,tag.outerRange.end);editor.setCaretPos(caretPos);return!0}function splitTag(editor,profile,tag){var caretPos=editor.getCaretPos(),tagContent=profile.tag_nl===!0?"\n \n":"",content=tag.outerContent().replace(/\s*\/>$/,">");caretPos=tag.outerRange.start+content.length;content+=tagContent+"</"+tag.open.name+">";content=utils.escapeText(content);editor.replaceContent(content,tag.outerRange.start,tag.outerRange.end);editor.setCaretPos(caretPos);return!0}var utils=require("../utils/common"),matcher=(require("../assets/resources"),require("../assets/htmlMatcher")),editorUtils=require("../utils/editor"),profile=require("../assets/profile");return{splitJoinTagAction:function(editor,profileName){var info=editorUtils.outputInfo(editor,null,profileName),curProfile=profile.get(info.profile),tag=matcher.tag(info.content,editor.getCaretPos());return tag?tag.close?joinTag(editor,curProfile,tag):splitTag(editor,curProfile,tag):!1}}})},{"../assets/htmlMatcher":26,"../assets/profile":29,"../assets/resources":31,"../utils/common":73,"../utils/editor":75}],19:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function toggleHTMLComment(editor){var r=range(editor.getSelectionRange()),info=editorUtils.outputInfo(editor);if(!r.length()){var tag=htmlMatcher.tag(info.content,editor.getCaretPos());tag&&(r=tag.outerRange)}return genericCommentToggle(editor,"<!--","-->",r)}function toggleCSSComment(editor){var rng=range(editor.getSelectionRange()),info=editorUtils.outputInfo(editor);if(!rng.length()){var rule=cssEditTree.parseFromPosition(info.content,editor.getCaretPos());if(rule){var property=cssItemFromPosition(rule,editor.getCaretPos());rng=property?property.range(!0):range(rule.nameRange(!0).start,rule.source)}}if(!rng.length()){rng=range(editor.getCurrentLineRange());utils.narrowToNonSpace(info.content,rng)}return genericCommentToggle(editor,"/*","*/",rng)}function cssItemFromPosition(rule,absPos){var relPos=absPos-(rule.options.offset||0),reSafeChar=/^[\s\n\r]/;return utils.find(rule.list(),function(item){return item.range().end===relPos?reSafeChar.test(rule.source.charAt(relPos)):item.range().inside(relPos)})}function searchComment(text,from,startToken,endToken){for(var commentStart=-1,commentEnd=-1,hasMatch=function(str,start){return text.substr(start,str.length)==str};from--;)if(hasMatch(startToken,from)){commentStart=from;break}if(-1!=commentStart){from=commentStart;for(var contentLen=text.length;contentLen>=from++;)if(hasMatch(endToken,from)){commentEnd=from+endToken.length;break}}return-1!=commentStart&&-1!=commentEnd?range(commentStart,commentEnd-commentStart):null}function genericCommentToggle(editor,commentStart,commentEnd,range){function removeComment(str){return str.replace(new RegExp("^"+utils.escapeForRegexp(commentStart)+"\\s*"),function(str){caretPos-=str.length;return""}).replace(new RegExp("\\s*"+utils.escapeForRegexp(commentEnd)+"$"),"")}var content=editorUtils.outputInfo(editor).content,caretPos=editor.getCaretPos(),newContent=null,commentRange=searchComment(content,caretPos,commentStart,commentEnd);if(commentRange&&commentRange.overlap(range)){range=commentRange;newContent=removeComment(range.substring(content))}else{newContent=commentStart+" "+range.substring(content).replace(new RegExp(utils.escapeForRegexp(commentStart)+"\\s*|\\s*"+utils.escapeForRegexp(commentEnd),"g"),"")+" "+commentEnd;caretPos+=commentStart.length+1}if(null!==newContent){newContent=utils.escapeText(newContent);editor.setCaretPos(range.start);editor.replaceContent(editorUtils.unindent(editor,newContent),range.start,range.end);editor.setCaretPos(caretPos);return!0}return!1}var prefs=require("../assets/preferences"),range=require("../assets/range"),utils=require("../utils/common"),actionUtils=require("../utils/action"),editorUtils=require("../utils/editor"),htmlMatcher=require("../assets/htmlMatcher"),cssEditTree=require("../editTree/css");return{toggleCommentAction:function(editor){var info=editorUtils.outputInfo(editor);if(actionUtils.isSupportedCSS(info.syntax)){var caretPos=editor.getCaretPos(),tag=htmlMatcher.tag(info.content,caretPos);tag&&tag.open.range.inside(caretPos)&&(info.syntax="html")}var cssSyntaxes=prefs.getArray("css.syntaxes");return~cssSyntaxes.indexOf(info.syntax)?toggleCSSComment(editor):toggleHTMLComment(editor)}}})},{"../assets/htmlMatcher":26,"../assets/preferences":28,"../assets/range":30,"../editTree/css":37,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],20:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function updateImageSizeHTML(editor){var offset=editor.getCaretPos(),info=editorUtils.outputInfo(editor),xmlElem=xmlEditTree.parseFromPosition(info.content,offset,!0);xmlElem&&"img"==(xmlElem.name()||"").toLowerCase()&&getImageSizeForSource(editor,xmlElem.value("src"),function(size){if(size){var compoundData=xmlElem.range(!0);xmlElem.value("width",size.width);xmlElem.value("height",size.height,xmlElem.indexOf("width")+1);actionUtils.compoundUpdate(editor,utils.extend(compoundData,{data:xmlElem.toString(),caret:offset}))}})}function updateImageSizeCSS(editor){var offset=editor.getCaretPos(),info=editorUtils.outputInfo(editor),cssRule=cssEditTree.parseFromPosition(info.content,offset,!0);if(cssRule){var m,prop=cssRule.itemFromPosition(offset,!0);prop&&(m=/url\((["']?)(.+?)\1\)/i.exec(prop.value()||""))&&getImageSizeForSource(editor,m[2],function(size){if(size){var compoundData=cssRule.range(!0);cssRule.value("width",size.width+"px");cssRule.value("height",size.height+"px",cssRule.indexOf("width")+1);actionUtils.compoundUpdate(editor,utils.extend(compoundData,{data:cssRule.toString(),caret:offset}))}})}}function getImageSizeForSource(editor,src,callback){var fileContent;if(src){if(/^data:/.test(src)){fileContent=base64.decode(src.replace(/^data\:.+?;.+?,/,""));return callback(actionUtils.getImageSize(fileContent))}var absPath=file.locateFile(editor.getFilePath(),src);if(null===absPath)throw"Can't find "+src+" file";file.read(absPath,function(err,content){if(err)throw"Unable to read "+absPath+": "+err;content=String(content);callback(actionUtils.getImageSize(content))})}}var utils=require("../utils/common"),editorUtils=require("../utils/editor"),actionUtils=require("../utils/action"),xmlEditTree=require("../editTree/xml"),cssEditTree=require("../editTree/css"),base64=require("../utils/base64"),file=require("../plugin/file");return{updateImageSizeAction:function(editor){actionUtils.isSupportedCSS(editor.getSyntax())?updateImageSizeCSS(editor):updateImageSizeHTML(editor);return!0}}})},{"../editTree/css":37,"../editTree/xml":38,"../plugin/file":63,"../utils/action":70,"../utils/base64":71,"../utils/common":73,"../utils/editor":75}],21:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function updateAttributes(tag,abbrNode,ix){var classNames=(abbrNode.attribute("class")||"").split(/\s+/g);ix&&classNames.push("+"+abbrNode.name());var r=function(str){return utils.replaceCounter(str,abbrNode.counter)};classNames.forEach(function(className){if(className){className=r(className);var ch=className.charAt(0);"+"==ch?tag.addClass(className.substr(1)):"-"==ch?tag.removeClass(className.substr(1)):tag.value("class",className)}});abbrNode.attributeList().forEach(function(attr){if("class"!=attr.name.toLowerCase()){var ch=attr.name.charAt(0);if("+"==ch){var attrName=attr.name.substr(1),tagAttr=tag.get(attrName);tagAttr?tagAttr.value(tagAttr.value()+r(attr.value)):tag.value(attrName,r(attr.value))}else"-"==ch?tag.remove(attr.name.substr(1)):tag.value(attr.name,r(attr.value))}})}var xmlEditTree=require("../editTree/xml"),actionUtils=(require("../utils/editor"),require("../utils/action")),utils=require("../utils/common"),parser=require("../parser/abbreviation");return{updateTagAction:function(editor,abbr){abbr=abbr||editor.prompt("Enter abbreviation");if(!abbr)return!1;var content=editor.getContent(),ctx=actionUtils.captureContext(editor),tag=this.getUpdatedTag(abbr,ctx,content);if(!tag)return!1;tag.name()!=ctx.name&&ctx.match.close&&editor.replaceContent("</"+tag.name()+">",ctx.match.close.range.start,ctx.match.close.range.end,!0);editor.replaceContent(tag.source,ctx.match.open.range.start,ctx.match.open.range.end,!0);return!0},getUpdatedTag:function(abbr,ctx,content,options){if(!ctx)return null;var tree=parser.parse(abbr,options||{}),tag=xmlEditTree.parse(ctx.match.open.range.substring(content),{offset:ctx.match.outerRange.start});tree.children.forEach(function(node,i){updateAttributes(tag,node,i)});var el=tree.children[0];el.data("nameResolved")||tag.name(el.name());return tag}}})},{"../editTree/xml":38,"../parser/abbreviation":55,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],22:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var range=require("../assets/range"),htmlMatcher=require("../assets/htmlMatcher"),utils=require("../utils/common"),editorUtils=require("../utils/editor"),actionUtils=require("../utils/action"),parser=require("../parser/abbreviation");return{wrapWithAbbreviationAction:function(editor,abbr,syntax,profile){var info=editorUtils.outputInfo(editor,syntax,profile);abbr=abbr||editor.prompt("Enter abbreviation");if(!abbr)return null;abbr=String(abbr);var r=range(editor.getSelectionRange());if(!r.length()){var match=htmlMatcher.tag(info.content,r.start);if(!match)return!1;r=utils.narrowToNonSpace(info.content,match.range)}var newContent=utils.escapeText(r.substring(info.content)),result=parser.expand(abbr,{pastedContent:editorUtils.unindent(editor,newContent),syntax:info.syntax,profile:info.profile,contextNode:actionUtils.captureContext(editor)});if(result){editor.replaceContent(result,r.start,r.end);return!0}return!1}}})},{"../assets/htmlMatcher":26,"../assets/range":30,"../parser/abbreviation":55,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],23:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function intersection(arr1,arr2){var result=[],smaller=arr1,larger=arr2;if(smaller.length>larger.length){smaller=arr2;larger=arr1}larger.forEach(function(item){~smaller.indexOf(item)&&result.push(item)});return result}function parseDB(data,optimized){"string"==typeof data&&(data=JSON.parse(data));optimized||(data=optimize(data));vendorsDB=data.vendors;cssDB=data.css;erasDB=data.era}function optimize(data){"string"==typeof data&&(data=JSON.parse(data));return{vendors:parseVendors(data),css:parseCSS(data),era:parseEra(data)}}function parseVendors(data){var out={};Object.keys(data.agents).forEach(function(name){var agent=data.agents[name];out[name]={prefix:agent.prefix,versions:agent.versions}});return out}function parseCSS(data){var out={};data.cats.CSS;Object.keys(data.data).forEach(function(name){var section=data.data[name];name in cssSections&&cssSections[name].forEach(function(kw){out[kw]=section.stats})});return out}function parseEra(data){return Object.keys(data.eras).sort(function(a,b){return parseInt(a.substr(1))-parseInt(b.substr(1))})}function getVendorsList(){var allVendors=Object.keys(vendorsDB),vendors=prefs.getArray("caniuse.vendors");return vendors&&"all"!=vendors[0]?intersection(allVendors,vendors):allVendors}function getVersionSlice(){var era=prefs.get("caniuse.era"),ix=erasDB.indexOf(era);~ix||(ix=erasDB.indexOf("e-2"));return ix}var prefs=require("./preferences"),utils=require("../utils/common");prefs.define("caniuse.enabled",!0,"Enable support of Can I Use database. When enabled, CSS abbreviation resolver will look at Can I Use database first before detecting CSS properties that should be resolved");prefs.define("caniuse.vendors","all","A comma-separated list vendor identifiers (as described in Can I Use database) that should be supported when resolving vendor-prefixed properties. Set value to <code>all</code> to support all available properties");prefs.define("caniuse.era","e-2","Browser era, as defined in Can I Use database. Examples: <code>e0</code> (current version), <code>e1</code> (near future) <code>e-2</code> (2 versions back) and so on.");var cssSections={"border-image":["border-image"],"css-boxshadow":["box-shadow"],"css3-boxsizing":["box-sizing"],multicolumn:["column-width","column-count","columns","column-gap","column-rule-color","column-rule-style","column-rule-width","column-rule","column-span","column-fill"],"border-radius":["border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],transforms2d:["transform"],"css-hyphens":["hyphens"],"css-transitions":["transition","transition-property","transition-duration","transition-timing-function","transition-delay"],"font-feature":["font-feature-settings"],"css-animation":["animation","animation-name","animation-duration","animation-timing-function","animation-iteration-count","animation-direction","animation-play-state","animation-delay","animation-fill-mode","@keyframes"],"css-gradients":["linear-gradient"],"css-masks":["mask-image","mask-source-type","mask-repeat","mask-position","mask-clip","mask-origin","mask-size","mask","mask-type","mask-box-image-source","mask-box-image-slice","mask-box-image-width","mask-box-image-outset","mask-box-image-repeat","mask-box-image","clip-path","clip-rule"],"css-featurequeries":["@supports"],flexbox:["flex","inline-flex","flex-direction","flex-wrap","flex-flow","order","flex"],calc:["calc"],"object-fit":["object-fit","object-position"],"css-grid":["grid","inline-grid","grid-template-rows","grid-template-columns","grid-template-areas","grid-template","grid-auto-rows","grid-auto-columns"," grid-auto-flow","grid-auto-position","grid"," grid-row-start","grid-column-start","grid-row-end","grid-column-end","grid-column","grid-row","grid-area","justify-self","justify-items","align-self","align-items"],"css-repeating-gradients":["repeating-linear-gradient"],"css-filters":["filter"],"user-select-none":["user-select"],"intrinsic-width":["min-content","max-content","fit-content","fill-available"],"css3-tabsize":["tab-size"]},cssDB=null,vendorsDB=null,erasDB=null,db=null;!function(r){if("undefined"==typeof define||!define.amd)try{var fs=r("fs"),path=r("path");db=fs.readFileSync(path.join(__dirname,"../caniuse.json"),{encoding:"utf8"})}catch(e){}}(require);db&&parseDB(db);return{load:parseDB,optimize:optimize,resolvePrefixes:function(property){if(!(prefs.get("caniuse.enabled")&&cssDB&&property in cssDB))return null;var prefixes=[],propStats=cssDB[property],versions=getVersionSlice();getVendorsList().forEach(function(vendor){for(var v,vendorVesions=vendorsDB[vendor].versions.slice(versions),i=0;i<vendorVesions.length;i++){v=vendorVesions[i];if(v&&~propStats[vendor][v].indexOf("x")){prefixes.push(vendorsDB[vendor].prefix);break}}});return utils.unique(prefixes).sort(function(a,b){return b.length-a.length})}}})},{"../utils/common":73,"./preferences":28}],24:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function commonFactory(value){return{data:value}}var factories={},reAttrs=/([@\!]?)([\w\-:]+)\s*=\s*(['"])(.*?)\3/g;module=module||{};module.exports={add:function(name,factory){var that=this;factories[name]=function(){var elem=factory.apply(that,arguments);elem&&(elem.type=name);return elem}},get:function(name){return factories[name]},create:function(name){var args=[].slice.call(arguments,1),factory=this.get(name);return factory?factory.apply(this,args):null},is:function(elem,type){return this.type(elem)===type},type:function(elem){return elem&&elem.type}};module.exports.add("element",function(elementName,attrs,isEmpty){var ret={name:elementName,is_empty:!!isEmpty};if(attrs){ret.attributes=[];if(Array.isArray(attrs))ret.attributes=attrs;else if("string"==typeof attrs)for(var m;m=reAttrs.exec(attrs);)ret.attributes.push({name:m[2],value:m[4],isDefault:"@"==m[1],isImplied:"!"==m[1]});else ret.attributes=Object.keys(attrs).map(function(name){return{name:name,value:attrs[name]}})}return ret});module.exports.add("snippet",commonFactory);module.exports.add("reference",commonFactory);module.exports.add("empty",function(){return{}});return module.exports})},{}],25:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function HandlerList(){this._list=[]}var utils=require("../utils/common");HandlerList.prototype={add:function(fn,options){var order=this._list.length;options&&"order"in options&&(order=1e4*options.order);this._list.push(utils.extend({},options,{order:order,fn:fn}))},remove:function(fn){var item=utils.find(this._list,function(item){return item.fn===fn});item&&this._list.splice(this._list.indexOf(item),1)},list:function(){return this._list.sort(function(a,b){return b.order-a.order})},listFn:function(){return this.list().map(function(item){return item.fn})},exec:function(skipValue,args){args=args||[];var result=null;utils.find(this.list(),function(h){result=h.fn.apply(h,args);return result!==skipValue?!0:void 0});return result}};return{create:function(){return new HandlerList}}})},{"../utils/common":73}],26:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function openTag(i,match){return{name:match[1],selfClose:!!match[3],range:range(i,match[0]),type:"open"}}function closeTag(i,match){return{name:match[1],range:range(i,match[0]),type:"close"}}function comment(i,match){return{range:range(i,"number"==typeof match?match-i:match[0]),type:"comment"}}function createMatcher(text){var m,memo={};return{open:function(i){var m=this.matches(i);return m&&"open"==m.type?m:null},close:function(i){var m=this.matches(i);return m&&"close"==m.type?m:null},matches:function(i){var key="p"+i;if(!(key in memo)){memo[key]=!1;if("<"==text.charAt(i)){var substr=text.slice(i);(m=substr.match(reOpenTag))?memo[key]=openTag(i,m):(m=substr.match(reCloseTag))&&(memo[key]=closeTag(i,m))}}return memo[key]},text:function(){return text},clean:function(){memo=text=m=null}}}function matches(text,pos,pattern){return text.substring(pos,pos+pattern.length)==pattern}function findClosingPair(open,matcher){for(var stack=[],tag=null,text=matcher.text(),pos=open.range.end,len=text.length;len>pos;pos++){if(matches(text,pos,"<!--"))for(var j=pos;len>j;j++)if(matches(text,j,"-->")){pos=j+3;break}if(tag=matcher.matches(pos)){if("open"!=tag.type||tag.selfClose){if("close"==tag.type){if(!stack.length)return tag.name==open.name?tag:null;if(stack[stack.length-1]==tag.name)stack.pop();else{for(var found=!1;stack.length&&!found;){var last=stack.pop();last==tag.name&&(found=!0)}if(!stack.length&&!found)return tag.name==open.name?tag:null}}}else stack.push(tag.name);pos=tag.range.end-1}}}var range=require("./range"),reOpenTag=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,reCloseTag=/^<\/([\w\:\-]+)[^>]*>/;return{find:function(text,pos){for(var j,jl,matcher=createMatcher(text),open=null,close=null,i=pos;i>=0;i--)if(open=matcher.open(i)){if(open.selfClose){if(open.range.cmp(pos,"lt","gt"))break;continue}close=findClosingPair(open,matcher);if(close){var r=range.create2(open.range.start,close.range.end);if(r.contains(pos))break}else if(open.range.contains(pos))break;open=null}else if(matches(text,i,"-->")){for(j=i-1;j>=0&&!matches(text,j,"-->");j--)if(matches(text,j,"<!--")){i=j;break}}else if(matches(text,i,"<!--")){for(j=i+4,jl=text.length;jl>j;j++)if(matches(text,j,"-->")){j+=3;break}open=comment(i,j);break}matcher.clean();if(open){var outerRange=null,innerRange=null;if(close){outerRange=range.create2(open.range.start,close.range.end);innerRange=range.create2(open.range.end,close.range.start)}else outerRange=innerRange=range.create2(open.range.start,open.range.end);if("comment"==open.type){var _c=outerRange.substring(text);innerRange.start+=_c.length-_c.replace(/^<\!--\s*/,"").length;innerRange.end-=_c.length-_c.replace(/\s*-->$/,"").length}return{open:open,close:close,type:"comment"==open.type?"comment":"tag",innerRange:innerRange,innerContent:function(){return this.innerRange.substring(text)},outerRange:outerRange,outerContent:function(){return this.outerRange.substring(text)},range:innerRange.length()&&innerRange.cmp(pos,"lte","gte")?innerRange:outerRange,content:function(){return this.range.substring(text)},source:text}}},tag:function(text,pos){var result=this.find(text,pos);return result&&"tag"==result.type?result:void 0}}})},{"./range":30}],27:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){return{log:function(){"undefined"!=typeof console&&console.log&&console.log.apply(console,arguments)}}})},{}],28:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function toBoolean(val){if("string"==typeof val){val=val.toLowerCase();return"yes"==val||"true"==val||"1"==val}return!!val}function isValueObj(obj){return"object"==typeof obj&&!Array.isArray(obj)&&"value"in obj&&Object.keys(obj).length<3}var utils=require("../utils/common"),preferences={},defaults={},_dbgDefaults=null,_dbgPreferences=null;return{define:function(name,value,description){var prefs=name;if("string"==typeof name){prefs={};prefs[name]={value:value,description:description}}Object.keys(prefs).forEach(function(k){
3
+ var v=prefs[k];defaults[k]=isValueObj(v)?v:{value:v}})},set:function(name,value){var prefs=name;if("string"==typeof name){prefs={};prefs[name]=value}Object.keys(prefs).forEach(function(k){var v=prefs[k];if(!(k in defaults))throw new Error('Property "'+k+'" is not defined. You should define it first with `define` method of current module');if(v!==defaults[k].value){switch(typeof defaults[k].value){case"boolean":v=toBoolean(v);break;case"number":v=parseInt(v+"",10)||0;break;default:null!==v&&(v+="")}preferences[k]=v}else k in preferences&&delete preferences[k]})},get:function(name){return name in preferences?preferences[name]:name in defaults?defaults[name].value:void 0},getArray:function(name){var val=this.get(name);if("undefined"==typeof val||null===val||""===val)return null;val=val.split(",").map(utils.trim);return val.length?val:null},getDict:function(name){var result={};this.getArray(name).forEach(function(val){var parts=val.split(":");result[parts[0]]=parts[1]});return result},description:function(name){return name in defaults?defaults[name].description:void 0},remove:function(name){Array.isArray(name)||(name=[name]);name.forEach(function(key){key in preferences&&delete preferences[key];key in defaults&&delete defaults[key]})},list:function(){return Object.keys(defaults).sort().map(function(key){return{name:key,value:this.get(key),type:typeof defaults[key].value,description:defaults[key].description}},this)},load:function(json){Object.keys(json).forEach(function(key){this.set(key,json[key])},this)},exportModified:function(){return utils.extend({},preferences)},reset:function(){preferences={}},_startTest:function(){_dbgDefaults=defaults;_dbgPreferences=preferences;defaults={};preferences={}},_stopTest:function(){defaults=_dbgDefaults;preferences=_dbgPreferences}}})},{"../utils/common":73}],29:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function OutputProfile(options){utils.extend(this,defaultProfile,options)}function stringCase(str,caseValue){switch(String(caseValue||"").toLowerCase()){case"lower":return str.toLowerCase();case"upper":return str.toUpperCase()}return str}function createProfile(name,options){return profiles[name.toLowerCase()]=new OutputProfile(options)}function createDefaultProfiles(){createProfile("xhtml");createProfile("html",{self_closing_tag:!1,compact_bool:!0});createProfile("xml",{self_closing_tag:!0,tag_nl:!0});createProfile("plain",{tag_nl:!1,indent:!1,place_cursor:!1});createProfile("line",{tag_nl:!1,indent:!1,extraFilters:"s"});createProfile("css",{tag_nl:!0});createProfile("css_line",{tag_nl:!1})}var utils=require("../utils/common"),resources=require("./resources"),prefs=require("./preferences");prefs.define("profile.allowCompactBoolean",!0,'This option can be used to globally disable compact form of boolean attribues (attributes where name and value are equal). With compactform enabled, HTML tags can be outputted as <code>&lt;div contenteditable&gt;</code> instead of <code>&lt;div contenteditable="contenteditable"&gt;</code>');prefs.define("profile.booleanAttributes","^contenteditable|seamless$","A regular expression for attributes that should be boolean by default.If attribute name matches this expression, you don’t have to write dot after attribute name in Emmet abbreviation to mark it as boolean.");var profiles={},defaultProfile={tag_case:"asis",attr_case:"asis",attr_quotes:"double",tag_nl:"decide",tag_nl_leaf:!1,place_cursor:!0,indent:!0,inline_break:3,compact_bool:!1,self_closing_tag:"xhtml",filters:"",extraFilters:""};OutputProfile.prototype={tagName:function(name){return stringCase(name,this.tag_case)},attributeName:function(name){return stringCase(name,this.attr_case)},attributeQuote:function(){return"single"==this.attr_quotes?"'":'"'},selfClosing:function(){return"xhtml"==this.self_closing_tag?" /":this.self_closing_tag===!0?"/":""},cursor:function(){return this.place_cursor?utils.getCaretPlaceholder():""},isBoolean:function(name,value){if(name==value)return!0;var boolAttrs=prefs.get("profile.booleanAttributes");if(!value&&boolAttrs){boolAttrs=new RegExp(boolAttrs,"i");return boolAttrs.test(name)}return!1},allowCompactBoolean:function(){return this.compact_bool&&prefs.get("profile.allowCompactBoolean")}};createDefaultProfiles();return{create:function(name,options){return 2==arguments.length?createProfile(name,options):new OutputProfile(utils.defaults(name||{},defaultProfile))},get:function(name,syntax){if(!name&&syntax){var profile=resources.findItem(syntax,"profile");profile&&(name=profile)}return name?name instanceof OutputProfile?name:"string"==typeof name&&name.toLowerCase()in profiles?profiles[name.toLowerCase()]:this.create(name):profiles.plain},remove:function(name){name=(name||"").toLowerCase();name in profiles&&delete profiles[name]},reset:function(){profiles={};createDefaultProfiles()},stringCase:stringCase}})},{"../utils/common":73,"./preferences":28,"./resources":31}],30:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function cmp(a,b,op){switch(op){case"eq":case"==":return a===b;case"lt":case"<":return b>a;case"lte":case"<=":return b>=a;case"gt":case">":return a>b;case"gte":case">=":return a>=b}}function Range(start,len){if("object"==typeof start&&"start"in start){this.start=Math.min(start.start,start.end);this.end=Math.max(start.start,start.end)}else if(Array.isArray(start)){this.start=start[0];this.end=start[1]}else{len="string"==typeof len?len.length:+len;this.start=start;this.end=start+len}}Range.prototype={length:function(){return Math.abs(this.end-this.start)},equal:function(range){return this.cmp(range,"eq","eq")},shift:function(delta){this.start+=delta;this.end+=delta;return this},overlap:function(range){return range.start<=this.end&&range.end>=this.start},intersection:function(range){if(this.overlap(range)){var start=Math.max(range.start,this.start),end=Math.min(range.end,this.end);return new Range(start,end-start)}return null},union:function(range){if(this.overlap(range)){var start=Math.min(range.start,this.start),end=Math.max(range.end,this.end);return new Range(start,end-start)}return null},inside:function(loc){return this.cmp(loc,"lte","gt")},contains:function(loc){return this.cmp(loc,"lt","gt")},include:function(r){return this.cmp(r,"lte","gte")},cmp:function(loc,left,right){var a,b;if(loc instanceof Range){a=loc.start;b=loc.end}else a=b=loc;return cmp(this.start,a,left||"<=")&&cmp(this.end,b,right||">")},substring:function(str){return this.length()>0?str.substring(this.start,this.end):""},clone:function(){return new Range(this.start,this.length())},toArray:function(){return[this.start,this.end]},toString:function(){return this.valueOf()},valueOf:function(){return"{"+this.start+", "+this.length()+"}"}};module.exports=function(start,len){if("undefined"==typeof start||null===start)return null;if(start instanceof Range)return start;if("object"==typeof start&&"start"in start&&"end"in start){len=start.end-start.start;start=start.start}return new Range(start,len)};module.exports.create=module.exports;module.exports.isRange=function(val){return val instanceof Range};module.exports.create2=function(start,end){"number"==typeof start&&"number"==typeof end&&(end-=start);return this.create(start,end)};module.exports.sort=function(ranges,reverse){ranges=ranges.sort(function(a,b){return a.start===b.start?b.end-a.end:a.start-b.start});reverse&&ranges.reverse();return ranges};return module.exports})},{}],31:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function each(obj,fn){obj&&Object.keys(obj).forEach(function(key){fn(obj[key],key)})}function normalizeCaretPlaceholder(text){return utils.replaceUnescapedSymbol(text,"|",utils.getCaretPlaceholder())}function parseItem(name,value,type){value=normalizeCaretPlaceholder(value);return"snippets"==type?elements.create("snippet",value):"abbreviations"==type?parseAbbreviation(name,value):void 0}function parseAbbreviation(key,value){key=utils.trim(key);var m;return(m=reTag.exec(value))?elements.create("element",m[1],m[2],"/"==m[4]):elements.create("reference",value)}function normalizeName(str){return str.replace(/:$/,"").replace(/:/g,"-")}function expandSnippetsDefinition(snippets){var out={};each(snippets,function(val,key){for(var items=key.split("|"),i=items.length-1;i>=0;i--)out[items[i]]=val});return out}var handlerList=require("./handlerList"),utils=require("../utils/common"),elements=require("./elements"),stringScore=(require("../assets/logger"),require("../vendor/stringScore")),cssResolver=require("../resolver/css"),VOC_SYSTEM="system",VOC_USER="user",cache={},reTag=/^<(\w+\:?[\w\-]*)((?:\s+[@\!]?[\w\:\-]+\s*=\s*(['"]).*?\3)*)\s*(\/?)>/,systemSettings={},userSettings={},resolvers=handlerList.create();utils.extend(exports,{setVocabulary:function(data,type){cache={};var voc={};each(data,function(section,syntax){var _section={};each(section,function(subsection,name){("abbreviations"==name||"snippets"==name)&&(subsection=expandSnippetsDefinition(subsection));_section[name]=subsection});voc[syntax]=_section});type==VOC_SYSTEM?systemSettings=voc:userSettings=voc},getVocabulary:function(name){return name==VOC_SYSTEM?systemSettings:userSettings},getMatchedResource:function(node,syntax){return resolvers.exec(null,utils.toArray(arguments))||this.findSnippet(syntax,node.name())},getVariable:function(name){return(this.getSection("variables")||{})[name]},setVariable:function(name,value){var voc=this.getVocabulary("user")||{};"variables"in voc||(voc.variables={});voc.variables[name]=value;this.setVocabulary(voc,"user")},hasSyntax:function(syntax){return syntax in this.getVocabulary(VOC_USER)||syntax in this.getVocabulary(VOC_SYSTEM)},addResolver:function(fn,options){resolvers.add(fn,options)},removeResolver:function(fn){resolvers.remove(fn)},getSection:function(name){if(!name)return null;name in cache||(cache[name]=utils.deepMerge({},systemSettings[name],userSettings[name]));for(var key,data=cache[name],subsections=utils.toArray(arguments,1);data&&(key=subsections.shift());){if(!(key in data))return null;data=data[key]}return data},findItem:function(topSection,subsection){for(var data=this.getSection(topSection);data;){if(subsection in data)return data[subsection];data=this.getSection(data["extends"])}},findSnippet:function(syntax,name,memo){if(!syntax||!name)return null;memo=memo||[];var names=[name];~name.indexOf("-")&&names.push(name.replace(/\-/g,":"));var data=this.getSection(syntax),matchedItem=null;["snippets","abbreviations"].some(function(sectionName){var data=this.getSection(syntax,sectionName);return data?names.some(function(n){return data[n]?matchedItem=parseItem(n,data[n],sectionName):void 0}):void 0},this);memo.push(syntax);return matchedItem||!data["extends"]||~memo.indexOf(data["extends"])?matchedItem:this.findSnippet(data["extends"],name,memo)},fuzzyFindSnippet:function(syntax,name,minScore){var result=this.fuzzyFindMatches(syntax,name,minScore)[0];return result?result.value.parsedValue:void 0},fuzzyFindMatches:function(syntax,name,minScore){minScore=minScore||.3;name=normalizeName(name);var snippets=this.getAllSnippets(syntax);return Object.keys(snippets).map(function(key){var value=snippets[key];return{key:key,score:stringScore.score(value.nk,name,.1),value:value}}).filter(function(item){return item.score>=minScore}).sort(function(a,b){return a.score-b.score}).reverse()},getAllSnippets:function(syntax){var cacheKey="all-"+syntax;if(!cache[cacheKey]){var stack=[],sectionKey=syntax,memo=[];do{var section=this.getSection(sectionKey);if(!section)break;["snippets","abbreviations"].forEach(function(sectionName){var stackItem={};each(section[sectionName]||null,function(v,k){stackItem[k]={nk:normalizeName(k),value:v,parsedValue:parseItem(k,v,sectionName),type:sectionName}});stack.push(stackItem)});memo.push(sectionKey);sectionKey=section["extends"]}while(sectionKey&&!~memo.indexOf(sectionKey));cache[cacheKey]=utils.extend.apply(utils,stack.reverse())}return cache[cacheKey]},getNewline:function(){var nl=this.getVariable("newline");return"string"==typeof nl?nl:"\n"},setNewline:function(str){this.setVariable("newline",str);this.setVariable("nl",str)}});exports.addResolver(cssResolver.resolve.bind(cssResolver));!function(r){if("undefined"==typeof define||!define.amd)try{var fs=r("fs"),path=r("path"),defaultSnippets=fs.readFileSync(path.join(__dirname,"../snippets.json"),{encoding:"utf8"});exports.setVocabulary(JSON.parse(defaultSnippets),VOC_SYSTEM)}catch(e){}}(require);return exports})},{"../assets/logger":27,"../resolver/css":64,"../utils/common":73,"../vendor/stringScore":79,"./elements":24,"./handlerList":25}],32:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function StringStream(string){this.pos=this.start=0;this.string=string;this._length=string.length}StringStream.prototype={eol:function(){return this.pos>=this._length},sol:function(){return 0===this.pos},peek:function(){return this.string.charAt(this.pos)},next:function(){return this.pos<this._length?this.string.charAt(this.pos++):void 0},eat:function(match){var ok,ch=this.string.charAt(this.pos);ok="string"==typeof match?ch==match:ch&&(match.test?match.test(ch):match(ch));if(ok){++this.pos;return ch}},eatWhile:function(match){for(var start=this.pos;this.eat(match););return this.pos>start},eatSpace:function(){for(var start=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>start},skipToEnd:function(){this.pos=this._length},skipTo:function(ch){var found=this.string.indexOf(ch,this.pos);if(found>-1){this.pos=found;return!0}},skipToPair:function(open,close,skipString){for(var ch,braceCount=0,pos=this.pos,len=this._length;len>pos;){ch=this.string.charAt(pos++);if(ch==open)braceCount++;else if(ch==close){braceCount--;if(1>braceCount){this.pos=pos;return!0}}else!skipString||'"'!=ch&&"'"!=ch||this.skipString(ch)}return!1},skipQuoted:function(noBackup){var ch=this.string.charAt(noBackup?this.pos:this.pos-1);if('"'===ch||"'"===ch){noBackup&&this.pos++;return this.skipString(ch)}},skipString:function(quote){for(var ch,pos=this.pos,len=this._length;len>pos;){ch=this.string.charAt(pos++);if("\\"!=ch&&ch==quote){this.pos=pos;return!0}}return!1},backUp:function(n){this.pos-=n},match:function(pattern,consume,caseInsensitive){if("string"!=typeof pattern){var match=this.string.slice(this.pos).match(pattern);match&&consume!==!1&&(this.pos+=match[0].length);return match}var cased=caseInsensitive?function(str){return str.toLowerCase()}:function(str){return str};if(cased(this.string).indexOf(cased(pattern),this.pos)==this.pos){consume!==!1&&(this.pos+=pattern.length);return!0}},current:function(backUp){return this.string.slice(this.start,this.pos-(backUp?1:0))}};module.exports=function(string){return new StringStream(string)};module.exports.create=module.exports;return module.exports})},{}],33:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var utils=require("../utils/common"),stringStream=require("./stringStream"),resources=require("./resources"),startPlaceholderNum=100,tabstopIndex=0,defaultOptions={replaceCarets:!1,escape:function(ch){return"\\"+ch},tabstop:function(data){return data.token},variable:function(data){return data.token}};return{extract:function(text,options){var placeholders={carets:""},marks=[];options=utils.extend({},defaultOptions,options,{tabstop:function(data){var token=data.token,ret="";if("cursor"==data.placeholder)marks.push({start:data.start,end:data.start+token.length,group:"carets",value:""});else{"placeholder"in data&&(placeholders[data.group]=data.placeholder);data.group in placeholders&&(ret=placeholders[data.group]);marks.push({start:data.start,end:data.start+token.length,group:data.group,value:ret})}return token}});options.replaceCarets&&(text=text.replace(new RegExp(utils.escapeForRegexp(utils.getCaretPlaceholder()),"g"),"${0:cursor}"));text=this.processText(text,options);var buf="",lastIx=0,tabStops=marks.map(function(mark){buf+=text.substring(lastIx,mark.start);var pos=buf.length,ph=placeholders[mark.group]||"";buf+=ph;lastIx=mark.end;return{group:mark.group,start:pos,end:pos+ph.length}});buf+=text.substring(lastIx);return{text:buf,tabstops:tabStops.sort(function(a,b){return a.start-b.start})}},processText:function(text,options){options=utils.extend({},defaultOptions,options);for(var ch,m,a,buf="",stream=stringStream.create(text);ch=stream.next();)if("\\"!=ch||stream.eol()){a=ch;if("$"==ch){stream.start=stream.pos-1;if(m=stream.match(/^[0-9]+/))a=options.tabstop({start:buf.length,group:stream.current().substr(1),token:stream.current()});else if(m=stream.match(/^\{([a-z_\-][\w\-]*)\}/))a=options.variable({start:buf.length,name:m[1],token:stream.current()});else if(m=stream.match(/^\{([0-9]+)(:.+?)?\}/,!1)){stream.skipToPair("{","}");var obj={start:buf.length,group:m[1],token:stream.current()},placeholder=obj.token.substring(obj.group.length+2,obj.token.length-1);placeholder&&(obj.placeholder=placeholder.substr(1));a=options.tabstop(obj)}}buf+=a}else buf+=options.escape(stream.next());return buf},upgrade:function(node,offset){var maxNum=0,options={tabstop:function(data){var group=parseInt(data.group,10);group>maxNum&&(maxNum=group);return data.placeholder?"${"+(group+offset)+":"+data.placeholder+"}":"${"+(group+offset)+"}"}};["start","end","content"].forEach(function(p){node[p]=this.processText(node[p],options)},this);return maxNum},variablesResolver:function(node){var placeholderMemo={};return function(str,varName){if("child"==varName)return str;if("cursor"==varName)return utils.getCaretPlaceholder();var attr=node.attribute(varName);if("undefined"!=typeof attr&&attr!==str)return attr;var varValue=resources.getVariable(varName);if(varValue)return varValue;placeholderMemo[varName]||(placeholderMemo[varName]=startPlaceholderNum++);return"${"+placeholderMemo[varName]+":"+varName+"}"}},replaceVariables:function(str,vars){vars=vars||{};var resolver="function"==typeof vars?vars:function(str,p1){return p1 in vars?vars[p1]:null};return this.processText(str,{variable:function(data){var newValue=resolver(data.token,data.name,data);null===newValue&&(newValue=resources.getVariable(data.name));(null===newValue||"undefined"==typeof newValue)&&(newValue=data.token);return newValue}})},resetTabstopIndex:function(){tabstopIndex=0;startPlaceholderNum=100},abbrOutputProcessor:function(text,node,type){var maxNum=0,that=this,tsOptions={tabstop:function(data){var group=parseInt(data.group,10);if(0===group)return"${0}";group>maxNum&&(maxNum=group);if(data.placeholder){var ix=group+tabstopIndex,placeholder=that.processText(data.placeholder,tsOptions);return"${"+ix+":"+placeholder+"}"}return"${"+(group+tabstopIndex)+"}"}};text=this.processText(text,tsOptions);text=this.replaceVariables(text,this.variablesResolver(node));tabstopIndex+=maxNum+1;return text}}})},{"../utils/common":73,"./resources":31,"./stringStream":32}],34:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function TokenIterator(tokens){this.tokens=tokens;this._position=0;this.reset()}TokenIterator.prototype={next:function(){if(this.hasNext()){var token=this.tokens[++this._i];this._position=token.start;return token}this._i=this._il;return null},current:function(){return this.tokens[this._i]},peek:function(){return this.tokens[this._i+i]},position:function(){return this._position},hasNext:function(){return this._i<this._il-1},reset:function(){this._i=0;this._il=this.tokens.length},item:function(){return this.tokens[this._i]},itemNext:function(){return this.tokens[this._i+1]},itemPrev:function(){return this.tokens[this._i-1]},nextUntil:function(type,callback){for(var token,test="string"==typeof type?function(t){return t.type==type}:type;token=this.next();){callback&&callback.call(this,token);if(test.call(this,token))break}}};return{create:function(tokens){return new TokenIterator(tokens)}}})},{}],35:[function(require,module,exports){module.exports={eras:{"e-26":"26 versions back","e-25":"25 versions back","e-24":"24 versions back","e-23":"23 versions back","e-22":"22 versions back","e-21":"21 versions back","e-20":"20 versions back","e-19":"19 versions back","e-18":"18 versions back","e-17":"17 versions back","e-16":"16 versions back","e-15":"15 versions back","e-14":"14 versions back","e-13":"13 versions back","e-12":"12 versions back","e-11":"11 versions back","e-10":"10 versions back","e-9":"9 versions back","e-8":"8 versions back","e-7":"7 versions back","e-6":"6 versions back","e-5":"5 versions back","e-4":"4 versions back","e-3":"3 versions back","e-2":"2 versions back","e-1":"Previous version",e0:"Current",e1:"Near future",e2:"Farther future"},agents:{ie:{browser:"IE",abbr:"IE",prefix:"ms",type:"desktop",usage_global:{10:10.7866,11:.114751,5.5:.009298,6:.204912,7:.508182,8:8.31124,9:5.21297},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.5","6","7","8","9","10","11",null,null],current_version:""},firefox:{browser:"Firefox",abbr:"FF",prefix:"moz",type:"desktop",usage_global:{10:.112406,11:.088319,12:.208754,13:.096348,14:.096348,15:.136493,16:.264957,17:.192696,18:.112406,19:.128464,2:.016058,20:.16058,21:.216783,22:.256928,23:.907277,24:11.0318,25:.529914,26:.016058,27:.016058,3:.088319,3.5:.040145,3.6:.305102,4:.072261,5:.048174,6:.048174,7:.040145,8:.072261,9:.056203},versions:[null,"2","3","3.5","3.6","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27"],current_version:""},chrome:{browser:"Chrome",abbr:"Chr.",prefix:"webkit",type:"desktop",usage_global:{10:.048174,11:.112406,12:.064232,13:.056203,14:.056203,15:.072261,16:.048174,17:.040145,18:.08029,19:.040145,20:.040145,21:.48174,22:.248899,23:.216783,24:.200725,25:.361305,26:.353276,27:.369334,28:.610204,29:5.08236,30:24.6089,31:.16058,32:.064232,4:.024087,5:.024087,6:.032116,7:.024087,8:.032116,9:.024087},versions:["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32"],current_version:""},safari:{browser:"Safari",abbr:"Saf.",prefix:"webkit",type:"desktop",usage_global:{3.1:0,3.2:.008692,4:.104377,5:.305102,5.1:1.28464,6:2.04739,6.1:.064232,7:.16058},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.1","3.2","4","5","5.1","6","6.1","7",null,null],current_version:""},opera:{browser:"Opera",abbr:"Op.",prefix:"o",type:"desktop",usage_global:{"10.0-10.1":.016058,10.5:.008392,10.6:.008029,11:.008219,11.1:.008219,11.5:.016058,11.6:.032116,12:.040145,12.1:.48174,15:.032116,16:.104377,17:.16058,18:0,"9.5-9.6":.008219},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"9.5-9.6","10.0-10.1","10.5","10.6","11","11.1","11.5","11.6","12","12.1","15","16","17","18",null],current_version:"",prefix_exceptions:{15:"webkit",16:"webkit",17:"webkit",18:"webkit"}},ios_saf:{browser:"iOS Safari",abbr:"iOS",prefix:"webkit",type:"mobile",usage_global:{3.2:.00400113,"4.0-4.1":.00800226,"4.2-4.3":.0280079,"5.0-5.1":.28408,"6.0-6.1":1.15633,"7.0":2.52071},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.2","4.0-4.1","4.2-4.3","5.0-5.1","6.0-6.1","7.0",null,null],current_version:""},op_mini:{browser:"Opera Mini",abbr:"O.Mini",prefix:"o",type:"mobile",usage_global:{"5.0-7.0":4.58374},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.0-7.0",null,null],current_version:""},android:{browser:"Android Browser",abbr:"And.",prefix:"webkit",type:"mobile",usage_global:{2.1:.0251229,2.2:.0854178,2.3:1.32146,3:.00502458,4:.994867,4.1:1.87417,"4.2-4.3":.743638,4.4:0},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"2.1","2.2","2.3","3","4","4.1","4.2-4.3","4.4",null],current_version:""},op_mob:{browser:"Opera Mobile",abbr:"O.Mob",prefix:"o",type:"mobile",usage_global:{0:0,10:0,11.5:.00726525,12:.0363263,12.1:.101714},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10",null,null,"11.5","12","12.1","0",null,null],current_version:"16",prefix_exceptions:{0:"webkit"}},bb:{browser:"Blackberry Browser",abbr:"BB",prefix:"webkit",type:"mobile",usage_global:{10:0,7:.141419},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"7","10",null,null],current_version:""},and_chr:{browser:"Chrome for Android",abbr:"Chr/And.",prefix:"webkit",type:"mobile",usage_global:{0:1.38176},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"0",null,null],current_version:"30"},and_ff:{browser:"Firefox for Android",abbr:"FF/And.",prefix:"moz",type:"mobile",usage_global:{0:.070956},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"0",null,null],current_version:"25"},ie_mob:{browser:"IE Mobile",abbr:"IE.Mob",prefix:"ms",type:"mobile",usage_global:{10:.205595},versions:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10",null,null],current_version:""}},statuses:{rec:"Recommendation",pr:"Proposed Recommendation",cr:"Candidate Recommendation",wd:"Working Draft",other:"Other",unoff:"Unofficial / Note"},cats:{CSS:["CSS","CSS2","CSS3"],HTML5:["Canvas","HTML5"],"JS API":["JS API"],Other:["PNG","Other","DOM"],SVG:["SVG"]},updated:1383587152,data:{"png-alpha":{title:"PNG alpha transparency",description:"Semi-transparent areas in PNG files",spec:"http://www.w3.org/TR/PNG/",status:"rec",links:[{url:"http://dillerdesign.com/experiment/DD_belatedPNG/",title:"Workaround for IE6"},{url:"http://en.wikipedia.org/wiki/Portable_Network_Graphics",title:"Wikipedia"}],categories:["PNG"],stats:{ie:{5.5:"n",6:"p",7:"y",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"IE6 does support full transparency in 8-bit PNGs, which can sometimes be an alternative to 24-bit PNGs.",usage_perc_y:94.36,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},apng:{title:"Animated PNG (APNG)",description:"Like animated GIFs, but allowing 24-bit colors and alpha transparency",spec:"https://wiki.mozilla.org/APNG_Specification",status:"unoff",links:[{url:"http://en.wikipedia.org/wiki/APNG",title:"Wikipedia"},{url:"https://github.com/davidmz/apng-canvas",title:"Polyfill using canvas"},{url:"https://chrome.google.com/webstore/detail/ehkepjiconegkhpodgoaeamnpckdbblp",title:"Chrome extension providing support"},{url:"http://www.truekolor.net/learn-how-to-create-an-animated-png/",title:"APNG tutorial"}],categories:["PNG"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"n",32:"n"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"n"},and_chr:{0:"n"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"Where support for APNG is missing, only the first frame is displayed",usage_perc_y:16.19,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},video:{title:"Video element",description:"Method of playing videos on webpages (without requiring a plug-in)",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#video",status:"wd",links:[{url:"https://raw.github.com/phiggins42/has.js/master/detect/video.js#video",title:"has.js test"},{url:"http://webmproject.org",title:"WebM format information"},{url:"http://docs.webplatform.org/wiki/html/elements/video",title:"WebPlatform Docs"},{url:"http://camendesign.co.uk/code/video_for_everybody",title:"Video for Everybody"},{url:"http://diveinto.org/html5/video.html",title:"Video on the Web - includes info on Android support"},{url:"http://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/",title:"Detailed article on video/audio elements"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a",2.2:"a",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Different browsers have support for different video formats, see sub-features for details. \r\n\r\nThe Android browser (before 2.3) requires <a href="http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/">specific handling</a> to run the video element.',usage_perc_y:80.71,usage_perc_a:.11,ucprefix:!1,parent:"",keywords:"<video>"},audio:{title:"Audio element",description:"Method of playing sound on webpages (without requiring a plug-in)",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#audio",
4
+ status:"wd",links:[{url:"http://html5doctor.com/native-audio-in-the-browser/",title:"HTML5 Doctor article"},{url:"http://textopia.org/androidsoundformats.html",title:"File format test page"},{url:"http://www.jplayer.org/latest/demos/",title:"Demos of audio player that uses &lt;audio>"},{url:"http://www.phoboslab.org/log/2011/03/the-state-of-html5-audio",title:"The State of HTML5 Audio"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/audio.js#audio",title:"has.js test"},{url:"http://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/",title:"Detailed article on video/audio elements"},{url:"http://docs.webplatform.org/wiki/html/elements/audio",title:"WebPlatform Docs"},{url:"http://24ways.org/2010/the-state-of-html5-audio",title:"Detailed article on support"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"a","10.0-10.1":"a",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:80.7,usage_perc_a:.02,ucprefix:!1,parent:"",keywords:""},contenteditable:{title:"contenteditable attribute (basic support)",description:"Method of making any HTML element editable",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable",status:"wd",links:[{url:"http://accessgarage.wordpress.com/2009/05/08/how-to-hack-your-app-to-make-contenteditable-work/",title:"Blog post on usage problems"},{url:"http://html5demos.com/contenteditable",title:"Demo page"},{url:"http://blog.whatwg.org/the-road-to-html-5-contenteditable",title:"WHATWG blog post"},{url:"http://docs.webplatform.org/wiki/html/attributes/contentEditable",title:"WebPlatform Docs"}],categories:["HTML5"],stats:{ie:{5.5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"a",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"This support only refers to very basic editing capability, implementations vary significantly on how certain elements can be edited.",usage_perc_y:88.37,usage_perc_a:.09,ucprefix:!1,parent:"",keywords:""},dragndrop:{title:"Drag and Drop",description:"Method of easily dragging and dropping elements on a page, requiring minimal JavaScript.",spec:"http://www.w3.org/TR/html5/editing.html#dnd",status:"wd",links:[{url:"http://html5demos.com/drag",title:"Demo with link blocks"},{url:"http://html5doctor.com/native-drag-and-drop/",title:"HTML5 Doctor article"},{url:"http://docs.webplatform.org/wiki/dom/events/drag",title:"WebPlatform Docs"},{url:"http://nettutsplus.s3.amazonaws.com/64_html5dragdrop/demo/index.html",title:"Shopping cart demo"}],categories:["HTML5"],stats:{ie:{5.5:"a",6:"a",7:"a",8:"a",9:"a",10:"y",11:"y"},firefox:{2:"p",3:"p",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"p","9.5-9.6":"p","10.0-10.1":"p",10.5:"p",10.6:"p",11:"p",11.1:"p",11.5:"p",11.6:"p",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"p",11:"p",11.1:"p",11.5:"p",12:"p",12.1:"y",0:"n"},and_chr:{0:"n"},and_ff:{0:"n"},ie_mob:{10:"y"}},notes:"Partial support in older IE refers to no support for the dataTransfer.files or .types objects and limited supported formats for dataTransfer.setData/getData.",usage_perc_y:64.83,usage_perc_a:14.25,ucprefix:!1,parent:"",keywords:"draganddrop"},queryselector:{title:"querySelector/querySelectorAll",description:"Method of accessing DOM elements using CSS selectors",spec:"http://www.w3.org/TR/selectors-api/",status:"rec",links:[{url:"http://docs.webplatform.org/wiki/css/selectors_api/querySelector",title:"WebPlatform Docs"},{url:"http://cjihrig.com/blog/javascripts-selectors-api/",title:"Blog post"},{url:"https://developer.mozilla.org/En/DOM/Element.querySelectorAll",title:"MDN article on querySelectorAll"},{url:"https://developer.mozilla.org/en/DOM/element.querySelector",title:"MDN article on querySelector"}],categories:["DOM"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"p",3:"p",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"p","9.5-9.6":"p","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Only works for the CSS selectors available. Thus the IE8 implementation is limited to the CSS 2.1 selectors",usage_perc_y:93.74,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"query,selectors,selectors api"},getelementsbyclassname:{title:"getElementsByClassName",description:"Method of accessing DOM elements by class name",spec:"http://www.w3.org/TR/dom/#dom-document-getelementsbyclassname",status:"wd",links:[{url:"http://www.quirksmode.org/dom/tests/basics.html#getElementsByClassName",title:"Test page"},{url:"http://docs.webplatform.org/wiki/dom/methods/getElementsByClassName",title:"WebPlatform Docs"}],categories:["DOM","HTML5"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y"},firefox:{2:"p",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:85.52,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"byclassname"},forms:{title:"HTML5 form features",description:'Expanded form options, including things like date pickers, sliders, validation, placeholders and multiple file uploads. Previously known as "Web forms 2.0".',spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html",status:"wd",links:[{url:"https://github.com/westonruter/webforms2",title:"Cross-browser JS implementation (based on original spec)"},{url:"http://www.miketaylr.com/code/input-type-attr.html",title:"HTML5 inputs and attribute support page"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"p",10:"a",11:"a"},firefox:{2:"p",3:"p",3.5:"p",3.6:"p",4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a"},chrome:{4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a",28:"a",29:"a",30:"a",31:"a",32:"a"},safari:{3.1:"p",3.2:"p",4:"a",5:"a",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"a",16:"a",17:"a",18:"a"},ios_saf:{3.2:"n","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"a"},bb:{7:"n",10:"a"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"a"},and_chr:{0:"a"},and_ff:{0:"a"},ie_mob:{10:"a"}},notes:"",usage_perc_y:4.75,usage_perc_a:65.35,ucprefix:!1,parent:"",keywords:"input,datepicker"},html5semantic:{title:"New semantic elements",description:"HTML5 offers some new elements, primarily for semantic purposes. The elements include: section, article, aside, header, footer, nav, figure, figcaption, time, mark.",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#sections",status:"wd",links:[{url:"http://oli.jp/2009/html5-structure3/",title:"Article on structural elements"},{url:"http://blog.whatwg.org/supporting-new-elements-in-ie",title:"Workaround for IE"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/dom.js#dom-html5-elements",title:"has.js test"},{url:"http://blog.whatwg.org/styling-ie-noscript",title:"Alternate workaround"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"a",3.5:"a",3.6:"a",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"a",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a",3.2:"a",4:"a",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"a","9.5-9.6":"a","10.0-10.1":"a",10.5:"a",10.6:"a",11:"a",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"a"},android:{2.1:"a",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"a",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support refers to missing the default styling. This is easily taken care of by using display:block for all new elements (except time and mark, these should be display:inline anyway).",usage_perc_y:80.26,usage_perc_a:5.26,ucprefix:!1,parent:"",keywords:""},"offline-apps":{title:"Offline web applications",description:"Method of defining web page files to be cached using a cache manifest file, allowing them to work offline on subsequent visits to the page",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html",status:"wd",links:[{url:"http://www.sitepoint.com/offline-web-application-tutorial/",title:"Sitepoint tutorial"},{url:"http://diveinto.org/html5/offline.html",title:"Dive Into HTML5 article"},{url:"http://docs.webplatform.org/wiki/apis/appcache/ApplicationCache",title:"WebPlatform Docs"},{url:"http://hacks.mozilla.org/2010/01/offline-web-applications/",title:"Mozilla Hacks article/demo"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"n",10:"y",11:"y"},firefox:{2:"p",3:"a",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"p",10.5:"p",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:75.59,usage_perc_a:.09,ucprefix:!1,parent:"",keywords:"appcache,app cache,application cache,online"},webworkers:{title:"Web Workers",description:"Method of running scripts in the background, isolated from the web page",spec:"http://www.w3.org/TR/workers/",status:"cr",links:[{url:"http://code.google.com/p/ie-web-worker/",title:"Polyfill for IE (single threaded)"},{url:"http://net.tutsplus.com/tutorials/javascript-ajax/getting-started-with-web-workers/",title:"Tutorial"},{url:"https://developer.mozilla.org/En/Using_web_workers",title:"MDN article"},{url:"http://nerget.com/rayjs-mt/rayjs.html",title:"Web Worker demo"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"p",10:"y",11:"y"},firefox:{2:"p",3:"p",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"p",10.5:"p",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"p",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:70.53,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},fontface:{title:"@font-face Web fonts",description:"Method of displaying fonts downloaded from websites",spec:"http://www.w3.org/TR/css3-webfonts/",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/atrules/@font-face",title:"WebPlatform Docs"},{url:"http://www.css3files.com/font/",title:"Information page"},{url:"http://webfonts.info",title:"News and information site"},{url:"http://en.wikipedia.org/wiki/Web_typography",title:"Wikipedia"}],categories:["CSS3"],stats:{ie:{5.5:"a",6:"a",7:"a",8:"a",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"a",2.3:"a",3:"a",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"a",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support before IE8 refers to only supporting EOT fonts. Safari for iOS 4.1 and below only supports SVG fonts.",usage_perc_y:79.25,usage_perc_a:10.6,ucprefix:!1,parent:"",keywords:"font face"},eot:{title:"EOT - Embedded OpenType fonts",description:"Type of font that can be derived from a regular font, allowing small files and legal use of high-quality fonts. Usage is restricted by the file being tied to the website",spec:"http://www.w3.org/Submission/EOT/",status:"unoff",links:[{url:"http://www.microsoft.com/typography/web/embedding/default.aspx",title:"Example pages"},{url:"http://en.wikipedia.org/wiki/Embedded_OpenType",title:"Wikipedia"}],categories:["Other"],stats:{ie:{5.5:"n",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"n",32:"n"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"n"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"Proposal by Microsoft, being considered for W3C standardization.",usage_perc_y:25.14,usage_perc_a:0,ucprefix:!1,parent:"fontface",keywords:""},woff:{title:"WOFF - Web Open Font Format",description:"Compressed TrueType/OpenType font that contains information about the font's source.",spec:"http://www.w3.org/TR/WOFF/",status:"rec",links:[{url:"http://hacks.mozilla.org/2009/10/woff/",title:"Mozilla hacks blog post"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Reported to be supported in some modified versions of the Android 4.0 browser.",usage_perc_y:75.23,usage_perc_a:0,ucprefix:!1,parent:"fontface",keywords:""},multibackgrounds:{title:"CSS3 Multiple backgrounds",description:"Method of using multiple images as a background",spec:"http://www.w3.org/TR/css3-background/",status:"cr",links:[{url:"http://www.css3.info/preview/multiple-backgrounds/",title:"Demo & information page"},{url:"http://www.css3files.com/background/",title:"Information page"},{url:"http://docs.webplatform.org/wiki/css/properties/background-image",title:"WebPlatform Docs"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:85.37,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},"border-image":{title:"CSS3 Border images",description:"Method of using images for borders",spec:"http://www.w3.org/TR/css3-background/#the-border-image",status:"cr",links:[{url:"http://www.css3files.com/border/",title:"Information page"},{url:"http://docs.webplatform.org/wiki/css/properties/border-image",title:"WebPlatform Docs"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"y"},firefox:{2:"n",3:"n",3.5:"a x",3.6:"a x",4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"y x",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a x",3.2:"a x",4:"a x",5:"a x",5.1:"a x",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"a",10.6:"a",11:"a x",11.1:"a x",11.5:"a x",11.6:"a x",12:"a x",12.1:"a x",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a x","4.0-4.1":"a x","4.2-4.3":"a x","5.0-5.1":"a x","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a x",2.2:"a x",2.3:"a x",3:"a x",4:"a x",4.1:"a x","4.2-4.3":"a x",4.4:"y"},bb:{7:"a x",10:"y"},op_mob:{10:"n",11:"a x",11.1:"a x",11.5:"a x",12:"a x",12.1:"a x",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"In Firefox both the border-style and border-width must be specified for border-images to work. Partial support refers to supporting the shorthand syntax, but not the individual properties (border-image-source, border-image-slice, etc).",usage_perc_y:54.86,usage_perc_a:9.76,ucprefix:!1,parent:"",keywords:""},"background-img-opts":{title:"CSS3 Background-image options",description:"New properties to affect background images, including background-clip, background-origin and background-size",spec:"http://www.w3.org/TR/css3-background/#backgrounds",status:"cr",links:[{url:"https://github.com/louisremi/background-size-polyfill",title:"Polyfill for IE7-8"},{url:"http://www.standardista.com/css3/css3-background-properties",title:"Detailed compatibility tables and demos"},{url:"http://www.css3files.com/background/",title:"Information page"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"a x",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a",3.2:"a",4:"a",5:"y",5.1:"y",6:"a",6.1:"a",7:"a"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"a x",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"a"},android:{2.1:"a x",2.2:"y x",2.3:"y x",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support in Opera Mini refers to not supporting background sizing or background attachments. Partial support in Safari 6 refers to not supporting background sizing offset from edges syntax.",usage_perc_y:78.07,usage_perc_a:7.32,ucprefix:!1,parent:"",keywords:""},"css-table":{title:"CSS Table display",description:"Method of displaying elements as tables, rows, and cells",spec:"http://www.w3.org/TR/CSS21/tables.html",status:"rec",links:[{url:"http://blog.12spokes.com/web-design-development/when-to-choose-between-the-html-table-element-and-css-displaytable-property/",title:"Deciding on HTML or CSS tables"},{url:"http://www.onenaught.com/posts/201/use-css-displaytable-for-layout",title:"Blog post on usage"}],categories:["CSS2"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:93.86,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"display:table, display: table,table-cell,table-row,table-layout"},"css-gencontent":{title:"CSS Generated content",description:"Method of displaying text or images before or after the given element's contents using the :before and :after pseudo-elements",spec:"http://www.w3.org/TR/CSS21/generate.html",status:"rec",links:[{url:"http://www.westciv.com/style_master/academy/css_tutorial/advanced/generated_content.html",title:"Guide on usage"},{url:"http://docs.webplatform.org/wiki/css/generated_and_replaced_content",title:"WebPlatform Docs"},{url:"http://dev.opera.com/articles/view/css-generated-content-techniques/",title:"Dev.Opera article"}],categories:["CSS2","CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"a",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"IE8 only supports the single-colon CSS 2.1 syntax (i.e. pseudo-class). It does not support the double-colon CSS3 syntax (i.e. pseudo-element)",usage_perc_y:85.55,usage_perc_a:8.31,ucprefix:!1,parent:"",keywords:"before,after"},"css-fixed":{title:"CSS position:fixed",description:"Method of keeping an element in a fixed location regardless of scroll position",spec:"http://www.w3.org/TR/CSS21/visuren.html#fixed-positioning",status:"rec",links:[{url:"http://www.css-101.org/fixed-positioning/05.php",title:"Workaround for IE6"},{url:"http://bradfrostweb.com/blog/mobile/fixed-position/",title:"Article on mobile support"},{url:"http://docs.webplatform.org/wiki/css/properties/position",title:"WebPlatform Docs"}],categories:["CSS"],stats:{ie:{5.5:"n",6:"p",7:"y",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a",2.2:"a",2.3:"a",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Only works in Android 2.2+ by using the following meta tag: &lt;meta name="viewport" content="width=device-width, user-scalable=no">. Partial support in iOS Safari refers to <a href="http://remysharp.com/2012/05/24/issues-with-position-fixed-scrolling-on-ios/">buggy behavior</a>.',usage_perc_y:84.35,usage_perc_a:5.39,ucprefix:!1,parent:"",keywords:""},hashchange:{title:"Hashchange event",description:"Event triggered in JavaScript when the URL's hash has changed (for example: page.html#foo to page.html#bar) ",spec:"http://www.w3.org/TR/html5/history.html#event-hashchange",status:"cr",links:[{url:"http://www.quirksmode.org/dom/events/tests/hashchange.html",title:"Simple demo"},{url:"http://docs.webplatform.org/wiki/dom/events/hashchange",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/en/DOM/window.onhashchange",title:"MDN article"},{url:"http://github.com/3nr1c/jUri.js",title:"Polyfill"},{url:"http://msdn.microsoft.com/en-us/library/cc288209(VS.85).aspx",title:"MSDN article"}],categories:["HTML5","JS API"],stats:{ie:{5.5:"p",6:"p",7:"p",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"p",3:"p",3.5:"p",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"p",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",
5
+ 26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"p",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"p","9.5-9.6":"p","10.0-10.1":"p",10.5:"p",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"p",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:88.92,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"onhashchange,HashChangeEvent"},"css-sel2":{title:"CSS 2.1 selectors",description:"Allows more accurate element selecting, using >, +, [attr], :first-child, etc.",spec:"http://www.w3.org/TR/CSS21/selector.html",status:"rec",links:[{url:"http://www.quirksmode.org/css/contents.html",title:"Detailed support information"},{url:"http://docs.webplatform.org/wiki/css/selectors",title:"WebPlatform Docs"},{url:"http://selectivizr.com",title:"Selectivizr: Polyfill for IE6-8"},{url:"http://www.yourhtmlsource.com/stylesheets/advancedselectors.html",title:"Examples of advanced selectors"}],categories:["CSS2"],stats:{ie:{5.5:"n",6:"p",7:"y",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:94.36,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"child selector,:hover,adjacent,sibling,adjacent sibling"},"css-sel3":{title:"CSS3 selectors",description:"Advanced element selection using selectors like :nth-child(), :last-child, :first-of-type, etc.",spec:"http://www.w3.org/TR/css3-selectors/",status:"rec",links:[{url:"http://www.css3.info/selectors-test/",title:"Automated CSS3 selector test"},{url:"http://docs.webplatform.org/wiki/css/selectors",title:"WebPlatform Docs"},{url:"http://www.quirksmode.org/css/contents.html",title:"Detailed support information"},{url:"http://selectivizr.com",title:"Selectivizr: Polyfill for IE6-8"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:85.43,usage_perc_a:0,ucprefix:!1,parent:"",keywords:":target,:not"},"css-textshadow":{title:"CSS3 Text-shadow",description:"Method of applying one or more shadow or blur effects to text",spec:"http://www.w3.org/TR/css-text-decor-3/#text-shadow-property",status:"wd",links:[{url:"http://ie.microsoft.com/testdrive/Graphics/hands-on-css3/hands-on_text-shadow.htm",title:"Live editor"},{url:"http://docs.webplatform.org/wiki/css/properties/text-shadow",title:"WebPlatform Docs"},{url:"http://hacks.mozilla.org/2009/06/text-shadow/",title:"Mozilla hacks article"},{url:"http://www.css3files.com/shadow/#textshadow",title:"Information page"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a",3.2:"a",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"a"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"a",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Opera Mini ignores the blur-radius set, so no blur effect is visible. Text-shadow behavior can be somewhat emulated in older IE versions using the non-standard "dropshadow" or "glow" filters. ',usage_perc_y:75.49,usage_perc_a:4.73,ucprefix:!1,parent:"",keywords:""},"css-boxshadow":{title:"CSS3 Box-shadow",description:"Method of displaying an inner or outer shadow effect to elements",spec:"http://www.w3.org/TR/css3-background/#box-shadow",status:"cr",links:[{url:"http://www.css3files.com/shadow/",title:"Information page"},{url:"https://developer.mozilla.org/En/CSS/-moz-box-shadow",title:"MDN article"},{url:"http://westciv.com/tools/boxshadows/index.html",title:"Live editor"},{url:"http://tests.themasta.com/blogstuff/boxshadowdemo.html",title:"Demo of various effects"},{url:"http://docs.webplatform.org/wiki/css/properties/box-shadow",title:"WebPlatform Docs"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y x",3.6:"y x",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a x",3.2:"a x",4:"a x",5:"y x",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a x","4.0-4.1":"y x","4.2-4.3":"y x","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a x",2.2:"a x",2.3:"a x",3:"a x",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y x",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Can be partially emulated in older IE versions using the non-standard "shadow" filter. Partial support in Safari, iOS Safari and Android Browser refers to missing "inset" and blur radius value support.',usage_perc_y:79.27,usage_perc_a:1.55,ucprefix:!1,parent:"",keywords:"box-shadows,boxshadows,box shadow,shaow"},"css3-colors":{title:"CSS3 Colors",description:"Method of describing colors using Hue, Saturation and Lightness (hsl()) rather than just RGB, as well as allowing alpha-transparency with rgba() and hsla().",spec:"http://www.w3.org/TR/css3-color/",status:"rec",links:[{url:"http://www.zenelements.com/blog/css3-rgb-rgba-color-opacity/",title:"Guide to RGB & RGBA"},{url:"http://www.css3files.com/color/",title:"Information page"},{url:"http://www.zenelements.com/blog/css3-hsl-hsla-color-opacity/",title:"Guide to HSL & HSLA"},{url:"http://docs.webplatform.org/wiki/css/color#RGBA_Notation",title:"WebPlatform Docs"},{url:"http://dev.opera.com/articles/view/color-in-opera-10-hsl-rgb-and-alpha-transparency/",title:"Dev.Opera article"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"a",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"a","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:85.51,usage_perc_a:.02,ucprefix:!1,parent:"",keywords:"rgb,hsl,rgba,hsla"},"css3-boxsizing":{title:"CSS3 Box-sizing",description:"Method of specifying whether or not an element's borders and padding should be included in size units",spec:"http://www.w3.org/TR/css3-ui/#box-sizing",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/properties/box-sizing",title:"WebPlatform Docs"},{url:"http://css-tricks.com/box-sizing/",title:"CSS Tricks"},{url:"https://github.com/Schepp/box-sizing-polyfill",title:"Polyfill for IE"},{url:"https://developer.mozilla.org/En/CSS/Box-sizing",title:"MDN article"},{url:"http://www.456bereastreet.com/archive/201104/controlling_width_with_css3_box-sizing/",title:"Blog post"}],categories:["CSS3"],stats:{ie:{5.5:"p",6:"p",7:"p",8:"a",9:"a",10:"a",11:"a"},firefox:{2:"y x",3:"y x",3.5:"y x",3.6:"y x",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x"},chrome:{4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a",28:"a",29:"a",30:"a",31:"a",32:"a"},safari:{3.1:"a x",3.2:"a x",4:"a x",5:"a x",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"n","9.5-9.6":"a","10.0-10.1":"a",10.5:"a",10.6:"a",11:"a",11.1:"a",11.5:"a",11.6:"a",12:"a",12.1:"a",15:"a",16:"a",17:"a",18:"a"},ios_saf:{3.2:"a x","4.0-4.1":"a x","4.2-4.3":"a x","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"a"},android:{2.1:"a x",2.2:"a x",2.3:"a x",3:"a x",4:"a",4.1:"a","4.2-4.3":"a",4.4:"a"},bb:{7:"a x",10:"a"},op_mob:{10:"a",11:"a",11.1:"a",11.5:"a",12:"a",12.1:"a",0:"a"},and_chr:{0:"a"},and_ff:{0:"y x"},ie_mob:{10:"a"}},notes:'Partial support refers to supporting only the "border-box" value, not "padding-box" (which was added to the spec later).',usage_perc_y:15.43,usage_perc_a:78.42,ucprefix:!1,parent:"",keywords:"border-box,content-box,padding-box"},"css-mediaqueries":{title:"CSS3 Media Queries",description:"Method of applying styles based on media information. Includes things like page and device dimensions",spec:"http://www.w3.org/TR/css3-mediaqueries/",status:"rec",links:[{url:"http://docs.webplatform.org/wiki/css/atrules/@media",title:"WebPlatform Docs"},{url:"http://ie.microsoft.com/testdrive/HTML5/85CSS3_MediaQueries/",title:"IE demo page with information"},{url:"https://github.com/scottjehl/Respond",title:"Polyfill for IE"},{url:"http://webdesignerwall.com/tutorials/responsive-design-with-css3-media-queries",title:"Media Queries tutorial"}],categories:["CSS3"],stats:{ie:{5.5:"p",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a",3.2:"a",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Incomplete support by older webkit browsers refers to only acknowledging different media rules on page reload",usage_perc_y:85.42,usage_perc_a:.01,ucprefix:!1,parent:"",keywords:"@media"},multicolumn:{title:"CSS3 Multiple column layout",description:"Method of flowing information in multiple columns",spec:"http://www.w3.org/TR/css3-multicol/",status:"cr",links:[{url:"http://dev.opera.com/articles/view/css3-multi-column-layout/",title:"Dev.Opera article"},{url:"http://docs.webplatform.org/wiki/css/properties/column-width",title:"WebPlatform Docs"},{url:"http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/an-introduction-to-the-css3-multiple-column-layout-module/",title:"Introduction page"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"a x",3:"a x",3.5:"a x",3.6:"a x",4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"a x",21:"a x",22:"a x",23:"a x",24:"a x",25:"a x",26:"a x",27:"a x"},chrome:{4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"a x",21:"a x",22:"a x",23:"a x",24:"a x",25:"a x",26:"a x",27:"a x",28:"a x",29:"a x",30:"a x",31:"a x",32:"a x"},safari:{3.1:"a x",3.2:"a x",4:"a x",5:"a x",5.1:"a x",6:"a x",6.1:"a x",7:"a x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"a x",16:"a x",17:"a x",18:"a x"},ios_saf:{3.2:"a x","4.0-4.1":"a x","4.2-4.3":"a x","5.0-5.1":"a x","6.0-6.1":"a x","7.0":"a x"},op_mini:{"5.0-7.0":"y"},android:{2.1:"a x",2.2:"a x",2.3:"a x",3:"a x",4:"a x",4.1:"a x","4.2-4.3":"a x",4.4:"a x"},bb:{7:"a x",10:"a x"},op_mob:{10:"n",11:"n",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"a x"},and_chr:{0:"a x"},and_ff:{0:"a x"},ie_mob:{10:"y"}},notes:"Partial support refers to not supporting the break-before, break-after, break-inside properties. Webkit browsers do have equivalent support for the non-standard -webkit-column-break-* properties.",usage_perc_y:16.41,usage_perc_a:63.85,ucprefix:!1,parent:"",keywords:"column-count"},"border-radius":{title:"CSS3 Border-radius (rounded corners)",description:"Method of making the border corners round",spec:"http://www.w3.org/TR/css3-background/#the-border-radius",status:"cr",links:[{url:"http://docs.webplatform.org/wiki/css/properties/border-radius",title:"WebPlatform Docs"},{url:"http://muddledramblings.com/table-of-css3-border-radius-compliance",title:"Detailed compliance table"},{url:"http://www.css3files.com/border/#borderradius",title:"Information page"},{url:"http://css3pie.com/",title:"Polyfill which includes border-radius"},{url:"http://border-radius.com",title:"Border-radius CSS Generator"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"a x",3:"y x",3.5:"y x",3.6:"y x",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y x",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y x",3.2:"y x",4:"y x",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y x","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y x",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:80.91,usage_perc_a:.02,ucprefix:!1,parent:"",keywords:"roundedcorners, border radius,-moz-border-radius"},transforms2d:{title:"CSS3 Transforms",description:"Method of transforming an element including rotating, scaling, etc.",spec:"http://www.w3.org/TR/css3-2d-transforms/",status:"wd",links:[{url:"http://www.westciv.com/tools/transforms/",title:"Live editor"},{url:"http://www.useragentman.com/IETransformsTranslator/",title:"Converter for IE"},{url:"http://docs.webplatform.org/wiki/css/transforms/transform",title:"WebPlatform Docs"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-transform",title:"has.js test"},{url:"https://developer.mozilla.org/en/CSS/-moz-transform",title:"MDN article"},{url:"http://www.webresourcesdepot.com/cross-browser-css-transforms-csssandpaper/",title:"Workaround script for IE"},{url:"http://www.css3files.com/transform/",title:"Information page"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"y x",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y x",3.6:"y x",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"y x",3.2:"y x",4:"y x",5:"y x",5.1:"y x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y x",10.6:"y x",11:"y x",11.1:"y x",11.5:"y x",11.6:"y x",12:"y x",12.1:"y",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"y x","4.0-4.1":"y x","4.2-4.3":"y x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y x",2.2:"y x",2.3:"y x",3:"y x",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y x"},bb:{7:"y x",10:"y x"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'The scale transform can be emulated in IE < 9 using Microsoft\'s "zoom" extension, others are (not easily) possible using the MS Matrix filter',usage_perc_y:80.82,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"transformation,translate,rotation,rotate,scale,css-transforms"},"use-strict":{title:"ECMAScript 5 Strict Mode",description:'Method of placing code in a "strict" operating context.',spec:"http://ecma-international.org/ecma-262/5.1/#sec-14.1",status:"other",links:[{url:"http://javascriptweblog.wordpress.com/2011/05/03/javascript-strict-mode/",title:"Article with test suite"},{url:"http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/",title:"Information page"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"a",5.1:"a",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support in older Safari refers to strict mode still accepting a lot of JS that should be considered invalid.",usage_perc_y:71.65,usage_perc_a:1.59,ucprefix:!1,parent:"",keywords:""},transforms3d:{title:"CSS3 3D Transforms",description:"Method of transforming an element in the third dimension",spec:"http://www.w3.org/TR/css3-3d-transforms/",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/transforms/transform",title:"WebPlatform Docs"},{url:"http://css3.bradshawenterprises.com/flip/",title:"Multi-browser demo"},{url:"http://thewebrocks.com/demos/3D-css-tester/",title:"3D CSS Tester"},{url:"http://hacks.mozilla.org/2011/10/css-3d-transformations-in-firefox-nightly/",title:"Mozilla hacks article"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-transform",title:"has.js test"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"a",11:"a"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"y x",5:"y x",5.1:"y x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"y x","4.0-4.1":"y x","4.2-4.3":"y x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y x",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y x"},bb:{7:"y x",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"y"},ie_mob:{10:"a"}},notes:'Partial support in IE10 refers to not supporting <a href="http://msdn.microsoft.com/en-us/library/ie/hh673529%28v=vs.85%29.aspx#the_ms_transform_style_property">the transform-style: preserve-3d property</a>. This prevents nesting 3D transformed elements.',usage_perc_y:61.31,usage_perc_a:11.11,ucprefix:!1,parent:"",keywords:"css 3d,3dtransforms,translate3d,transform3d"},sharedworkers:{title:"Shared Web Workers",description:"Method of allowing multiple scripts to communicate with a single web worker.",spec:"http://www.w3.org/TR/workers/#shared-workers-introduction",status:"cr",links:[{url:"http://www.sitepoint.com/javascript-shared-web-workers-html5/",title:"Sitepoint article"},{url:"http://greenido.wordpress.com/2011/11/03/web-workers-part-3-out-of-3-shared-wrokers/",title:"Blog post"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"u",27:"u"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"y",10:"y"},op_mob:{10:"u",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"n"},and_chr:{0:"n"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"Expected to be supported in Firefox 27.",usage_perc_y:40.07,usage_perc_a:0,ucprefix:!1,parent:"webworkers",keywords:"shared worker"},"css-hyphens":{title:"CSS Hyphenation",description:'Method of controlling when words at the end of lines should be hyphenated using the "hyphens" property.',spec:"http://www.w3.org/TR/css3-text/#hyphenation",status:"wd",links:[{url:"https://developer.mozilla.org/en/CSS/hyphens",title:"MDN article"},{url:"http://docs.webplatform.org/wiki/css/properties/hyphens",title:"WebPlatform Docs"},{url:"http://blog.fontdeck.com/post/9037028497/hyphens",title:"Blog post"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y x",11:"y x"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"n",32:"n"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"y x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"y x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"n"},and_ff:{0:"y x"},ie_mob:{10:"n"}},notes:'Chrome 29- and Android 4.0 Browser support "-webkit-hyphens: none", but not the "auto" property. Chrome 30+ doesn\'t support it either.',usage_perc_y:33.31,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"hyphen,shy"},"css-transitions":{title:"CSS3 Transitions",description:"Simple method of animating certain properties of an element",spec:"http://www.w3.org/TR/css3-transitions/",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/properties/transition",title:"WebPlatform Docs"},{url:"http://www.webdesignerdepot.com/2010/01/css-transitions-101/",title:"Article on usage"},{url:"http://www.opera.com/docs/specs/presto2.12/css/transitions/#anima",title:"Animation of property types support in Opera"},{url:"http://www.css3files.com/transition/",title:"Information page"},{url:"http://www.the-art-of-web.com/css/timing-function/",title:"Examples on timing functions"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y x",3.2:"y x",4:"y x",5:"y x",5.1:"y x",6:"y x",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y x",10.6:"y x",11:"y x",11.1:"y x",11.5:"y x",11.6:"y x",12:"y x",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y x","4.0-4.1":"y x","4.2-4.3":"y x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y x",2.2:"y x",2.3:"y x",3:"y x",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y"},bb:{7:"y x",10:"y x"},op_mob:{10:"y x",11:"y x",11.1:"y x",11.5:"y x",12:"y x",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:75.27,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"css transition"},"font-feature":{title:"Font feature settings",description:"Method of applying advanced typographic and language-specific font features to supported OpenType fonts.",spec:"http://w3.org/TR/css3-fonts/#font-rend-props",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/properties/font-feature-settings",title:"WebPlatform Docs"},{url:"http://hacks.mozilla.org/2010/11/firefox-4-font-feature-support/",title:"Mozilla hacks article"},{url:"http://html5accessibility.com/",title:"Detailed tables on accessability support"},{url:"http://ie.microsoft.com/testdrive/Graphics/opentype/",title:"Demo pages (IE/Firefox only)"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"a x",17:"a x",18:"a x",19:"a x",20:"a x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"a",5:"a",5.1:"a",6:"a",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"a","6.0-6.1":"a","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y x"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"y x"},ie_mob:{10:"n"}},notes:"Partial support in older Firefox versions refers to using an older syntax. Partial support in older Chrome versions refers to lacking support in Mac OS X. ",usage_perc_y:62.13,usage_perc_a:6.41,ucprefix:!1,parent:"",keywords:"font-feature,font-feature-settings,kern,kerning,font-variant-alternates,ligatures,font-variant-ligatures"},"css-animation":{title:"CSS3 Animation",description:"Complex method of animating certain properties of an element",spec:"http://www.w3.org/TR/css3-animations/",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/properties/animations",title:"WebPlatform Docs"},{url:"http://www.css3files.com/animation/",title:"Information page"},{url:"http://robertnyman.com/2010/05/06/css3-animations/",title:"Blog post on usage"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"y x",5:"y x",5.1:"y x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"y x",12.1:"y",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"y x","4.0-4.1":"y x","4.2-4.3":"y x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a x",2.2:"a x",2.3:"a x",3:"a x",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y x"},bb:{7:"y x",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"y",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"y"},ie_mob:{
6
+ 10:"y"}},notes:"Partial support in Android browser refers to buggy behavior in different scenarios.",usage_perc_y:73.62,usage_perc_a:1.44,ucprefix:!1,parent:"",keywords:"animations,css-animations,keyframe,keyframes"},"css-gradients":{title:"CSS Gradients",description:"Method of defining a linear or radial color gradient as a CSS image.",spec:"http://www.w3.org/TR/css3-images/",status:"cr",links:[{url:"http://www.colorzilla.com/gradient-editor/",title:"Cross-browser editor"},{url:"http://docs.webplatform.org/wiki/css/functions/linear-gradient",title:"WebPlatform Docs"},{url:"http://www.css3files.com/gradient/",title:"Information page"},{url:"http://css3pie.com/",title:"Tool to emulate support in IE"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"y x",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"a x",5:"a x",5.1:"y x",6:"y x",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"a x",11.5:"a x",11.6:"y x",12:"y x",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a x","4.0-4.1":"a x","4.2-4.3":"a x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a x",2.2:"a x",2.3:"a x",3:"a x",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y"},bb:{7:"a x",10:"y x"},op_mob:{10:"n",11:"n",11.1:"a x",11.5:"a x",12:"y x",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Partial support in Opera 11.10 and 11.50 also refers to only having support for linear gradients. Support can be somewhat emulated in older IE versions using the non-standard "gradient" filter. Firefox 10+, Opera 11.6+, Chrome 26+ and IE10 also support the new "to (side)" syntax.',usage_perc_y:73.31,usage_perc_a:2.22,ucprefix:!1,parent:"",keywords:"linear,linear-gradient,gradiant"},"css-canvas":{title:"CSS Canvas Drawings",description:"Method of using HTML5 Canvas as a background image",spec:"http://webkit.org/blog/176/css-canvas-drawing/",status:"unoff",links:[{url:"http://webkit.org/blog/176/css-canvas-drawing/",title:"Webkit blog post"}],categories:["CSS"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"u",27:"u"},chrome:{4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"y x",5:"y x",5.1:"y x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"y x","4.0-4.1":"y x","4.2-4.3":"y x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y x",2.2:"y x",2.3:"y x",3:"y x",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y x"},bb:{7:"y x",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"Proposal by Webkit, being considered for W3C standardization. A similar effect can be achieved in Firefox 4+ using the -moz-element() background property",usage_perc_y:48.41,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},"css-reflections":{title:"CSS Reflections",description:"Method of displaying a reflection of an element",spec:"http://webkit.org/blog/182/css-reflections/",status:"unoff",links:[{url:"http://webkit.org/blog/182/css-reflections/",title:"Webkit blog post"}],categories:["CSS"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"y x",5:"y x",5.1:"y x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"y x","4.0-4.1":"y x","4.2-4.3":"y x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y x",2.2:"y x",2.3:"y x",3:"y x",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y x"},bb:{7:"y x",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"Similar effect can be achieved in Firefox 4+ using the -moz-element() background property",usage_perc_y:48.41,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"box-reflect"},"css-masks":{title:"CSS Masks",description:"Method of displaying part of an element, using a selected image as a mask",spec:"http://www.w3.org/TR/css-masking/",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/properties/mask",title:"WebPlatform Docs"},{url:"http://www.html5rocks.com/en/tutorials/masking/adobe/",title:"HTML5 Rocks article"},{url:"http://thenittygritty.co/css-masking",title:"Detailed blog post"}],categories:["CSS"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"u",27:"u"},chrome:{4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"a x",21:"a x",22:"a x",23:"a x",24:"a x",25:"a x",26:"a x",27:"a x",28:"a x",29:"a x",30:"a x",31:"a x",32:"a x"},safari:{3.1:"n",3.2:"n",4:"a x",5:"a x",5.1:"a x",6:"a x",6.1:"a x",7:"a x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"a x",16:"a x",17:"a x",18:"a x"},ios_saf:{3.2:"a x","4.0-4.1":"a x","4.2-4.3":"a x","5.0-5.1":"a x","6.0-6.1":"a x","7.0":"a x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a x",2.2:"a x",2.3:"a x",3:"a x",4:"a x",4.1:"a x","4.2-4.3":"a x",4.4:"a x"},bb:{7:"a x",10:"a x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"a x"},and_chr:{0:"a x"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"Previously a WebKit-only property, now a W3C specification. Partial support refers to not yet fully supporting the new spec (details currently unknown).",usage_perc_y:0,usage_perc_a:48.41,ucprefix:!1,parent:"",keywords:""},svg:{title:"SVG (basic support)",description:"Method of displaying basic Vector Graphics features using the embed or object elements",spec:"http://www.w3.org/Graphics/SVG/",status:"rec",links:[{url:"http://en.wikipedia.org/wiki/Scalable_Vector_Graphics",title:"Wikipedia"},{url:"http://code.google.com/p/svgweb/",title:"SVG Web: Flash-based polyfill"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/graphics.js#svg",title:"has.js test"},{url:"http://svg-edit.googlecode.com",title:"Web-based SVG editor"},{url:"http://www.alistapart.com/articles/using-svg-for-flexible-scalable-and-fun-backgrounds-part-i",title:"A List Apart article"},{url:"http://svg-wow.org/",title:"SVG showcase site"}],categories:["SVG"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y"},firefox:{2:"a",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:84.1,usage_perc_a:.02,ucprefix:!1,parent:"",keywords:""},"svg-css":{title:"SVG in CSS backgrounds",description:"Method of using SVG images as CSS backgrounds",spec:"http://www.w3.org/TR/css3-background/#background-image",status:"cr",links:[{url:"http://designfestival.com/a-farewell-to-css3-gradients/",title:"Tutorial for advanced effects"}],categories:["SVG","CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"a",4:"a",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"a"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"a",11:"a",11.1:"a",11.5:"a",12:"a",12.1:"a",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support in older Firefox and Opera Mini/Mobile refers to SVG images being blurry when scaled. Partial support in iOS Safari and older Safari versions refers to failing to support tiling or the background-position property.",usage_perc_y:75.45,usage_perc_a:8.2,ucprefix:!1,parent:"",keywords:"svg-in-css,svgincss,css-svg"},"svg-smil":{title:"SVG SMIL animation",description:"Method of using animation elements to animate SVG images",spec:"http://www.w3.org/TR/SVG/animate.html",status:"rec",links:[{url:"https://github.com/madsgraphics/SVGEventListener",title:"Polyfill for SMIL animate events on SVG"},{url:"https://developer.mozilla.org/en/SVG/SVG_animation_with_SMIL",title:"MDN article"},{url:"http://svg-wow.org/blog/category/animation/",title:"Examples on SVG WOW"},{url:"http://leunen.me/fakesmile/",title:"JS library to support SMIL in SVG"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/graphics.js#svg-smil",title:"has.js test"}],categories:["SVG"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p"},firefox:{2:"p",3:"p",3.5:"p",3.6:"p",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"a",5:"a",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"p"}},notes:"Partial support in Safari refers to not working in HTML files.",usage_perc_y:54.76,usage_perc_a:7.99,ucprefix:!1,parent:"",keywords:""},"svg-fonts":{title:"SVG fonts",description:"Method of using fonts defined as SVG shapes",spec:"http://www.w3.org/TR/SVG/fonts.html",status:"rec",links:[{url:"http://opentype.info/blog/2010/04/13/the-ipad-and-svg-fonts-in-mobile-safari/",title:"Blog post on usage for iPad"},{url:"http://jeremie.patonnier.net/post/2011/02/07/Why-are-SVG-Fonts-so-different",title:"Blog post"}],categories:["SVG"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"Supported in Opera Mini in SVG images only, not in HTML.",usage_perc_y:47.78,usage_perc_a:0,ucprefix:!1,parent:"fontface",keywords:""},"svg-filters":{title:"SVG filters",description:"Method of using photoshop-like effects on SVG objects including blurring and color manipulation.",spec:"http://www.w3.org/TR/SVG/filters.html",status:"rec",links:[{url:"http://electricbeach.org/?p=950",title:"Experiments with filter effects"},{url:"http://svg-wow.org/blog/category/filters/",title:"SVG filter demos"},{url:"http://docs.webplatform.org/wiki/svg/elements/filter",title:"WebPlatform Docs"}],categories:["SVG"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"a",6:"a",7:"a",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:72.99,usage_perc_a:.08,ucprefix:!1,parent:"",keywords:""},"svg-html":{title:"SVG effects for HTML",description:"Method of using SVG transforms, filters, etc on HTML elements using either CSS or the foreignObject element",spec:"http://www.w3.org/TR/SVG11/extend.html#ForeignObjectElement",status:"wd",links:[{url:"https://developer.mozilla.org/En/Applying_SVG_effects_to_HTML_content",title:"MDN Reference page"},{url:"https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html",title:"Filter Effects draft"},{url:"https://developer.mozilla.org/en/SVG/Tutorial/Other_content_in_SVG",title:"MDN Tutorial"}],categories:["SVG"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"a",10:"a",11:"a"},firefox:{2:"n",3:"a",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a",28:"a",29:"a",30:"a",31:"a",32:"a"},safari:{3.1:"n",3.2:"n",4:"a",5:"a",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"a","9.5-9.6":"a","10.0-10.1":"a",10.5:"a",10.6:"a",11:"a",11.1:"a",11.5:"a",11.6:"a",12:"a",12.1:"a",15:"a",16:"a",17:"a",18:"a"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"a"},bb:{7:"n",10:"y"},op_mob:{10:"a",11:"a",11.1:"a",11.5:"a",12:"a",12.1:"a",0:"a"},and_chr:{0:"a"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:'Partial support refers to lack of filter support or buggy result from effects. A <a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html">CSS Filter Effects</a> specification is in the works that would replace this method.',usage_perc_y:15.33,usage_perc_a:60.21,ucprefix:!1,parent:"",keywords:""},"svg-html5":{title:"Inline SVG in HTML5",description:"Method of using SVG tags directly in HTML documents. Requires HTML5 parser.",spec:"http://www.w3.org/TR/html5/embedded-content-0.html#svg-0",status:"cr",links:[{url:"http://hacks.mozilla.org/2010/05/firefox-4-the-html5-parser-inline-svg-speed-and-more/",title:"Mozilla Hacks blog post"},{url:"http://samples.msdn.microsoft.com/ietestcenter/html5/svghtml_harness.htm?url=SVG_HTML_Elements_001",title:"Test suite"}],categories:["SVG","HTML5"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y"},firefox:{2:"p",3:"p",3.5:"p",3.6:"p",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"p",5:"p",6:"p",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"p",5:"p",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"p","9.5-9.6":"p","10.0-10.1":"p",10.5:"p",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"p","4.0-4.1":"p","4.2-4.3":"p","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"p",11:"p",11.1:"p",11.5:"p",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:78.45,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},canvas:{title:"Canvas (basic support)",description:"Method of generating fast, dynamic graphics using JavaScript",spec:"http://www.w3.org/TR/html5/embedded-content-0.html#the-canvas-element",status:"cr",links:[{url:"https://developer.mozilla.org/en/Canvas_tutorial",title:"Tutorial by Mozilla"},{url:"http://explorercanvas.googlecode.com/",title:"Implementation for Internet Explorer"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/graphics.js#canvas",title:"has.js test"},{url:"http://www.diveinto.org/html5/canvas.html",title:"Another tutorial"},{url:"http://glimr.rubyforge.org/cake/canvas.html",title:"Animation kit "},{url:"http://www.canvasdemos.com/",title:"Showcase site"}],categories:["Canvas","HTML5"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"a"},android:{2.1:"a",2.2:"a",2.3:"a",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Opera Mini supports the canvas element, but is unable to play animations or run other more complex applications. Android 2.x supports canvas except the toDataURL() function. See http://code.google.com/p/android/issues/detail?id=7901 Some (slow) workarounds are described here: http://stackoverflow.com/q/10488033/841830",usage_perc_y:79.53,usage_perc_a:6.02,ucprefix:!1,parent:"",keywords:""},"canvas-text":{title:"Text API for Canvas",description:"Method of displaying text on Canvas elements",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-0",status:"wd",links:[{url:"http://code.google.com/p/canvas-text/",title:"Support library"},{url:"http://docs.webplatform.org/wiki/apis/canvas/CanvasRenderingContext2D/fillText",title:"WebPlatform Docs"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/graphics.js#canvas-text",title:"has.js test"},{url:"https://developer.mozilla.org/en/Drawing_text_using_a_canvas#Additional_examples",title:"Examples by Mozilla"}],categories:["Canvas","HTML5"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y"},firefox:{2:"p",3:"p",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"p","9.5-9.6":"p","10.0-10.1":"p",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"p",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:80.82,usage_perc_a:0,ucprefix:!1,parent:"canvas",keywords:""},"namevalue-storage":{title:"Web Storage - name/value pairs",description:"Method of storing data locally like cookies, but for larger amounts of data (sessionStorage and localStorage, used to fall under HTML5).",spec:"http://www.w3.org/TR/webstorage/#storage",status:"rec",links:[{url:"http://html5demos.com/storage",title:"Simple demo"},{url:"http://docs.webplatform.org/wiki/apis/web-storage/Storage/localStorage",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/En/DOM/Storage",title:"Gecko reference"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-localstorage;native-sessionstorage",title:"has.js test"},{url:"http://code.google.com/p/sessionstorage/",title:"Support library"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"a",3:"a",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"In private browsing mode Safari and iOS Safari don't support setting localStorage.",usage_perc_y:89.13,usage_perc_a:.1,ucprefix:!1,parent:"",keywords:"webstorage,local storage"},"sql-storage":{title:"Web SQL Database",description:"Method of storing data client-side, allows Sqlite database queries for access and manipulation",spec:"http://www.w3.org/TR/webdatabase/",status:"unoff",links:[{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-sql-db",title:"has.js test"},{url:"http://html5doctor.com/introducing-web-sql-databases/",title:"HTML5 Doctor article"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"The Web SQL Database specification is no longer being maintained and support may be dropped in future versions.",usage_perc_y:49.18,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"db-storage,websql"},indexeddb:{title:"IndexedDB",description:"Method of storing data client-side, allows indexed database queries. Previously known as WebSimpleDB API.",spec:"http://www.w3.org/TR/IndexedDB/",status:"wd",links:[{url:"http://hacks.mozilla.org/2010/06/comparing-indexeddb-and-webdatabase/",title:"Mozilla Hacks article"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-indexeddb",title:"has.js test"},{url:"http://docs.webplatform.org/wiki/apis/indexedDB",title:"WebPlatform Docs"},{url:"https://github.com/axemclion/IndexedDBShim",title:"Polyfill for browsers supporting WebSQL"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"a x",12:"a x",13:"a x",14:"a x",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"a x",21:"a x",22:"a x",23:"y x",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"a x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Partial support in BB10 refers to an <a href="http://www.w3.org/TR/2011/WD-IndexedDB-20110419/">outdated specification</a> being implemented. Code targeting the <a href="http://www.w3.org/TR/IndexedDB/">current state of the specification</a> might not work.',usage_perc_y:59.46,usage_perc_a:1.68,ucprefix:!1,parent:"",keywords:"indexdb"},eventsource:{title:"Server-sent DOM events",description:"Method of continuously sending data from a server to the browser, rather than repeatedly requesting it (EventSource interface, used to fall under HTML5)",spec:"http://www.w3.org/TR/eventsource/",status:"cr",links:[{url:"http://www.html5rocks.com/tutorials/eventsource/basics/",title:"HTML5 Rocks tutorial"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-eventsource",title:"has.js test"},{url:"http://samshull.blogspot.com/2010/10/ajax-push-in-ios-safari-and-chrome-with.html",title:"Blog post with demo"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"a","9.5-9.6":"a","10.0-10.1":"a",10.5:"a",10.6:"a",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"a",11:"a",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"",usage_perc_y:58.8,usage_perc_a:.06,ucprefix:!1,parent:"",keywords:"serversent,s-sent-events"},"x-doc-messaging":{title:"Cross-document messaging",description:"Method of sending information from a page on one domain to a page on a different one (using postMessage)",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages",status:"wd",links:[{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-crosswindowmessaging",title:"has.js test"},{url:"http://html5demos.com/postmessage2",title:"Simple demo"},{url:"https://developer.mozilla.org/en/DOM/window.postMessage",title:"MDN article"},{url:"http://docs.webplatform.org/wiki/apis/web-messaging/methods/postMessage_%28window%29",title:"WebPlatform Docs"},{url:"http://72lions.com/2011/05/cross-origin-communication-with-html5",title:"Article and demo"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"a",9:"a",10:"a",11:"y"},firefox:{2:"n",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"a"}},notes:'Partial support in IE8-9 refers to only working in frames/iframes (not other tabs/windows). Also in IE 9 and below an object cannot be sent using postMessage. Partial support in IE10 refers to <a href="http://stackoverflow.com/questions/16226924/is-cross-origin-postmessage-broken-in-ie10">limitations in certain conditions</a>',
7
+ usage_perc_y:69.31,usage_perc_a:24.52,ucprefix:!1,parent:"",keywords:""},datauri:{title:"Data URIs",description:"Method of embedding images and other files in webpages as a string of text",spec:"http://www.ietf.org/rfc/rfc2397.txt",status:"other",links:[{url:"http://www.websiteoptimization.com/speed/tweak/inline-images/",title:"Data URL converter"},{url:"http://css-tricks.com/5970-data-uris/",title:"Information page"},{url:"http://en.wikipedia.org/wiki/data_URI_scheme",title:"Wikipedia"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"a",9:"a",10:"a",11:"a"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"a"}},notes:"Support in Internet Explorer 8 is limited to images and linked resources like CSS files, not HTML files. Max URI length in IE8 is 32KB. In IE9+ JavaScript files are supported too and the maximum size limit set to 4GB.",usage_perc_y:69.23,usage_perc_a:24.63,ucprefix:!1,parent:"",keywords:"data url,datauris,data uri,dataurl,dataurls"},mathml:{title:"MathML",description:"An XML language that allows mathematical formulas and notations to be written on web pages.",spec:"http://www.w3.org/TR/MathML/",status:"rec",links:[{url:"http://www.mozilla.org/projects/mathml/demo/",title:"MathML demos"},{url:"http://en.wikipedia.org/wiki/MathML",title:"Wikipedia"},{url:"http://www.mathjax.org",title:"Cross-browser support script"},{url:"https://developer.mozilla.org/en/MathML/Element",title:"MDN element reference"}],categories:["Other"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"n",10:"n",11:"n"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"p",5:"p",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"p",13:"p",14:"p",15:"p",16:"p",17:"p",18:"p",19:"p",20:"p",21:"p",22:"p",23:"p",24:"y",25:"p",26:"p",27:"p",28:"p",29:"p",30:"p",31:"p",32:"p"},safari:{3.1:"p",3.2:"p",4:"p",5:"p",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"a","10.0-10.1":"a",10.5:"a",10.6:"a",11:"a",11.1:"a",11.5:"a",11.6:"a",12:"a",12.1:"a",15:"p",16:"p",17:"p",18:"p"},ios_saf:{3.2:"p","4.0-4.1":"p","4.2-4.3":"p","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"p"},android:{2.1:"p",2.2:"p",2.3:"p",3:"p",4:"p",4.1:"p","4.2-4.3":"p",4.4:"p"},bb:{7:"p",10:"y"},op_mob:{10:"p",11:"p",11.1:"p",11.5:"p",12:"p",12.1:"p",0:"p"},and_chr:{0:"p"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"Opera's support is limited to a CSS profile of MathML. Support was added in Chrome 24, but removed afterwards due to instability.",usage_perc_y:23.15,usage_perc_a:.63,ucprefix:!1,parent:"",keywords:""},"css-featurequeries":{title:"CSS Feature Queries",description:"CSS Feature Queries allow authors to condition rules based on whether particular property declarations are supported in CSS using the @supports at rule.",spec:"http://www.w3.org/TR/css3-conditional/#at-supports",status:"cr",links:[{url:"http://dabblet.com/gist/3895764",title:"Test case"},{url:"http://mcc.id.au/blog/2012/08/supports",title:"@supports in Firefox"},{url:"https://developer.mozilla.org/en-US/docs/Web/CSS/@supports",title:"MDN Article"},{url:"http://docs.webplatform.org/wiki/css/atrules/@supports",title:"WebPlatform Docs"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"",usage_perc_y:45.52,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"supports,conditional"},xhtml:{title:"XHTML served as application/xhtml+xml",description:"A strict form of HTML, and allows embedding of other XML languages",spec:"http://www.w3.org/TR/xhtml1/",status:"rec",links:[{url:"http://en.wikipedia.org/wiki/XHTML",title:"Wikipedia"},{url:"http://docs.webplatform.org/wiki/concepts/internet_and_web/the_web_standards_model#What_is_XHTML.3F",title:"WebPlatform Docs"},{url:"http://www.xmlplease.com/xhtml/xhtml5polyglot/",title:"Information on XHTML5"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'The XHTML syntax is very close to HTML, and thus is almost always (<a href="https://developer.mozilla.org/en-US/docs/XHTML#MIME_type_versus_DOCTYPE">incorrectly</a>) served as text/html on the web.',usage_perc_y:85.55,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"xhtml+xml"},xhtmlsmil:{title:"XHTML+SMIL animation",description:"Method of using SMIL animation in web pages",spec:"http://www.w3.org/TR/XHTMLplusSMIL/",status:"unoff",links:[{url:"http://en.wikipedia.org/wiki/XHTML%2BSMIL",title:"Wikipedia"},{url:"http://leunen.me/fakesmile/",title:"JS library to support XHTML+SMIL"}],categories:["Other"],stats:{ie:{5.5:"n",6:"a",7:"a",8:"a",9:"n",10:"n",11:"n"},firefox:{2:"p",3:"p",3.5:"p",3.6:"p",4:"p",5:"p",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"p",13:"p",14:"p",15:"p",16:"p",17:"p",18:"p",19:"p",20:"p",21:"p",22:"p",23:"p",24:"p",25:"p",26:"p",27:"p"},chrome:{4:"p",5:"p",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"p",13:"p",14:"p",15:"p",16:"p",17:"p",18:"p",19:"p",20:"p",21:"p",22:"p",23:"p",24:"p",25:"p",26:"p",27:"p",28:"p",29:"p",30:"p",31:"p",32:"p"},safari:{3.1:"p",3.2:"p",4:"p",5:"p",5.1:"p",6:"p",6.1:"p",7:"p"},opera:{9:"p","9.5-9.6":"p","10.0-10.1":"p",10.5:"p",10.6:"p",11:"p",11.1:"p",11.5:"p",11.6:"p",12:"p",12.1:"p",15:"p",16:"p",17:"p",18:"p"},ios_saf:{3.2:"p","4.0-4.1":"p","4.2-4.3":"p","5.0-5.1":"p","6.0-6.1":"p","7.0":"p"},op_mini:{"5.0-7.0":"p"},android:{2.1:"p",2.2:"p",2.3:"p",3:"p",4:"p",4.1:"p","4.2-4.3":"p",4.4:"p"},bb:{7:"p",10:"p"},op_mob:{10:"p",11:"p",11.1:"p",11.5:"p",12:"p",12.1:"p",0:"p"},and_chr:{0:"p"},and_ff:{0:"p"},ie_mob:{10:"n"}},notes:"Internet Explorer supports the W3C proposal HTML+TIME, which is largely the same as XHTML+SMIL",usage_perc_y:0,usage_perc_a:9.02,ucprefix:!1,parent:"xhtml",keywords:""},"wai-aria":{title:"WAI-ARIA Accessibility features",description:"Method of providing ways for people with disabilities to use dynamic web content and web applications.",spec:"http://www.w3.org/TR/wai-aria/",status:"cr",links:[{url:"http://www.alistapart.com/articles/the-accessibility-of-wai-aria/",title:"ALA Article"},{url:"http://en.wikipedia.org/wiki/WAI-ARIA",title:"Wikipedia"},{url:"http://zufelt.ca/blog/are-you-confused-html5-and-wai-aria-yet",title:"HTML5/WAI-ARIA information"},{url:"http://www.w3.org/WAI/intro/aria",title:"Information page"},{url:"http://www.paciellogroup.com/blog/2011/10/browser-assistive-technology-tests-redux/",title:"Links to various test results"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"a",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a",28:"a",29:"a",30:"a",31:"a",32:"a"},safari:{3.1:"n",3.2:"n",4:"a",5:"a",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"n","9.5-9.6":"a","10.0-10.1":"a",10.5:"a",10.6:"a",11:"a",11.1:"a",11.5:"a",11.6:"a",12:"a",12.1:"a",15:"a",16:"a",17:"a",18:"a"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"a"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"a"},bb:{7:"n",10:"n"},op_mob:{10:"a",11:"a",11.1:"a",11.5:"a",12:"a",12.1:"a",0:"a"},and_chr:{0:"a"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:40.05,usage_perc_a:48.6,ucprefix:!1,parent:"",keywords:"wai,aria"},geolocation:{title:"Geolocation",description:"Method of informing a website of the user's geographical location",spec:"http://www.w3.org/TR/geolocation-API/",status:"cr",links:[{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-geolocation",title:"has.js test"},{url:"http://docs.webplatform.org/wiki/apis/geolocation",title:"WebPlatform Docs"},{url:"http://html5demos.com/geo",title:"Simple demo"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y"},firefox:{2:"p",3:"p",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"p",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"p",10.5:"p",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"n",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"p",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:80.65,usage_perc_a:.02,ucprefix:!1,parent:"",keywords:""},flexbox:{title:"Flexible Box Layout Module",description:"Method of positioning elements in horizontal or vertical stacks.",spec:"http://www.w3.org/TR/css3-flexbox/",status:"cr",links:[{url:"http://css-tricks.com/snippets/css/a-guide-to-flexbox/",title:"A Complete Guide to Flexbox"},{url:"http://bennettfeely.com/flexplorer/",title:"Flexbox CSS generator"},{url:"http://www.adobe.com/devnet/html5/articles/working-with-flexbox-the-new-spec.html",title:"Article on using the latest spec"},{url:"http://philipwalton.github.io/solved-by-flexbox/",title:"Examples on how to solve common layout problems with flexbox"},{url:"http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/",title:"Tutorial on cross-browser support"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"a x #2",11:"y"},firefox:{2:"a x #1",3:"a x #1",3.5:"a x #1",3.6:"a x #1",4:"a x #1",5:"a x #1",6:"a x #1",7:"a x #1",8:"a x #1",9:"a x #1",10:"a x #1",11:"a x #1",12:"a x #1",13:"a x #1",14:"a x #1",15:"a x #1",16:"a x #1",17:"a x #1",18:"a x #1",19:"a x #1",20:"a x #1",21:"a x #1",22:"a #3",23:"a #3",24:"a #3",25:"a #3",26:"a #3",27:"a #3"},chrome:{4:"a x #1",5:"a x #1",6:"a x #1",7:"a x #1",8:"a x #1",9:"a x #1",10:"a x #1",11:"a x #1",12:"a x #1",13:"a x #1",14:"a x #1",15:"a x #1",16:"a x #1",17:"a x #1",18:"a x #1",19:"a x #1",20:"a x #1",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a x #1",3.2:"a x #1",4:"a x #1",5:"a x #1",5.1:"a x #1",6:"a x #1",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"y",15:"y x",16:"y x",17:"y",18:"y"},ios_saf:{3.2:"a x #1","4.0-4.1":"a x #1","4.2-4.3":"a x #1","5.0-5.1":"a x #1","6.0-6.1":"a x #1","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a x #1",2.2:"a x #1",2.3:"a x #1",3:"a x #1",4:"a x #1",4.1:"a x #1","4.2-4.3":"a x #1",4.4:"y"},bb:{7:"a x #1",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"a x #1"},ie_mob:{10:"a x #2"}},notes:'Most partial support refers to supporting an <a href="http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/">older version</a> of the specification or an <a href="http://www.w3.org/TR/2012/WD-css3-flexbox-20120322/">older syntax</a>. For Firefox 21+ it refers to lack of flex-wrap & flex-flow support.',usage_perc_y:37.88,usage_perc_a:37.66,ucprefix:!1,parent:"",keywords:"flex"},webgl:{title:"WebGL - 3D Canvas graphics",description:"Method of generating dynamic 3D graphics using JavaScript, accelerated through hardware",spec:"https://www.khronos.org/registry/webgl/specs/1.0/",status:"other",links:[{url:"http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation",title:"Instructions on enabling WebGL"},{url:"http://webkit.org/blog/603/webgl-now-available-in-webkit-nightlies/",title:"Webkit blog post"},{url:"http://www.khronos.org/webgl/wiki/Tutorial",title:"Tutorial"},{url:"http://hacks.mozilla.org/2009/12/webgl-draft-released-today/",title:"Firefox blog post"},{url:"http://iewebgl.com/",title:"Polyfill for IE"}],categories:["Canvas"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"p",10:"p",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"a",12.1:"a",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"a",12.1:"a",0:"y"},and_chr:{0:"n"},and_ff:{0:"y"},ie_mob:{10:"p"}},notes:'Support listed as "partial" refers to the fact that not all users with these browsers have WebGL access. This is due to the additional requirement for users to have <a href="http://www.khronos.org/webgl/wiki/BlacklistsAndWhitelists">up to date video drivers</a>. This problem was <a href="http://blog.chromium.org/2012/02/gpu-accelerating-2d-canvas-and-enabling.html">solved in Chrome</a> as of version 18.\r\n\r\nNote that WebGL is part of the <a href="http://www.khronos.org/webgl/">Khronos Group</a>, not the W3C. On Chrome for Android, WebGL is disabled by default, but can be enabled by enabling the "Enable WebGL" flag under chrome://flags',usage_perc_y:33.4,usage_perc_a:19.68,ucprefix:!1,parent:"canvas",keywords:"web gl"},fileapi:{title:"File API",description:"Method of manipulating file objects in web applications client-side, as well as programmatically selecting them and accessing their data.",spec:"http://www.w3.org/TR/FileAPI/",status:"wd",links:[{url:"https://developer.mozilla.org/en/Using_files_from_web_applications",title:"MDN article"},{url:"http://docs.webplatform.org/wiki/apis/file",title:"WebPlatform Docs"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"a",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"a",4:"a",4.1:"a","4.2-4.3":"a",4.4:"y"},bb:{7:"a",10:"y"},op_mob:{10:"n",11:"n",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"Partial support in older Safari refers to lacking FileReader support. ",usage_perc_y:67.73,usage_perc_a:5.38,ucprefix:!1,parent:"",keywords:"FileReader"},shadowdom:{title:"Shadow DOM",description:"Method of establishing and maintaining functional boundaries between DOM trees and how these trees interact with each other within a document, thus enabling better functional encapsulation within the DOM.",spec:"http://www.w3.org/TR/shadow-dom/",status:"wd",links:[{url:"http://www.html5rocks.com/tutorials/webcomponents/shadowdom/",title:"HTML5Rocks - Shadow DOM 101 article"},{url:"http://html5-demos.appspot.com/static/shadowdom-visualizer/index.html",title:"Shadow DOM Visualizer"}],categories:["DOM","HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"y x",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y x"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"",usage_perc_y:33.29,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"web components"},websockets:{title:"Web Sockets",description:"Bidirectional communication technology for web apps",spec:"http://www.w3.org/TR/websockets/",status:"cr",links:[{url:"http://docs.webplatform.org/wiki/apis/websocket",title:"WebPlatform Docs"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-websockets",title:"has.js test"},{url:"http://websocket.org/aboutwebsocket.html",title:"WebSockets information"},{url:"http://en.wikipedia.org/wiki/WebSocket",title:"Wikipedia"},{url:"http://updates.html5rocks.com/2011/08/What-s-different-in-the-new-WebSocket-protocol",title:"Details on newer protocol"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"a",5:"a",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"a",5.1:"a",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"a",11.1:"a",11.5:"a",11.6:"a",12:"a",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"a","5.0-5.1":"a","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"a",11.1:"a",11.5:"a",12:"a",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support refers to the websockets implementation using an older version of the protocol and/or the implementation being disabled by default (due to security issues with the older protocol).",usage_perc_y:67.46,usage_perc_a:2.62,ucprefix:!0,parent:"",keywords:""},"script-async":{title:"async attribute for external scripts",description:"The boolean async attribute on script elements allows the external JavaScript file to run when it's available, without delaying page load first.",spec:"http://www.w3.org/TR/html5/scripting-1.html#attr-script-async",status:"cr",links:[{url:"https://developer.mozilla.org/en/HTML/Element/script#Attributes",title:"MDN article"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/script.js#script-async",title:"has.js test"},{url:"http://ie.microsoft.com/testdrive/Performance/AsyncScripts/Default.html",title:"Demo"}],categories:["HTML5","DOM"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"a",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Using script.async = false; to maintain execution order for dynamically-added scripts isn't supported in Safari 5.0",usage_perc_y:72.82,usage_perc_a:.31,ucprefix:!1,parent:"",keywords:""},cors:{title:"Cross-Origin Resource Sharing",description:"Method of performing XMLHttpRequests across domains",spec:"http://www.w3.org/TR/cors/",status:"cr",links:[{url:"http://saltybeagle.com/2009/09/cross-origin-resource-sharing-demo/",title:"Demo and script with cross-browser support"},{url:"http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/",title:"Mozilla Hacks blog post"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-cors-xhr",title:"has.js test"},{url:"http://msdn.microsoft.com/en-us/library/cc288060(VS.85).aspx",title:"Alternative implementation by IE8"},{url:"http://dev.opera.com/articles/view/dom-access-control-using-cross-origin-resource-sharing/",title:"DOM access using CORS"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"a",9:"a",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Supported somewhat in IE8 and IE9 using the XDomainRequest object (but has <a href=" http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx">limitations</a>)',usage_perc_y:75.51,usage_perc_a:13.52,ucprefix:!1,parent:"",keywords:""},calc:{title:"calc() as CSS unit value",description:"Method of allowing calculated values for length units, i.e. width: calc(100% - 3em)",spec:"http://www.w3.org/TR/css3-values/#calc",status:"cr",links:[{url:"http://docs.webplatform.org/wiki/css/functions/calc",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/en/CSS/-moz-calc",title:"MDN article"},{url:"http://hacks.mozilla.org/2010/06/css3-calc/",title:"Mozilla Hacks article"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y x",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y x","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Support can be somewhat emulated in older versions of IE using the non-standard expression() syntax. ",usage_perc_y:71.77,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},ruby:{title:"Ruby annotation",description:"Method of adding pronunciation or other annotations using ruby elements (primarily used in East Asian typography)",spec:"http://www.w3.org/TR/html-markup/ruby.html",status:"wd",links:[{url:"https://addons.mozilla.org/firefox/addon/6812/",title:'Addon "HTML Ruby" for Firefox support'},{url:"http://html5doctor.com/ruby-rt-rp-element/",title:"HTML5 Doctor article"},{url:"http://docs.webplatform.org/wiki/html/elements/ruby",title:"WebPlatform Docs"},{url:"https://addons.mozilla.org/firefox/addon/1935/",title:'Add-on "XHTML Ruby Support" for Firefox'}],categories:["HTML5"],stats:{ie:{5.5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a"},firefox:{2:"p",3:"p",3.5:"p",3.6:"p",4:"p",5:"p",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"p",13:"p",14:"p",15:"p",16:"p",17:"p",18:"p",19:"p",20:"p",21:"p",22:"p",23:"p",24:"p",25:"p",26:"p",27:"p"},chrome:{4:"p",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a",28:"a",29:"a",30:"a",31:"a",32:"a"},safari:{3.1:"p",3.2:"p",4:"p",5:"a",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"p","9.5-9.6":"p","10.0-10.1":"p",10.5:"p",10.6:"p",11:"p",11.1:"p",11.5:"p",11.6:"p",12:"p",12.1:"p",15:"a",16:"a",17:"a",18:"a"},ios_saf:{3.2:"p","4.0-4.1":"p","4.2-4.3":"p","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"p"},android:{2.1:"p",2.2:"p",2.3:"p",3:"a",4:"a",4.1:"a","4.2-4.3":"a",4.4:"a"},bb:{7:"p",10:"a"},op_mob:{10:"p",11:"p",11.1:"p",11.5:"p",12:"p",12.1:"p",0:"a"},and_chr:{0:"a"},and_ff:{0:"p"},ie_mob:{10:"a"}},notes:"Browsers without native support can still simulate support using CSS. Partial support refers to only supporting basic ruby, may still be missing writing-mode, Complex ruby and CSS3 Ruby",usage_perc_y:0,usage_perc_a:72.03,ucprefix:!1,parent:"",keywords:""},"css-opacity":{title:"CSS3 Opacity",description:"Method of setting the transparency level of an element",spec:"http://www.w3.org/TR/css3-color/",status:"rec",links:[{url:"http://www.css3files.com/color/#opacity",title:"Information page"},{url:"http://docs.webplatform.org/wiki/css/properties/opacity",title:"WebPlatform Docs"}],categories:["CSS3"],stats:{ie:{5.5:"a",6:"a",7:"a",8:"a",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Transparency for elements in IE8 and older can be achieved using the proprietary "filter" property and does not work well with PNG images using alpha transparency.',usage_perc_y:85.55,usage_perc_a:9.03,ucprefix:!1,parent:"",keywords:"transparent,transparency,alpha"},"form-validation":{title:"Form validation",description:"Method of setting required fields and field types without requiring JavaScript",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#client-side-form-validation",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/html/attributes/required",title:"WebPlatform Docs"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"a",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"y"},op_mob:{
8
+ 10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"a"}},notes:"Partial support in Safari refers to lack of notice when form with required fields is attempted to be submitted. Partial support in IE10 mobile refers to lack of warning when blocking submission.",usage_perc_y:61.75,usage_perc_a:4.07,ucprefix:!1,parent:"forms",keywords:""},history:{title:"Session history management",description:"Method of manipulating the user's browser's session history in JavaScript using history.pushState, history.replaceState and the popstate event",spec:"http://www.w3.org/TR/html5/browsers.html#history-1",status:"cr",links:[{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-history-state",title:"has.js test"},{url:"https://github.com/browserstate/history.js",title:"History.js polyfill "},{url:"http://docs.webplatform.org/wiki/dom/history",title:"WebPlatform Docs"},{url:"http://html5demos.com/history",title:"Demo page"},{url:"http://www.adequatelygood.com/2010/7/Saner-HTML5-History-Management",title:"Introduction to history management"},{url:"https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history",title:"MDN article"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"a",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"a","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"y",2.3:"y",3:"n",4:"n",4.1:"n","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Older iOS versions and Android 4.0.4 claim support, but implementation is too buggy to be useful. Partial support in other Safari browsers refers to other buggy behavior.",usage_perc_y:68.29,usage_perc_a:3.89,ucprefix:!1,parent:"",keywords:"onpushstate,onreplacestate"},json:{title:"JSON parsing",description:"Method of converting JavaScript objects to JSON strings and JSON back to objects using JSON.stringify() and JSON.parse()",spec:"http://es5.github.com/#x15.12",status:"other",links:[{url:"http://docs.webplatform.org/wiki/apis/json",title:"WebPlatform Docs"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/json.js#json",title:"has.js test"},{url:"http://www.json.org/js.html",title:"JSON in JS (includes script w/support)"},{url:"https://developer.mozilla.org/En/Using_native_JSON",title:"MDN article"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Requires document to be in IE8+ <a href="http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx">standards mode</a> to work in IE8.',usage_perc_y:93.71,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},classlist:{title:"classList (DOMTokenList )",description:"Method of easily manipulating classes on elements, using the DOMTokenList object.",spec:"http://www.w3.org/TR/dom/#dom-element-classlist",status:"wd",links:[{url:"https://github.com/eligrey/classList.js",title:"Polyfill script"},{url:"http://hacks.mozilla.org/2010/01/classlist-in-firefox-3-6/",title:"Mozilla Hacks article"},{url:"http://docs.webplatform.org/wiki/dom/properties/classList",title:"WebPlatform Docs"},{url:"https://github.com/eligrey/classList.js/pull/12",title:"Polyfill script for classList on SVG elements on WebKit"}],categories:["DOM","HTML5"],stats:{ie:{5.5:"p",6:"p",7:"p",8:"p",9:"p",10:"y",11:"y"},firefox:{2:"p",3:"p",3.5:"p",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"p",5:"p",6:"p",7:"p",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"p",5:"p",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"p","9.5-9.6":"p","10.0-10.1":"p",10.5:"p",10.6:"p",11:"p",11.1:"p",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"p","4.0-4.1":"p","4.2-4.3":"p","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"p"},android:{2.1:"p",2.2:"p",2.3:"p",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"p",11:"p",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:73.54,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},"text-overflow":{title:"CSS3 Text-overflow",description:"Append ellipsis when text overflows its containing element",spec:"http://www.w3.org/TR/css3-ui/#text-overflow0",status:"wd",links:[{url:"http://www.css3files.com/text/",title:"Information page"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-text-overflow",title:"has.js test"},{url:"http://docs.webplatform.org/wiki/css/properties/text-overflow",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/En/CSS/Text-overflow",title:"MDN article"},{url:"https://github.com/rmorse/AutoEllipsis",title:"jQuery polyfill for Firefox"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"p",3:"p",3.5:"p",3.6:"p",4:"p",5:"p",6:"p",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y x","9.5-9.6":"y x","10.0-10.1":"y x",10.5:"y x",10.6:"y x",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y x"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y x",11:"y x",11.1:"y x",11.5:"y x",12:"y x",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:93.95,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"textoverflow,ellipsis"},webm:{title:"WebM/VP8 video format",description:"Multimedia format designed to provide a royalty-free, high-quality open video compression format for use with HTML5 video.",spec:"http://www.webmproject.org/",status:"other",links:[{url:"http://perian.org/",title:"Perian :Mac OSX Webm Codec install"},{url:"https://tools.google.com/dlpage/webmmf",title:"Codec for IE9 support"},{url:"http://webmproject.org",title:"Officical website"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/video.js#video-webm",title:"has.js test"},{url:"http://www.broken-links.com/2010/09/01/playing-webm-in-safari-with-plugins/",title:"Info on supporting WebM in Safari"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"p",10:"p",11:"p"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"p",4:"p",5:"p",5.1:"p",6:"p",6.1:"p",7:"p"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"p"}},notes:"Will work in IE9+ and Safari/MacOSX provided the user has the WebM codecs installed.",usage_perc_y:55.72,usage_perc_a:0,ucprefix:!1,parent:"video",keywords:"matroska"},mpeg4:{title:"MPEG-4/H.264 video format",description:"Commonly used video compression format (not royalty-free)",spec:"http://ip.hhi.de/imagecom_G1/assets/pdfs/csvt_overview_0305.pdf",status:"other",links:[{url:"http://www.interoperabilitybridges.com/html5-extension-for-wmp-plugin",title:"Firefox extension allowing support in Win7"},{url:"http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC",title:"Wikipedia article"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a",2.2:"a",2.3:"a",3:"a",4:"a",4.1:"a","4.2-4.3":"a",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"a"},ie_mob:{10:"y"}},notes:'The Android 2.3 browser currently requires <a href="http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/">specific handling</a> to play videos. Firefox <a href="http://blog.lizardwrangler.com/2012/03/18/video-user-experience-and-our-mission/">will include support</a> on some platforms in upcoming versions. Firefox supports H.264 on Windows 7 and later since version 21. Partial support for Firefox refers to the lack of support in OSX & Linux platforms, for Android Firefox it refers to the inability of hardware acceleration.',usage_perc_y:59.55,usage_perc_a:18.1,ucprefix:!1,parent:"video",keywords:"avc,mp4,mpv,mov,aac"},ogv:{title:"Ogg/Theora video format",description:"Free lossy video compression format.",spec:"http://theora.org/doc/",status:"other",links:[{url:"http://en.wikipedia.org/wiki/Theora",title:"Wikipedia article"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"p",10:"p",11:"p"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"n"},and_ff:{0:"y"},ie_mob:{10:"p"}},notes:"",usage_perc_y:49.8,usage_perc_a:0,ucprefix:!1,parent:"video",keywords:"xiph"},wordwrap:{title:"CSS3 Overflow-wrap",description:"Allows lines to be broken within words if an otherwise unbreakable string is too long to fit.",spec:"http://www.w3.org/TR/css3-text/#overflow-wrap",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/properties/word-wrap",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/En/CSS/Word-wrap",title:"MDN article"},{url:"http://www.css3files.com/text/#wordwrap",title:"Information page"}],categories:["CSS3"],stats:{ie:{5.5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a"},firefox:{2:"n",3:"n",3.5:"a",3.6:"a",4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a"},chrome:{4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a",3.2:"a",4:"a",5:"a",5.1:"a",6:"a",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"a",10.6:"a",11:"a",11.1:"a",11.5:"a",11.6:"a",12:"a",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"a","6.0-6.1":"a","7.0":"y"},op_mini:{"5.0-7.0":"a"},android:{2.1:"a",2.2:"a",2.3:"a",3:"a",4:"a",4.1:"a","4.2-4.3":"a",4.4:"y"},bb:{7:"a",10:"y"},op_mob:{10:"a",11:"a",11.1:"a",11.5:"a",12:"a",12.1:"a",0:"y"},and_chr:{0:"y"},and_ff:{0:"a"},ie_mob:{10:"a"}},notes:'Partial support refers to requiring the legacy name "word-wrap" (rather than overflow-wrap) to work.',usage_perc_y:36.93,usage_perc_a:57.51,ucprefix:!1,parent:"",keywords:"wordwrap,word-wrap"},progressmeter:{title:"Progress & Meter",description:"Method of indicating a progress state (progress element) or the current level of a gauge (meter element).\r\n",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-progress-element",status:"wd",links:[{url:"http://dev.opera.com/articles/view/new-form-features-in-HTML5/#newoutput",title:"Dev.Opera article"},{url:"http://peter.sh/examples/?/html/meter-progress.html",title:"Examples of progress and meter elements"},{url:"http://docs.webplatform.org/wiki/html/elements/progress",title:"WebPlatform Docs"},{url:"http://html5doctor.com/measure-up-with-the-meter-tag/",title:"HTML5 Doctor on meter element "}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"a",11:"a"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"a"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"a"}},notes:'Partial support in Firefox 6-15, IE10 & iOS7 Safari refers to supporting the progress element, but not the meter element. iOS7 Safari also does not support "indeterminate" progress elements.',usage_perc_y:52.21,usage_perc_a:14.58,ucprefix:!1,parent:"forms",keywords:""},"object-fit":{title:"CSS3 object-fit/object-position",description:'Method of specifying how an object (image or video) should fit inside its box. object-fit options include "contain" (fit according to aspect ratio), "fill" (stretches object to fill) and "cover" (overflows box but maintains ratio), where object-position allows the object to be repositioned like background-image does.',spec:"http://www.w3.org/TR/css3-images/",status:"cr",links:[{url:"http://dev.opera.com/articles/view/css3-object-fit-object-position/",title:"Dev.Opera article"},{url:"http://docs.webplatform.org/wiki/css/properties/object-fit",title:"WebPlatform Docs"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"u",27:"u"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"n",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"y x",11:"y x",11.1:"y x",11.5:"y x",11.6:"y x",12:"y x",12.1:"y x",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"y x",11.1:"y x",11.5:"y x",12:"y x",12.1:"y x",0:"n"},and_chr:{0:"n"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"Can be enabled in Chrome 31+ and Opera 18+ by enabling experimental Web Platform features under chrome://flags/ or opera://flags/.",usage_perc_y:.81,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"objectfit,objectposition"},xhr2:{title:"XMLHttpRequest 2",description:"Adds more functionality to AJAX requests like file uploads, transfer progress information and the ability to send form data.",spec:"http://www.w3.org/TR/XMLHttpRequest2/",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/apis/xhr/XMLHttpRequest",title:"WebPlatform Docs"},{url:"http://www.profilepicture.co.uk/tutorials/ajax-file-upload-xmlhttprequest-level-2/",title:"Article with file upload demo"},{url:"https://developer.mozilla.org/en/XMLHttpRequest/FormData",title:"MDN article on FormData"},{url:"https://github.com/3nr1c/jUri.js",title:"Polyfill for FormData object"}],categories:["DOM","JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"a",3.6:"a",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"u",5:"u",6:"u",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:73.51,usage_perc_a:.35,ucprefix:!1,parent:"",keywords:"formdata"},minmaxwh:{title:"CSS min/max-width/height",description:"Method of setting a minimum or maximum width or height to an element. ",spec:"http://www.w3.org/TR/CSS21/visudet.html#min-max-widths",status:"rec",links:[{url:"http://docs.webplatform.org/wiki/css/properties/min-width",title:"WebPlatform Docs"},{url:"http://code.google.com/p/ie7-js/",title:"JS library with support"},{url:"http://www.impressivewebs.com/min-max-width-height-css/",title:"CSS Basics post"}],categories:["CSS2"],stats:{ie:{5.5:"p",6:"p",7:"y",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'IE7 does not support "inherit" as a value on any of these properties. IE8 has some bugs with max-width/height combined with overflow: auto/scroll.',usage_perc_y:94.36,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"min-width,min-height,max-width,max-height"},details:{title:"Details & Summary elements",description:"The &lt;details> element generates a simple no-JavaScript widget to show/hide element contents, optionally by clicking on its child &lt;summary> element.",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#the-details-element",status:"wd",links:[{url:"http://html5doctor.com/summary-figcaption-element/",title:"HTML5 Doctor article"},{url:"http://mathiasbynens.be/notes/html5-details-jquery",title:"jQuery fallback script"},{url:"http://docs.webplatform.org/wiki/html/elements/details",title:"WebPlatform Docs"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-details",title:"has.js test"},{url:"https://gist.github.com/370590",title:"Fallback script"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"p",3.5:"p",3.6:"p",4:"p",5:"p",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"p",13:"p",14:"p",15:"p",16:"p",17:"p",18:"p",19:"p",20:"p",21:"p",22:"p",23:"p",24:"p",25:"p",26:"p",27:"p"},chrome:{4:"p",5:"p",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"p",5:"p",5.1:"p",6:"y",6.1:"y",7:"y"},opera:{9:"p","9.5-9.6":"p","10.0-10.1":"p",10.5:"p",10.6:"p",11:"p",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"p","4.0-4.1":"p","4.2-4.3":"p","5.0-5.1":"p","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"p"},android:{2.1:"p",2.2:"p",2.3:"p",3:"p",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"p",10:"y"},op_mob:{10:"p",11:"p",11.1:"p",11.5:"p",12:"p",12.1:"p",0:"y"},and_chr:{0:"y"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"",usage_perc_y:44.5,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},"text-stroke":{title:"CSS text-stroke",description:"Method of declaring the outline (stroke) width and color for text.",spec:"http://developer.apple.com/library/safari/documentation/appleapplications/reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266-_webkit_text_stroke",status:"unoff",links:[{url:"http://www.westciv.com/tools/textStroke/",title:"Live editor"},{url:"http://css-tricks.com/7405-adding-stroke-to-web-text/",title:"Information & workarounds"}],categories:["CSS"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"u",27:"u"},chrome:{4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"y x",3.2:"y x",4:"y x",5:"y x",5.1:"y x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"a x","4.0-4.1":"y x","4.2-4.3":"y x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y x",2.2:"y x",2.3:"y x",3:"n",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y x"},bb:{7:"y x",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:'Does not yet appear in any W3C specification. Was briefly included in a spec as the "text-outline" property, but this was removed.',usage_perc_y:48.41,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"textstroke,stroke-color,stroke-width,fill-color"},"inline-block":{title:"CSS inline-block",description:"Method of displaying an element as a block while flowing it with text. ",spec:"http://www.w3.org/TR/CSS21/visuren.html#fixed-positioning",status:"rec",links:[{url:"http://robertnyman.com/2010/02/24/css-display-inline-block-why-it-rocks-and-why-it-sucks/",title:"Blog post w/info"},{url:"http://docs.webplatform.org/wiki/css/properties/display",title:"WebPlatform Docs"},{url:"http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/",title:"Info on cross browser support"}],categories:["CSS2"],stats:{ie:{5.5:"a",6:"a",7:"a",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"a x",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Only supported in IE6 and IE7 on elements with a display of "inline" by default. <a href="http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/">Alternative properties</a> are available to provide complete cross-browser support.',usage_perc_y:93.84,usage_perc_a:.74,ucprefix:!1,parent:"",keywords:"inlineblock"},notifications:{title:"Web Notifications",description:"Method of alerting the user outside of a web page by displaying notifications (that do not require interaction by the user).",spec:"http://www.w3.org/TR/notifications/",status:"wd",links:[{url:"http://www.html5rocks.com/tutorials/notifications/quick/",title:"HTML5 Rocks tutorial"},{url:"http://www.chromium.org/developers/design-documents/desktop-notifications/api-specification",title:"Chromium API"},{url:"https://addons.mozilla.org/en-us/firefox/addon/221523/",title:"Add-on "}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"a x",21:"a x",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"a x"},bb:{7:"n",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"a x"},and_chr:{0:"a x"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"",usage_perc_y:45.27,usage_perc_a:2.66,ucprefix:!1,parent:"",keywords:""},stream:{title:"getUserMedia/Stream API",description:"Method of accessing external device data (such as a webcam video stream). Formerly this was envisioned as the &lt;device> element.",spec:"http://www.w3.org/TR/mediacapture-streams/",status:"wd",links:[{url:"http://my.opera.com/core/blog/2011/03/23/webcam-orientation-preview",title:"Technology preview from Opera"},{url:"http://docs.webplatform.org/wiki/dom/methods/getUserMedia",title:"WebPlatform Docs"}],categories:["HTML5","JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"y",12.1:"y",15:"n",16:"n",17:"n",18:"y x"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"y",12.1:"y",0:"y x"},and_chr:{0:"y"},and_ff:{0:"y x"},ie_mob:{10:"n"}},notes:"",usage_perc_y:48.44,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"camera,device,getUserMedia,media stream,Media Capture API"},"svg-img":{title:"SVG in HTML img element",description:"Method of displaying SVG images in HTML using &lt;img>",spec:"http://www.w3.org/TR/html5/embedded-content-1.html#the-img-element",status:"cr",links:[{url:"http://www.codedread.com/blog/",title:"Blog with SVGs an images"},{url:"http://blog.dholbert.org/2010/10/svg-as-image.html",title:"Blog post with examples"}],categories:["SVG"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"a",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"
9
+ },android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:83.65,usage_perc_a:.01,ucprefix:!1,parent:"",keywords:"svg-as-img,svg-in-img"},datalist:{title:"Datalist element",description:"Method of setting a list of options for a user to select in a text field, while leaving the ability to enter a custom value.",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-datalist-element",status:"wd",links:[{url:"http://demo.agektmr.com/datalist/",title:"Eiji Kitamura's options demos & tests"},{url:"http://docs.webplatform.org/wiki/html/elements/datalist",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/en/HTML/Element/datalist",title:"MDN reference"},{url:"http://afarkas.github.com/webshim/demos/",title:"HTML5 Library including datalist support"},{url:"http://hacks.mozilla.org/2010/11/firefox-4-html5-forms/",title:"Mozilla Hacks article"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"p",7:"p",8:"p",9:"p",10:"a",11:"a"},firefox:{2:"p",3:"p",3.5:"p",3.6:"p",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"p",5:"p",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"p",13:"p",14:"p",15:"p",16:"p",17:"p",18:"p",19:"n",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"p",3.2:"p",4:"p",5:"p",5.1:"p",6:"n",6.1:"n",7:"n"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"p","4.0-4.1":"p","4.2-4.3":"p","5.0-5.1":"p","6.0-6.1":"p","7.0":"p"},op_mini:{"5.0-7.0":"n"},android:{2.1:"p",2.2:"p",2.3:"p",3:"p",4:"p",4.1:"p","4.2-4.3":"p",4.4:"p"},bb:{7:"p",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"p"},and_chr:{0:"p"},and_ff:{0:"y"},ie_mob:{10:"p"}},notes:'Partial support in IE10 refers to <a href="http://playground.onereason.eu/2013/04/ie10s-lousy-support-for-datalists/">significantly buggy behavior</a>.',usage_perc_y:48.86,usage_perc_a:10.9,ucprefix:!1,parent:"forms",keywords:"list attribute"},dataset:{title:"dataset & data-* attributes",description:"Method of applying and accessing custom data to elements.",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#embedding-custom-non-visible-data-with-the-data-*-attributes",status:"wd",links:[{url:"http://www.orangesoda.net/jquery.dataset.html",title:"jQuery polyfill for dataset support"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/dom.js#dom-dataset",title:"has.js test"},{url:"http://html5demos.com/dataset",title:"Demo using dataset"},{url:"http://html5doctor.com/html5-custom-data-attributes/",title:"HTML5 Doctor article"},{url:"http://docs.webplatform.org/wiki/html/attributes/data-*",title:"WebPlatform Docs"}],categories:["HTML5"],stats:{ie:{5.5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"y"},firefox:{2:"a",3:"a",3.5:"a",3.6:"a",4:"a",5:"a",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"a",6:"a",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a",3.2:"a",4:"a",5:"a",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"a","9.5-9.6":"a","10.0-10.1":"a",10.5:"a",10.6:"a",11:"a",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"a"},android:{2.1:"a",2.2:"a",2.3:"a",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"a",11:"a",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"a"}},notes:'All browsers can already use data-* attributes and access them using getAttribute. "Supported" refers to accessing the values using the dataset property. Current spec only refers to support on HTML elements, only some browsers also have support for SVG/MathML elements.',usage_perc_y:62.15,usage_perc_a:32.43,ucprefix:!1,parent:"",keywords:"DOMStringMap"},"css-grid":{title:"CSS Grid Layout",description:"Method of using a grid concept to lay out content, providing a mechanism for authors to divide available space for lay out into columns and rows using a set of predictable sizing behaviors",spec:"http://www.w3.org/TR/css3-grid-layout/",status:"wd",links:[{url:"https://bugzilla.mozilla.org/show_bug.cgi?id=616605",title:"Mozilla (Firefox) feature request"},{url:"http://blogs.msdn.com/b/ie/archive/2011/04/14/ie10-platform-preview-and-css-features-for-adaptive-layouts.aspx",title:"IE Blog post"},{url:"https://github.com/codler/Grid-Layout-Polyfill",title:"Grid Layout Polyfill"},{url:"https://bugs.webkit.org/show_bug.cgi?id=60731",title:"Webkit (Chrome, Safari, etc.) feature request"}],categories:["CSS"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"p",10:"y x",11:"y x"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"p",20:"p",21:"p",22:"p",23:"p",24:"p",25:"p",26:"u",27:"u"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"p",26:"p",27:"p",28:"p",29:"p",30:"p",31:"u",32:"u"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"p",6.1:"p",7:"p"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"p","7.0":"p"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"p",4.4:"p"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"p"},and_chr:{0:"p"},and_ff:{0:"n"},ie_mob:{10:"y x"}},notes:"",usage_perc_y:11.11,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"grids,grid-row,grid-column"},menu:{title:"Toolbar/context menu",description:"Method of defining a toolbar menu, a context menu or a list of (interactive) options using the &lt;menu> element.",spec:"http://www.w3.org/TR/html5/interactive-elements.html#context-menus",status:"cr",links:[{url:"https://raw.github.com/phiggins42/has.js/master/detect/events.js#event-contextmenu",title:"has.js test"},{url:"https://bug617528.bugzilla.mozilla.org/attachment.cgi?id=554309",title:"Demo"},{url:"http://addyosmani.github.com/jQuery-contextMenu/",title:"jQuery polyfill"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"u",32:"u"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"n"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:'Partial support in Firefox refers to using the non-standard "menuitem" child elements, where the current spec uses "<a href="http://www.w3.org/TR/html5/interactive-elements.html#the-command-element">command</a>" child elements. It is also currently limited to context menus, not toolbar menus.',usage_perc_y:0,usage_perc_a:14.7,ucprefix:!1,parent:"",keywords:"contextmenu,menuitem,command"},rem:{title:"rem (root em) units",description:'Type of unit similar to "em", but relative only to the root element, not any parent element. Thus compounding does not occur as it does with "em" units.',spec:"http://www.w3.org/TR/css3-values/#font-relative-lengths",status:"cr",links:[{url:"http://snook.ca/archives/html_and_css/font-size-with-rem",title:"Article on usage"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"u",5:"u",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:80.56,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},ttf:{title:"TTF/OTF - TrueType and OpenType font support",description:"Support for the TrueType (.ttf)and OpenType (.otf) outline font formats in @font-face. ",spec:"http://developer.apple.com/fonts/TTRefMan/index.html",status:"other",links:[{url:"http://stackoverflow.com/questions/17694143/what-is-the-status-of-ttf-support-in-internet-explorer",title:"What is the status of TTF support in Internet Explorer?"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"a",10:"a",11:"a"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"u"}},notes:'Partial support in IE9 refers to the fonts only working <a href="http://blogs.msdn.com/b/ie/archive/2010/07/15/the-css-corner-better-web-typography-for-better-design.aspx">when set to be "installable"</a>.',usage_perc_y:64.48,usage_perc_a:16.11,ucprefix:!1,parent:"fontface",keywords:""},touch:{title:"Touch events",description:"Method of registering when, where and how the interface is touched, for devices with a touch screen. These DOM events are similar to mousedown, mousemove, etc.",spec:"http://www.w3.org/TR/touch-events/",status:"rec",links:[{url:"http://schepers.cc/getintouch",title:"Information on the spec development"},{url:"http://www.quirksmode.org/mobile/tableTouch.html",title:"Detailed support tables"},{url:"http://www.quirksmode.org/m/tests/drag2.html",title:"Multi-touch demo"},{url:"http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx",title:"Internet Explorer's gesture and touch implementation."}],categories:["DOM","JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"p",11:"p"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"a",5:"a",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"p"}},notes:"Internet Explorer implements Pointer Events specification which supports more input devices than Touch Events one.",usage_perc_y:58.16,usage_perc_a:.12,ucprefix:!1,parent:"",keywords:"touchstart,touchend,touchmove,touchenter,touchleave,touchcancel"},matchesselector:{title:"matches() DOM method",description:"Method of testing whether or not a DOM element matches a given selector. Formerly known (and largely supported with prefix) as matchesSelector.",spec:"http://www.w3.org/TR/selectors-api2/",status:"wd",links:[{url:"https://developer.mozilla.org/en/DOM/Element.mozMatchesSelector",title:"MDN article"},{url:"http://docs.webplatform.org/wiki/dom/methods/matchesSelector",title:"WebPlatform Docs"}],categories:["DOM","JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"a x",10:"a x",11:"a x"},firefox:{2:"n",3:"n",3.5:"n",3.6:"a x",4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"a x",21:"a x",22:"a x",23:"a x",24:"a x",25:"a x",26:"a x",27:"a x"},chrome:{4:"a x",5:"a x",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"a x",21:"a x",22:"a x",23:"a x",24:"a x",25:"a x",26:"a x",27:"a x",28:"a x",29:"a x",30:"a x",31:"a x",32:"a x"},safari:{3.1:"n",3.2:"n",4:"n",5:"a x",5.1:"a x",6:"a x",6.1:"a x",7:"a x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"a x",11.6:"a x",12:"a x",12.1:"a x",15:"a x",16:"a x",17:"a x",18:"a x"},ios_saf:{3.2:"n","4.0-4.1":"a x","4.2-4.3":"a x","5.0-5.1":"a x","6.0-6.1":"a x","7.0":"a x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"a x",2.3:"a x",3:"a x",4:"a x",4.1:"a x","4.2-4.3":"a x",4.4:"a x"},bb:{7:"a x",10:"a x"},op_mob:{10:"n",11:"n",11.1:"a x",11.5:"a x",12:"a x",12.1:"a x",0:"a x"},and_chr:{0:"a x"},and_ff:{0:"a x"},ie_mob:{10:"a x"}},notes:'Partial support refers to supporting the older specification\'s "matchesSelector" name rather than just "matches".',usage_perc_y:0,usage_perc_a:80.6,ucprefix:!1,parent:"",keywords:" matchesSelector"},"pointer-events":{title:"CSS pointer-events (for HTML)",description:'This CSS property, when set to "none" allows elements to not receive hover/click events, instead the event will occur on anything behind it. ',spec:"http://wiki.csswg.org/spec/css4-ui#pointer-events",status:"unoff",links:[{url:"http://robertnyman.com/2010/03/22/css-pointer-events-to-allow-clicks-on-underlying-elements/",title:"Article & tutorial"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-pointerevents",title:"has.js test"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"Already part of the SVG specification, and all SVG-supporting browsers appear to support the property on SVG elements.",usage_perc_y:63.82,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"pointerevents"},blobbuilder:{title:"Blob constructing",description:"Construct Blobs (binary large objects) either using the BlobBuilder API (deprecated) or the Blob constructor.",spec:"http://www.w3.org/TR/file-writer-api/#the-blobbuilder-interface",status:"wd",links:[{url:"https://developer.mozilla.org/en/DOM/BlobBuilder",title:"MDN article on BlobBuilder"},{url:"https://developer.mozilla.org/en-US/docs/DOM/Blob",title:"MDN article on Blobs"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"a x",7:"a x",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"a x",4:"a x",4.1:"a x","4.2-4.3":"a x",4.4:"a x"},bb:{7:"n",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"y",0:"y"},and_chr:{0:"a x"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support refers to only supporting the now deprecated BlobBuilder to create blobs.",usage_perc_y:64.97,usage_perc_a:6.3,ucprefix:!0,parent:"fileapi",keywords:""},filereader:{title:"FileReader API",description:"Method of reading the contents of a File or Blob object into memory",spec:"http://www.w3.org/TR/FileAPI/#dfn-filereader",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/apis/file/FileReader",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/en/DOM/FileReader",title:"FileReader API"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"n",10:"y"},op_mob:{10:"n",11:"n",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:71.89,usage_perc_a:0,ucprefix:!1,parent:"fileapi",keywords:""},filesystem:{title:"Filesystem & FileWriter API",description:"Method of reading and writing files to a sandboxed file system.\r\n",spec:"http://www.w3.org/TR/file-system-api/",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/apis/filesystem",title:"WebPlatform Docs"},{url:"http://www.html5rocks.com/en/tutorials/file/filesystem/",title:"HTML5 Rocks tutorial"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"a x",9:"a x",10:"a x",11:"a x",12:"a x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y x"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"",usage_perc_y:34.87,usage_perc_a:.28,ucprefix:!1,parent:"",keywords:"filewriter"},bloburls:{title:"Blob URLs",description:"Method of creating URL handles to the specified File or Blob object.",spec:"http://www.w3.org/TR/FileAPI/#url",status:"wd",links:[{url:"https://developer.mozilla.org/en/DOM/window.URL.createObjectURL",title:"MDN article"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y x",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y x","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"",usage_perc_y:70.6,usage_perc_a:0,ucprefix:!1,parent:"fileapi",keywords:"createobjecturl"},typedarrays:{title:"Typed Arrays",description:"JavaScript typed arrays provide a mechanism for accessing raw binary data much more efficiently.\r\n",spec:"http://www.khronos.org/registry/typedarray/specs/latest/",status:"other",links:[{url:"https://developer.mozilla.org/en/javascript_typed_arrays",title:"MDN article"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"n",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:73.11,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"float64array,dataview,uint8array"},deviceorientation:{title:"DeviceOrientation events",description:"API for detecting orientation and motion events from the device running the browser.",spec:"http://www.w3.org/TR/orientation-event/",status:"wd",links:[{url:"http://html5labs.interoperabilitybridges.com/prototypes/device-orientation-events/device-orientation-events/info",title:"DeviceOrientation implementation prototype for IE10"},{url:"http://www.html5rocks.com/en/tutorials/device/orientation/",title:"HTML5 Rocks tutorial"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-orientation",title:"has.js test"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"a"},firefox:{2:"n",3:"n",3.5:"n",3.6:"p",4:"p",5:"p",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a"},chrome:{4:"n",5:"n",6:"n",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a",28:"a",29:"a",30:"a",31:"a",32:"a"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"a",16:"a",17:"a",18:"a"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"a","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"a",4:"a",4.1:"a","4.2-4.3":"a",4.4:"a"},bb:{7:"n",10:"a"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"y",12.1:"y",0:"a"},and_chr:{0:"a"},and_ff:{0:"a"},ie_mob:{10:"n"}},notes:'Partial support refers to the lack of compassneedscalibration event. Partial support also refers to the lack of devicemotion event support for Chrome 30- and Opera. Opera Mobile 14 lost the ondevicemotion event support. Firefox 3.6, 4 and 5 support the non-standard <a href="https://developer.mozilla.org/en/DOM/MozOrientation">MozOrientation</a> event.',usage_perc_y:.14,usage_perc_a:57.76,ucprefix:!1,parent:"",keywords:""},"script-defer":{title:"defer attribute for external scripts",description:"The boolean defer attribute on script elements allows the external JavaScript file to run when the DOM is loaded, without delaying page load first.",spec:"http://www.w3.org/TR/html5/the-script-element.html#attr-script-defer",status:"cr",links:[{url:"https://developer.mozilla.org/en/HTML/Element/script#Attributes",title:"MDN article"},{url:"http://docs.webplatform.org/wiki/html/attributes/defer",title:"WebPlatform Docs"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/script.js#script-defer",title:"has.js test"}],categories:["DOM","HTML5"],stats:{ie:{5.5:"a",6:"a",7:"a",8:"a",9:"a",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support refers to a buggy implementation in IE<10",usage_perc_y:73.17,usage_perc_a:14.25,ucprefix:!1,parent:"",keywords:""},"nav-timing":{title:"Navigation Timing API",description:"API for accessing timing information related to navigation and elements.",spec:"http://www.w3.org/TR/navigation-timing/",status:"cr",links:[{url:"https://developer.mozilla.org/en/API/navigationTiming",title:"MDN article"},{url:"http://www.html5rocks.com/en/tutorials/webperformance/basics/",title:"HTML5 Rocks tutorial"},{url:"http://docs.webplatform.org/wiki/apis/navigation_timing",title:"WebPlatform Docs"}],categories:["DOM","JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"n",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:69.95,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"performance,performance.timing"},"audio-api":{title:"Web Audio API",description:"High-level JavaScript API for processing and synthesizing audio",spec:"http://www.w3.org/TR/webaudio/",status:"wd",links:[{url:"http://www.doboism.com/projects/webaudio-compatibility/",title:"Additional browser compatibility tests for specific features"},{url:"http://docs.webplatform.org/wiki/apis/webaudio",title:"WebPlatform Docs"},{url:"https://github.com/corbanbrook/audionode.js",title:"Polyfill to support Web Audio API in Firefox"},{url:"https://github.com/g200kg/WAAPISim",title:"Polyfill to enable Web Audio API through Firefox Audio Data api or flash"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"y x"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"Firefox versions < 25 support an alternative, deprecated audio API.",usage_perc_y:41.68,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"web-audio"},"css-regions":{title:"CSS Regions",description:"Method of flowing content into multiple elements.",spec:"http://www.w3.org/TR/css3-regions/",status:"wd",links:[{url:"http://msdn.microsoft.com/en-us/ie/hh272902#_CSSConnected",title:"IE10 developer guide info"},{url:"http://html.adobe.com/webstandards/cssregions/",title:"Adobe demos and samples"},{url:"http://docs.webplatform.org/wiki/css/atrules/@region",title:"WebPlatform Docs"
10
+ }],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"a x",11:"a x"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"a x",16:"a x",17:"a x",18:"a x",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"n",32:"n"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"n"},and_ff:{0:"n"},ie_mob:{10:"a x"}},notes:'Currently supported in WebKit Nightly using <code>-webkit-flow-into: flow_name;</code> and <code>-webkit-from-flow: flow_name;</code>. Support in Chrome 19+ is disabled by default and can be enabled using a runtime flag (see <code>about:flags</code>) or a command line flag (see <a href="http://peter.sh/experiments/chromium-command-line-switches/#enable-css-regions">this list</a>). For Chrome 19-22 the flag is named "Enable CSS Regions" / <code>--enable-css-regions</code>, while for Chrome 23+ the flag is named "Enable experimental WebKit features" / <code>--enable-experimental-webkit-features</code>. Support in IE10 is limited to using an iframe as a content source with the <code>-ms-flow-into: flow_name;</code> and <code>-ms-flow-from: flow_name;</code> syntax. Support for Safari 6.1&7 is <a href="http://www.broken-links.com/2013/07/10/web-platform-technologies-in-safari-6-1-and-7/">likely</a> but not official.',usage_perc_y:2.75,usage_perc_a:11.35,ucprefix:!1,parent:"",keywords:""},fullscreen:{title:"Full Screen API",description:"API for allowing content (like a video or canvas element) to take up the entire screen.",spec:"http://www.w3.org/TR/fullscreen/",status:"wd",links:[{url:"https://developer.mozilla.org/en/DOM/Using_full-screen_mode",title:"MDN article"},{url:"http://jlongster.com/2011/11/21/canvas.html",title:"Blog post"},{url:"http://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/",title:"Mozilla hacks article"},{url:"http://docs.webplatform.org/wiki/dom/methods/requestFullscreen",title:"WebPlatform Docs"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"y x"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"a x",11:"a x",12:"a x",13:"a x",14:"a x",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"a x",21:"a x",22:"a x",23:"a x",24:"a x",25:"a x",26:"a x",27:"a x"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"a x",16:"a x",17:"a x",18:"a x",19:"a x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"a x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"y",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"a"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"a x"},ie_mob:{10:"n"}},notes:"Partial support refers to supporting an earlier draft of the spec.",usage_perc_y:37.35,usage_perc_a:16.21,ucprefix:!1,parent:"",keywords:"full-screen"},requestanimationframe:{title:"requestAnimationFrame",description:"API allowing a more efficient way of running script-based animation, compared to traditional methods using timeouts.",spec:"http://www.w3.org/TR/animation-timing/#requestAnimationFrame",status:"wd",links:[{url:"http://hacks.mozilla.org/2011/08/animating-with-javascript-from-setinterval-to-requestanimationframe/",title:"Mozilla Hacks article"},{url:"http://paulirish.com/2011/requestanimationframe-for-smart-animating/",title:"Blog post"},{url:"http://docs.webplatform.org/wiki/apis/timing/methods/requestAnimationFrame",title:"WebPlatform Docs"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y x",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y x","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y x"},ie_mob:{10:"y"}},notes:"",usage_perc_y:67.13,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},"input-range":{title:"Range input type",description:"Form field type that allows the user to select a value using a slider widget.",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#range-state-(type=range)",status:"wd",links:[{url:"https://github.com/fryn/html5slider",title:"Polyfill for Firefox"},{url:"http://docs.webplatform.org/wiki/html/elements/input/type/range",title:"WebPlatform Docs"},{url:"http://tutorialzine.com/2011/12/what-you-need-to-know-html5-range-input/",title:"Tutorial"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/form.js#input-type-range",title:"has.js test"},{url:"https://github.com/freqdec/fd-slider",title:"Cross-browser polyfill"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"u",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a",2.2:"a",2.3:"a",3:"a",4:"a",4.1:"a","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Currently all Android browsers with partial support hide the slider input field by default. However, the element <a href="http://tiffanybbrown.com/2012/02/07/input-typerange-and-androids-stock-browser/">can be styled</a> to be made visible and usable.',usage_perc_y:68.52,usage_perc_a:4.31,ucprefix:!1,parent:"forms",keywords:""},matchmedia:{title:"matchMedia",description:"API for finding out whether or not a media query applies to the document.",spec:"http://www.w3.org/TR/cssom-view/#dom-window-matchmedia",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/media_queries/apis/matchMedia",title:"WebPlatform Docs"},{url:"https://github.com/paulirish/matchMedia.js/",title:"matchMedia.js polyfill"},{url:"https://developer.mozilla.org/en/DOM/window.matchMedia",title:"MDN article"},{url:"https://developer.mozilla.org/en/CSS/Using_media_queries_from_code",title:"MDN tutorial"}],categories:["JS API","DOM"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"n",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:72.81,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"mediaquerylist"},"input-datetime":{title:"Date/time input types",description:"Form field widget to easily allow users to enter dates and/or times, generally by using a calendar widget.",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#date-state-(type=date)",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/html/elements/input/type/date",title:"WebPlatform Docs"},{url:"http://net.tutsplus.com/tutorials/javascript-ajax/quick-tip-cross-browser-datepickers-within-minutes/",title:"Datepicker tutorial w/polyfill"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/form.js#input-type-datetime;input-type-datetime-local",title:"has.js test"},{url:"https://github.com/zoltan-dulac/html5Forms.js",title:"Polyfill for HTML5 forms"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a",28:"a",29:"a",30:"a",31:"a",32:"a"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"a",16:"a",17:"a",18:"a"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"a"},and_chr:{0:"y"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:'Safari provides date-formatted text fields, but no real calendar widget. Partial support in Chrome refers to a missing calendar widget for the "datetime" type (and other types in older versions). Some modified versions of the Android 4.x browser do have support for date/time fields. ',usage_perc_y:6.13,usage_perc_a:33.1,ucprefix:!1,parent:"forms",keywords:"datepicker,timepicker"},"input-color":{title:"Color input type",description:"Form field allowing the user to select a color.",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#color-state-(type=color)",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/html/elements/input/type/color",title:"WebPlatform Docs"},{url:"http://www.html5tutorial.info/html5-color.php",title:"Tutorial"},{url:"https://github.com/jonstipe/color-polyfill",title:"Polyfill"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"n",16:"n",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"",usage_perc_y:35.22,usage_perc_a:0,ucprefix:!1,parent:"forms",keywords:"colour"},"input-number":{title:"Number input type",description:"Form field type for numbers.",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#number-state-(type=number)",status:"wd",links:[{url:"https://raw.github.com/phiggins42/has.js/master/detect/form.js#input-type-number",title:"has.js test"},{url:"http://www.html5tutorial.info/html5-number.php",title:"Tutorial"},{url:"https://github.com/jonstipe/number-polyfill",title:"Polyfill"},{url:"http://docs.webplatform.org/wiki/html/elements/input/type/number",title:"WebPlatform Docs"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"a",11:"a"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"n",5:"n",6:"u",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"a",4.1:"a","4.2-4.3":"a",4.4:"a"},bb:{7:"n",10:"a"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"a"},and_chr:{0:"a"},and_ff:{0:"n"},ie_mob:{10:"a"}},notes:'iOS Safari, Android 4 and Chrome for Android show number input, but do not use "step", "min" or "max" attributes or show increment/decrement buttons. Internet Explorer 10 does not show increment/decrement buttons.',usage_perc_y:38.44,usage_perc_a:20.1,ucprefix:!1,parent:"forms",keywords:"spinner"},"iframe-sandbox":{title:"sandbox attribute for iframes",description:"Method of running external site pages with reduced privileges (e.g. no JavaScript) in iframes",spec:"http://www.w3.org/TR/html5/the-iframe-element.html#attr-iframe-sandbox",status:"cr",links:[{url:"http://msdn.microsoft.com/en-us/hh563496",title:"MSDN article"},{url:"http://blog.chromium.org/2010/05/security-in-depth-html5s-sandbox.html",title:"Chromium blog article"},{url:"http://docs.webplatform.org/wiki/html/attributes/sandbox",title:"WebPlatform Docs"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:59.45,usage_perc_a:13.57,ucprefix:!1,parent:"",keywords:""},"css-counters":{title:"CSS Counters",description:"Method of controlling number values in generated content, using the counter-reset and counter-increment properties.",spec:"http://www.w3.org/TR/CSS21/generate.html#counters",status:"wd",links:[{url:"http://onwebdev.blogspot.com/2012/02/css-counters-tutorial.html",title:"Tutorial and information"},{url:"http://docs.webplatform.org/wiki/css/properties/counter-reset",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/en/CSS_Counters",title:"MDN article"}],categories:["CSS2"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"y"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:93.86,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},"css-resize":{title:"CSS resize property",description:"Method of allowing an element to be resized by the user, with options to limit to a given direction. ",spec:"http://www.w3.org/TR/css3-ui/#resize",status:"wd",links:[{url:"http://css-tricks.com/almanac/properties/r/resize/",title:"CSS Tricks info"},{url:"http://davidwalsh.name/textarea-resize",title:"On textarea resizing"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y x",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"a",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"n"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"Opera 12.10+ currently only supports the resize property for textarea elements.",usage_perc_y:52.82,usage_perc_a:.48,ucprefix:!1,parent:"",keywords:"horizontal,vertical"},"input-placeholder":{title:"input placeholder attribute",description:"Method of setting placeholder text for text-like input fields, to suggest the expected inserted information.",spec:"http://dev.w3.org/html5/spec/Overview.html#attr-input-placeholder",status:"cr",links:[{url:"http://docs.webplatform.org/wiki/html/attributes/placeholder",title:"WebPlatform Docs"},{url:"https://raw.github.com/phiggins42/has.js/master/detect/form.js#input-attr-placeholder",title:"has.js test"},{url:"http://www.zachleat.com/web/placeholder/",title:"Article on usage"},{url:"https://github.com/mathiasbynens/jquery-placeholder",title:"Polyfill"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a",3.2:"a",4:"a",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"a",11.1:"a",11.5:"a",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support in older Safari and Opera versions refers to lacking placeholder support on textarea elements. ",usage_perc_y:75.1,usage_perc_a:.15,ucprefix:!1,parent:"forms",keywords:""},spdy:{title:"SPDY networking protocol",description:"Networking protocol for low-latency transport of content over the web.",spec:"http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00",status:"unoff",links:[{url:"http://en.wikipedia.org/wiki/SPDY",title:"Wikipedia"},{url:"http://dev.chromium.org/spdy/spdy-whitepaper",title:"SPDY whitepaper"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"a"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"n",10:"u"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"",usage_perc_y:53.69,usage_perc_a:.11,ucprefix:!1,parent:"",keywords:""},"css-repeating-gradients":{title:"CSS Repeating Gradients",description:"Method of defining a repeating linear or radial color gradient as a CSS image.",spec:"http://www.w3.org/TR/css3-images/#repeating-gradients",status:"cr",links:[{url:"http://docs.webplatform.org/wiki/css/repeating-linear-gradient",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/en/CSS/repeating-linear-gradient",title:"MDN article"},{url:"http://www.css3files.com/gradient/#repeatinglineargradient",title:"Information page"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"y x",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"y x",6:"y x",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"a x",11.5:"a x",11.6:"y x",12:"y x",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"a x",11.5:"a x",12:"y x",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y x"},ie_mob:{10:"y"}},notes:'Firefox 10+, Chrome 26+ and Opera 11.6+ also support the new "to (side)" syntax.',usage_perc_y:73.31,usage_perc_a:.03,ucprefix:!1,parent:"css-gradients",keywords:""},"css-filters":{title:"CSS Filter Effects",description:"Method of applying filter effects (like blur, grayscale, brightness, contrast and hue) to elements, previously only possible by using SVG.",spec:"http://www.w3.org/TR/filter-effects/",status:"wd",links:[{url:"http://dl.dropbox.com/u/3260327/angular/CSS3ImageManipulation.html",title:"Filter editor"},{url:"http://bennettfeely.com/filters/",title:"Filter Playground"},{url:"http://html5-demos.appspot.com/static/css/filters/index.html",title:"Demo file for WebKit browsers"},{url:"http://www.html5rocks.com/en/tutorials/filters/understanding-css/",title:"Mozilla hacks article"}],categories:["CSS3","CSS"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"u",27:"u"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y x"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:'Note that this property is significantly different from and incompatible with Microsoft\'s <a href="http://msdn.microsoft.com/en-us/library/ie/ms530752%28v=vs.85%29.aspx">older "filter" property</a>.',usage_perc_y:40.55,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"sepia,hue-rotate,invert,saturate"},getcomputedstyle:{title:"getComputedStyle",description:"API to get the current computed CSS styles applied to an element. This may be the current value applied by an animation or as set by a stylesheet.",spec:"http://www.w3.org/TR/cssom/#dom-window-getcomputedstyle",status:"rec",links:[{url:"http://ie.microsoft.com/testdrive/HTML5/getComputedStyle/",title:"Demo"},{url:"http://snipplr.com/view/13523/",title:"Polyfill for IE"},{url:"https://developer.mozilla.org/en/DOM/window.getComputedStyle",title:"MDN article"},{url:"http://docs.webplatform.org/wiki/css/cssom/methods/getComputedStyle",title:"WebPlatform Docs"}],categories:["JS API","CSS3","DOM"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"a",3.5:"a",3.6:"a",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"a",3.2:"a",4:"a",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"a","9.5-9.6":"a","10.0-10.1":"a",10.5:"a",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"a"},android:{2.1:"a",2.2:"a",2.3:"a",3:"a",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"a",10:"y"},op_mob:{10:"a",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"Partial support in older Firefox versions refers to requiring the second parameter to be included. Partial support in all other browsers refers to not supporting getComputedStyle on pseudo-elements.",usage_perc_y:78.53,usage_perc_a:7,ucprefix:!1,parent:"",keywords:""},"word-break":{title:"CSS3 word-break",description:"Property to prevent or allow words to be broken over multiple lines between letters.",spec:"http://www.w3.org/TR/css3-text/#word-break",status:"wd",links:[{url:"http://docs.webplatform.org/wiki/css/properties/word-break",title:"WebPlatform Docs"},{url:"https://developer.mozilla.org/en/CSS/word-break",title:"MDN article"}],categories:["CSS3"],stats:{ie:{5.5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"a",5:"a",6:"a",7:"a",8:"a",9:"a",10:"a",11:"a",12:"a",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a",28:"a",29:"a",30:"a",31:"a",32:"a"},safari:{3.1:"a",3.2:"a",4:"a",5:"a",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"a",16:"a",17:"a",18:"a"},ios_saf:{3.2:"a","4.0-4.1":"a","4.2-4.3":"a","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"n"},android:{2.1:"a",2.2:"a",2.3:"a",3:"a",4:"a",4.1:"a","4.2-4.3":"a",4.4:"a"},bb:{7:"a",10:"a"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"a"},and_chr:{0:"a"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:'Partial support refers to supporting the "break-all" value, but not the "keep-all" value.',usage_perc_y:39.39,usage_perc_a:48.42,ucprefix:!1,parent:"",keywords:"break-all,keep-all"},"viewport-units":{title:"Viewport units: vw, vh, vmin, vmax",description:"Length units representing 1% of the viewport size for viewport width (vw), height (vh), the smaller of the two (vmin), or the larger of the two (vmax).",spec:"http://www.w3.org/TR/css3-values/#viewport-relative-lengths",status:"cr",links:[{url:"http://css-tricks.com/viewport-sized-typography/",title:"Blog post"},{url:"https://github.com/saabi/vminpoly",title:"Polyfill"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"a",10:"a",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"a",6.1:"a",7:"a"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"a","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"a"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"a"}},notes:'Partial support in IE9 refers to supporting "vm" instead of "vmin". All other partial support refers to not supporting the "vmax" unit.',usage_perc_y:48.9,usage_perc_a:21.18,ucprefix:!1,parent:"",keywords:"vm,viewport-percentage"},contentsecuritypolicy:{
11
+ title:"Content Security Policy",description:"Mitigate cross-site scripting attacks by whitelisting allowed sources of script, style, and other resources.",spec:"http://www.w3.org/TR/CSP/",status:"cr",links:[{url:"http://content-security-policy.com/",title:"CSP Examples & Quick Reference"},{url:"http://html5rocks.com/en/tutorials/security/content-security-policy/",title:"HTML5Rocks article"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"a x",11:"a x"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"a x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"a x","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y x"},ie_mob:{10:"a x"}},notes:"The HTTP header is 'X-Content-Security-Policy' for Firefox and IE 10&11, and 'X-WebKit-CSP' for Safari and Chrome. IE 10&11's support is limited to the 'sandbox' directive.",usage_perc_y:55.74,usage_perc_a:12.68,ucprefix:!1,parent:"",keywords:"csp,security,header"},pagevisibility:{title:"PageVisibility",description:"JavaScript API for determining whether a document is visible on the display",spec:"http://www.w3.org/TR/page-visibility/",status:"cr",links:[{url:"https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API",title:"MDN article"},{url:"http://docs.webplatform.org/wiki/apis/timing/properties/visibilityState",title:"WebPlatform Docs"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"y",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y x"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"y",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:63.89,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"visibilitystate"},stricttransportsecurity:{title:"Strict Transport Security",description:"Declare that a website is only accessible over a secure connection (HTTPS).",spec:"http://tools.ietf.org/html/rfc6797",status:"other",links:[{url:"http://dev.chromium.org/sts",title:"Strict Transport Security @ Chromium"},{url:"https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security",title:"Strict Transport Security @ Mozilla Developer Network"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"u"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"The HTTP header is 'Strict-Transport-Security'.",usage_perc_y:50.76,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"sts,hsts,security,header"},"style-scoped":{title:"Scoped CSS",description:"Allows CSS rules to be scoped to part of the document, based on the position of the style element.",spec:"http://www.w3.org/TR/html5/document-metadata.html#attr-style-scoped",status:"cr",links:[{url:"https://github.com/PM5544/scoped-polyfill",title:"Polyfill"},{url:"http://html5doctor.com/the-scoped-attribute/",title:"HTML5 Doctor article"},{url:"http://updates.html5rocks.com/2012/03/A-New-Experimental-Feature-style-scoped",title:"HTML5Rocks article"}],categories:["CSS","HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"u",32:"u"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"u",0:"n"},and_chr:{0:"n"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:'Supported in Chrome 20+ by enabling the "experimental WebKit features" flag in chrome://flags.',usage_perc_y:13.05,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"scope"},"svg-fragment":{title:"SVG fragment identifiers",description:"Method of displaying only a part of an SVG image by defining a view ID or view box dimensions as the file's fragment identifier.",spec:"http://www.w3.org/TR/SVG/linking.html#SVGFragmentIdentifiers",status:"rec",links:[{url:"http://www.broken-links.com/2012/08/14/better-svg-sprites-with-fragment-identifiers/",title:"Blog post"}],categories:["SVG"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"u",32:"u"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"u",0:"n"},and_chr:{0:"n"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:25.15,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"fragments,sprite"},outline:{title:"CSS outline",description:"The CSS outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient.",spec:"http://www.w3.org/TR/CSS2/ui.html#propdef-outline",status:"rec",links:[{url:"https://developer.mozilla.org/en-US/docs/CSS/outline",title:"Mozilla Developer Network: outline"},{url:"http://dev.w3.org/csswg/css3-ui/#outline",title:"CSS Basic User Interface Module Level 3"}],categories:["CSS2"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"y",9:"y",10:"y",11:"y"},firefox:{2:"y",3:"y",3.5:"y",3.6:"y",4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"y","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y",2.2:"y",2.3:"y",3:"y",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"y",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"y"}},notes:"",usage_perc_y:89.27,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"-moz-outline,outline-width,outline-style,outline-color"},download:{title:"Download attribute",description:"When used on an anchor, this attribute signifies that the resource it points to should be downloaded by the browser rather than navigate to it.",spec:"http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#downloading-resources",status:"wd",links:[{url:"http://html5-demos.appspot.com/static/a.download.html",title:"Demo: creating a text file and downloading it."},{url:"http://updates.html5rocks.com/2011/08/Downloading-resources-in-HTML5-a-download",title:"HTML5Rocks post"}],categories:["HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"y"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"",usage_perc_y:48.02,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"download,a.download,a[download],download attribute"},pointer:{title:"Pointer events",description:'This specification integrates various inputs from mice, touchscreens, and pens, making separate implementations no longer necessary and authoring for cross-device pointers easier. Not to be mistaken with the unrelated "pointer-events" CSS property.',spec:"http://www.w3.org/TR/pointerevents/",status:"cr",links:[{url:"http://blogs.msdn.com/b/eternalcoding/archive/2013/01/16/hand-js-a-polyfill-for-supporting-pointer-events-on-every-browser.aspx",title:"Hand.js, the polyfill for browsers only supporting Touch Events"},{url:"http://blogs.msdn.com/b/ie/archive/2011/09/20/touch-input-for-ie10-and-metro-style-apps.aspx",title:"Implementation of Pointer Events in IE10"},{url:"http://blogs.msdn.com/b/davrous/archive/2013/02/20/handling-touch-in-your-html5-apps-thanks-to-the-pointer-events-of-ie10-and-windows-8.aspx",title:"Article & tutorial"}],categories:["DOM","JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"a x",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"p",13:"p",14:"p",15:"p",16:"p",17:"p",18:"p",19:"p",20:"p",21:"p",22:"p",23:"p",24:"p",25:"p",26:"p",27:"p"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"p",23:"p",24:"p",25:"p",26:"p",27:"p",28:"p",29:"p",30:"p",31:"p",32:"p"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"p",16:"p",17:"p",18:"p"},ios_saf:{3.2:"p","4.0-4.1":"p","4.2-4.3":"p","5.0-5.1":"p","6.0-6.1":"p","7.0":"p"},op_mini:{"5.0-7.0":"n"},android:{2.1:"p",2.2:"p",2.3:"p",3:"p",4:"p",4.1:"p","4.2-4.3":"p",4.4:"p"},bb:{7:"p",10:"p"},op_mob:{10:"n",11:"p",11.1:"p",11.5:"p",12:"p",12.1:"p",0:"p"},and_chr:{0:"p"},and_ff:{0:"p"},ie_mob:{10:"a x"}},notes:"Partial support in IE10 refers the lack of pointerenter and pointerleave events.",usage_perc_y:.11,usage_perc_a:10.99,ucprefix:!1,parent:"",keywords:"pointerdown,pointermove,pointerup,pointercancel,pointerover,pointerout,pointerenter,pointerleave"},"user-select-none":{title:"CSS user-select: none",description:"Method of preventing text/element selection using CSS. ",spec:"https://developer.mozilla.org/en-US/docs/CSS/user-select",status:"unoff",links:[{url:"http://msdn.microsoft.com/en-us/library/ie/hh781492(v=vs.85).aspx",title:"MSDN Documentation"},{url:"https://developer.mozilla.org/en-US/docs/CSS/user-select",title:"MDN article"},{url:"http://css-tricks.com/almanac/properties/u/user-select/",title:"CSS Tricks article"}],categories:["CSS"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y x",11:"y x"},firefox:{2:"y x",3:"y x",3.5:"y x",3.6:"y x",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x"},chrome:{4:"u",5:"u",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"y x",3.2:"y x",4:"y x",5:"y x",5.1:"y x",6:"y x",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"y x","4.0-4.1":"y x","4.2-4.3":"y x","5.0-5.1":"y x","6.0-6.1":"y x","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"y x",2.2:"y x",2.3:"y x",3:"y x",4:"y x",4.1:"y x","4.2-4.3":"y x",4.4:"y x"},bb:{7:"y x",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"y x"},ie_mob:{10:"y x"}},notes:'Currently the user-select property does not appear in any W3C specification. Support information here is only for "none" value, not others.',usage_perc_y:74.91,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},webp:{title:"WebP image format",description:"Image format that supports lossy and lossless compression, as well as animation and alpha transparency.",spec:"https://developers.google.com/speed/webp/",status:"other",links:[{url:"http://libwebpjs.appspot.com/",title:"Decoder in JS"},{url:"https://developers.google.com/speed/webp/",title:"Official website"},{url:"http://antimatter15.github.io/weppy/demo.html",title:"Polyfill for browsers with WebM support"},{url:"http://webpjs.appspot.com/",title:"Polyfill for browsers with or without WebM support (i.e. IE6-IE9, Safari/iOS version 6.1 and below; Firefox versions 24 and bel"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"p",5:"p",6:"p",7:"p",8:"p",9:"p",10:"p",11:"p",12:"p",13:"p",14:"p",15:"p",16:"p",17:"p",18:"p",19:"p",20:"p",21:"p",22:"p",23:"p",24:"p",25:"p",26:"p",27:"p"},chrome:{4:"n",5:"n",6:"p",7:"p",8:"p",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"p",11:"p",11.1:"p",11.5:"p",11.6:"p",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"y",4.1:"y","4.2-4.3":"y",4.4:"y"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"a",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"n"},ie_mob:{10:"n"}},notes:"Animated webp images are supported in Chrome 32+ and Opera 19+.",usage_perc_y:39.4,usage_perc_a:.01,ucprefix:!1,parent:"",keywords:""},"intrinsic-width":{title:"Intrinsic & Extrinsic Sizing",description:"Allows for the heights and widths to be specified in intrinsic values using the fill-available, max-content, min-content, and fit-content properties.",spec:"http://www.w3.org/TR/css3-sizing/",status:"wd",links:[{url:"http://demosthenes.info/blog/662/Design-From-the-Inside-Out-With-CSS-MinContent",title:"Min-Content tutorial"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"y x",7:"y x"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y x",16:"y x",17:"y x",18:"y x"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"y x"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y x"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"y x"},ie_mob:{10:"n"}},notes:'Prefixes are on the values, not the property names (e.g. -webkit-min-content) Firefox currently supports the "-moz-available" property rather than "-moz-fill-available".',usage_perc_y:51.68,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"fill-available,max-content,min-content,fit-content,contain-floats"},template:{title:"HTML templates",description:"Method of declaring a portion of reusable markup that is parsed but not rendered until cloned.",spec:"http://www.w3.org/TR/html-templates/",status:"wd",links:[{url:"http://www.html5rocks.com/en/tutorials/webcomponents/template/",title:"HTML5Rocks - HTML's New template Tag"},{url:"http://polymer-project.org",title:"Polymer project (polyfill & web compontents framework)"}],categories:["DOM","HTML5"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"",usage_perc_y:45.76,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"web components, template"},opus:{title:"Opus",description:"Royalty-free open audio codec by IETF, which incorporated SILK from Skype and CELT from Xiph.org, to serve higher sound quality and lower latency at the same bitrate.",spec:"http://tools.ietf.org/html/rfc6716",status:"other",links:[{url:"https://hacks.mozilla.org/2012/07/firefox-beta-15-supports-the-new-opus-audio-format/",title:"Introduction of Opus by Mozilla"},{url:"http://www.ietf.org/mail-archive/web/rtcweb/current/msg04953.html",title:"Google's statement about the use of VP8 and Opus codec for WebRTC standard"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"n",32:"n"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"u"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"n"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"Chrome does not support Opus by default but users can enable it via the 'enable-opus-playback' flag. When it comes to Opera, it is said that the Linux version may be able to play it when the GStreamer module is up to date and the served mime-type is 'audio/ogg'.",usage_perc_y:14.04,usage_perc_a:0,ucprefix:!1,parent:"audio",keywords:""},jpegxr:{title:"JPEG XR image format",description:"The latest JPEG image format of Joint Photographic Experts Group which boasts better compression and supports lossless compression, alpha channel, and 48-bit deep color over normal jpg format.",spec:"http://www.itu.int/rec/T-REC-T.832",status:"other",links:[{url:"http://msdn.microsoft.com/en-us/library/windows/desktop/hh707223(v=vs.85).aspx",title:"Microsoft JPEG XR Codec Overview"}],categories:["Other"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"n",31:"n",32:"n"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"n",7:"n"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"n"},and_ff:{0:"n"},ie_mob:{10:"y"}},notes:"",usage_perc_y:16.32,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""},"channel-messaging":{title:"Channel messaging",description:"Method for having two-way communication between browsing contexts (using MessageChannel)",spec:"http://www.w3.org/TR/webmessaging/#channel-messaging",status:"cr",links:[{url:"http://dev.opera.com/articles/view/window-postmessage-messagechannel/#channel",title:"An Introduction to HTML5 web messaging"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"y",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"u","10.0-10.1":"u",10.5:"u",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"y","6.0-6.1":"y","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"u",11:"y",11.1:"y",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"n"},ie_mob:{10:"y"}},notes:"",usage_perc_y:55.07,usage_perc_a:0,ucprefix:!1,parent:"x-doc-messaging",keywords:""},"css3-tabsize":{title:"CSS3 tab-size",description:"Method of customizing the width of a tab character. Only effective using 'white-space: pre'.",spec:"http://www.w3.org/TR/css3-text/#tab-size1",status:"wd",links:[{url:"https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size",title:"MDN article"}],categories:["CSS3"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"y x",11:"y x",11.1:"y x",11.5:"y x",11.6:"y x",12:"y x",12.1:"y x",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"y",10:"y"},op_mob:{10:"n",11:"y x",11.1:"y x",11.5:"y x",12:"y x",12.1:"y x",0:"y"},and_chr:{0:"y"},and_ff:{0:"y x"},ie_mob:{10:"n"}},notes:"",usage_perc_y:53.05,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"tab-size,tab-width"},mutationobserver:{title:"Mutation Observer",description:"Method for observing and reacting to changes to the DOM. Replaces MutationEvents, which is deprecated.",spec:"http://www.w3.org/TR/dom/",status:"wd",links:[{url:"https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver",title:"MutationObserver from MDN"},{url:"https://github.com/Polymer/MutationObservers",title:"Polyfill"}],categories:["DOM","JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"p",10:"p",11:"y"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"y x",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"y x","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"p",4.1:"p","4.2-4.3":"p",4.4:"y"},bb:{7:"n",10:"y x"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"p"}},notes:"When the content of a node with a single CharacterData child node is changed by innerHTML attribute and the node have a single different one as a result, WebKit browsers consider it as a characterData mutation of the child CharacterData node, while other browsers think it as a childList mutation of the parent node.",usage_perc_y:54.8,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"MutationObserver"},"css-selection":{title:"::selection CSS pseudo-element",description:"The ::selection CSS pseudo-element applies rules to the portion of a document that has been highlighted (e.g., selected with the mouse or another pointing device) by the user.",spec:"https://developer.mozilla.org/en-US/docs/Web/CSS/::selection",status:"unoff",links:[{url:"http://docs.webplatform.org/wiki/css/selectors/pseudo-elements/::selection",title:"WebPlatform Docs"},{url:"http://quirksmode.org/css/selectors/selection.html",title:"::selection test"}],categories:["CSS"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"y",10:"y",11:"y"},firefox:{2:"y x",3:"y x",3.5:"y x",3.6:"y x",4:"y x",5:"y x",6:"y x",7:"y x",8:"y x",9:"y x",10:"y x",11:"y x",12:"y x",13:"y x",14:"y x",15:"y x",16:"y x",17:"y x",18:"y x",19:"y x",20:"y x",21:"y x",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x"},chrome:{4:"y",5:"y",6:"y",7:"y",8:"y",9:"y",10:"y",11:"y",12:"y",13:"y",14:"y",15:"y",16:"y",17:"y",18:"y",19:"y",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y",28:"y",29:"y",30:"y",31:"y",32:"y"},safari:{3.1:"y",3.2:"y",4:"y",5:"y",5.1:"y",6:"y",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"y","10.0-10.1":"y",10.5:"y",10.6:"y",11:"y",11.1:"y",11.5:"y",11.6:"y",12:"y",12.1:"y",15:"y",16:"y",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"n"},op_mob:{10:"u",11:"u",11.1:"u",11.5:"y",12:"y",12.1:"y",0:"y"},and_chr:{0:"y"},and_ff:{0:"n"},ie_mob:{10:"y"}},notes:"",usage_perc_y:71.68,usage_perc_a:0,ucprefix:!1,parent:"",keywords:"::selection,selection"},"canvas-blending":{title:"Canvas blend modes",description:"Method of defining the effect resulting from overlaying two layers on a Canvas element. ",spec:"http://www.w3.org/TR/compositing-1/#blending",status:"wd",links:[{url:"http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/",title:"Blog post"}],categories:["Canvas"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"y",21:"y",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"n",24:"n",25:"n",26:"n",27:"n",28:"n",29:"n",30:"y",31:"y",32:"y"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"y",7:"y"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"y",18:"y"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"y"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"y"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"n"},and_chr:{0:"y"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:"",usage_perc_y:42.33,usage_perc_a:0,ucprefix:!1,parent:"canvas",keywords:""},clipboard:{title:"Clipboard API",description:"API to provide copy, cut and paste functionality using the OS clipboard.",
12
+ spec:"http://www.w3.org/TR/clipboard-apis/",status:"wd",links:[{url:"http://www.deluxeblogtips.com/2010/06/javascript-copy-to-clipboard.html",title:"Blog post on cross-browser usage"},{url:"https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent",title:"MDN page on ClipboardEvent"}],categories:["JS API"],stats:{ie:{5.5:"a #1",6:"a #1",7:"a #1",8:"a #1",9:"a #1",10:"a #1",11:"a #1"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"y",23:"y",24:"y",25:"y",26:"y",27:"y"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"a",14:"a",15:"a",16:"a",17:"a",18:"a",19:"a",20:"a",21:"a",22:"a",23:"a",24:"a",25:"a",26:"a",27:"a",28:"a",29:"a",30:"a",31:"a",32:"a"},safari:{3.1:"u",3.2:"u",4:"a",5:"a",5.1:"a",6:"a",6.1:"a",7:"a"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"a",17:"a",18:"a"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"a","6.0-6.1":"a","7.0":"a"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"a"},bb:{7:"n",10:"a"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"a"},and_chr:{0:"a"},and_ff:{0:"y"},ie_mob:{10:"n"}},notes:'Partial support in IE refers using <a href="http://msdn.microsoft.com/en-us/library/ie/ms535220%28v=vs.85%29.aspx">a non-standard method</a> of interacting with the clipboard. For other browsers it refers to not supporting the ClipboardEvent constructor.',usage_perc_y:12.83,usage_perc_a:67.91,ucprefix:!1,parent:"",keywords:"cut,copy,paste,clipboarddata"},rtcpeerconnection:{title:"WebRTC Peer-to-peer connections",description:"Method of allowing two users to communicate directly, browser to browser using the RTCPeerConnection API.",spec:"http://www.w3.org/TR/webrtc/#peer-to-peer-connections",status:"wd",links:[{url:"http://www.webrtc.org/",title:"WebRTC Project site"}],categories:["JS API"],stats:{ie:{5.5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n"},firefox:{2:"n",3:"n",3.5:"n",3.6:"n",4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"y x",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x"},chrome:{4:"n",5:"n",6:"n",7:"n",8:"n",9:"n",10:"n",11:"n",12:"n",13:"n",14:"n",15:"n",16:"n",17:"n",18:"n",19:"n",20:"n",21:"n",22:"n",23:"y x",24:"y x",25:"y x",26:"y x",27:"y x",28:"y x",29:"y x",30:"y x",31:"y x",32:"y x"},safari:{3.1:"n",3.2:"n",4:"n",5:"n",5.1:"n",6:"n",6.1:"u",7:"u"},opera:{9:"n","9.5-9.6":"n","10.0-10.1":"n",10.5:"n",10.6:"n",11:"n",11.1:"n",11.5:"n",11.6:"n",12:"n",12.1:"n",15:"n",16:"n",17:"n",18:"n"},ios_saf:{3.2:"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0":"n"},op_mini:{"5.0-7.0":"n"},android:{2.1:"n",2.2:"n",2.3:"n",3:"n",4:"n",4.1:"n","4.2-4.3":"n",4.4:"n"},bb:{7:"n",10:"n"},op_mob:{10:"n",11:"n",11.1:"n",11.5:"n",12:"n",12.1:"n",0:"y x"},and_chr:{0:"y x"},and_ff:{0:"y x"},ie_mob:{10:"n"}},notes:"BlackBerry 10 recognizes RTCPeerConnection but real support is unconfirmed.",usage_perc_y:46.24,usage_perc_a:0,ucprefix:!1,parent:"",keywords:""}}}},{}],36:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function EditContainer(source,options){this.options=utils.extend({offset:0},options);this.source=source;this._children=[];this._positions={name:0};this.initialize.apply(this,arguments)}function EditElement(parent,nameToken,valueToken){this.parent=parent;this._name=nameToken.value;this._value=valueToken?valueToken.value:"";this._positions={name:nameToken.start,value:valueToken?valueToken.start:-1};this.initialize.apply(this,arguments)}var range=require("../assets/range"),utils=require("../utils/common"),klass=require("../vendor/klass");EditContainer.extend=klass.extend;EditContainer.prototype={type:"container",initialize:function(){},_pos:function(num,isAbsolute){return num+(isAbsolute?this.options.offset:0)},_updateSource:function(value,start,end){var r=range.create(start,"undefined"==typeof end?0:end-start),delta=value.length-r.length(),update=function(obj){Object.keys(obj).forEach(function(k){obj[k]>=r.end&&(obj[k]+=delta)})};update(this._positions);var recursiveUpdate=function(items){items.forEach(function(item){update(item._positions);"container"==item.type&&recursiveUpdate(item.list())})};recursiveUpdate(this.list());this.source=utils.replaceSubstring(this.source,value,r)},add:function(name,value,pos){var item=new EditElement(name,value);this._children.push(item);return item},get:function(name){return"number"==typeof name?this.list()[name]:"string"==typeof name?utils.find(this.list(),function(prop){return prop.name()===name}):name},getAll:function(name){Array.isArray(name)||(name=[name]);var names=[],indexes=[];name.forEach(function(item){"string"==typeof item?names.push(item):"number"==typeof item&&indexes.push(item)});return this.list().filter(function(attribute,i){return~indexes.indexOf(i)||~names.indexOf(attribute.name())})},list:function(){return this._children},remove:function(name){var element=this.get(name);if(element){this._updateSource("",element.fullRange());var ix=this._children.indexOf(element);~ix&&this._children.splice(ix,1)}},indexOf:function(item){return this.list().indexOf(this.get(item))},value:function(name,value,pos){var element=this.get(name);return element?element.value(value):"undefined"!=typeof value?this.add(name,value,pos):void 0},values:function(name){return this.getAll(name).map(function(element){return element.value()})},name:function(val){if("undefined"!=typeof val&&this._name!==(val=String(val))){this._updateSource(val,this._positions.name,this._positions.name+this._name.length);this._name=val}return this._name},nameRange:function(isAbsolute){return range.create(this._positions.name+(isAbsolute?this.options.offset:0),this.name())},range:function(isAbsolute){return range.create(isAbsolute?this.options.offset:0,this.valueOf())},itemFromPosition:function(pos,isAbsolute){return utils.find(this.list(),function(elem){return elem.range(isAbsolute).inside(pos)})},toString:function(){return this.valueOf()},valueOf:function(){return this.source}};EditElement.extend=klass.extend;EditElement.prototype={type:"element",initialize:function(){},_pos:function(num,isAbsolute){return num+(isAbsolute?this.parent.options.offset:0)},value:function(val){if("undefined"!=typeof val&&this._value!==(val=String(val))){this.parent._updateSource(val,this.valueRange());this._value=val}return this._value},name:function(val){if("undefined"!=typeof val&&this._name!==(val=String(val))){this.parent._updateSource(val,this.nameRange());this._name=val}return this._name},namePosition:function(isAbsolute){return this._pos(this._positions.name,isAbsolute)},valuePosition:function(isAbsolute){return this._pos(this._positions.value,isAbsolute)},range:function(isAbsolute){return range.create(this.namePosition(isAbsolute),this.valueOf())},fullRange:function(isAbsolute){return this.range(isAbsolute)},nameRange:function(isAbsolute){return range.create(this.namePosition(isAbsolute),this.name())},valueRange:function(isAbsolute){return range.create(this.valuePosition(isAbsolute),this.value())},toString:function(){return this.valueOf()},valueOf:function(){return this.name()+this.value()}};return{EditContainer:EditContainer,EditElement:EditElement,createToken:function(start,value,type){var obj={start:start||0,value:value||"",type:type};obj.end=obj.start+obj.value.length;return obj}}})},{"../assets/range":30,"../utils/common":73,"../vendor/klass":78}],37:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function trimWhitespaceInRange(rng,text,mask){mask=mask||WHITESPACE_REMOVE_FROM_START|WHITESPACE_REMOVE_FROM_END;text=rng.substring(text);var m;mask&WHITESPACE_REMOVE_FROM_START&&(m=text.match(reSpaceStart))&&(rng.start+=m[0].length);mask&WHITESPACE_REMOVE_FROM_END&&(m=text.match(reSpaceEnd))&&(rng.end-=m[0].length);rng.end<rng.start&&(rng.end=rng.start);return rng}function consumeSingleProperty(it,text){var name,value,end,token=it.current();if(!token)return null;for(var ws={white:1,line:1,comment:1};(token=it.current())&&token.type in ws;)it.next();if(!it.hasNext())return null;token=it.current();name=range(token.start,token.value);for(var isAtProperty="@"==token.value.charAt(0);token=it.next();){name.end=token.end;if(":"==token.type||"white"==token.type){name.end=token.start;it.next();if(":"==token.type||isAtProperty)break}else if(";"==token.type||"line"==token.type){name.end=token.start;value=range(token.start,0);it.next();break}}token=it.current();if(!value&&token){"line"==token.type&&(lastNewline=token);value=range(token.start,token.value);for(var lastNewline;token=it.next();){value.end=token.end;if("line"==token.type)lastNewline=token;else{if("}"==token.type||";"==token.type){value.end=token.start;";"==token.type&&(end=range(token.start,token.value));it.next();break}if(":"==token.type&&lastNewline){value.end=lastNewline.start;it._i=it.tokens.indexOf(lastNewline);break}}}}value||(value=range(name.end,0));return{name:trimWhitespaceInRange(name,text),value:trimWhitespaceInRange(value,text,WHITESPACE_REMOVE_FROM_START|(end?WHITESPACE_REMOVE_FROM_END:0)),end:end||range(value.end,0)}}function findParts(str){var ch,stream=stringStream.create(str),result=[],sep=/[\s\u00a0,;]/,add=function(){stream.next();result.push(range(stream.start,stream.current()));stream.start=stream.pos};stream.eatSpace();stream.start=stream.pos;for(;ch=stream.next();)if('"'==ch||"'"==ch){stream.next();if(!stream.skipTo(ch))break;add()}else if("("==ch){stream.backUp(1);if(!stream.skipToPair("(",")"))break;stream.backUp(1);add()}else if(sep.test(ch)){result.push(range(stream.start,stream.current().length-1));stream.eatWhile(sep);stream.start=stream.pos}add();return utils.unique(result.filter(function(item){return!!item.length()}))}function consumeProperties(node,source,offset){var list=extractPropertiesFromSource(source,offset);list.forEach(function(property){node._children.push(new CSSEditElement(node,editTree.createToken(property.name.start,property.nameText),editTree.createToken(property.value.start,property.valueText),editTree.createToken(property.end.start,property.endText)))})}function extractPropertiesFromSource(source,offset){offset=offset||0;source=source.replace(reSpaceEnd,"");var out=[];if(!source)return out;for(var property,tokens=cssParser.parse(source),it=tokenIterator.create(tokens);property=consumeSingleProperty(it,source);)out.push({nameText:property.name.substring(source),name:property.name.shift(offset),valueText:property.value.substring(source),value:property.value.shift(offset),endText:property.end.substring(source),end:property.end.shift(offset)});return out}var utils=require("../utils/common"),editTree=require("./base"),cssParser=require("../parser/css"),cssSections=require("../utils/cssSections"),range=require("../assets/range"),stringStream=require("../assets/stringStream"),tokenIterator=require("../assets/tokenIterator"),defaultOptions={styleBefore:"\n ",styleSeparator:": ",offset:0},reSpaceStart=/^\s+/,reSpaceEnd=/\s+$/,WHITESPACE_REMOVE_FROM_START=1,WHITESPACE_REMOVE_FROM_END=2,CSSEditContainer=editTree.EditContainer.extend({initialize:function(source,options){utils.extend(this.options,defaultOptions,options);Array.isArray(source)&&(source=cssParser.toSource(source));var allRules=cssSections.findAllRules(source),currentRule=allRules.shift(),topLevelRules=[];allRules.forEach(function(r){var isTopLevel=!utils.find(topLevelRules,function(tr){return tr.contains(r)});isTopLevel&&topLevelRules.push(r)});var selectorRange=range.create2(currentRule.start,currentRule._selectorEnd);this._name=selectorRange.substring(source);this._positions.name=selectorRange.start;this._positions.contentStart=currentRule._contentStart+1;var sectionOffset=currentRule._contentStart+1,that=(currentRule.end-1,this);topLevelRules.forEach(function(r){consumeProperties(that,source.substring(sectionOffset,r.start),sectionOffset);utils.extend({},that.options,{offset:r.start+that.options.offset});sectionOffset=r.end});consumeProperties(this,source.substring(sectionOffset,currentRule.end-1),sectionOffset);this._saveStyle()},_saveStyle:function(){var start=this._positions.contentStart,source=this.source;this.list().forEach(function(p){if("container"!==p.type){p.styleBefore=source.substring(start,p.namePosition());var lines=utils.splitByLines(p.styleBefore);lines.length>1&&(p.styleBefore="\n"+lines[lines.length-1]);p.styleSeparator=source.substring(p.nameRange().end,p.valuePosition());var parts=p.styleBefore.split("*/");p.styleBefore=parts[parts.length-1];p.styleSeparator=p.styleSeparator.replace(/\/\*.*?\*\//g,"");start=p.range().end}})},namePosition:function(isAbsolute){return this._pos(this._positions.name,isAbsolute)},valuePosition:function(isAbsolute){return this._pos(this._positions.contentStart,isAbsolute)},valueRange:function(isAbsolute){return range.create2(this.valuePosition(isAbsolute),this._pos(this.valueOf().length,isAbsolute)-1)},add:function(name,value,pos){var list=this.list(),start=this._positions.contentStart,styles=utils.pick(this.options,"styleBefore","styleSeparator");"undefined"==typeof pos&&(pos=list.length);var donor=list[pos];if(donor)start=donor.fullRange().start;else if(donor=list[pos-1]){donor.end(";");start=donor.range().end}donor&&(styles=utils.pick(donor,"styleBefore","styleSeparator"));var nameToken=editTree.createToken(start+styles.styleBefore.length,name),valueToken=editTree.createToken(nameToken.end+styles.styleSeparator.length,value),property=new CSSEditElement(this,nameToken,valueToken,editTree.createToken(valueToken.end,";"));utils.extend(property,styles);this._updateSource(property.styleBefore+property.toString(),start);this._children.splice(pos,0,property);return property}}),CSSEditElement=editTree.EditElement.extend({initialize:function(rule,name,value,end){this.styleBefore=rule.options.styleBefore;this.styleSeparator=rule.options.styleSeparator;this._end=end.value;this._positions.end=end.start},valueParts:function(isAbsolute){var parts=findParts(this.value());if(isAbsolute){var offset=this.valuePosition(!0);parts.forEach(function(p){p.shift(offset)})}return parts},value:function(val){var isUpdating="undefined"!=typeof val,allItems=this.parent.list();if(isUpdating&&this.isIncomplete()){var self=this,donor=utils.find(allItems,function(item){return item!==self&&!item.isIncomplete()});this.styleSeparator=donor?donor.styleSeparator:this.parent.options.styleSeparator;this.parent._updateSource(this.styleSeparator,range(this.valueRange().start,0))}var value=this.constructor.__super__.value.apply(this,arguments);if(isUpdating){var ix=allItems.indexOf(this);ix===allItems.length-1||this.end()||this.end(";")}return value},isIncomplete:function(){return this.nameRange().end===this.valueRange().start},end:function(val){if("undefined"!=typeof val&&this._end!==val){this.parent._updateSource(val,this._positions.end,this._positions.end+this._end.length);this._end=val}return this._end},fullRange:function(isAbsolute){var r=this.range(isAbsolute);r.start-=this.styleBefore.length;return r},valueOf:function(){return this.name()+this.styleSeparator+this.value()+this.end()}});return{parse:function(source,options){return new CSSEditContainer(source,options)},parseFromPosition:function(content,pos,isBackward){var bounds=cssSections.locateRule(content,pos,isBackward);return bounds&&bounds.inside(pos)?this.parse(bounds.substring(content),{offset:bounds.start}):null},propertyFromPosition:function(css,pos){var cssProp=null,cssRule="string"==typeof css?this.parseFromPosition(css,pos,!0):css;if(cssRule){cssProp=cssRule.itemFromPosition(pos,!0);cssProp||(cssProp=utils.find(cssRule.list(),function(elem){return elem.range(!0).end==pos}))}return cssProp},baseName:function(name){return name.replace(/^\s*\-\w+\-/,"")},findParts:findParts,extractPropertiesFromSource:extractPropertiesFromSource}})},{"../assets/range":30,"../assets/stringStream":32,"../assets/tokenIterator":34,"../parser/css":56,"../utils/common":73,"../utils/cssSections":74,"./base":36}],38:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var editTree=require("./base"),xmlParser=require("../parser/xml"),range=require("../assets/range"),utils=require("../utils/common"),defaultOptions={styleBefore:" ",styleSeparator:"=",styleQuote:'"',offset:0},startTag=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/m,XMLEditContainer=editTree.EditContainer.extend({initialize:function(source,options){utils.defaults(this.options,defaultOptions);this._positions.name=1;var attrToken=null,tokens=xmlParser.parse(source);tokens.forEach(function(token){token.value=range.create(token).substring(source);switch(token.type){case"tag":/^<[^\/]+/.test(token.value)&&(this._name=token.value.substring(1));break;case"attribute":attrToken&&this._children.push(new XMLEditElement(this,attrToken));attrToken=token;break;case"string":this._children.push(new XMLEditElement(this,attrToken,token));attrToken=null}},this);attrToken&&this._children.push(new XMLEditElement(this,attrToken));this._saveStyle()},_saveStyle:function(){var start=this.nameRange().end,source=this.source;this.list().forEach(function(p){p.styleBefore=source.substring(start,p.namePosition());-1!==p.valuePosition()&&(p.styleSeparator=source.substring(p.namePosition()+p.name().length,p.valuePosition()-p.styleQuote.length));start=p.range().end})},add:function(name,value,pos){var list=this.list(),start=this.nameRange().end,styles=utils.pick(this.options,"styleBefore","styleSeparator","styleQuote");"undefined"==typeof pos&&(pos=list.length);var donor=list[pos];donor?start=donor.fullRange().start:(donor=list[pos-1])&&(start=donor.range().end);donor&&(styles=utils.pick(donor,"styleBefore","styleSeparator","styleQuote"));value=styles.styleQuote+value+styles.styleQuote;var attribute=new XMLEditElement(this,editTree.createToken(start+styles.styleBefore.length,name),editTree.createToken(start+styles.styleBefore.length+name.length+styles.styleSeparator.length,value));utils.extend(attribute,styles);this._updateSource(attribute.styleBefore+attribute.toString(),start);this._children.splice(pos,0,attribute);return attribute},addClass:function(value){var attr=this.get("class");value=utils.trim(value);if(!attr)return this.add("class",value);var classVal=attr.value(),classList=" "+classVal.replace(/\n/g," ")+" ";~classList.indexOf(" "+value+" ")||attr.value(classVal+" "+value)},removeClass:function(value){var attr=this.get("class");value=utils.trim(value);if(attr){var reClass=new RegExp("(^|\\s+)"+utils.escapeForRegexp(value)),classVal=attr.value().replace(reClass,"");utils.trim(classVal)?attr.value(classVal):this.remove("class")}}}),XMLEditElement=editTree.EditElement.extend({initialize:function(parent,nameToken,valueToken){this.styleBefore=parent.options.styleBefore;this.styleSeparator=parent.options.styleSeparator;var value="",quote=parent.options.styleQuote;if(valueToken){value=valueToken.value;quote=value.charAt(0);'"'==quote||"'"==quote?value=value.substring(1):quote="";quote&&value.charAt(value.length-1)==quote&&(value=value.substring(0,value.length-1))}this.styleQuote=quote;this._value=value;this._positions.value=valueToken?valueToken.start+quote.length:-1},fullRange:function(isAbsolute){var r=this.range(isAbsolute);r.start-=this.styleBefore.length;return r},valueOf:function(){return this.name()+this.styleSeparator+this.styleQuote+this.value()+this.styleQuote}});return{parse:function(source,options){return new XMLEditContainer(source,options)},parseFromPosition:function(content,pos,isBackward){var bounds=this.extractTag(content,pos,isBackward);return bounds&&bounds.inside(pos)?this.parse(bounds.substring(content),{offset:bounds.start}):null},extractTag:function(content,pos,isBackward){var i,len=content.length,maxLen=Math.min(2e3,len),r=null,match=function(pos){var m;return"<"==content.charAt(pos)&&(m=content.substr(pos,maxLen).match(startTag))?range.create(pos,m[0]):void 0};for(i=pos;i>=0&&!(r=match(i));i--);if(r&&(r.inside(pos)||isBackward))return r;if(!r&&isBackward)return null;for(i=pos;len>i;i++)if(r=match(i))return r}}})},{"../assets/range":30,"../parser/xml":62,"../utils/common":73,"./base":36}],39:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function getFileName(path){var re=/([\w\.\-]+)$/i,m=re.exec(path);return m?m[1]:""}function normalizeProfile(profile){if("object"==typeof profile){"indent"in profile&&(profile.indent=!!profile.indent);"self_closing_tag"in profile&&"number"==typeof profile.self_closing_tag&&(profile.self_closing_tag=!!profile.self_closing_tag)}return profile}var global="undefined"!=typeof self?self:this,utils=require("./utils/common"),actions=require("./action/main"),parser=require("./parser/abbreviation"),file=require("./plugin/file"),preferences=require("./assets/preferences"),resources=require("./assets/resources"),profile=require("./assets/profile"),ciu=require("./assets/caniuse"),logger=require("./assets/logger"),sliceFn=Array.prototype.slice;return{expandAbbreviation:function(abbr,syntax,profile,contextNode){return parser.expand(abbr,{syntax:syntax,profile:profile,contextNode:contextNode})},run:function(name){return actions.run.apply(actions,sliceFn.call(arguments,0))},loadExtensions:function(fileList){var payload={},userSnippets=null,that=this;fileList=fileList.filter(function(f){var ext=file.getExt(f);return"json"===ext||"js"===ext});var reader=(file.readText||file.read).bind(file),next=function(){if(fileList.length){var f=fileList.shift();reader(f,function(err,content){if(err){logger.log('Unable to read "'+f+'" file: '+err);return next()}switch(file.getExt(f)){case"js":try{eval(content)}catch(e){logger.log('Unable to eval "'+f+'" file: '+e)}break;case"json":var fileName=getFileName(f).toLowerCase().replace(/\.json$/,"");/^snippets/.test(fileName)?"snippets"===fileName?userSnippets=utils.parseJSON(content):payload.snippets=utils.deepMerge(payload.snippets||{},utils.parseJSON(content)):payload[fileName]=content}next()})}else{userSnippets&&(payload.snippets=utils.deepMerge(payload.snippets||{},userSnippets));that.loadUserData(payload)}};next()},loadPreferences:function(data){preferences.load(utils.parseJSON(data))},loadSnippets:function(data){data=utils.parseJSON(data);var userData=resources.getVocabulary("user")||{};resources.setVocabulary(utils.deepMerge(userData,data),"user")},loadSystemSnippets:function(data){resources.setVocabulary(utils.parseJSON(data),"system")},loadCIU:function(data){ciu.load(utils.parseJSON(data))},resetSnippets:function(){resources.setVocabulary({},"user")},loadUserData:function(data){data=utils.parseJSON(data);data.snippets&&this.loadSnippets(data.snippets);data.preferences&&this.loadPreferences(data.preferences);data.profiles&&this.loadProfiles(data.profiles);data.caniuse&&this.loadCIU(data.caniuse);var profiles=data.syntaxProfiles||data.syntaxprofiles;profiles&&this.loadSyntaxProfiles(profiles)},resetUserData:function(){this.resetSnippets();preferences.reset();profile.reset()},loadSyntaxProfiles:function(profiles){profiles=utils.parseJSON(profiles);var snippets={};Object.keys(profiles).forEach(function(syntax){var options=profiles[syntax];syntax in snippets||(snippets[syntax]={});snippets[syntax].profile=normalizeProfile(options)});this.loadSnippets(snippets)},loadProfiles:function(profiles){profiles=utils.parseJSON(profiles);Object.keys(profiles).forEach(function(name){profile.create(name,normalizeProfile(profiles[name]))})},require:require,actions:actions,file:file,preferences:preferences,resources:resources,profile:profile,tabStops:require("./assets/tabStops"),htmlMatcher:require("./assets/htmlMatcher"),utils:{common:utils,action:require("./utils/action"),editor:require("./utils/editor")}}})},{"./action/main":12,"./assets/caniuse":23,"./assets/htmlMatcher":26,"./assets/logger":27,"./assets/preferences":28,"./assets/profile":29,"./assets/resources":31,"./assets/tabStops":33,"./parser/abbreviation":55,"./plugin/file":63,"./utils/action":70,"./utils/common":73,"./utils/editor":75}],40:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function getSeparators(){return{element:prefs.get("bem.elementSeparator"),modifier:prefs.get("bem.modifierSeparator")}}function bemParse(item){if(abbreviationUtils.isSnippet(item))return item;item.__bem={block:"",element:"",modifier:""};var classNames=normalizeClassName(item.attribute("class")).split(" "),reBlockName=/^[a-z]\-/i;item.__bem.block=utils.find(classNames,function(name){return reBlockName.test(name)});if(!item.__bem.block){reBlockName=/^[a-z]/i;item.__bem.block=utils.find(classNames,function(name){return reBlockName.test(name)})||""}classNames=classNames.map(function(name){return processClassName(name,item)});classNames=utils.unique(utils.flatten(classNames)).join(" ");classNames&&item.attribute("class",classNames);return item}function normalizeClassName(className){className=(" "+(className||"")+" ").replace(/\s+/g," ");var shortSymbol=prefs.get("bem.shortElementPrefix");if(shortSymbol){var re=new RegExp("\\s("+utils.escapeForRegexp(shortSymbol)+"+)","g");className=className.replace(re,function(str,p1){return" "+utils.repeatString(getSeparators().element,p1.length)})}return utils.trim(className)}function processClassName(name,item){name=transformClassName(name,item,"element");name=transformClassName(name,item,"modifier");var block="",element="",modifier="",separators=getSeparators();if(~name.indexOf(separators.element)){var elements=name.split(separators.element);block=elements.shift();var modifiers=elements.pop().split(separators.modifier);elements.push(modifiers.shift());element=elements.join(separators.element);modifier=modifiers.join(separators.modifier)}else if(~name.indexOf(separators.modifier)){var blockModifiers=name.split(separators.modifier);block=blockModifiers.shift();modifier=blockModifiers.join(separators.modifier)}if(block||element||modifier){block||(block=item.__bem.block);var prefix=block,result=[];if(element){prefix+=separators.element+element;result.push(prefix)}else result.push(prefix);modifier&&result.push(prefix+separators.modifier+modifier);item.__bem.block=block;item.__bem.element=element;item.__bem.modifier=modifier;return result}return name}function transformClassName(name,item,entityType){var separators=getSeparators(),reSep=new RegExp("^("+separators[entityType]+")+","g");if(reSep.test(name)){for(var depth=0,cleanName=name.replace(reSep,function(str){depth=str.length/separators[entityType].length;return""}),donor=item;donor.parent&&depth--;)donor=donor.parent;donor&&donor.__bem||(donor=item);if(donor&&donor.__bem){var prefix=donor.__bem.block;"modifier"==entityType&&donor.__bem.element&&(prefix+=separators.element+donor.__bem.element);return prefix+separators[entityType]+cleanName}}return name}function process(tree,profile){tree.name&&bemParse(tree,profile);tree.children.forEach(function(item){process(item,profile);!abbreviationUtils.isSnippet(item)&&item.start&&(shouldRunHtmlFilter=!0)});return tree}var htmlFilter=require("./html"),prefs=require("../assets/preferences"),abbreviationUtils=require("../utils/abbreviation"),utils=require("../utils/common");prefs.define("bem.elementSeparator","__","Class name’s element separator.");prefs.define("bem.modifierSeparator","_","Class name’s modifier separator.");prefs.define("bem.shortElementPrefix","-","Symbol for describing short “block-element” notation. Class names prefixed with this symbol will be treated as element name for parent‘s block name. Each symbol instance traverses one level up in parsed tree for block name lookup. Empty value will disable short notation.");var shouldRunHtmlFilter=!1;return function(tree,profile){shouldRunHtmlFilter=!1;tree=process(tree,profile);shouldRunHtmlFilter&&(tree=htmlFilter(tree,profile));return tree}})},{"../assets/preferences":28,"../utils/abbreviation":69,"../utils/common":73,"./html":46}],41:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function addComments(node,templateBefore,templateAfter){var trigger=prefs.get("filter.commentTrigger");if("*"!=trigger){var shouldAdd=utils.find(trigger.split(","),function(name){return!!node.attribute(utils.trim(name))});if(!shouldAdd)return}var ctx={node:node,name:node.name(),padding:node.parent?node.parent.padding:"",attr:function(name,before,after){var attr=node.attribute(name);return attr?(before||"")+attr+(after||""):""}},nodeBefore=templateBefore?templateBefore(ctx):"",nodeAfter=templateAfter?templateAfter(ctx):"";node.start=node.start.replace(/</,nodeBefore+"<");node.end=node.end.replace(/>/,">"+nodeAfter)}function process(tree,before,after){tree.children.forEach(function(item){abbrUtils.isBlock(item)&&addComments(item,before,after);process(item,before,after)});return tree}var prefs=require("../assets/preferences"),utils=require("../utils/common"),template=require("../utils/template"),abbrUtils=require("../utils/abbreviation");require("./main");prefs.define("filter.commentAfter",'\n<!-- /<%= attr("id", "#") %><%= attr("class", ".") %> -->',"A definition of comment that should be placed <i>after</i> matched element when <code>comment</code> filter is applied. This definition is an ERB-style template passed to <code>_.template()</code> function (see Underscore.js docs for details). In template context, the following properties and functions are availabe:\n<ul><li><code>attr(name, before, after)</code> – a function that outputsspecified attribute value concatenated with <code>before</code> and <code>after</code> strings. If attribute doesn't exists, the empty string will be returned.</li><li><code>node</code> – current node (instance of <code>AbbreviationNode</code>)</li><li><code>name</code> – name of current tag</li><li><code>padding</code> – current string padding, can be used for formatting</li></ul>");prefs.define("filter.commentBefore","","A definition of comment that should be placed <i>before</i> matched element when <code>comment</code> filter is applied. For more info, read description of <code>filter.commentAfter</code> property");prefs.define("filter.commentTrigger","id, class","A comma-separated list of attribute names that should exist in abbreviatoin where comment should be added. If you wish to add comment for every element, set this option to <code>*</code>");return function(tree){var templateBefore=template(prefs.get("filter.commentBefore")),templateAfter=template(prefs.get("filter.commentAfter"));return process(tree,templateBefore,templateAfter)}})},{"../assets/preferences":28,"../utils/abbreviation":69,"../utils/common":73,"../utils/template":77,"./main":49}],42:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function isVeryFirstChild(item){return item.parent&&!item.parent.parent&&!item.index()}return function process(tree,profile,level){level=level||0;tree.children.forEach(function(item){isVeryFirstChild(item)||profile.tag_nl===!1||(item.start="\n"+item.start);process(item,profile,level+1);
13
+ });return tree}})},{}],43:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function escapeChars(str){return str.replace(/([<>&])/g,function(str,p1){return charMap[p1]})}var charMap={"<":"&lt;",">":"&gt;","&":"&amp;"};return function process(tree){tree.children.forEach(function(item){item.start=escapeChars(item.start);item.end=escapeChars(item.end);item.content=escapeChars(item.content);process(item)});return tree}})},{}],44:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function getIndentation(node){var items=prefs.getArray("format.noIndentTags")||[];return~items.indexOf(node.name())?"":" "}function hasBlockSibling(item){return item.parent&&abbrUtils.hasBlockChildren(item.parent)}function isVeryFirstChild(item){return item.parent&&!item.parent.parent&&!item.index()}function shouldAddLineBreak(node,profile){return profile.tag_nl===!0||abbrUtils.isBlock(node)?!0:node.parent&&profile.inline_break?shouldFormatInline(node.parent,profile):!1}function shouldBreakChild(node,profile){return node.children.length&&shouldAddLineBreak(node.children[0],profile)}function shouldFormatInline(node,profile){var nodeCount=0;return!!utils.find(node.children,function(child){child.isTextNode()||!abbrUtils.isInline(child)?nodeCount=0:abbrUtils.isInline(child)&&nodeCount++;return nodeCount>=profile.inline_break?!0:void 0})}function isRoot(item){return!item.parent}function processSnippet(item,profile){item.start=item.end="";!isVeryFirstChild(item)&&profile.tag_nl!==!1&&shouldAddLineBreak(item,profile)&&(isRoot(item.parent)||!abbrUtils.isInline(item.parent))&&(item.start="\n"+item.start);return item}function shouldBreakInsideInline(node,profile){var hasBlockElems=node.children.some(function(child){return abbrUtils.isSnippet(child)?!1:!abbrUtils.isInline(child)});return hasBlockElems?!0:shouldFormatInline(node,profile)}function processTag(item,profile){item.start=item.end=placeholder;var isUnary=abbrUtils.isUnary(item),nl="\n",indent=getIndentation(item);if(profile.tag_nl!==!1){var forceNl=profile.tag_nl===!0&&(profile.tag_nl_leaf||item.children.length);if(!forceNl){var forceIndentTags=prefs.getArray("format.forceIndentationForTags")||[];forceNl=~forceIndentTags.indexOf(item.name())}if(!item.isTextNode()){if(shouldAddLineBreak(item,profile)){isVeryFirstChild(item)||abbrUtils.isSnippet(item.parent)&&!item.index()||(item.start=nl+item.start);(abbrUtils.hasBlockChildren(item)||shouldBreakChild(item,profile)||forceNl&&!isUnary)&&(item.end=nl+item.end);(abbrUtils.hasTagsInContent(item)||forceNl&&!item.children.length&&!isUnary)&&(item.start+=nl+indent)}else abbrUtils.isInline(item)&&hasBlockSibling(item)&&!isVeryFirstChild(item)?item.start=nl+item.start:abbrUtils.isInline(item)&&shouldBreakInsideInline(item,profile)&&(item.end=nl+item.end);item.padding=indent}}return item}var utils=require("../utils/common"),abbrUtils=require("../utils/abbreviation"),prefs=require("../assets/preferences");require("../assets/resources");prefs.define("format.noIndentTags","html","A comma-separated list of tag names that should not get inner indentation.");prefs.define("format.forceIndentationForTags","body","A comma-separated list of tag names that should <em>always</em> get inner indentation.");var placeholder="%s";return function process(tree,profile,level){level=level||0;tree.children.forEach(function(item){abbrUtils.isSnippet(item)?processSnippet(item,profile,level):processTag(item,profile,level);process(item,profile,level+1)});return tree}})},{"../assets/preferences":28,"../assets/resources":31,"../utils/abbreviation":69,"../utils/common":73}],45:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function transformClassName(className){return utils.trim(className).replace(/\s+/g,".")}function condenseDataAttrs(attrs){var out=[],data=null,reData=/^data-/i;attrs.forEach(function(attr){if(reData.test(attr.name)){if(!data){data=[];out.push({name:"data",value:data})}data.push(utils.extend({},attr,{name:attr.name.replace(reData,"")}))}else out.push(attr)});return out}function stringifyAttrs(attrs,profile){var attrQuote=profile.attributeQuote();return"{"+attrs.map(function(attr){var value=attrQuote+attr.value+attrQuote;Array.isArray(attr.value)?value=stringifyAttrs(attr.value,profile):attr.isBoolean&&(value="true");return":"+attr.name+" => "+value}).join(", ")+"}"}function makeAttributesString(tag,profile){var attrs="",otherAttrs=[],cursor=(profile.attributeQuote(),profile.cursor());tag.attributeList().forEach(function(a){var attrName=profile.attributeName(a.name);switch(attrName.toLowerCase()){case"id":attrs+="#"+(a.value||cursor);break;case"class":attrs+="."+transformClassName(a.value||cursor);break;default:otherAttrs.push({name:attrName,value:a.value||cursor,isBoolean:profile.isBoolean(a.name,a.value)})}});otherAttrs.length&&(attrs+=stringifyAttrs(condenseDataAttrs(otherAttrs),profile));return attrs}function processTag(item,profile){if(!item.parent)return item;var attrs=makeAttributesString(item,profile),cursor=profile.cursor(),isUnary=abbrUtils.isUnary(item),selfClosing=profile.self_closing_tag&&isUnary?"/":"",start="",tagName="%"+profile.tagName(item.name());"%div"==tagName.toLowerCase()&&attrs&&-1==attrs.indexOf("{")&&(tagName="");item.end="";start=tagName+attrs+selfClosing;item.content&&!/^\s/.test(item.content)&&(item.content=" "+item.content);var placeholder="%s";item.start=utils.replaceSubstring(item.start,start,item.start.indexOf(placeholder),placeholder);item.children.length||isUnary||(item.start+=cursor);return item}var utils=require("../utils/common"),abbrUtils=require("../utils/abbreviation"),formatFilter=require("./format");return function process(tree,profile,level){level=level||0;level||(tree=formatFilter(tree,"_format",profile));tree.children.forEach(function(item){abbrUtils.isSnippet(item)||processTag(item,profile,level);process(item,profile,level+1)});return tree}})},{"../utils/abbreviation":69,"../utils/common":73,"./format":44}],46:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function makeAttributesString(node,profile){var attrQuote=profile.attributeQuote(),cursor=profile.cursor();return node.attributeList().map(function(a){var isBoolean=profile.isBoolean(a.name,a.value),attrName=profile.attributeName(a.name),attrValue=isBoolean?attrName:a.value;return isBoolean&&profile.allowCompactBoolean()?" "+attrName:" "+attrName+"="+attrQuote+(attrValue||cursor)+attrQuote}).join("")}function processTag(item,profile){if(!item.parent)return item;var attrs=makeAttributesString(item,profile),cursor=profile.cursor(),isUnary=abbrUtils.isUnary(item),start="",end="";if(!item.isTextNode()){var tagName=profile.tagName(item.name());if(isUnary){start="<"+tagName+attrs+profile.selfClosing()+">";item.end=""}else{start="<"+tagName+attrs+">";end="</"+tagName+">"}}var placeholder="%s";item.start=utils.replaceSubstring(item.start,start,item.start.indexOf(placeholder),placeholder);item.end=utils.replaceSubstring(item.end,end,item.end.indexOf(placeholder),placeholder);item.children.length||isUnary||~item.content.indexOf(cursor)||tabStops.extract(item.content).tabstops.length||(item.start+=cursor);return item}var abbrUtils=require("../utils/abbreviation"),utils=require("../utils/common"),tabStops=require("../assets/tabStops"),formatFilter=require("./format");return function process(tree,profile,level){level=level||0;level||(tree=formatFilter(tree,profile,level));tree.children.forEach(function(item){abbrUtils.isSnippet(item)||processTag(item,profile,level);process(item,profile,level+1)});return tree}})},{"../assets/tabStops":33,"../utils/abbreviation":69,"../utils/common":73,"./format":44}],47:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function transformClassName(className){return utils.trim(className).replace(/\s+/g,".")}function stringifyAttrs(attrs,profile){var attrQuote=profile.attributeQuote();return"("+attrs.map(function(attr){return attr.isBoolean?attr.name:attr.name+"="+attrQuote+attr.value+attrQuote}).join(", ")+")"}function makeAttributesString(tag,profile){var attrs="",otherAttrs=[],cursor=(profile.attributeQuote(),profile.cursor());tag.attributeList().forEach(function(a){var attrName=profile.attributeName(a.name);switch(attrName.toLowerCase()){case"id":attrs+="#"+(a.value||cursor);break;case"class":attrs+="."+transformClassName(a.value||cursor);break;default:otherAttrs.push({name:attrName,value:a.value||cursor,isBoolean:profile.isBoolean(a.name,a.value)})}});otherAttrs.length&&(attrs+=stringifyAttrs(otherAttrs,profile));return attrs}function processTagContent(item){if(item.content){var content=tabStops.replaceVariables(item.content,function(str,name){return"nl"===name||"newline"===name?"\n":str});if(reNl.test(content)&&!reIndentedText.test(content)){var pad="| ";item.content="\n"+pad+utils.padString(content,pad)}else reSpace.test(content)||(item.content=" "+content)}}function processTag(item,profile){if(!item.parent)return item;var attrs=makeAttributesString(item,profile),cursor=profile.cursor(),isUnary=abbrUtils.isUnary(item),tagName=profile.tagName(item.name());"div"==tagName.toLowerCase()&&attrs&&"("!=attrs.charAt(0)&&(tagName="");item.end="";var start=tagName+attrs;processTagContent(item);var placeholder="%s";item.start=utils.replaceSubstring(item.start,start,item.start.indexOf(placeholder),placeholder);item.children.length||isUnary||(item.start+=cursor);return item}var utils=require("../utils/common"),abbrUtils=require("../utils/abbreviation"),formatFilter=require("./format"),tabStops=require("../assets/tabStops"),profile=require("../assets/profile"),reNl=/[\n\r]/,reIndentedText=/^\s*\|/,reSpace=/^\s/;return function process(tree,curProfile,level){level=level||0;level||(tree=formatFilter(tree,profile.get("xml")));tree.children.forEach(function(item){abbrUtils.isSnippet(item)||processTag(item,curProfile,level);process(item,curProfile,level+1)});return tree}})},{"../assets/profile":29,"../assets/tabStops":33,"../utils/abbreviation":69,"../utils/common":73,"./format":44}],48:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var attrMap={"class":"className","for":"htmlFor"};return function process(tree){tree.children.forEach(function(item){item._attributes.forEach(function(attr){attr.name in attrMap&&(attr.name=attrMap[attr.name])});process(item)});return tree}})},{}],49:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function list(filters){return filters?"string"==typeof filters?filters.split(/[\|,]/g):filters:[]}var utils=require("../utils/common"),profile=require("../assets/profile"),resources=require("../assets/resources"),registeredFilters={html:require("./html"),haml:require("./haml"),jade:require("./jade"),jsx:require("./jsx"),slim:require("./slim"),xsl:require("./xsl"),css:require("./css"),bem:require("./bem"),c:require("./comment"),e:require("./escape"),s:require("./singleLine"),t:require("./trim")},basicFilters="html";return{add:function(name,fn){registeredFilters[name]=fn},apply:function(tree,filters,profileName){profileName=profile.get(profileName);list(filters).forEach(function(filter){var name=utils.trim(filter.toLowerCase());name&&name in registeredFilters&&(tree=registeredFilters[name](tree,profileName))});return tree},composeList:function(syntax,profileName,additionalFilters){profileName=profile.get(profileName);var filters=list(profileName.filters||resources.findItem(syntax,"filters")||basicFilters);profileName.extraFilters&&(filters=filters.concat(list(profileName.extraFilters)));additionalFilters&&(filters=filters.concat(list(additionalFilters)));filters&&filters.length||(filters=list(basicFilters));return filters},extract:function(abbr){var filters="";abbr=abbr.replace(/\|([\w\|\-]+)$/,function(str,p1){filters=p1;return""});return[abbr,list(filters)]}}})},{"../assets/profile":29,"../assets/resources":31,"../utils/common":73,"./bem":40,"./comment":41,"./css":42,"./escape":43,"./haml":45,"./html":46,"./jade":47,"./jsx":48,"./singleLine":50,"./slim":51,"./trim":52,"./xsl":53}],50:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var abbrUtils=require("../utils/abbreviation"),rePad=/^\s+/,reNl=/[\n\r]/g;return function process(tree){tree.children.forEach(function(item){if(!abbrUtils.isSnippet(item)){item.start=item.start.replace(rePad,"");item.end=item.end.replace(rePad,"")}item.start=item.start.replace(reNl,"");item.end=item.end.replace(reNl,"");item.content=item.content.replace(reNl,"");process(item)});return tree}})},{"../utils/abbreviation":69}],51:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function transformClassName(className){return utils.trim(className).replace(/\s+/g,".")}function getAttrWrapper(){var start=" ",end="";switch(prefs.get("slim.attributesWrapper")){case"round":start="(";end=")";break;case"square":start="[";end="]";break;case"curly":start="{";end="}"}return{start:start,end:end}}function stringifyAttrs(attrs,profile){var attrQuote=profile.attributeQuote(),attrWrap=getAttrWrapper();return attrWrap.start+attrs.map(function(attr){var value=attrQuote+attr.value+attrQuote;if(attr.isBoolean){if(attrWrap.end)return attr.name;value="true"}return attr.name+"="+value}).join(" ")+attrWrap.end}function makeAttributesString(tag,profile){var attrs="",otherAttrs=[],cursor=(profile.attributeQuote(),profile.cursor());tag.attributeList().forEach(function(a){var attrName=profile.attributeName(a.name);switch(attrName.toLowerCase()){case"id":attrs+="#"+(a.value||cursor);break;case"class":attrs+="."+transformClassName(a.value||cursor);break;default:otherAttrs.push({name:attrName,value:a.value||cursor,isBoolean:profile.isBoolean(a.name,a.value)})}});otherAttrs.length&&(attrs+=stringifyAttrs(otherAttrs,profile));return attrs}function processTagContent(item){if(item.content){var content=tabStops.replaceVariables(item.content,function(str,name){return"nl"===name||"newline"===name?"\n":str});if(reNl.test(content)&&!reIndentedText.test(content)){var pad=" ";item.content="\n| "+utils.padString(content,pad)}else reSpace.test(content)||(item.content=" "+content)}}function processTag(item,profile){if(!item.parent)return item;var attrs=makeAttributesString(item,profile),cursor=profile.cursor(),isUnary=abbrUtils.isUnary(item),selfClosing=profile.self_closing_tag&&isUnary?"/":"",tagName=profile.tagName(item.name());"div"==tagName.toLowerCase()&&attrs&&-1=="([{".indexOf(attrs.charAt(0))&&(tagName="");item.end="";var start=tagName+attrs+selfClosing;processTagContent(item);var placeholder="%s";item.start=utils.replaceSubstring(item.start,start,item.start.indexOf(placeholder),placeholder);item.children.length||isUnary||(item.start+=cursor);return item}var utils=require("../utils/common"),abbrUtils=require("../utils/abbreviation"),formatFilter=require("./format"),tabStops=require("../assets/tabStops"),prefs=require("../assets/preferences"),profile=require("../assets/profile"),reNl=/[\n\r]/,reIndentedText=/^\s*\|/,reSpace=/^\s/;prefs.define("slim.attributesWrapper","none","Defines how attributes will be wrapped:<ul><li><code>none</code> – no wrapping;</li><li><code>round</code> — wrap attributes with round braces;</li><li><code>square</code> — wrap attributes with round braces;</li><li><code>curly</code> — wrap attributes with curly braces.</li></ul>");return function process(tree,curProfile,level){level=level||0;level||(tree=formatFilter(tree,profile.get("xml")));tree.children.forEach(function(item){abbrUtils.isSnippet(item)||processTag(item,curProfile,level);process(item,curProfile,level+1)});return tree}})},{"../assets/preferences":28,"../assets/profile":29,"../assets/tabStops":33,"../utils/abbreviation":69,"../utils/common":73,"./format":44}],52:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function process(tree,re){tree.children.forEach(function(item){item.content&&(item.content=item.content.replace(re,""));process(item,re)});return tree}var prefs=require("../assets/preferences");prefs.define("filter.trimRegexp","[\\s|\\u00a0]*[\\d|#|\\-|*|\\u2022]+\\.?\\s*","Regular expression used to remove list markers (numbers, dashes, bullets, etc.) in <code>t</code> (trim) filter. The trim filter is useful for wrapping with abbreviation lists, pased from other documents (for example, Word documents).");return function(tree){var re=new RegExp(prefs.get("filter.trimRegexp"));return process(tree,re)}})},{"../assets/preferences":28}],53:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function trimAttribute(node){node.start=node.start.replace(/\s+select\s*=\s*(['"]).*?\1/,"")}var abbrUtils=require("../utils/abbreviation"),tags={"xsl:variable":1,"xsl:with-param":1};return function process(tree){tree.children.forEach(function(item){!abbrUtils.isSnippet(item)&&(item.name()||"").toLowerCase()in tags&&item.children.length&&trimAttribute(item);process(item)});return tree}})},{"../utils/abbreviation":69}],54:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function randint(from,to){return Math.round(Math.random()*(to-from)+from)}function sample(arr,count){for(var len=arr.length,iterations=Math.min(len,count),result=[];result.length<iterations;){var randIx=randint(0,len-1);~result.indexOf(randIx)||result.push(randIx)}return result.map(function(ix){return arr[ix]})}function choice(val){return"string"==typeof val?val.charAt(randint(0,val.length-1)):val[randint(0,val.length-1)]}function sentence(words,end){words.length&&(words[0]=words[0].charAt(0).toUpperCase()+words[0].substring(1));return words.join(" ")+(end||choice("?!..."))}function insertCommas(words){var len=words.length;if(!(2>len)){var totalCommas=0;totalCommas=len>3&&6>=len?randint(0,1):len>6&&12>=len?randint(0,2):randint(1,4);for(var pos,word,i=0;totalCommas>i;i++){pos=randint(0,words.length-2);word=words[pos];","!==word.charAt(word.length-1)&&(words[pos]+=",")}}}function paragraph(lang,wordCount,startWithCommon){var data=langs[lang];if(!data)return"";var words,result=[],totalWords=0;wordCount=parseInt(wordCount,10);if(startWithCommon&&data.common){words=data.common.slice(0,wordCount);words.length>5&&(words[4]+=",");totalWords+=words.length;result.push(sentence(words,"."))}for(;wordCount>totalWords;){words=sample(data.words,Math.min(randint(2,30),wordCount-totalWords));totalWords+=words.length;insertCommas(words);result.push(sentence(words))}return result.join(" ")}var prefs=require("../assets/preferences"),langs={en:{common:["lorem","ipsum","dolor","sit","amet","consectetur","adipisicing","elit"],words:["exercitationem","perferendis","perspiciatis","laborum","eveniet","sunt","iure","nam","nobis","eum","cum","officiis","excepturi","odio","consectetur","quasi","aut","quisquam","vel","eligendi","itaque","non","odit","tempore","quaerat","dignissimos","facilis","neque","nihil","expedita","vitae","vero","ipsum","nisi","animi","cumque","pariatur","velit","modi","natus","iusto","eaque","sequi","illo","sed","ex","et","voluptatibus","tempora","veritatis","ratione","assumenda","incidunt","nostrum","placeat","aliquid","fuga","provident","praesentium","rem","necessitatibus","suscipit","adipisci","quidem","possimus","voluptas","debitis","sint","accusantium","unde","sapiente","voluptate","qui","aspernatur","laudantium","soluta","amet","quo","aliquam","saepe","culpa","libero","ipsa","dicta","reiciendis","nesciunt","doloribus","autem","impedit","minima","maiores","repudiandae","ipsam","obcaecati","ullam","enim","totam","delectus","ducimus","quis","voluptates","dolores","molestiae","harum","dolorem","quia","voluptatem","molestias","magni","distinctio","omnis","illum","dolorum","voluptatum","ea","quas","quam","corporis","quae","blanditiis","atque","deserunt","laboriosam","earum","consequuntur","hic","cupiditate","quibusdam","accusamus","ut","rerum","error","minus","eius","ab","ad","nemo","fugit","officia","at","in","id","quos","reprehenderit","numquam","iste","fugiat","sit","inventore","beatae","repellendus","magnam","recusandae","quod","explicabo","doloremque","aperiam","consequatur","asperiores","commodi","optio","dolor","labore","temporibus","repellat","veniam","architecto","est","esse","mollitia","nulla","a","similique","eos","alias","dolore","tenetur","deleniti","porro","facere","maxime","corrupti"]},sp:{common:["mujer","uno","dolor","más","de","poder","mismo","si"],words:["ejercicio","preferencia","perspicacia","laboral","paño","suntuoso","molde","namibia","planeador","mirar","demás","oficinista","excepción","odio","consecuencia","casi","auto","chicharra","velo","elixir","ataque","no","odio","temporal","cuórum","dignísimo","facilismo","letra","nihilista","expedición","alma","alveolar","aparte","león","animal","como","paria","belleza","modo","natividad","justo","ataque","séquito","pillo","sed","ex","y","voluminoso","temporalidad","verdades","racional","asunción","incidente","marejada","placenta","amanecer","fuga","previsor","presentación","lejos","necesariamente","sospechoso","adiposidad","quindío","pócima","voluble","débito","sintió","accesorio","falda","sapiencia","volutas","queso","permacultura","laudo","soluciones","entero","pan","litro","tonelada","culpa","libertario","mosca","dictado","reincidente","nascimiento","dolor","escolar","impedimento","mínima","mayores","repugnante","dulce","obcecado","montaña","enigma","total","deletéreo","décima","cábala","fotografía","dolores","molesto","olvido","paciencia","resiliencia","voluntad","molestias","magnífico","distinción","ovni","marejada","cerro","torre","y","abogada","manantial","corporal","agua","crepúsculo","ataque","desierto","laboriosamente","angustia","afortunado","alma","encefalograma","materialidad","cosas","o","renuncia","error","menos","conejo","abadía","analfabeto","remo","fugacidad","oficio","en","almácigo","vos","pan","represión","números","triste","refugiado","trote","inventor","corchea","repelente","magma","recusado","patrón","explícito","paloma","síndrome","inmune","autoinmune","comodidad","ley","vietnamita","demonio","tasmania","repeler","apéndice","arquitecto","columna","yugo","computador","mula","a","propósito","fantasía","alias","rayo","tenedor","deleznable","ventana","cara","anemia","corrupto"]},ru:{common:["далеко-далеко","за","словесными","горами","в стране","гласных","и согласных","живут","рыбные","тексты"],words:["вдали","от всех","они","буквенных","домах","на берегу","семантика","большого","языкового","океана","маленький","ручеек","даль","журчит","по всей","обеспечивает","ее","всеми","необходимыми","правилами","эта","парадигматическая","страна","которой","жаренные","предложения","залетают","прямо","рот","даже","всемогущая","пунктуация","не","имеет","власти","над","рыбными","текстами","ведущими","безорфографичный","образ","жизни","однажды","одна","маленькая","строчка","рыбного","текста","имени","lorem","ipsum","решила","выйти","большой","мир","грамматики","великий","оксмокс","предупреждал","о","злых","запятых","диких","знаках","вопроса","коварных","точках","запятой","но","текст","дал","сбить","себя","толку","он","собрал","семь","своих","заглавных","букв","подпоясал","инициал","за","пояс","пустился","дорогу","взобравшись","первую","вершину","курсивных","гор","бросил","последний","взгляд","назад","силуэт","своего","родного","города","буквоград","заголовок","деревни","алфавит","подзаголовок","своего","переулка","грустный","реторический","вопрос","скатился","его","щеке","продолжил","свой","путь","дороге","встретил","рукопись","она","предупредила","моей","все","переписывается","несколько","раз","единственное","что","меня","осталось","это","приставка","возвращайся","ты","лучше","свою","безопасную","страну","послушавшись","рукописи","наш","продолжил","свой","путь","вскоре","ему","повстречался","коварный","составитель","рекламных","текстов","напоивший","языком","речью","заманивший","свое","агенство","которое","использовало","снова","снова","своих","проектах","если","переписали","то","живет","там","до","сих","пор"]}};prefs.define("lorem.defaultLang","en",'Default language of generated dummy text. Currently, <code>en</code> and <code>ru</code> are supported, but users can add their own syntaxes see <a href="http://docs.emmet.io/abbreviations/lorem-ipsum/">docs</a>.');prefs.define("lorem.omitCommonPart",!1,"Omit commonly used part (e.g. “Lorem ipsum dolor sit amet“) from generated text.");return{addLang:function(lang,data){"string"==typeof data?data={words:data.split(" ").filter(function(item){return!!item})}:Array.isArray(data)&&(data={words:data});langs[lang]=data},preprocessor:function(tree){var match,re=/^(?:lorem|lipsum)([a-z]{2})?(\d*)$/i,allowCommon=!prefs.get("lorem.omitCommonPart");tree.findAll(function(node){if(node._name&&(match=node._name.match(re))){var wordCound=match[2]||30,lang=match[1]||prefs.get("lorem.defaultLang")||"en";node._name="";node.data("forceNameResolving",node.isRepeating()||node.attributeList().length);node.data("pasteOverwrites",!0);node.data("paste",function(i){return paragraph(lang,wordCound,!i&&allowCommon)})}})}}})},{"../assets/preferences":28}],55:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function AbbreviationNode(parent){this.parent=null;this.children=[];this._attributes=[];this.abbreviation="";this.counter=1;this._name=null;this._text="";this.repeatCount=1;this.hasImplicitRepeat=!1;this._data={};this.start="";this.end="";this.content="";this.padding=""}function stripped(str){return str.substring(1,str.length-1)}function parseAbbreviation(abbr){abbr=utils.trim(abbr);for(var ch,multiplier,root=new AbbreviationNode,context=root.addChild(),stream=stringStream.create(abbr),loopProtector=1e3,addChild=function(child){context.addChild(child)},consumeAbbr=function(){stream.start=stream.pos;stream.eatWhile(function(c){if("["==c||"{"==c){if(stream.skipToPair(c,pairs[c])){stream.backUp(1);return!0}throw new Error('Invalid abbreviation: mo matching "'+pairs[c]+'" found for character at '+stream.pos)}if("+"==c){stream.next();var isMarker=stream.eol()||~"+>^*".indexOf(stream.peek());stream.backUp(1);return isMarker}return"("!=c&&isAllowedChar(c)})};!stream.eol()&&--loopProtector>0;){ch=stream.peek();switch(ch){case"(":stream.start=stream.pos;if(!stream.skipToPair("(",")"))throw new Error('Invalid abbreviation: mo matching ")" found for character at '+stream.pos);var inner=parseAbbreviation(stripped(stream.current()));(multiplier=stream.match(/^\*(\d+)?/,!0))&&context._setRepeat(multiplier[1]);inner.children.forEach(addChild);break;case">":context=context.addChild();stream.next();break;case"+":context=context.parent.addChild();stream.next();break;case"^":var parent=context.parent||context;context=(parent.parent||parent).addChild();stream.next();break;default:consumeAbbr();context.setAbbreviation(stream.current());stream.start=stream.pos}}if(1>loopProtector)throw new Error("Endless loop detected");return root}function splitAttributes(attrSet){attrSet=utils.trim(attrSet);for(var ch,parts=[],stream=stringStream(attrSet);ch=stream.next();)if(" "==ch){parts.push(utils.trim(stream.current()));for(;" "==stream.peek();)stream.next();stream.start=stream.pos}else if(('"'==ch||"'"==ch)&&!stream.skipString(ch))throw new Error("Invalid attribute set");parts.push(utils.trim(stream.current()));return parts}function unquote(str){var ch=str.charAt(0);if('"'==ch||"'"==ch){str=str.substr(1);var last=str.charAt(str.length-1);last===ch&&(str=str.substr(0,str.length-1))}return str}function extractAttributes(attrSet){var reAttrName=/^[\w\-:\$@]+\.?$/;return splitAttributes(attrSet).map(function(attr){if(reAttrName.test(attr)){var value="";if("."==attr.charAt(attr.length-1)){attr=attr.substr(0,attr.length-1);value=attr}return{name:attr,value:value}}if(~attr.indexOf("=")){var parts=attr.split("=");return{name:parts.shift(),value:unquote(parts.join("="))}}return{name:DEFAULT_ATTR_NAME,value:unquote(attr)}})}function parseAttributes(abbr){for(var result=[],attrMap={"#":"id",".":"class"},nameEnd=null,stream=stringStream.create(abbr);!stream.eol();)switch(stream.peek()){case"#":case".":null===nameEnd&&(nameEnd=stream.pos);var attrName=attrMap[stream.peek()];stream.next();stream.start=stream.pos;stream.eatWhile(reWord);result.push({name:attrName,value:stream.current()});break;case"[":null===nameEnd&&(nameEnd=stream.pos);stream.start=stream.pos;if(!stream.skipToPair("[","]"))throw new Error("Invalid attribute set definition");result=result.concat(extractAttributes(stripped(stream.current())));break;default:stream.next()}return result.length?{element:abbr.substring(0,nameEnd),attributes:optimizeAttributes(result)}:null}function optimizeAttributes(attrs){attrs=attrs.map(function(attr){return utils.clone(attr)});var lookup={};return attrs.filter(function(attr){if(!(attr.name in lookup))return lookup[attr.name]=attr;var la=lookup[attr.name];if("class"==attr.name.toLowerCase())la.value+=(la.value.length?" ":"")+attr.value;else{la.value=attr.value;la.isImplied=!!attr.isImplied}return!1})}function extractText(abbr){if(!~abbr.indexOf("{"))return null;for(var stream=stringStream.create(abbr);!stream.eol();)switch(stream.peek()){case"[":case"(":stream.skipToPair(stream.peek(),pairs[stream.peek()]);break;case"{":stream.start=stream.pos;stream.skipToPair("{","}");return{element:abbr.substring(0,stream.start),text:stripped(stream.current())};default:stream.next()}}function unroll(node){for(var j,child,maxCount,i=node.children.length-1;i>=0;i--){child=node.children[i];if(child.isRepeating()){maxCount=j=child.repeatCount;child.repeatCount=1;child.updateProperty("counter",1);child.updateProperty("maxCount",maxCount);for(;--j>0;)child.parent.addChild(child.clone(),i+1).updateProperty("counter",j+1).updateProperty("maxCount",maxCount)}}node.children.forEach(unroll);return node}function squash(node){for(var i=node.children.length-1;i>=0;i--){var n=node.children[i];n.isGroup()?n.replace(squash(n).children):n.isEmpty()&&n.remove()}node.children.forEach(squash);return node}function isAllowedChar(ch){var charCode=ch.charCodeAt(0),specialChars="#.*:$-_!@|%";return charCode>64&&91>charCode||charCode>96&&123>charCode||charCode>47&&58>charCode||-1!=specialChars.indexOf(ch)}var tabStops=require("../assets/tabStops"),profile=require("../assets/profile"),filters=require("../filter/main"),utils=require("../utils/common"),abbreviationUtils=require("../utils/abbreviation"),stringStream=require("../assets/stringStream"),lorem=require("../generator/lorem"),procPastedContent=require("./processor/pastedContent"),procTagName=require("./processor/tagName"),procResourceMatcher=require("./processor/resourceMatcher"),procAttributes=require("./processor/attributes"),procHref=require("./processor/href"),reValidName=/^[\w\-\$\:@\!%]+\+?$/i,reWord=/[\w\-:\$@]/,DEFAULT_ATTR_NAME="%default",pairs={
14
+ "[":"]","(":")","{":"}"},spliceFn=Array.prototype.splice,preprocessors=[],postprocessors=[],outputProcessors=[];AbbreviationNode.prototype={addChild:function(child,position){child=child||new AbbreviationNode;child.parent=this;"undefined"==typeof position?this.children.push(child):this.children.splice(position,0,child);return child},clone:function(){var node=new AbbreviationNode,attrs=["abbreviation","counter","_name","_text","repeatCount","hasImplicitRepeat","start","end","content","padding"];attrs.forEach(function(a){node[a]=this[a]},this);node._attributes=this._attributes.map(function(attr){return utils.extend({},attr)});node._data=utils.extend({},this._data);node.children=this.children.map(function(child){child=child.clone();child.parent=node;return child});return node},remove:function(){if(this.parent){var ix=this.parent.children.indexOf(this);~ix&&this.parent.children.splice(ix,1)}return this},replace:function(){var parent=this.parent,ix=parent.children.indexOf(this),items=utils.flatten(arguments);spliceFn.apply(parent.children,[ix,1].concat(items));items.forEach(function(item){item.parent=parent})},updateProperty:function(name,value){this[name]=value;this.children.forEach(function(child){child.updateProperty(name,value)});return this},find:function(fn){return this.findAll(fn,{amount:1})[0]},findAll:function(fn,state){state=utils.extend({amount:0,found:0},state||{});if("function"!=typeof fn){var elemName=fn.toLowerCase();fn=function(item){return item.name().toLowerCase()==elemName}}var result=[];this.children.forEach(function(child){if(fn(child)){result.push(child);state.found++;if(state.amount&&state.found>=state.amount)return}result=result.concat(child.findAll(fn))});return result.filter(function(item){return!!item})},data:function(name,value){2==arguments.length&&(this._data[name]=value);return this._data[name]},name:function(){return this._name},attributeList:function(){return optimizeAttributes(this._attributes.slice(0))},attribute:function(name,value){if(2==arguments.length){if(null===value){var vals=this._attributes.filter(function(attr){return attr.name===name}),that=this;vals.forEach(function(attr){var ix=that._attributes.indexOf(attr);~ix&&that._attributes.splice(ix,1)});return}var attrNames=this._attributes.map(function(attr){return attr.name}),ix=attrNames.indexOf(name.toLowerCase());~ix?this._attributes[ix].value=value:this._attributes.push({name:name,value:value})}return(utils.find(this.attributeList(),function(attr){return attr.name==name})||{}).value},index:function(){return this.parent?this.parent.children.indexOf(this):-1},_setRepeat:function(count){count?this.repeatCount=parseInt(count,10)||1:this.hasImplicitRepeat=!0},setAbbreviation:function(abbr){abbr=abbr||"";var that=this;abbr=abbr.replace(/\*(\d+)?$/,function(str,repeatCount){that._setRepeat(repeatCount);return""});this.abbreviation=abbr;var abbrText=extractText(abbr);if(abbrText){abbr=abbrText.element;this.content=this._text=abbrText.text}var abbrAttrs=parseAttributes(abbr);if(abbrAttrs){abbr=abbrAttrs.element;this._attributes=abbrAttrs.attributes}this._name=abbr;if(this._name&&!reValidName.test(this._name))throw new Error("Invalid abbreviation")},valueOf:function(){var start=this.start,end=this.end,content=this.content,node=this;outputProcessors.forEach(function(fn){start=fn(start,node,"start");content=fn(content,node,"content");end=fn(end,node,"end")});var innerContent=this.children.map(function(child){return child.valueOf()}).join("");content=abbreviationUtils.insertChildContent(content,innerContent,{keepVariable:!1});return start+utils.padString(content,this.padding)+end},toString:function(){return this.valueOf()},hasEmptyChildren:function(){return!!utils.find(this.children,function(child){return child.isEmpty()})},hasImplicitName:function(){return!this._name&&!this.isTextNode()},isGroup:function(){return!this.abbreviation},isEmpty:function(){return!this.abbreviation&&!this.children.length},isRepeating:function(){return this.repeatCount>1||this.hasImplicitRepeat},isTextNode:function(){return!this.name()&&!this.attributeList().length},isElement:function(){return!this.isEmpty()&&!this.isTextNode()},deepestChild:function(){if(!this.children.length)return null;for(var deepestChild=this;deepestChild.children.length;)deepestChild=deepestChild.children[deepestChild.children.length-1];return deepestChild}};outputProcessors.push(function(text,node){return utils.replaceCounter(text,node.counter,node.maxCount)});outputProcessors.push(tabStops.abbrOutputProcessor.bind(tabStops));[lorem,procResourceMatcher,procAttributes,procPastedContent,procTagName,procHref].forEach(function(mod){mod.preprocessor&&preprocessors.push(mod.preprocessor.bind(mod));mod.postprocessor&&postprocessors.push(mod.postprocessor.bind(mod))});return{DEFAULT_ATTR_NAME:DEFAULT_ATTR_NAME,parse:function(abbr,options){options=options||{};var tree=parseAbbreviation(abbr),that=this;if(options.contextNode){tree._name=options.contextNode.name;var attrLookup={};tree._attributes.forEach(function(attr){attrLookup[attr.name]=attr});options.contextNode.attributes.forEach(function(attr){if(attr.name in attrLookup)attrLookup[attr.name].value=attr.value;else{attr=utils.clone(attr);tree._attributes.push(attr);attrLookup[attr.name]=attr}})}preprocessors.forEach(function(fn){fn(tree,options,that)});"counter"in options&&tree.updateProperty("counter",options.counter);tree=squash(unroll(tree));postprocessors.forEach(function(fn){fn(tree,options,that)});return tree},expand:function(abbr,options){if(!abbr)return"";if("string"==typeof options)throw new Error("Deprecated use of `expand` method: `options` must be object");options=options||{};options.syntax||(options.syntax=utils.defaultSyntax());var p=profile.get(options.profile,options.syntax);tabStops.resetTabstopIndex();var data=filters.extract(abbr),outputTree=this.parse(data[0],options),filtersList=filters.composeList(options.syntax,p,data[1]);filters.apply(outputTree,filtersList,p);return outputTree.valueOf()},AbbreviationNode:AbbreviationNode,addPreprocessor:function(fn){~preprocessors.indexOf(fn)||preprocessors.push(fn)},removeFilter:function(fn){var ix=preprocessors.indexOf(fn);~ix&&preprocessors.splice(ix,1)},addPostprocessor:function(fn){~postprocessors.indexOf(fn)||postprocessors.push(fn)},removePostprocessor:function(fn){var ix=postprocessors.indexOf(fn);~ix&&postprocessors.splice(ix,1)},addOutputProcessor:function(fn){~outputProcessors.indexOf(fn)||outputProcessors.push(fn)},removeOutputProcessor:function(fn){var ix=outputProcessors.indexOf(fn);~ix&&outputProcessors.splice(ix,1)},isAllowedChar:function(ch){ch=String(ch);return isAllowedChar(ch)||~">+^[](){}".indexOf(ch)}}})},{"../assets/profile":29,"../assets/stringStream":32,"../assets/tabStops":33,"../filter/main":49,"../generator/lorem":54,"../utils/abbreviation":69,"../utils/common":73,"./processor/attributes":57,"./processor/href":58,"./processor/pastedContent":59,"./processor/resourceMatcher":60,"./processor/tagName":61}],56:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function isNameChar(c,cc){cc=cc||c.charCodeAt(0);return cc>=97&&122>=cc||cc>=65&&90>=cc||cc>=1024&&1279>=cc||"&"===c||"_"===c||"<"===c||">"===c||"="===c||"-"===c}function isDigit(c,cc){cc=cc||c.charCodeAt(0);return cc>=48&&57>=cc}function tokener(value,type){session.tokens.push({value:value,type:type||value,start:null,end:null})}function getPosInfo(w){for(var errPos=w.chnum,source=w.source.replace(/\r\n?/g,"\n"),part=w.source.substring(0,errPos+1).replace(/\r\n?/g,"\n"),lines=part.split("\n"),ch=(lines[lines.length-1]||"").length,fullLine=source.split("\n")[lines.length-1]||"",chunkSize=100,offset=Math.max(0,ch-chunkSize),formattedLine=fullLine.substr(offset,2*chunkSize)+"\n",i=0;ch-offset-1>i;i++)formattedLine+="-";formattedLine+="^";return{line:lines.length,ch:ch,text:fullLine,hint:formattedLine}}function raiseError(message){var err=error(message),errObj=new Error(err.message,"",err.line);errObj.line=err.line;errObj.ch=err.ch;errObj.name=err.name;errObj.hint=err.hint;throw errObj}function error(m){var info=getPosInfo(walker);session.tokens;session.tokens=null;var message="CSS parsing error at line "+info.line+", char "+info.ch+": "+m;message+="\n"+info.hint;return{name:"ParseError",message:message,hint:info.hint,line:info.line,ch:info.ch}}function white(){for(var c=walker.ch,token="";" "===c||" "===c;){token+=c;c=walker.nextChar()}tokener(token,"white")}function comment(){var cnext,w=walker,c=w.ch,token=c;cnext=w.nextChar();if("/"===cnext)for(;c&&"\n"!==cnext&&"\r"!==cnext;){token+=cnext;c=cnext;cnext=w.nextChar()}else{if("*"!==cnext)return tokener(token,token);for(;c&&("*"!==c||"/"!==cnext);){token+=cnext;c=cnext;cnext=w.nextChar()}}token+=cnext;w.nextChar();tokener(token,"comment")}function eatString(){var cnext,w=walker,c=w.ch,q=c,token=c;c=w.nextChar();for(;c!==q;){if("\n"===c){cnext=w.nextChar();"\\"===cnext?token+=c+cnext:raiseError("Unterminated string")}else token+="\\"===c?c+w.nextChar():c;c=w.nextChar()}token+=c;return token}function str(){var token=eatString();walker.nextChar();tokener(token,"string")}function brace(){var w=walker,c=w.ch,depth=1,token=c,stop=!1;c=w.nextChar();for(;c&&!stop;){if("("===c)depth++;else if(")"===c){depth--;depth||(stop=!0)}else'"'===c||"'"===c?c=eatString():""===c&&raiseError("Unterminated brace");token+=c;c=w.nextChar()}tokener(token,"brace")}function identifier(pre){var c=walker.ch,token=pre?pre+c:c;c=walker.nextChar();for(var cc=c.charCodeAt(0);isNameChar(c,cc)||isDigit(c,cc);){token+=c;c=walker.nextChar();cc=c.charCodeAt(0)}tokener(token,"identifier")}function num(){var nondigit,w=walker,c=w.ch,token=c,point="."===token;c=w.nextChar();nondigit=!isDigit(c);if(point&&nondigit)return tokener(token,".");if("-"===token&&nondigit)return identifier("-");for(;""!==c&&(isDigit(c)||!point&&"."===c);){"."===c&&(point=!0);token+=c;c=w.nextChar()}tokener(token,"number")}function op(){var w=walker,c=w.ch,token=c,next=w.nextChar();if("="===next&&isOp(token,!0)){token+=next;tokener(token,"match");w.nextChar()}else tokener(token,token)}function tokenize(){var ch=walker.ch;if(" "===ch||" "===ch)return white();if("/"===ch)return comment();if('"'===ch||"'"===ch)return str();if("("===ch)return brace();if("-"===ch||"."===ch||isDigit(ch))return num();if(isNameChar(ch))return identifier();if(isOp(ch))return op();if("\r"!==ch)if("\n"!==ch)raiseError("Unrecognized character '"+ch+"'");else{tokener(ch,"line");walker.nextChar()}else{"\n"===walker.peek()&&(ch+=walker.nextChar());tokener(ch,"line");walker.nextChar()}}var session={tokens:null},walker={init:function(source){this.source=source;this.ch="";this.chnum=-1;this.nextChar()},nextChar:function(){return this.ch=this.source.charAt(++this.chnum)},peek:function(){return this.source.charAt(this.chnum+1)}},isOp=function(){for(var opsa="{}[]()+*=.,;:>~|\\%$#@^!".split(""),opsmatcha="*^|$~".split(""),ops={},opsmatch={},i=0;i<opsa.length;i+=1)ops[opsa[i]]=!0;for(i=0;i<opsmatcha.length;i+=1)opsmatch[opsmatcha[i]]=!0;return function(ch,matchattr){return matchattr?ch in opsmatch:ch in ops}}();return{lex:function(source){walker.init(source);session.tokens=[];if(source)for(;""!==walker.ch;)tokenize();else session.tokens.push(this.white());var tokens=session.tokens;session.tokens=null;return tokens},parse:function(source){for(var token,tokens=this.lex(source),pos=0,i=0,il=tokens.length;il>i;i++){token=tokens[i];token.start=pos;token.end=pos+=token.value.length}return tokens},white:function(){return{value:"",type:"white",start:0,end:0}},toSource:function(toks){for(var i=0,max=toks.length,src="";max>i;i++)src+=toks[i].value;return src}}})},{}],57:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function resolveDefaultAttrs(node,parser){node.children.forEach(function(item){var attrList=item.attributeList(),defaultAttrValue=item.attribute(parser.DEFAULT_ATTR_NAME);if("undefined"!=typeof defaultAttrValue){item.attribute(parser.DEFAULT_ATTR_NAME,null);if(attrList.length){var defaultAttr=utils.find(attrList,findDefault)||utils.find(attrList,findImplied)||utils.find(attrList,findEmpty);if(defaultAttr){var oldVal=item.attribute(defaultAttr.name),newVal=utils.replaceUnescapedSymbol(oldVal,"|",defaultAttrValue);oldVal==newVal&&(newVal=defaultAttrValue);item.attribute(defaultAttr.name,newVal)}}}else attrList.forEach(function(attr){attr.isImplied&&item.attribute(attr.name,null)});resolveDefaultAttrs(item,parser)})}var utils=require("../../utils/common"),findDefault=function(attr){return attr.isDefault},findImplied=function(attr){return attr.isImplied},findEmpty=function(attr){return!attr.value};return{preprocessor:function(tree,options,parser){resolveDefaultAttrs(tree,parser)}}})},{"../../utils/common":73}],58:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){var prefs=require("../../assets/preferences"),utils=require("../../utils/common"),pc=require("./pastedContent");prefs.define("href.autodetect",!0,"Enables or disables automatic URL recognition when wrapping text with <code>&lt;a&gt;</code> tag. With this option enabled, if wrapped text matches URL or e-mail pattern it will be automatically inserted into <code>href</code> attribute.");prefs.define("href.urlPattern","^(?:(?:https?|ftp|file)://|www\\.|ftp\\.)(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[A-Z0-9+&@#/%=~_|$])","RegExp pattern to match wrapped URLs. Matched content will be inserts as-is into <code>href</code> attribute, only whitespace will be trimmed.");prefs.define("href.emailPattern","^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,5}$","RegExp pattern to match wrapped e-mails. Unlike <code>href.urlPattern</code>, wrapped content will be prefixed with <code>mailto:</code> in <code>href</code> attribute");return{postprocessor:function(tree,options){if(prefs.get("href.autodetect")){var reUrl=new RegExp(prefs.get("href.urlPattern"),"i"),reEmail=new RegExp(prefs.get("href.emailPattern"),"i"),reProto=/^([a-z]+:)?\/\//i;tree.findAll(function(item){if("a"==item.name().toLowerCase()&&!item.attribute("href")){var pastedContent=utils.trim(pc.pastedContent(item)||options.pastedContent);if(pastedContent)if(reUrl.test(pastedContent)){reProto.test(pastedContent)||(pastedContent="http://"+pastedContent);item.attribute("href",pastedContent)}else reEmail.test(pastedContent)&&item.attribute("href","mailto:"+pastedContent)}})}}}})},{"../../assets/preferences":28,"../../utils/common":73,"./pastedContent":59}],59:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function locateOutputPlaceholder(text){for(var result=[],stream=stringStream.create(text);!stream.eol();){if("\\"==stream.peek())stream.next();else{stream.start=stream.pos;if(stream.match(outputPlaceholder,!0)){result.push(range.create(stream.start,outputPlaceholder));continue}}stream.next()}return result}function replaceOutputPlaceholders(source,value){var ranges=locateOutputPlaceholder(source);ranges.reverse().forEach(function(r){source=utils.replaceSubstring(source,value,r)});return source}function hasOutputPlaceholder(node){return locateOutputPlaceholder(node.content).length?!0:!!utils.find(node.attributeList(),function(attr){return!!locateOutputPlaceholder(attr.value).length})}function insertPastedContent(node,content,overwrite){var nodesWithPlaceholders=node.findAll(function(item){return hasOutputPlaceholder(item)});hasOutputPlaceholder(node)&&nodesWithPlaceholders.unshift(node);if(nodesWithPlaceholders.length)nodesWithPlaceholders.forEach(function(item){item.content=replaceOutputPlaceholders(item.content,content);item._attributes.forEach(function(attr){attr.value=replaceOutputPlaceholders(attr.value,content)})});else{var deepest=node.deepestChild()||node;overwrite?deepest.content=content:deepest.content=abbrUtils.insertChildContent(deepest.content,content)}}var utils=require("../../utils/common"),abbrUtils=require("../../utils/abbreviation"),stringStream=require("../../assets/stringStream"),range=require("../../assets/range"),outputPlaceholder="$#";return{pastedContent:function(item){var content=item.data("paste");return Array.isArray(content)?content[item.counter-1]:"function"==typeof content?content(item.counter-1,item.content):content?content:void 0},preprocessor:function(tree,options){if(options.pastedContent){var lines=utils.splitByLines(options.pastedContent,!0).map(utils.trim);tree.findAll(function(item){if(item.hasImplicitRepeat){item.data("paste",lines);return item.repeatCount=lines.length}})}},postprocessor:function(tree,options){var that=this,targets=tree.findAll(function(item){var pastedContent=that.pastedContent(item);pastedContent&&insertPastedContent(item,pastedContent,!!item.data("pasteOverwrites"));return!!pastedContent});!targets.length&&options.pastedContent&&insertPastedContent(tree,options.pastedContent)}}})},{"../../assets/range":30,"../../assets/stringStream":32,"../../utils/abbreviation":69,"../../utils/common":73}],60:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function matchResources(node,syntax,parser){node.children.slice(0).forEach(function(child){var r=resources.getMatchedResource(child,syntax);"string"==typeof r&&(r=elements.create("snippet",r));child.data("resource",r);var elemType=elements.type(r);if("snippet"==elemType){var content=r.data,curContent=child._text||child.content;curContent&&(content=abbreviationUtils.insertChildContent(content,curContent));child.content=content}else if("element"==elemType){child._name=r.name;Array.isArray(r.attributes)&&(child._attributes=[].concat(r.attributes,child._attributes))}else if("reference"==elemType){var subtree=parser.parse(r.data,{syntax:syntax});if(child.repeatCount>1){var repeatedChildren=subtree.findAll(function(node){return node.hasImplicitRepeat});repeatedChildren.length||(repeatedChildren=subtree.children);repeatedChildren.forEach(function(node){node.repeatCount=child.repeatCount;node.hasImplicitRepeat=!1})}var deepestChild=subtree.deepestChild();if(deepestChild){child.children.forEach(function(c){deepestChild.addChild(c)});deepestChild.content=child.content}subtree.children.forEach(function(node){child.attributeList().forEach(function(attr){node.attribute(attr.name,attr.value)})});child.replace(subtree.children)}matchResources(child,syntax,parser)})}var resources=require("../../assets/resources"),elements=require("../../assets/elements"),utils=require("../../utils/common"),abbreviationUtils=require("../../utils/abbreviation");return{preprocessor:function(tree,options,parser){var syntax=options.syntax||utils.defaultSyntax();matchResources(tree,syntax,parser)}}})},{"../../assets/elements":24,"../../assets/resources":31,"../../utils/abbreviation":69,"../../utils/common":73}],61:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function resolveNodeNames(tree){tree.children.forEach(function(node){if(node.hasImplicitName()||node.data("forceNameResolving")){node._name=tagName.resolve(node.parent.name());node.data("nameResolved",!0)}resolveNodeNames(node)});return tree}var tagName=require("../../resolver/tagName");return{postprocessor:resolveNodeNames}})},{"../../resolver/tagName":67}],62:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function inText(stream,state){function chain(parser){state.tokenize=parser;return parser(stream,state)}var ch=stream.next();if("<"==ch){if(stream.eat("!")){if(stream.eat("["))return stream.match("CDATA[")?chain(inBlock("atom","]]>")):null;if(stream.match("--"))return chain(inBlock("comment","-->"));if(stream.match("DOCTYPE",!0,!0)){stream.eatWhile(/[\w\._\-]/);return chain(doctype(1))}return null}if(stream.eat("?")){stream.eatWhile(/[\w\._\-]/);state.tokenize=inBlock("meta","?>");return"meta"}type=stream.eat("/")?"closeTag":"openTag";stream.eatSpace();tagName="";for(var c;c=stream.eat(/[^\s\u00a0=<>\"\'\/?]/);)tagName+=c;state.tokenize=inTag;return"tag"}if("&"==ch){var ok;ok=stream.eat("#")?stream.eat("x")?stream.eatWhile(/[a-fA-F\d]/)&&stream.eat(";"):stream.eatWhile(/[\d]/)&&stream.eat(";"):stream.eatWhile(/[\w\.\-:]/)&&stream.eat(";");return ok?"atom":"error"}stream.eatWhile(/[^&<]/);return"text"}function inTag(stream,state){var ch=stream.next();if(">"==ch||"/"==ch&&stream.eat(">")){state.tokenize=inText;type=">"==ch?"endTag":"selfcloseTag";return"tag"}if("="==ch){type="equals";return null}if(/[\'\"]/.test(ch)){state.tokenize=inAttribute(ch);return state.tokenize(stream,state)}stream.eatWhile(/[^\s\u00a0=<>\"\'\/?]/);return"word"}function inAttribute(quote){return function(stream,state){for(;!stream.eol();)if(stream.next()==quote){state.tokenize=inTag;break}return"string"}}function inBlock(style,terminator){return function(stream,state){for(;!stream.eol();){if(stream.match(terminator)){state.tokenize=inText;break}stream.next()}return style}}function doctype(depth){return function(stream,state){for(var ch;null!==(ch=stream.next());){if("<"==ch){state.tokenize=doctype(depth+1);return state.tokenize(stream,state)}if(">"==ch){if(1==depth){state.tokenize=inText;break}state.tokenize=doctype(depth-1);return state.tokenize(stream,state)}}return"meta"}}function pass(){for(var i=arguments.length-1;i>=0;i--)curState.cc.push(arguments[i])}function cont(){pass.apply(null,arguments);return!0}function pushContext(tagName,startOfLine){var noIndent=Kludges.doNotIndent.hasOwnProperty(tagName)||curState.context&&curState.context.noIndent;curState.context={prev:curState.context,tagName:tagName,indent:curState.indented,startOfLine:startOfLine,noIndent:noIndent}}function popContext(){curState.context&&(curState.context=curState.context.prev)}function element(type){if("openTag"==type){curState.tagName=tagName;return cont(attributes,endtag(curState.startOfLine))}if("closeTag"==type){var err=!1;if(curState.context){if(curState.context.tagName!=tagName){Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())&&popContext();err=!curState.context||curState.context.tagName!=tagName}}else err=!0;err&&(setStyle="error");return cont(endclosetag(err))}return cont()}function endtag(startOfLine){return function(type){if("selfcloseTag"==type||"endTag"==type&&Kludges.autoSelfClosers.hasOwnProperty(curState.tagName.toLowerCase())){maybePopContext(curState.tagName.toLowerCase());return cont()}if("endTag"==type){maybePopContext(curState.tagName.toLowerCase());pushContext(curState.tagName,startOfLine);return cont()}return cont()}}function endclosetag(err){return function(type){err&&(setStyle="error");if("endTag"==type){popContext();return cont()}setStyle="error";return cont(arguments.callee)}}function maybePopContext(nextTagName){for(var parentTagName;;){if(!curState.context)return;parentTagName=curState.context.tagName.toLowerCase();if(!Kludges.contextGrabbers.hasOwnProperty(parentTagName)||!Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName))return;popContext()}}function attributes(type){if("word"==type){setStyle="attribute";return cont(attribute,attributes)}if("endTag"==type||"selfcloseTag"==type)return pass();setStyle="error";return cont(attributes)}function attribute(type){if("equals"==type)return cont(attvalue,attributes);Kludges.allowMissing||(setStyle="error");return"endTag"==type||"selfcloseTag"==type?pass():cont()}function attvalue(type){if("string"==type)return cont(attvaluemaybe);if("word"==type&&Kludges.allowUnquoted){setStyle="string";return cont()}setStyle="error";return"endTag"==type||"selfCloseTag"==type?pass():cont()}function attvaluemaybe(type){return"string"==type?cont(attvaluemaybe):pass()}function startState(){return{tokenize:inText,cc:[],indented:0,startOfLine:!0,tagName:null,context:null}}function token(stream,state){if(stream.sol()){state.startOfLine=!0;state.indented=0}if(stream.eatSpace())return null;setStyle=type=tagName=null;var style=state.tokenize(stream,state);state.type=type;if((style||type)&&"comment"!=style){curState=state;for(;;){var comb=state.cc.pop()||element;if(comb(type||style))break}}state.startOfLine=!1;return setStyle||style}var setStyle,stringStream=require("../assets/stringStream"),Kludges={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!0,allowMissing:!0},tagName=null,type=null,curState=null;return{parse:function(data,offset){offset=offset||0;for(var state=startState(),stream=stringStream.create(data),tokens=[];!stream.eol();){tokens.push({type:token(stream,state),start:stream.start+offset,end:stream.pos+offset});stream.start=stream.pos}return tokens}}})},{"../assets/stringStream":32}],63:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function bts(bytes){for(var out=[],i=0,il=bytes.length;il>i;i++)out.push(String.fromCharCode(bytes[i]));return out.join("")}function isURL(path){var re=/^https?:\/\//;return re.test(path)}var utils=require("../utils/common");!function(r){if("undefined"==typeof define||!define.amd)try{fs=r("fs");path=r("path")}catch(e){}}(require);module.exports=function(obj){obj&&utils.extend(module.exports,obj)};return utils.extend(module.exports,{_parseParams:function(args){var params={path:args[0],size:0};args=utils.toArray(args,1);params.callback=args[args.length-1];args=args.slice(0,args.length-1);args.length&&(params.size=args[0]);return params},_read:function(params,callback){if(isURL(params.path))var req=require(/^https:/.test(params.path)?"https":"http").get(params.path,function(res){var bufs=[],totalLength=0,finished=!1;res.on("data",function(chunk){totalLength+=chunk.length;bufs.push(chunk);if(params.size&&totalLength>=params.size){finished=!0;callback(null,Buffer.concat(bufs));req.abort()}}).on("end",function(){if(!finished){finished=!0;callback(null,Buffer.concat(bufs))}})}).on("error",callback);else if(params.size){var fd=fs.openSync(params.path,"r"),buf=new Buffer(params.size);fs.read(fd,buf,0,params.size,null,function(err,bytesRead){callback(err,buf)})}else callback(null,fs.readFileSync(params.path))},read:function(path,size,callback){var params=this._parseParams(arguments);this._read(params,function(err,buf){params.callback(err,err?"":bts(buf))})},readText:function(path,size,callback){var params=this._parseParams(arguments);this._read(params,function(err,buf){params.callback(err,err?"":buf.toString())})},locateFile:function(editorFile,fileName){if(isURL(fileName))return fileName;var f,dirname=editorFile;fileName=fileName.replace(/^\/+/,"");for(;dirname&&dirname!==path.dirname(dirname);){dirname=path.dirname(dirname);f=path.join(dirname,fileName);if(fs.existsSync(f))return f}return""},createPath:function(parent,fileName,callback){var stat=fs.statSync(parent);stat&&!stat.isDirectory()&&(parent=path.dirname(parent));return callback(path.resolve(parent,fileName))},save:function(file,content){fs.writeFileSync(file,content,"ascii")},getExt:function(file){var m=(file||"").match(/\.([\w\-]+)$/);return m?m[1].toLowerCase():""}})})},{"../utils/common":73}],64:[function(require,module,exports){if("object"==typeof module&&"function"!=typeof define)var define=function(factory){module.exports=factory(require,exports,module)};define(function(require,exports,module){function isNumeric(ch){var code=ch&&ch.charCodeAt(0);return ch&&"."==ch||code>47&&58>code}function isSingleProperty(snippet){snippet=utils.trim(snippet);return/\/\*|\n|\r/.test(snippet)?!1:/^[a-z0-9\-]+\s*\:/i.test(snippet)?2==snippet.replace(/\$\{.+?\}/g,"").split(":").length:!1}function normalizeValue(value){"-"!=value.charAt(0)||/^\-[\.\d]/.test(value)||(value=value.replace(/^\-+/,""));var ch=value.charAt(0);return"#"==ch?normalizeHexColor(value):"$"==ch?utils.escapeText(value):getKeyword(value)}function normalizeHexColor(value){var hex=value.replace(/^#+/,"")||"0";if("t"==hex.toLowerCase())return"transparent";var opacity="";hex=hex.replace(/\.(\d+)$/,function(str){opacity="0"+str;return""});var repeat=utils.repeatString,color=null;switch(hex.length){case 1:color=repeat(hex,6);break;case 2:color=repeat(hex,3);break;case 3:color=hex.charAt(0)+hex.charAt(0)+hex.charAt(1)+hex.charAt(1)+hex.charAt(2)+hex.charAt(2);break;case 4:color=hex+hex.substr(0,2);break;case 5:color=hex+hex.charAt(0);break;default:color=hex.substr(0,6)}if(opacity)return toRgba(color,opacity);if(prefs.get("css.color.short")){var p=color.split("");p[0]==p[1]&&p[2]==p[3]&&p[4]==p[5]&&(color=p[0]+p[2]+p[4])}switch(prefs.get("css.color.case")){case"upper":color=color.toUpperCase();break;case"lower":color=color.toLowerCase()}return"#"+color}function toRgba(color,opacity){var r=parseInt(color.substr(0,2),16),g=parseInt(color.substr(2,2),16),b=parseInt(color.substr(4,2),16);return"rgba("+[r,g,b,opacity].join(", ")+")"}function getKeyword(name){var aliases=prefs.getDict("css.keywordAliases");return name in aliases?aliases[name]:nam