integral 1.1.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (633) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +6 -33
  3. data/Rakefile +1 -1
  4. data/app/assets/images/integral/defaults/no_image_available.jpg +0 -0
  5. data/app/assets/images/logo.png +0 -0
  6. data/app/assets/javascripts/ckeditor/my_config.js.erb +26 -18
  7. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/lv.js +8 -0
  8. data/app/assets/javascripts/ckeditor/plugins/autoembed/plugin.js +1 -1
  9. data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +14 -14
  10. data/app/assets/javascripts/ckeditor/plugins/autogrow/samples/autogrow.html +8 -8
  11. data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  12. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
  13. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
  14. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
  15. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/autocomplete.png +0 -0
  16. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/autoformat.png +0 -0
  17. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/commentselectedrange.png +0 -0
  18. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/searchcode.png +0 -0
  19. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/uncommentselectedrange.png +0 -0
  20. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -2
  21. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -2
  22. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  23. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -6
  24. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
  25. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.handlebars.min.js +1 -0
  26. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -2
  27. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  28. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -3
  29. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -1
  30. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +7 -7
  31. data/app/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +231 -217
  32. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/darcula.css +46 -0
  33. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/gruvbox-dark.css +34 -0
  34. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/idea.css +42 -0
  35. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
  36. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lucario.css +37 -0
  37. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -0
  38. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/oceanic-next.css +44 -0
  39. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/shadowfox.css +52 -0
  40. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ssms.css +16 -0
  41. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ar.js +15 -0
  42. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/lv.js +15 -0
  43. data/app/assets/javascripts/ckeditor/plugins/embedbase/plugin.js +1 -1
  44. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/copywidget.png +0 -0
  45. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/editwidget.png +0 -0
  46. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/copywidget.png +0 -0
  47. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/editwidget.png +0 -0
  48. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/removewidget.png +0 -0
  49. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/widget.png +0 -0
  50. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/removewidget.png +0 -0
  51. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/widget.png +0 -0
  52. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/plugin.js +86 -0
  53. data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  54. data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  55. data/app/assets/javascripts/ckeditor/plugins/image2/dev/contents.css +35 -0
  56. data/app/assets/javascripts/ckeditor/plugins/image2/dev/image2.html +339 -0
  57. data/app/assets/javascripts/ckeditor/plugins/image2/dialogs/image2.js +553 -0
  58. data/app/assets/javascripts/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  59. data/app/assets/javascripts/ckeditor/plugins/image2/icons/image.png +0 -0
  60. data/app/assets/javascripts/ckeditor/plugins/image2/lang/af.js +21 -0
  61. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ar.js +21 -0
  62. data/app/assets/javascripts/ckeditor/plugins/image2/lang/az.js +21 -0
  63. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bg.js +21 -0
  64. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bn.js +21 -0
  65. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bs.js +21 -0
  66. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ca.js +21 -0
  67. data/app/assets/javascripts/ckeditor/plugins/image2/lang/cs.js +21 -0
  68. data/app/assets/javascripts/ckeditor/plugins/image2/lang/cy.js +21 -0
  69. data/app/assets/javascripts/ckeditor/plugins/image2/lang/da.js +21 -0
  70. data/app/assets/javascripts/ckeditor/plugins/image2/lang/de-ch.js +21 -0
  71. data/app/assets/javascripts/ckeditor/plugins/image2/lang/de.js +21 -0
  72. data/app/assets/javascripts/ckeditor/plugins/image2/lang/el.js +21 -0
  73. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-au.js +21 -0
  74. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-ca.js +21 -0
  75. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-gb.js +21 -0
  76. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en.js +21 -0
  77. data/app/assets/javascripts/ckeditor/plugins/image2/lang/eo.js +21 -0
  78. data/app/assets/javascripts/ckeditor/plugins/image2/lang/es-mx.js +21 -0
  79. data/app/assets/javascripts/ckeditor/plugins/image2/lang/es.js +21 -0
  80. data/app/assets/javascripts/ckeditor/plugins/image2/lang/et.js +21 -0
  81. data/app/assets/javascripts/ckeditor/plugins/image2/lang/eu.js +21 -0
  82. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fa.js +21 -0
  83. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fi.js +21 -0
  84. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fo.js +21 -0
  85. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr-ca.js +21 -0
  86. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr.js +21 -0
  87. data/app/assets/javascripts/ckeditor/plugins/image2/lang/gl.js +21 -0
  88. data/app/assets/javascripts/ckeditor/plugins/image2/lang/gu.js +21 -0
  89. data/app/assets/javascripts/ckeditor/plugins/image2/lang/he.js +21 -0
  90. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hi.js +21 -0
  91. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hr.js +21 -0
  92. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hu.js +21 -0
  93. data/app/assets/javascripts/ckeditor/plugins/image2/lang/id.js +21 -0
  94. data/app/assets/javascripts/ckeditor/plugins/image2/lang/is.js +21 -0
  95. data/app/assets/javascripts/ckeditor/plugins/image2/lang/it.js +21 -0
  96. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ja.js +21 -0
  97. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ka.js +21 -0
  98. data/app/assets/javascripts/ckeditor/plugins/image2/lang/km.js +21 -0
  99. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ko.js +21 -0
  100. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ku.js +21 -0
  101. data/app/assets/javascripts/ckeditor/plugins/image2/lang/lt.js +21 -0
  102. data/app/assets/javascripts/ckeditor/plugins/image2/lang/lv.js +21 -0
  103. data/app/assets/javascripts/ckeditor/plugins/image2/lang/mk.js +21 -0
  104. data/app/assets/javascripts/ckeditor/plugins/image2/lang/mn.js +21 -0
  105. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ms.js +21 -0
  106. data/app/assets/javascripts/ckeditor/plugins/image2/lang/nb.js +21 -0
  107. data/app/assets/javascripts/ckeditor/plugins/image2/lang/nl.js +21 -0
  108. data/app/assets/javascripts/ckeditor/plugins/image2/lang/no.js +21 -0
  109. data/app/assets/javascripts/ckeditor/plugins/image2/lang/oc.js +21 -0
  110. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pl.js +21 -0
  111. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt-br.js +21 -0
  112. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt.js +21 -0
  113. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ro.js +21 -0
  114. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ru.js +21 -0
  115. data/app/assets/javascripts/ckeditor/plugins/image2/lang/si.js +21 -0
  116. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sk.js +21 -0
  117. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sl.js +21 -0
  118. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sq.js +21 -0
  119. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr-latn.js +21 -0
  120. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr.js +21 -0
  121. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sv.js +21 -0
  122. data/app/assets/javascripts/ckeditor/plugins/image2/lang/th.js +21 -0
  123. data/app/assets/javascripts/ckeditor/plugins/image2/lang/tr.js +21 -0
  124. data/app/assets/javascripts/ckeditor/plugins/image2/lang/tt.js +21 -0
  125. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ug.js +21 -0
  126. data/app/assets/javascripts/ckeditor/plugins/image2/lang/uk.js +21 -0
  127. data/app/assets/javascripts/ckeditor/plugins/image2/lang/vi.js +21 -0
  128. data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh-cn.js +21 -0
  129. data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh.js +21 -0
  130. data/app/assets/javascripts/ckeditor/plugins/image2/plugin.js +1720 -0
  131. data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  132. data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  133. data/app/assets/javascripts/ckeditor/plugins/image2/samples/image2.html +68 -0
  134. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/dnd.html +4 -4
  135. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/magicfinger.html +4 -4
  136. data/app/assets/javascripts/ckeditor/plugins/lineutils/plugin.js +7 -7
  137. data/app/assets/javascripts/ckeditor/plugins/linkballoon/README.md +5 -0
  138. data/app/assets/javascripts/ckeditor/plugins/linkballoon/assets/demo.png +0 -0
  139. data/app/assets/javascripts/ckeditor/plugins/linkballoon/plugin.js +25 -0
  140. data/app/assets/javascripts/ckeditor/plugins/notification/lang/az.js +7 -0
  141. data/app/assets/javascripts/ckeditor/plugins/notification/lang/bg.js +7 -0
  142. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ca.js +7 -0
  143. data/app/assets/javascripts/ckeditor/plugins/notification/lang/cs.js +2 -2
  144. data/app/assets/javascripts/ckeditor/plugins/notification/lang/da.js +2 -2
  145. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de-ch.js +2 -2
  146. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de.js +2 -2
  147. data/app/assets/javascripts/ckeditor/plugins/notification/lang/en-au.js +7 -0
  148. data/app/assets/javascripts/ckeditor/plugins/notification/lang/en.js +2 -2
  149. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eo.js +2 -2
  150. data/app/assets/javascripts/ckeditor/plugins/notification/lang/es-mx.js +7 -0
  151. data/app/assets/javascripts/ckeditor/plugins/notification/lang/es.js +7 -0
  152. data/app/assets/javascripts/ckeditor/plugins/notification/lang/et.js +7 -0
  153. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eu.js +2 -2
  154. data/app/assets/javascripts/ckeditor/plugins/notification/lang/fa.js +7 -0
  155. data/app/assets/javascripts/ckeditor/plugins/notification/lang/fr.js +3 -3
  156. data/app/assets/javascripts/ckeditor/plugins/notification/lang/gl.js +2 -2
  157. data/app/assets/javascripts/ckeditor/plugins/notification/lang/hr.js +7 -0
  158. data/app/assets/javascripts/ckeditor/plugins/notification/lang/hu.js +7 -0
  159. data/app/assets/javascripts/ckeditor/plugins/notification/lang/id.js +2 -2
  160. data/app/assets/javascripts/ckeditor/plugins/notification/lang/it.js +2 -2
  161. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ja.js +7 -0
  162. data/app/assets/javascripts/ckeditor/plugins/notification/lang/km.js +2 -2
  163. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ko.js +2 -2
  164. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ku.js +2 -2
  165. data/app/assets/javascripts/ckeditor/plugins/notification/lang/lv.js +7 -0
  166. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nb.js +2 -2
  167. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nl.js +2 -2
  168. data/app/assets/javascripts/ckeditor/plugins/notification/lang/oc.js +7 -0
  169. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pl.js +2 -2
  170. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt-br.js +2 -2
  171. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt.js +2 -2
  172. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ro.js +7 -0
  173. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +2 -2
  174. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sk.js +7 -0
  175. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sq.js +7 -0
  176. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sv.js +2 -2
  177. data/app/assets/javascripts/ckeditor/plugins/notification/lang/tr.js +2 -2
  178. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ug.js +2 -2
  179. data/app/assets/javascripts/ckeditor/plugins/notification/lang/uk.js +2 -2
  180. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh-cn.js +3 -3
  181. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh.js +2 -2
  182. data/app/assets/javascripts/ckeditor/plugins/notification/plugin.js +794 -784
  183. data/app/assets/javascripts/ckeditor/plugins/openlink/README.md +50 -0
  184. data/app/assets/javascripts/ckeditor/plugins/openlink/icons/hidpi/openLink.png +0 -0
  185. data/app/assets/javascripts/ckeditor/plugins/openlink/icons/openLink.png +0 -0
  186. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/bg.js +7 -0
  187. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/de.js +7 -0
  188. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/en.js +7 -0
  189. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/pl.js +7 -0
  190. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/ru.js +7 -0
  191. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/uk.js +7 -0
  192. data/app/assets/javascripts/ckeditor/plugins/openlink/plugin.js +178 -0
  193. data/app/assets/javascripts/ckeditor/plugins/placeholder/dev/placeholder.html +5 -5
  194. data/app/assets/javascripts/ckeditor/plugins/placeholder/dialogs/placeholder.js +2 -2
  195. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/af.js +2 -2
  196. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ar.js +2 -2
  197. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/az.js +2 -2
  198. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/bg.js +5 -5
  199. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ca.js +2 -2
  200. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cs.js +2 -2
  201. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cy.js +2 -2
  202. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/da.js +2 -2
  203. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de-ch.js +2 -2
  204. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de.js +2 -2
  205. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/el.js +2 -2
  206. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-au.js +12 -0
  207. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-gb.js +2 -2
  208. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en.js +2 -2
  209. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eo.js +2 -2
  210. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es-mx.js +2 -2
  211. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es.js +2 -2
  212. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/et.js +2 -2
  213. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eu.js +2 -2
  214. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fa.js +2 -2
  215. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fi.js +2 -2
  216. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr-ca.js +2 -2
  217. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr.js +2 -2
  218. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/gl.js +2 -2
  219. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/he.js +2 -2
  220. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hr.js +2 -2
  221. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hu.js +2 -2
  222. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/id.js +2 -2
  223. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/it.js +2 -2
  224. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ja.js +2 -2
  225. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/km.js +2 -2
  226. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ko.js +2 -2
  227. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ku.js +2 -2
  228. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/lv.js +5 -5
  229. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nb.js +2 -2
  230. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nl.js +2 -2
  231. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/no.js +2 -2
  232. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/oc.js +2 -2
  233. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pl.js +2 -2
  234. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt-br.js +2 -2
  235. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt.js +2 -2
  236. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ro.js +12 -0
  237. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ru.js +2 -2
  238. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/si.js +2 -2
  239. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sk.js +2 -2
  240. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sl.js +2 -2
  241. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sq.js +2 -2
  242. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sv.js +2 -2
  243. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/th.js +2 -2
  244. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tr.js +2 -2
  245. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tt.js +2 -2
  246. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ug.js +2 -2
  247. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/uk.js +2 -2
  248. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/vi.js +2 -2
  249. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh-cn.js +2 -2
  250. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh.js +2 -2
  251. data/app/assets/javascripts/ckeditor/plugins/placeholder/plugin.js +3 -3
  252. data/app/assets/javascripts/ckeditor/plugins/placeholder/samples/placeholder.html +6 -6
  253. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/dialogs/simplebox.js +4 -4
  254. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/plugin.js +3 -3
  255. data/app/assets/javascripts/ckeditor/plugins/widget/dev/console.js +2 -2
  256. data/app/assets/javascripts/ckeditor/plugins/widget/dev/nestedwidgets.html +2 -2
  257. data/app/assets/javascripts/ckeditor/plugins/widget/dev/widgetstyles.html +2 -2
  258. data/app/assets/javascripts/ckeditor/plugins/widget/lang/af.js +2 -2
  259. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ar.js +2 -2
  260. data/app/assets/javascripts/ckeditor/plugins/widget/lang/az.js +2 -2
  261. data/app/assets/javascripts/ckeditor/plugins/widget/lang/bg.js +3 -3
  262. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ca.js +2 -2
  263. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cs.js +2 -2
  264. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cy.js +2 -2
  265. data/app/assets/javascripts/ckeditor/plugins/widget/lang/da.js +2 -2
  266. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de-ch.js +2 -2
  267. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de.js +2 -2
  268. data/app/assets/javascripts/ckeditor/plugins/widget/lang/el.js +2 -2
  269. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-au.js +8 -0
  270. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-gb.js +2 -2
  271. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en.js +2 -2
  272. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eo.js +2 -2
  273. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es-mx.js +2 -2
  274. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es.js +2 -2
  275. data/app/assets/javascripts/ckeditor/plugins/widget/lang/et.js +8 -0
  276. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eu.js +2 -2
  277. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fa.js +3 -3
  278. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fi.js +2 -2
  279. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fr.js +2 -2
  280. data/app/assets/javascripts/ckeditor/plugins/widget/lang/gl.js +2 -2
  281. data/app/assets/javascripts/ckeditor/plugins/widget/lang/he.js +2 -2
  282. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hr.js +2 -2
  283. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hu.js +2 -2
  284. data/app/assets/javascripts/ckeditor/plugins/widget/lang/id.js +2 -2
  285. data/app/assets/javascripts/ckeditor/plugins/widget/lang/it.js +2 -2
  286. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ja.js +2 -2
  287. data/app/assets/javascripts/ckeditor/plugins/widget/lang/km.js +2 -2
  288. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ko.js +2 -2
  289. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ku.js +2 -2
  290. data/app/assets/javascripts/ckeditor/plugins/widget/lang/lv.js +3 -3
  291. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nb.js +2 -2
  292. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nl.js +2 -2
  293. data/app/assets/javascripts/ckeditor/plugins/widget/lang/no.js +2 -2
  294. data/app/assets/javascripts/ckeditor/plugins/widget/lang/oc.js +2 -2
  295. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pl.js +2 -2
  296. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt-br.js +2 -2
  297. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt.js +2 -2
  298. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ro.js +8 -0
  299. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ru.js +2 -2
  300. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sk.js +2 -2
  301. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sl.js +2 -2
  302. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sq.js +3 -3
  303. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sv.js +2 -2
  304. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tr.js +2 -2
  305. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tt.js +2 -2
  306. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ug.js +2 -2
  307. data/app/assets/javascripts/ckeditor/plugins/widget/lang/uk.js +2 -2
  308. data/app/assets/javascripts/ckeditor/plugins/widget/lang/vi.js +2 -2
  309. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh-cn.js +2 -2
  310. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh.js +2 -2
  311. data/app/assets/javascripts/ckeditor/plugins/widget/plugin.js +235 -64
  312. data/app/assets/javascripts/ckeditor/plugins/widgetselection/plugin.js +6 -11
  313. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ar.js +1 -0
  314. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/bg.js +17 -0
  315. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ca.js +1 -0
  316. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/cs.js +15 -0
  317. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/da.js +1 -0
  318. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/de.js +1 -0
  319. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/el.js +1 -0
  320. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +5 -1
  321. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/es.js +1 -0
  322. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/eu.js +17 -0
  323. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fa.js +13 -0
  324. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fi.js +1 -0
  325. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fr.js +1 -0
  326. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/he.js +1 -0
  327. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hr.js +1 -0
  328. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hu.js +14 -0
  329. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/it.js +4 -3
  330. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ja.js +5 -5
  331. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ko.js +16 -0
  332. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/nl.js +3 -2
  333. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/no.js +1 -0
  334. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pl.js +4 -3
  335. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt-br.js +1 -0
  336. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt.js +1 -0
  337. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ro.js +15 -0
  338. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +2 -1
  339. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sk.js +15 -0
  340. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sv.js +5 -3
  341. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/tr.js +1 -0
  342. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/uk.js +17 -0
  343. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh-cn.js +1 -0
  344. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh.js +14 -0
  345. data/app/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +485 -302
  346. data/app/assets/javascripts/ckeditor/plugins/wordcount/samples/maxParagraphs.html +26 -0
  347. data/app/assets/javascripts/integral/backend.js +196 -25
  348. data/app/assets/javascripts/integral/frontend.js +37 -2
  349. data/app/assets/javascripts/integral/support/character_counter.js +13 -8
  350. data/app/assets/javascripts/integral/support/confirm_modal.coffee +2 -2
  351. data/app/assets/javascripts/integral/support/date_picker.coffee +54 -59
  352. data/app/assets/javascripts/integral/support/gallery.coffee +71 -54
  353. data/app/assets/javascripts/integral/support/grid.coffee +11 -4
  354. data/app/assets/javascripts/integral/support/lib/lazysizes.js +755 -0
  355. data/app/assets/javascripts/integral/support/lib/materialize-tags.js +49 -44
  356. data/app/assets/javascripts/integral/support/list.coffee +1 -0
  357. data/app/assets/javascripts/integral/support/ls.instagram.js +57 -0
  358. data/app/assets/javascripts/integral/support/ls.twitter.js +66 -0
  359. data/app/assets/javascripts/integral/support/record_selector.coffee +3 -1
  360. data/app/assets/javascripts/integral/support/remote_form.coffee +18 -11
  361. data/app/assets/javascripts/integral/support/slug_generator.coffee +1 -0
  362. data/app/assets/stylesheets/integral/backend.sass +36 -24
  363. data/app/assets/stylesheets/integral/backend/_foundation_settings.scss +5 -6
  364. data/app/assets/stylesheets/integral/backend/dashboard-layout.scss +31 -64
  365. data/app/assets/stylesheets/integral/backend/devise.sass +2 -3
  366. data/app/assets/stylesheets/integral/backend/materialize-tags.sass +2 -1
  367. data/app/assets/stylesheets/integral/backend/modules/dropdown_pane_notifications.scss +150 -0
  368. data/app/assets/stylesheets/integral/backend/modules/dropdown_pane_profile.scss +59 -0
  369. data/app/assets/stylesheets/integral/backend/modules/timeline.scss +214 -0
  370. data/app/assets/stylesheets/integral/backend/shared.sass +121 -13
  371. data/app/assets/stylesheets/integral/frontend.scss +45 -0
  372. data/app/assets/stylesheets/integral/frontend/_foundation_settings.scss +2 -2
  373. data/app/assets/stylesheets/integral/frontend/blog.sass +155 -142
  374. data/app/assets/stylesheets/integral/frontend/layout.sass +13 -3
  375. data/app/assets/stylesheets/integral/frontend/modules/article-footer.scss +55 -0
  376. data/app/assets/stylesheets/integral/frontend/modules/article.scss +34 -0
  377. data/app/assets/stylesheets/integral/frontend/modules/horizontal-post.scss +44 -0
  378. data/app/assets/stylesheets/integral/frontend/modules/inline-articles.scss +23 -0
  379. data/app/assets/stylesheets/integral/frontend/modules/latest-post.scss +37 -0
  380. data/app/assets/stylesheets/integral/frontend/modules/list-widget.scss +50 -0
  381. data/app/assets/stylesheets/integral/frontend/modules/piped-list.scss +33 -0
  382. data/app/assets/stylesheets/integral/frontend/modules/post-tags.scss +19 -0
  383. data/app/assets/stylesheets/integral/frontend/modules/scroll-container.scss +9 -0
  384. data/app/assets/stylesheets/integral/frontend/modules/sidebar-articles.scss +42 -0
  385. data/app/assets/stylesheets/integral/frontend/modules/sidebar-tags.scss +6 -0
  386. data/app/assets/stylesheets/integral/frontend/modules/sidebar-widget.scss +47 -0
  387. data/app/assets/stylesheets/integral/frontend/modules/vertical-post.scss +31 -0
  388. data/app/assets/stylesheets/integral/frontend/share_modal.sass +0 -5
  389. data/app/assets/stylesheets/integral/support/gallery.sass +8 -0
  390. data/app/assets/stylesheets/integral/support/media-query-indicator.sass +9 -3
  391. data/app/controllers/integral/application_controller.rb +10 -3
  392. data/app/controllers/integral/backend/activities_controller.rb +31 -26
  393. data/app/controllers/integral/backend/base_controller.rb +265 -26
  394. data/app/controllers/integral/backend/categories_controller.rb +49 -0
  395. data/app/controllers/integral/backend/images_controller.rb +39 -54
  396. data/app/controllers/integral/backend/lists_controller.rb +16 -98
  397. data/app/controllers/integral/backend/notification_subscriptions_controller.rb +23 -0
  398. data/app/controllers/integral/backend/pages_controller.rb +15 -117
  399. data/app/controllers/integral/backend/posts_controller.rb +22 -108
  400. data/app/controllers/integral/backend/settings_controller.rb +7 -8
  401. data/app/controllers/integral/backend/static_pages_controller.rb +14 -0
  402. data/app/controllers/integral/backend/users_controller.rb +61 -79
  403. data/app/controllers/integral/blog_controller.rb +12 -0
  404. data/app/controllers/integral/categories_controller.rb +45 -0
  405. data/app/controllers/integral/pages_controller.rb +3 -3
  406. data/app/controllers/integral/posts_controller.rb +7 -9
  407. data/app/controllers/integral/tags_controller.rb +5 -2
  408. data/app/decorators/integral/base_decorator.rb +16 -0
  409. data/app/decorators/integral/category_decorator.rb +30 -0
  410. data/app/decorators/integral/image_decorator.rb +3 -3
  411. data/app/decorators/integral/list_decorator.rb +1 -13
  412. data/app/decorators/integral/notification/notification_decorator.rb +74 -0
  413. data/app/decorators/integral/page_decorator.rb +1 -13
  414. data/app/decorators/integral/paginating_decorator.rb +6 -0
  415. data/app/decorators/integral/post_decorator.rb +44 -4
  416. data/app/decorators/integral/user_decorator.rb +1 -13
  417. data/app/decorators/integral/version_decorator.rb +58 -15
  418. data/app/helpers/integral/application_helper.rb +7 -0
  419. data/app/helpers/integral/backend/base_helper.rb +135 -15
  420. data/app/helpers/integral/blog_helper.rb +46 -0
  421. data/app/helpers/integral/social_helper.rb +0 -23
  422. data/app/jobs/integral/application_job.rb +1 -0
  423. data/app/jobs/integral/newsletter_signup_job.rb +0 -2
  424. data/app/jobs/integral/webhook/delivery_job.rb +37 -0
  425. data/app/mailers/integral/contact_mailer.rb +4 -1
  426. data/app/mailers/integral/devise_mailer.rb +6 -0
  427. data/app/models/concerns/integral/lazy_contentable.rb +54 -0
  428. data/app/models/concerns/integral/notification/subscribable.rb +67 -0
  429. data/app/models/concerns/integral/webhook/delivery.rb +30 -0
  430. data/app/models/concerns/integral/webhook/observable.rb +23 -0
  431. data/app/models/integral/application_record.rb +9 -0
  432. data/app/models/integral/category.rb +29 -0
  433. data/app/models/integral/category_version.rb +8 -0
  434. data/app/models/integral/image.rb +40 -3
  435. data/app/models/integral/list.rb +11 -4
  436. data/app/models/integral/list_item.rb +15 -16
  437. data/app/models/integral/list_item_connection.rb +6 -0
  438. data/app/models/integral/notification/notification.rb +28 -0
  439. data/app/models/integral/notification/subscription.rb +14 -0
  440. data/app/models/integral/page.rb +32 -10
  441. data/app/models/integral/post.rb +39 -14
  442. data/app/models/integral/user.rb +51 -2
  443. data/app/models/integral/version.rb +2 -2
  444. data/app/models/integral/webhook/endpoint.rb +40 -0
  445. data/app/models/integral/webhook/event.rb +20 -0
  446. data/app/policies/integral/base_policy.rb +7 -11
  447. data/app/policies/integral/category_policy.rb +9 -0
  448. data/app/policies/integral/page_policy.rb +1 -0
  449. data/app/policies/integral/version_policy.rb +0 -8
  450. data/app/serializers/integral/post_serializer.rb +24 -0
  451. data/app/uploaders/integral/avatar_uploader.rb +1 -1
  452. data/app/views/devise/invitations/edit.haml +1 -4
  453. data/app/views/devise/mailer/invitation_instructions.inky-haml +20 -0
  454. data/app/views/devise/sessions/new.haml +2 -2
  455. data/app/views/integral/backend/activities/_activity.haml +21 -0
  456. data/app/views/integral/backend/activities/grid/_dropdown_actions.haml +1 -0
  457. data/app/views/integral/backend/activities/grid/_row_content.haml +13 -0
  458. data/app/views/integral/backend/activities/index.haml +7 -13
  459. data/app/views/integral/backend/activities/shared/_grid.haml +35 -19
  460. data/app/views/integral/backend/activities/shared/index.haml +15 -0
  461. data/app/views/integral/backend/activities/shared/{_log.haml → show.haml} +7 -7
  462. data/app/views/integral/backend/activities/show.haml +1 -1
  463. data/app/views/integral/backend/categories/_modal.haml +24 -0
  464. data/app/views/integral/backend/images/_form.haml +16 -28
  465. data/app/views/integral/backend/images/edit.haml +2 -2
  466. data/app/views/integral/backend/images/grid/_dropdown_actions.haml +5 -0
  467. data/app/views/integral/backend/images/grid/_row_content.haml +5 -0
  468. data/app/views/integral/backend/images/index.haml +11 -17
  469. data/app/views/integral/backend/images/list.haml +11 -0
  470. data/app/views/integral/backend/images/show.haml +26 -0
  471. data/app/views/integral/backend/lists/_form.haml +7 -20
  472. data/app/views/integral/backend/lists/_item_container.haml +1 -1
  473. data/app/views/integral/backend/lists/_item_modal.haml +3 -3
  474. data/app/views/integral/backend/lists/_list_item_fields.haml +3 -2
  475. data/app/views/integral/backend/lists/_manager.haml +11 -13
  476. data/app/views/integral/backend/lists/edit.haml +11 -11
  477. data/app/views/integral/backend/lists/grid/_dropdown_actions.haml +9 -0
  478. data/app/views/integral/backend/lists/grid/_row_content.haml +3 -0
  479. data/app/views/integral/backend/lists/index.haml +11 -17
  480. data/app/views/integral/backend/lists/list.haml +11 -0
  481. data/app/views/integral/backend/lists/show.haml +30 -0
  482. data/app/views/integral/backend/notifications/_notification.haml +21 -0
  483. data/app/views/integral/backend/pages/_form.haml +20 -47
  484. data/app/views/integral/backend/pages/edit.haml +18 -0
  485. data/app/views/integral/backend/pages/grid/_dropdown_actions.haml +11 -0
  486. data/app/views/integral/backend/pages/grid/_row_content.haml +5 -0
  487. data/app/views/integral/backend/pages/index.haml +11 -21
  488. data/app/views/integral/backend/pages/list.haml +15 -0
  489. data/app/views/integral/backend/pages/show.haml +32 -0
  490. data/app/views/integral/backend/posts/_form.haml +19 -51
  491. data/app/views/integral/backend/posts/edit.haml +5 -10
  492. data/app/views/integral/backend/posts/grid/_dropdown_actions.haml +10 -0
  493. data/app/views/integral/backend/posts/grid/_row_content.haml +6 -0
  494. data/app/views/integral/backend/posts/index.haml +13 -19
  495. data/app/views/integral/backend/posts/list.haml +13 -0
  496. data/app/views/integral/backend/posts/new.haml +0 -1
  497. data/app/views/integral/backend/posts/show.haml +31 -0
  498. data/app/views/integral/backend/settings/sections/_social.haml +1 -3
  499. data/app/views/integral/backend/shared/_activity_modal.haml +13 -0
  500. data/app/views/integral/backend/shared/_breadcrumbs.haml +7 -4
  501. data/app/views/integral/backend/shared/_image_preview.haml +10 -3
  502. data/app/views/integral/backend/shared/_image_selector.haml +1 -1
  503. data/app/views/integral/backend/shared/_notification_subscription_toggle.haml +22 -0
  504. data/app/views/integral/backend/shared/action_bar/_index.haml +9 -0
  505. data/app/views/integral/backend/shared/action_bar/_show.haml +3 -0
  506. data/app/views/integral/backend/shared/cards/_at_a_glance.haml +3 -3
  507. data/app/views/integral/backend/shared/cards/_categories.haml +33 -0
  508. data/app/views/integral/backend/{static_pages/_card.haml → shared/cards/_object.haml} +1 -1
  509. data/app/views/integral/backend/shared/cards/_recent_activity.haml +20 -0
  510. data/app/views/integral/backend/shared/cards/_recent_resources.haml +17 -0
  511. data/app/views/integral/backend/shared/cards/_recent_user_activity.haml +1 -0
  512. data/app/views/integral/backend/shared/cards/_top_post_authors.haml +18 -0
  513. data/app/views/integral/backend/shared/cards/_welcome.haml +24 -25
  514. data/app/views/integral/backend/shared/{_empty_grid.haml → grid/_empty.haml} +0 -0
  515. data/app/views/integral/backend/shared/grid/_form.haml +9 -0
  516. data/app/views/integral/backend/shared/grid/_grid.haml +21 -0
  517. data/app/views/integral/backend/shared/{_pagination.haml → grid/_pagination.haml} +0 -0
  518. data/app/views/integral/backend/shared/grid/_row_layout.haml +8 -0
  519. data/app/views/integral/backend/shared/record_selector/_collection.haml +1 -0
  520. data/app/views/integral/backend/shared/record_selector/_modal.haml +9 -10
  521. data/app/views/integral/backend/shared/record_selector/_record.haml +6 -4
  522. data/app/views/integral/backend/static_pages/dashboard.haml +17 -16
  523. data/app/views/integral/backend/users/_form.haml +35 -47
  524. data/app/views/integral/backend/users/edit.haml +1 -1
  525. data/app/views/integral/backend/users/grid/_dropdown_actions.haml +17 -0
  526. data/app/views/integral/backend/users/grid/_row_content.haml +8 -0
  527. data/app/views/integral/backend/users/index.haml +11 -17
  528. data/app/views/integral/backend/users/list.haml +12 -0
  529. data/app/views/integral/backend/users/show.haml +22 -19
  530. data/app/views/integral/categories/show.haml +5 -0
  531. data/app/views/integral/posts/_article_footer.haml +17 -0
  532. data/app/views/integral/posts/_card.haml +11 -0
  533. data/app/views/integral/posts/_latest_post.haml +8 -0
  534. data/app/views/integral/posts/_most_read_section.haml +8 -0
  535. data/app/views/integral/posts/_post.haml +11 -0
  536. data/app/views/integral/posts/_similar_posts.haml +5 -0
  537. data/app/views/integral/posts/index.haml +7 -5
  538. data/app/views/integral/posts/templates/default.haml +35 -35
  539. data/app/views/integral/shared/_share_modal.haml +0 -3
  540. data/app/views/integral/shared/_social_list_items.haml +6 -12
  541. data/app/views/integral/shared/_subscribe_modal.haml +14 -0
  542. data/app/views/integral/shared/blog/_categories.haml +15 -0
  543. data/app/views/integral/shared/blog/_layout.haml +9 -0
  544. data/app/views/integral/shared/blog/_sidebar.haml +10 -0
  545. data/app/views/integral/shared/gallery/_placeholder.haml +1 -1
  546. data/app/views/integral/shared/gallery/_slide.haml +2 -2
  547. data/app/views/integral/shared/gallery/gallery.haml +5 -2
  548. data/app/views/integral/shared/sidebar/_item.haml +8 -0
  549. data/app/views/integral/shared/sidebar/_newsletter_signup.haml +7 -0
  550. data/app/views/integral/shared/sidebar/_popular_posts.haml +7 -0
  551. data/app/views/integral/shared/sidebar/_popular_tags.haml +7 -0
  552. data/app/views/integral/shared/sidebar/_recent_posts.haml +7 -0
  553. data/app/views/integral/tags/index.haml +2 -2
  554. data/app/views/integral/tags/show.haml +3 -6
  555. data/app/views/layouts/integral/backend.html.haml +27 -5
  556. data/app/views/layouts/integral/backend/_create_dropdown.haml +1 -30
  557. data/app/views/layouts/integral/backend/_main_menu_items.haml +1 -91
  558. data/app/views/layouts/integral/frontend.html.haml +3 -3
  559. data/config/initializers/devise.rb +1 -1
  560. data/config/locales/en.yml +127 -55
  561. data/config/routes.rb +2 -0
  562. data/db/migrate/20190414172018_create_webhook_endpoints.rb +10 -0
  563. data/db/migrate/20190929191412_add_integral_post_categories.rb +13 -0
  564. data/db/migrate/20191203090008_add_image_to_integral_categories.rb +6 -0
  565. data/db/migrate/20200401210442_create_category_versions.rb +20 -0
  566. data/db/migrate/20200407022636_create_integral_notifications.rb +25 -0
  567. data/db/migrate/20200421223602_add_status_to_integral_users.rb +5 -0
  568. data/db/seeds.rb +15 -9
  569. data/lib/generators/integral/assets_generator.rb +2 -2
  570. data/lib/generators/integral/install_generator.rb +1 -1
  571. data/lib/generators/integral/views_generator.rb +1 -1
  572. data/lib/generators/templates/app.yml +0 -1
  573. data/lib/generators/templates/integral.rb +5 -0
  574. data/lib/integral.rb +4 -30
  575. data/lib/integral/acts_as_integral.rb +115 -0
  576. data/lib/integral/acts_as_listable.rb +3 -3
  577. data/lib/integral/chart_renderer/base.rb +2 -0
  578. data/lib/integral/content_renderer.rb +2 -2
  579. data/lib/integral/engine.rb +12 -2
  580. data/lib/integral/grids/activities_grid.rb +15 -2
  581. data/lib/integral/grids/lists_grid.rb +1 -0
  582. data/lib/integral/grids/posts_grid.rb +5 -1
  583. data/lib/integral/grids/users_grid.rb +5 -0
  584. data/lib/integral/list_item_renderer.rb +4 -2
  585. data/lib/integral/list_renderer.rb +6 -1
  586. data/lib/integral/middleware/page_router.rb +15 -6
  587. data/lib/integral/router.rb +42 -8
  588. data/lib/integral/version.rb +1 -1
  589. data/lib/integral/widgets/swiper_list.rb +3 -2
  590. data/public/images/integral/demo/continous-integration.png +0 -0
  591. data/public/images/integral/demo/foundation-frontend-framework.jpg +0 -0
  592. data/public/images/integral/demo/heroku.png +0 -0
  593. data/public/images/integral/demo/integral-cms-without-hassle.jpg +0 -0
  594. data/public/images/integral/demo/integral-features-activity-tracking.jpg +0 -0
  595. data/public/images/integral/demo/integral-features-contact-form.png +0 -0
  596. data/public/images/integral/demo/integral-features-design.jpg +0 -0
  597. data/public/images/integral/demo/integral-features-dynamic-pages.jpg +0 -0
  598. data/public/images/integral/demo/integral-features-image-management.jpg +0 -0
  599. data/public/images/integral/demo/integral-features-integrated-blog.jpg +0 -0
  600. data/public/images/integral/demo/integral-features-list-management.jpg +0 -0
  601. data/public/images/integral/demo/integral-features-seo-ready.jpg +0 -0
  602. data/public/images/integral/demo/integral-features-user-management.jpg +0 -0
  603. data/public/images/integral/demo/integral-presentation.png +0 -0
  604. data/public/integral/ckeditor_demo_content.html +0 -13
  605. data/spec/factories.rb +30 -8
  606. metadata +305 -113
  607. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/jp.js +0 -13
  608. data/app/assets/javascripts/integral/support/date_picker/picker.date.js +0 -1435
  609. data/app/assets/javascripts/integral/support/date_picker/picker.js +0 -1132
  610. data/app/assets/stylesheets/integral/frontend.sass +0 -26
  611. data/app/assets/stylesheets/integral/support/date-picker.scss +0 -16
  612. data/app/assets/stylesheets/integral/support/date_picker/_default.date.scss +0 -452
  613. data/app/assets/stylesheets/integral/support/date_picker/_default.scss +0 -201
  614. data/app/assets/stylesheets/integral/support/date_picker/materialize_clockpicker.sass +0 -220
  615. data/app/views/devise/mailer/invitation_instructions.html.erb +0 -13
  616. data/app/views/integral/backend/activities/_grid.haml +0 -23
  617. data/app/views/integral/backend/activities/shared/_listing.haml +0 -14
  618. data/app/views/integral/backend/images/_grid.haml +0 -16
  619. data/app/views/integral/backend/lists/_grid.haml +0 -14
  620. data/app/views/integral/backend/pages/_grid.haml +0 -21
  621. data/app/views/integral/backend/pages/activities.haml +0 -2
  622. data/app/views/integral/backend/pages/activity.haml +0 -1
  623. data/app/views/integral/backend/pages/edit.html.haml +0 -15
  624. data/app/views/integral/backend/posts/_grid.haml +0 -25
  625. data/app/views/integral/backend/posts/activities.haml +0 -3
  626. data/app/views/integral/backend/posts/activity.haml +0 -1
  627. data/app/views/integral/backend/shared/_grid.haml +0 -18
  628. data/app/views/integral/backend/users/_grid.haml +0 -19
  629. data/app/views/integral/posts/_collection.haml +0 -4
  630. data/app/views/integral/posts/_item.haml +0 -16
  631. data/app/views/integral/shared/_blog_layout.haml +0 -15
  632. data/app/views/integral/shared/_blog_sidebar.haml +0 -49
  633. data/lib/integral/slack_bot.rb +0 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1d79cf3d29d5bd42ed2ff312edfba5df092f44f5
4
- data.tar.gz: 4e1436dcafb059b53ecd4edbc2f32b875cc4314d
2
+ SHA256:
3
+ metadata.gz: 7982fe78ebcb46201999a992d4456c12a65c70a7da6a1521272799a0a13f47dd
4
+ data.tar.gz: c570effa139d6846e32459a8dd8928544f618f15416839f7a2dae438e36b1b8d
5
5
  SHA512:
6
- metadata.gz: 1cc6755ead403715d6118da43b5e56fec7cc41ba13ab80a4e6eae175e26299b863a443f92335e610e7062d3c3796b21793d9881754b4a9b8ddaed65292d01505
7
- data.tar.gz: 67cb53f56c8e07f95a2b2e41eaa7414179d59342a5901913b1bab0c3138183d81e69c290cc9bfac305dfc3508bfacf135dce9c8024d8a3429623f55485b60802
6
+ metadata.gz: 02d3cb3b52d5b950f689caea5ccedc14470ff5b53196fb4a6381cf62c29d67df11b606a95c40260bd7d15764620b6896c86de4f1a18e58dcb9bfca03d4129821
7
+ data.tar.gz: 402326c2e8c5c55eb20b7494f3b11fdf335289a874de8dbdd0379d7d444825eb3e03ab89fdd1f2638ddcd0b4e9a07a0cb9aa848ea69595ad0fa773b473b2fe3a
data/README.md CHANGED
@@ -1,18 +1,19 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/integral.svg)][version-website]
2
2
  [![Current Build Status](https://img.shields.io/circleci/project/github/yamasolutions/integral/master.svg)][ci-website] [![Inline docs](http://inch-ci.org/github/yamasolutions/integral.svg?branch=master)][docs-website]
3
3
  # Integral CMS
4
- ![Integral CMS Features](https://media.giphy.com/media/LwzTKp4PxFpvKfxMJe/giphy.gif)
4
+ ![Integral CMS Features](https://integralrails.com/features.gif)
5
5
 
6
6
  Integral is a CMS for Rails 5+. The aim of Integral is to lower the barrier of entry in creating websites, using Ruby on Rails, with all the bells and whistles that users have now come to expect.
7
7
  Out of the box integral provides;
8
8
  * Backend features
9
9
  * Professional design
10
+ * Activity tracking
11
+ * User notifications
10
12
  * User authentication & authorization
11
13
  * Page & Post management with full WYSWIYG editing
12
14
  * Image management (w/ background image processing)
13
15
  * List management
14
16
  * Settings management
15
- * Activity tracking
16
17
  * Frontend features
17
18
  * Dynamic Pages
18
19
  * Integrated Blog
@@ -27,44 +28,16 @@ Out of the box integral provides;
27
28
 
28
29
  ## Getting Started
29
30
 
30
- 1. Create a new Rails application
31
- ```
32
- rails new example_app --database=postgresql -T
33
- ```
34
- 2. Add Integral to your Gemfile and run `bundle install`
35
- ```
36
- gem 'integral'
37
- ```
38
- 3. Run Integral install rake task (adds configuration initializers, installs routes & sets up database)
39
- ```
40
- rails generate integral:install
41
- ```
42
- 4. Set the default host within the development environment, used for URL generation
43
- ```
44
- # config/environments/development.rb
45
-
46
- Rails.application.routes.default_url_options[:host] = 'http://localhost:3000'
47
- ```
48
-
49
- Voila! Start your rails server and you're ready to go! You can access the user only area at `/admin`
50
-
51
- Integral requires Rails 5.1 or higher and Ruby 2.4.1 or higher.
31
+ Get a professional website up and running in minutes - Check out our [documentation website](https://integralrails.com/docs) for installation instructions and guides.
52
32
 
53
33
  ## Information
54
34
 
55
35
  * [Integral Website][integral-cms]
36
+ * [Integral Docs](https://integralrails.com/docs)
56
37
  * [CHANGELOG](https://github.com/yamasolutions/integral/blob/master/CHANGELOG.md)
57
38
  * [Code Documentation][docs-website]
58
39
  * [Wish list](https://github.com/yamasolutions/integral/wiki/Wish-List)
59
40
 
60
- ### Guides
61
- * [Deploying to production](https://github.com/yamasolutions/integral/blob/master/docs/deploying_to_production.md)
62
- * [Integral <3 Heroku](https://github.com/yamasolutions/integral/blob/master/docs/heroku.md)
63
- * [Extending Integral](https://github.com/yamasolutions/integral/blob/master/docs/extending_integral.md)
64
- * [Integral Lists](https://github.com/yamasolutions/integral/blob/master/docs/integral_lists.md)
65
- * [Integral Pages](https://github.com/yamasolutions/integral/blob/master/docs/integral_pages.md)
66
- * [Integral Widgets](https://github.com/yamasolutions/integral/blob/master/docs/integral_widgets.md)
67
- * [WYSIWYG Editor](https://github.com/yamasolutions/integral/blob/master/docs/wysiwyg_editor.md)
68
41
 
69
42
  ### Bug reporting
70
43
  If you discover a problem with Integral, we would love to know about it. Please use the [GitHub issue tracker][github-issue-tracker] to contact us about it.
@@ -73,7 +46,7 @@ If you have discovered a security related bug, please do NOT use the GitHub issu
73
46
 
74
47
 
75
48
  ### Looking for help
76
- If you have any questions please use [StackOverflow](https://stackoverflow.com) instead of the GitHub issue tracker.
49
+ If you have any questions please feel free to use the [GitHub issue tracker][github-issue-tracker].
77
50
 
78
51
 
79
52
  ## Contributing
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
17
- APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
17
+ APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
18
18
  load 'rails/tasks/engine.rake'
19
19
 
20
20
  load 'rails/tasks/statistics.rake'
@@ -16,14 +16,14 @@ CKEDITOR.editorConfig = function( config )
16
16
  pictures_path = Ckeditor::Engine.routes.url_helpers.pictures_path
17
17
  %>
18
18
  /* Filebrowser routes */
19
- config.filebrowserBrowseUrl = "<%= attachment_files_path %>"
20
- config.filebrowserUploadUrl = "<%= attachment_files_path %>"
21
- config.filebrowserFlashUploadUrl = "<%= attachment_files_path %>"
22
- config.filebrowserFlashBrowseUrl = "<%= attachment_files_path %>"
23
- config.filebrowserImageBrowseLinkUrl = "<%= pictures_path %>"
24
- config.filebrowserImageBrowseUrl = "<%= pictures_path %>"
25
- config.filebrowserImageUploadUrl = "<%= pictures_path %>"
26
- config.filebrowserImageBrowseLinkUrl = "<%= pictures_path %>"
19
+ config.filebrowserBrowseUrl = "<%= attachment_files_path %>";
20
+ config.filebrowserUploadUrl = "<%= attachment_files_path %>";
21
+ config.filebrowserFlashUploadUrl = "<%= attachment_files_path %>";
22
+ config.filebrowserFlashBrowseUrl = "<%= attachment_files_path %>";
23
+ config.filebrowserImageBrowseLinkUrl = "<%= pictures_path %>";
24
+ config.filebrowserImageBrowseUrl = "<%= pictures_path %>";
25
+ config.filebrowserImageUploadUrl = "<%= pictures_path %>";
26
+ config.filebrowserImageBrowseLinkUrl = "<%= pictures_path %>";
27
27
 
28
28
  // Toolbar groups configuration.
29
29
  config.toolbarGroups = [
@@ -52,14 +52,17 @@ CKEDITOR.editorConfig = function( config )
52
52
  { name: 'links', items: [ 'Link', 'Unlink', 'Image' ] }
53
53
  ];
54
54
 
55
- config.removeButtons = 'Blockquote,BGColor,CopyFormatting,TextColor,bgColor,Flash,Indent,Outdent,Superscript,Subscript,SpecialChar,Cut,Copy,Paste,PasteText,PasteFromWord,Save,Templates,NewPage,Preview,Print,SelectAll,Scayt,Replace,Form,Checkbox,Radio,TextField,HiddenField,ImageButton,Button,Select,Textarea,Language,BidiRtl,BidiLtr,CreateDiv,PageBreak,Smiley,About,Styles,FontSize,Font,Unlink';
56
- config.removeDialogTabs = 'link:upload;image:Upload';
57
- config.image_prefillDimensions = false;
55
+ config.allowedContent = true; // Allow all content - may want to disable this.
56
+ CKEDITOR.dtd.$removeEmpty['i'] = false; // Allow icon insertion
57
+ CKEDITOR.dtd.a.div = 1; // Set default container to div
58
+
59
+ config.removeButtons = 'Blockquote,BGColor,CopyFormatting,TextColor,bgColor,Flash,Indent,Outdent,Superscript,Subscript,SpecialChar,Cut,Copy,Paste,PasteText,PasteFromWord,Save,Templates,NewPage,Preview,Print,SelectAll,Scayt,Replace,Form,Checkbox,Radio,TextField,HiddenField,ImageButton,Button,Select,Textarea,Language,BidiRtl,BidiLtr,CreateDiv,PageBreak,Smiley,About,Styles,FontSize,Font,Unlink,OpenLink';
60
+ config.removeDialogTabs = 'link:upload;image2:Upload';
58
61
 
59
62
  config.format_small = { element: 'small' };
60
63
 
61
- config.format_tags = 'p;h2;h3;h4;h5;h6;pre;small;address;div';
62
- config.extraPlugins = 'wordcount,autogrow,codemirror,embedjs,lineutils,widgetselection,widget,placeholder,strinsert';
64
+ config.format_tags = 'p;h2;h3;h4;h5;h6'
65
+ config.extraPlugins = 'wordcount,autogrow,codemirror,embedjs,lineutils,widgetselection,widget,strinsert,balloontoolbar,openlink,linkballoon,image2,foundation-callout';
63
66
  config.removePlugins = 'forms';
64
67
 
65
68
  config.autoGrow_maxHeight = 500;
@@ -69,6 +72,10 @@ CKEDITOR.editorConfig = function( config )
69
72
  config.disallowedContent = '*[dir];strong[id]'; // Workaround to all pasted GDocs content to be unbolded
70
73
  config.coreStyles_italic = { element : 'i' };
71
74
 
75
+ config.image2_altRequired = true;
76
+ config.image2_disableResizer = true;
77
+ config.image2_prefillDimensions = false;
78
+
72
79
  CKEDITOR.dtd.a.div = 1;
73
80
 
74
81
  config.codemirror = {
@@ -78,11 +85,14 @@ CKEDITOR.editorConfig = function( config )
78
85
  showSearchButton: false,
79
86
  enableSearchTools: false,
80
87
  showAutoCompleteButton: false
81
- }
88
+ };
82
89
 
83
90
  config.embedjs = {
84
91
  file: '<%= javascript_path 'ckeditor/my_javascript.js' %>'
85
- }
92
+ };
93
+
94
+ config.scayt_autoStartup = true;
95
+ // config.scayt_customerId = 'xxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxxx-xxxxxxxxxxxx';
86
96
 
87
97
  /** Static Widgets **/
88
98
 
@@ -117,7 +127,6 @@ CKEDITOR.editorConfig = function( config )
117
127
  disabledHollowButton = "<a href='https://google.com' href='_blank' class='button disabled hollow'>Disabled Hollow Button</a>";
118
128
  // Misc
119
129
  quote = "<quote>You are what you do, not what you say you'll do.</quote>";
120
- imageWithCaption = "<table class='img-container'><tbody><tr><td style='text-align: center;'><img alt='' src='http://lorempixel.com/600/600/' /></td></tr><tr><td style='text-align: center;'>This is an image caption example</td></tr></tbody></table>";
121
130
 
122
131
  config.strinsert_button_label = 'Widgets';
123
132
  config.strinsert_strings = [
@@ -148,7 +157,6 @@ CKEDITOR.editorConfig = function( config )
148
157
  { 'name': 'Embeds' },
149
158
  { 'name': 'Youtube Embed', 'value': embedYoutube },
150
159
  { 'name': 'Misc' },
151
- { 'name': 'Quote', 'value': quote },
152
- { 'name': 'Image w/ Caption', 'value': imageWithCaption }
160
+ { 'name': 'Quote', 'value': quote }
153
161
  ];
154
162
  };
@@ -0,0 +1,8 @@
1
+ /*
2
+ Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'autoembed', 'lv', {
6
+ embeddingInProgress: 'Mēģinu iekļaut ielīmētu adresi...',
7
+ embeddingFailed: 'Šī adrese nevar tikt automātiski iekļauta.'
8
+ } );
@@ -10,7 +10,7 @@
10
10
 
11
11
  CKEDITOR.plugins.add( 'autoembed', {
12
12
  requires: 'autolink,undo',
13
- lang: 'az,bg,ca,cs,da,de,de-ch,el,en,en-au,eo,es,es-mx,eu,fr,gl,hr,hu,it,ja,km,ko,ku,mk,nb,nl,oc,pl,pt,pt-br,ro,ru,sk,sq,sv,tr,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
13
+ lang: 'az,bg,ca,cs,da,de,de-ch,el,en,en-au,eo,es,es-mx,eu,fr,gl,hr,hu,it,ja,km,ko,ku,lv,mk,nb,nl,oc,pl,pt,pt-br,ro,ru,sk,sq,sv,tr,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
14
14
  init: function( editor ) {
15
15
  var currentId = 1,
16
16
  embedCandidatePasted;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
2
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
6
6
  /**
@@ -69,7 +69,7 @@
69
69
  } );
70
70
  }
71
71
 
72
- // Coordinate with the "maximize" plugin. (#9311)
72
+ // Coordinate with the "maximize" plugin. (https://dev.ckeditor.com/ticket/9311)
73
73
  editor.on( 'afterCommandExec', function( evt ) {
74
74
  if ( evt.data.name == 'maximize' && evt.editor.mode == 'wysiwyg' ) {
75
75
  if ( evt.data.command.state == CKEDITOR.TRISTATE_ON )
@@ -95,7 +95,7 @@
95
95
  scrollable = CKEDITOR.env.quirks ? doc.getBody() : doc.getDocumentElement();
96
96
 
97
97
  // Reset scrollable body height and min-height css values.
98
- // While set by outside code it may break resizing. (#14620)
98
+ // While set by outside code it may break resizing. (https://dev.ckeditor.com/ticket/14620)
99
99
  var body = CKEDITOR.env.quirks ? scrollable : scrollable.findOne( 'body' );
100
100
  if ( body ) {
101
101
  body.setStyle( 'height', 'auto' );
@@ -114,7 +114,7 @@
114
114
 
115
115
  return (
116
116
  !editor.window ||
117
- // Disable autogrow when the editor is maximized. (#6339)
117
+ // Disable autogrow when the editor is maximized. (https://dev.ckeditor.com/ticket/6339)
118
118
  maximizeCommand && maximizeCommand.state == CKEDITOR.TRISTATE_ON
119
119
  );
120
120
  }
@@ -143,7 +143,7 @@
143
143
  newHeight = Math.max( newHeight, configMinHeight );
144
144
  newHeight = Math.min( newHeight, configMaxHeight );
145
145
 
146
- // #10196 Do not resize editor if new height is equal
146
+ // https://dev.ckeditor.com/ticket/10196 Do not resize editor if new height is equal
147
147
  // to the one set by previous resizeEditor() call.
148
148
  if ( newHeight != currentHeight && lastHeight != newHeight ) {
149
149
  newHeight = editor.fire( 'autoGrow', { currentHeight: currentHeight, newHeight: newHeight } ).newHeight;
@@ -165,8 +165,8 @@
165
165
  * The minimum height that the editor can assume when adjusting to content by using the Auto Grow
166
166
  * feature. This option accepts a value in pixels, without the unit (for example: `300`).
167
167
  *
168
- * Read more in the [documentation](#!/guide/dev_autogrow)
169
- * and see the [SDK sample](http://sdk.ckeditor.com/samples/autogrow.html).
168
+ * Read more in the {@glink guide/dev_autogrow documentation}
169
+ * and see the [SDK sample](https://sdk.ckeditor.com/samples/autogrow.html).
170
170
  *
171
171
  * config.autoGrow_minHeight = 300;
172
172
  *
@@ -180,8 +180,8 @@
180
180
  * feature. This option accepts a value in pixels, without the unit (for example: `600`).
181
181
  * Zero (`0`) means that the maximum height is not limited and the editor will expand infinitely.
182
182
  *
183
- * Read more in the [documentation](#!/guide/dev_autogrow)
184
- * and see the [SDK sample](http://sdk.ckeditor.com/samples/autogrow.html).
183
+ * Read more in the {@glink guide/dev_autogrow documentation}
184
+ * and see the [SDK sample](https://sdk.ckeditor.com/samples/autogrow.html).
185
185
  *
186
186
  * config.autoGrow_maxHeight = 400;
187
187
  *
@@ -194,8 +194,8 @@
194
194
  * Whether automatic editor height adjustment brought by the Auto Grow feature should happen on
195
195
  * editor creation.
196
196
  *
197
- * Read more in the [documentation](#!/guide/dev_autogrow)
198
- * and see the [SDK sample](http://sdk.ckeditor.com/samples/autogrow.html).
197
+ * Read more in the {@glink guide/dev_autogrow documentation}
198
+ * and see the [SDK sample](https://sdk.ckeditor.com/samples/autogrow.html).
199
199
  *
200
200
  * config.autoGrow_onStartup = true;
201
201
  *
@@ -209,8 +209,8 @@
209
209
  * editor height to content by using the Auto Grow feature. This option accepts a value in pixels,
210
210
  * without the unit (for example: `50`).
211
211
  *
212
- * Read more in the [documentation](#!/guide/dev_autogrow)
213
- * and see the [SDK sample](http://sdk.ckeditor.com/samples/autogrow.html).
212
+ * Read more in the {@glink guide/dev_autogrow documentation}
213
+ * and see the [SDK sample](https://sdk.ckeditor.com/samples/autogrow.html).
214
214
  *
215
215
  * config.autoGrow_bottomSpace = 50;
216
216
  *
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <!--
3
- Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
4
- For licensing, see LICENSE.md or http://ckeditor.com/license
3
+ Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
4
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
5
5
  -->
6
6
  <html>
7
7
  <head>
@@ -18,7 +18,7 @@ For licensing, see LICENSE.md or http://ckeditor.com/license
18
18
  <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Using AutoGrow Plugin
19
19
  </h1>
20
20
  <div class="warning deprecated">
21
- This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/autogrow.html">brand new version in CKEditor SDK</a>.
21
+ This sample is not maintained anymore. Check out its <a href="https://sdk.ckeditor.com/samples/autogrow.html">brand new version in CKEditor SDK</a>.
22
22
  </div>
23
23
  <div class="description">
24
24
  <p>
@@ -33,7 +33,7 @@ For licensing, see LICENSE.md or http://ckeditor.com/license
33
33
  <p>
34
34
  It is also possible to set a maximum height for the editor window. Once CKEditor
35
35
  editing area reaches the value in pixels specified in the
36
- <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-autoGrow_maxHeight">autoGrow_maxHeight</a></code>
36
+ <code><a class="samples" href="https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-autoGrow_maxHeight">autoGrow_maxHeight</a></code>
37
37
  configuration setting, scrollbars will be added and the editor window will no longer expand.
38
38
  </p>
39
39
  <p>
@@ -59,7 +59,7 @@ CKEDITOR.replace( '<em>textarea_id</em>', {
59
59
  <label for="editor1">
60
60
  CKEditor using the <code>autogrow</code> plugin with its default configuration:
61
61
  </label>
62
- <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
62
+ <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="https://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
63
63
  <script>
64
64
 
65
65
  CKEDITOR.replace( 'editor1', {
@@ -73,7 +73,7 @@ CKEDITOR.replace( '<em>textarea_id</em>', {
73
73
  <label for="editor2">
74
74
  CKEditor using the <code>autogrow</code> plugin with maximum height set to 400 pixels:
75
75
  </label>
76
- <textarea cols="80" id="editor2" name="editor2" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
76
+ <textarea cols="80" id="editor2" name="editor2" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="https://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
77
77
  <script>
78
78
 
79
79
  CKEDITOR.replace( 'editor2', {
@@ -91,10 +91,10 @@ CKEDITOR.replace( '<em>textarea_id</em>', {
91
91
  <div id="footer">
92
92
  <hr>
93
93
  <p>
94
- CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
94
+ CKEditor - The text editor for the Internet - <a class="samples" href="https://ckeditor.com/">https://ckeditor.com</a>
95
95
  </p>
96
96
  <p id="copy">
97
- Copyright &copy; 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
97
+ Copyright &copy; 2003-2018, <a class="samples" href="https://cksource.com/">CKSource</a> - Frederico
98
98
  Knabben. All rights reserved.
99
99
  </p>
100
100
  </div>
@@ -1 +1 @@
1
- .CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.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:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:0;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.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-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.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,.cm-s-default .cm-type{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{color:#555}.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-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.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-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{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;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!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 ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;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;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.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;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-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;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{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-color:#ffa;background-color: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}.CodeMirror{font:13px/1.4em monospace;text-align:left}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:blue;-ms-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;-webkit-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:#ff9600;background:rgba(255,150,0,0.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../icons/searchcode.png") no-repeat}.autoFormat span{background:url("../icons/autoformat.png") no-repeat}.CommentSelectedRange span{background:url("../icons/commentselectedrange.png") no-repeat}.UncommentSelectedRange span{background:url("../icons/uncommentselectedrange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539!important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b!important}.cm-s-monokai .CodeMirror-selected{background:#49483e!important}.cm-s-night .CodeMirror-selected{background:#447!important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f!important}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f!important}.cm-s-the-matrix .CodeMirror-selected{background:#494949!important}.cm-s-mbo .CodeMirror-selected{background:#716c62!important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline,.cm-s-pastel-on-dark .activeline{background:#757575}.cm-s-pastel-on-dark .activeline{background:#404040}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px #000;-ms-box-shadow:2px 3px 5px #000;box-shadow:2px 3px 5px #000;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:black;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:white}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:0;outline:0;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25BE"}.CodeMirror-foldgutter-folded:after{content:"\25B8"}
1
+ .CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.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:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:0;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.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-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.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,.cm-s-default .cm-type{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{color:#555}.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-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.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-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{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;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!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 ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;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;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.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;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-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;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{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-color:#ffa;background-color: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}.CodeMirror{font:13px/1.4em monospace;text-align:left}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:blue;-ms-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;-webkit-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:#ff9600;background:rgba(255,150,0,0.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../images/searchcode.png") no-repeat}.autoFormat span{background:url("../images/autoformat.png") no-repeat}.CommentSelectedRange span{background:url("../images/commentselectedrange.png") no-repeat}.UncommentSelectedRange span{background:url("../images/uncommentselectedrange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539!important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b!important}.cm-s-monokai .CodeMirror-selected{background:#49483e!important}.cm-s-night .CodeMirror-selected{background:#447!important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f!important}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f!important}.cm-s-the-matrix .CodeMirror-selected{background:#494949!important}.cm-s-mbo .CodeMirror-selected{background:#716c62!important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline,.cm-s-pastel-on-dark .activeline{background:#757575}.cm-s-pastel-on-dark .activeline{background:#404040}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px #000;-ms-box-shadow:2px 3px 5px #000;box-shadow:2px 3px 5px #000;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:black;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:white}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:0;outline:0;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25BE"}.CodeMirror-foldgutter-folded:after{content:"\25B8"}
@@ -1,2 +1,2 @@
1
- !function(){function t(t,e){for(var n=0;n<e.length;n+=1)if(e[n]===t)return!0;return!1}function e(t){return t.replace(/^\s+|\s+$/g,"")}function n(t){return t.replace(/^\s+/g,"")}function i(t,e){"use strict";return new r(t,e).beautify()}function r(i,r){"use strict";function s(t,e){var n=0;return t&&(n=t.indentation_level,!z.just_added_newline()&&t.line_indent_level>n&&(n=t.line_indent_level)),{mode:e,parent:t,last_text:t?t.last_text:"",last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:t?t.line_indent_level:n,start_line_index:z.get_line_number(),ternary_depth:0}}function h(t){var e=t.newlines;if(et.keep_array_indentation&&x(q.mode))for(n=0;n<e;n+=1)p(n>0);else if(et.max_preserve_newlines&&e>et.max_preserve_newlines&&(e=et.max_preserve_newlines),et.preserve_newlines&&t.newlines>1){p();for(var n=1;n<e;n+=1)p(!0)}F=t,tt[F.type]()}function c(t){t=t.replace(/\x0d/g,"");for(var e=[],n=t.indexOf("\n");-1!==n;)e.push(t.substring(0,n)),t=t.substring(n+1),n=t.indexOf("\n");return t.length&&e.push(t),e}function u(t){if(t=void 0!==t&&t,!z.just_added_newline())if(et.preserve_newlines&&F.wanted_newline||t)p(!1,!0);else if(et.wrap_line_length){var e=z.current_line.get_character_count()+F.text.length+(z.space_before_token?1:0);e>=et.wrap_line_length&&p(!1,!0)}}function p(t,e){if(!e&&";"!==q.last_text&&","!==q.last_text&&"="!==q.last_text&&"TK_OPERATOR"!==$)for(;q.mode===l.Statement&&!q.if_block&&!q.do_block;)K();z.add_new_line(t)&&(q.multiline_frame=!0)}function f(){z.just_added_newline()&&(et.keep_array_indentation&&x(q.mode)&&F.wanted_newline?(z.current_line.push(F.whitespace_before),z.space_before_token=!1):z.set_indent(q.indentation_level)&&(q.line_indent_level=q.indentation_level))}function d(t){if(z.raw)return void z.add_raw_token(F);et.comma_first&&"TK_COMMA"===$&&z.just_added_newline()&&","===z.previous_line.last()&&(z.previous_line.pop(),f(),z.add_token(","),z.space_before_token=!0),t=t||F.text,f(),z.add_token(t)}function T(){q.indentation_level+=1}function E(){q.indentation_level>0&&(!q.parent||q.indentation_level>q.parent.indentation_level)&&(q.indentation_level-=1)}function g(t){q?(Z.push(q),H=q):H=s(null,t),q=s(H,t)}function x(t){return t===l.ArrayLiteral}function b(e){return t(e,[l.Expression,l.ForInitializer,l.Conditional])}function K(){Z.length>0&&(H=q,q=Z.pop(),H.mode===l.Statement&&z.remove_redundant_indentation(H))}function w(){return q.parent.mode===l.ObjectLiteral&&q.mode===l.Statement&&(":"===q.last_text&&0===q.ternary_depth||"TK_RESERVED"===$&&t(q.last_text,["get","set"]))}function R(){return!!("TK_RESERVED"===$&&t(q.last_text,["var","let","const"])&&"TK_WORD"===F.type||"TK_RESERVED"===$&&"do"===q.last_text||"TK_RESERVED"===$&&"return"===q.last_text&&!F.wanted_newline||"TK_RESERVED"===$&&"else"===q.last_text&&("TK_RESERVED"!==F.type||"if"!==F.text)||"TK_END_EXPR"===$&&(H.mode===l.ForInitializer||H.mode===l.Conditional)||"TK_WORD"===$&&q.mode===l.BlockStatement&&!q.in_case&&"--"!==F.text&&"++"!==F.text&&"function"!==Q&&"TK_WORD"!==F.type&&"TK_RESERVED"!==F.type||q.mode===l.ObjectLiteral&&(":"===q.last_text&&0===q.ternary_depth||"TK_RESERVED"===$&&t(q.last_text,["get","set"])))&&(g(l.Statement),T(),"TK_RESERVED"===$&&t(q.last_text,["var","let","const"])&&"TK_WORD"===F.type&&(q.declaration_statement=!0),w()||u("TK_RESERVED"===F.type&&t(F.text,["do","for","if","while"])),!0)}function m(t,n){for(var i=0;i<t.length;i++){if(e(t[i]).charAt(0)!==n)return!1}return!0}function y(t,e){for(var n,i=0,r=t.length;i<r;i++)if((n=t[i])&&0!==n.indexOf(e))return!1;return!0}function v(e){return t(e,["case","return","do","if","throw","else"])}function A(t){var e=G+(t||0);return e<0||e>=nt.length?null:nt[e]}function k(){R();var e=l.Expression;if("["===F.text){if("TK_WORD"===$||")"===q.last_text)return"TK_RESERVED"===$&&t(q.last_text,X.line_starters)&&(z.space_before_token=!0),g(e),d(),T(),void(et.space_in_paren&&(z.space_before_token=!0));e=l.ArrayLiteral,x(q.mode)&&("["!==q.last_text&&(","!==q.last_text||"]"!==Q&&"}"!==Q)||et.keep_array_indentation||p())}else"TK_RESERVED"===$&&"for"===q.last_text?e=l.ForInitializer:"TK_RESERVED"===$&&t(q.last_text,["if","while"])&&(e=l.Conditional);";"===q.last_text||"TK_START_BLOCK"===$?p():"TK_END_EXPR"===$||"TK_START_EXPR"===$||"TK_END_BLOCK"===$||"."===q.last_text?u(F.wanted_newline):"TK_RESERVED"===$&&"("===F.text||"TK_WORD"===$||"TK_OPERATOR"===$?"TK_RESERVED"===$&&("function"===q.last_word||"typeof"===q.last_word)||"*"===q.last_text&&"function"===Q?et.space_after_anon_function&&(z.space_before_token=!0):"TK_RESERVED"!==$||!t(q.last_text,X.line_starters)&&"catch"!==q.last_text||et.space_before_conditional&&(z.space_before_token=!0):z.space_before_token=!0,"("===F.text&&"TK_RESERVED"===$&&"await"===q.last_word&&(z.space_before_token=!0),"("===F.text&&("TK_EQUALS"!==$&&"TK_OPERATOR"!==$||w()||u()),g(e),d(),et.space_in_paren&&(z.space_before_token=!0),T()}function S(){for(;q.mode===l.Statement;)K();q.multiline_frame&&u("]"===F.text&&x(q.mode)&&!et.keep_array_indentation),et.space_in_paren&&("TK_START_EXPR"!==$||et.space_in_empty_paren?z.space_before_token=!0:(z.trim(),z.space_before_token=!1)),"]"===F.text&&et.keep_array_indentation?(d(),K()):(K(),d()),z.remove_redundant_indentation(H),q.do_while&&H.mode===l.Conditional&&(H.mode=l.Expression,q.do_block=!1,q.do_while=!1)}function O(){var e=A(1),n=A(2);g(n&&(":"===n.text&&t(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||t(e.text,["get","set"])&&t(n.type,["TK_WORD","TK_RESERVED"]))?t(Q,["class","interface"])?l.BlockStatement:l.ObjectLiteral:l.BlockStatement);var i=!e.comments_before.length&&"}"===e.text,r=i&&"function"===q.last_word&&"TK_END_EXPR"===$;"expand"===et.brace_style||"none"===et.brace_style&&F.wanted_newline?"TK_OPERATOR"!==$&&(r||"TK_EQUALS"===$||"TK_RESERVED"===$&&v(q.last_text)&&"else"!==q.last_text)?z.space_before_token=!0:p(!1,!0):"TK_OPERATOR"!==$&&"TK_START_EXPR"!==$?"TK_START_BLOCK"===$?p():z.space_before_token=!0:x(H.mode)&&","===q.last_text&&("}"===Q?z.space_before_token=!0:p()),d(),T()}function N(){for(;q.mode===l.Statement;)K();var t="TK_START_BLOCK"===$;"expand"===et.brace_style?t||p():t||(x(q.mode)&&et.keep_array_indentation?(et.keep_array_indentation=!1,p(),et.keep_array_indentation=!0):p()),K(),d()}function D(){if("TK_RESERVED"===F.type&&q.mode!==l.ObjectLiteral&&t(F.text,["set","get"])&&(F.type="TK_WORD"),"TK_RESERVED"===F.type&&q.mode===l.ObjectLiteral){":"==A(1).text&&(F.type="TK_WORD")}if(R()||!F.wanted_newline||b(q.mode)||"TK_OPERATOR"===$&&"--"!==q.last_text&&"++"!==q.last_text||"TK_EQUALS"===$||!et.preserve_newlines&&"TK_RESERVED"===$&&t(q.last_text,["var","let","const","set","get"])||p(),q.do_block&&!q.do_while){if("TK_RESERVED"===F.type&&"while"===F.text)return z.space_before_token=!0,d(),z.space_before_token=!0,void(q.do_while=!0);p(),q.do_block=!1}if(q.if_block)if(q.else_block||"TK_RESERVED"!==F.type||"else"!==F.text){for(;q.mode===l.Statement;)K();q.if_block=!1,q.else_block=!1}else q.else_block=!0;if("TK_RESERVED"===F.type&&("case"===F.text||"default"===F.text&&q.in_case_statement))return p(),(q.case_body||et.jslint_happy)&&(E(),q.case_body=!1),d(),q.in_case=!0,void(q.in_case_statement=!0);if("TK_RESERVED"===F.type&&"function"===F.text&&((t(q.last_text,["}",";"])||z.just_added_newline()&&!t(q.last_text,["[","{",":","=",","]))&&(z.just_added_blankline()||F.comments_before.length||(p(),p(!0))),"TK_RESERVED"===$||"TK_WORD"===$?"TK_RESERVED"===$&&t(q.last_text,["get","set","new","return","export","async"])?z.space_before_token=!0:"TK_RESERVED"===$&&"default"===q.last_text&&"export"===Q?z.space_before_token=!0:p():"TK_OPERATOR"===$||"="===q.last_text?z.space_before_token=!0:(q.multiline_frame||!b(q.mode)&&!x(q.mode))&&p()),"TK_COMMA"!==$&&"TK_START_EXPR"!==$&&"TK_EQUALS"!==$&&"TK_OPERATOR"!==$||w()||u(),"TK_RESERVED"===F.type&&t(F.text,["function","get","set"]))return d(),void(q.last_word=F.text);if(J="NONE","TK_END_BLOCK"===$?"TK_RESERVED"===F.type&&t(F.text,["else","catch","finally"])?"expand"===et.brace_style||"end-expand"===et.brace_style||"none"===et.brace_style&&F.wanted_newline?J="NEWLINE":(J="SPACE",z.space_before_token=!0):J="NEWLINE":"TK_SEMICOLON"===$&&q.mode===l.BlockStatement?J="NEWLINE":"TK_SEMICOLON"===$&&b(q.mode)?J="SPACE":"TK_STRING"===$?J="NEWLINE":"TK_RESERVED"===$||"TK_WORD"===$||"*"===q.last_text&&"function"===Q?J="SPACE":"TK_START_BLOCK"===$?J="NEWLINE":"TK_END_EXPR"===$&&(z.space_before_token=!0,J="NEWLINE"),"TK_RESERVED"===F.type&&t(F.text,X.line_starters)&&")"!==q.last_text&&(J="else"===q.last_text||"export"===q.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===F.type&&t(F.text,["else","catch","finally"]))if("TK_END_BLOCK"!==$||"expand"===et.brace_style||"end-expand"===et.brace_style||"none"===et.brace_style&&F.wanted_newline)p();else{z.trim(!0);var e=z.current_line;"}"!==e.last()&&p(),z.space_before_token=!0}else"NEWLINE"===J?"TK_RESERVED"===$&&v(q.last_text)?z.space_before_token=!0:"TK_END_EXPR"!==$?"TK_START_EXPR"===$&&"TK_RESERVED"===F.type&&t(F.text,["var","let","const"])||":"===q.last_text||("TK_RESERVED"===F.type&&"if"===F.text&&"else"===q.last_text?z.space_before_token=!0:p()):"TK_RESERVED"===F.type&&t(F.text,X.line_starters)&&")"!==q.last_text&&p():q.multiline_frame&&x(q.mode)&&","===q.last_text&&"}"===Q?p():"SPACE"===J&&(z.space_before_token=!0);d(),q.last_word=F.text,"TK_RESERVED"===F.type&&"do"===F.text&&(q.do_block=!0),"TK_RESERVED"===F.type&&"if"===F.text&&(q.if_block=!0)}function C(){for(R()&&(z.space_before_token=!1);q.mode===l.Statement&&!q.if_block&&!q.do_block;)K();d()}function L(){R()?z.space_before_token=!0:"TK_RESERVED"===$||"TK_WORD"===$?z.space_before_token=!0:"TK_COMMA"===$||"TK_START_EXPR"===$||"TK_EQUALS"===$||"TK_OPERATOR"===$?w()||u():p(),d()}function I(){R(),q.declaration_statement&&(q.declaration_assignment=!0),z.space_before_token=!0,d(),z.space_before_token=!0}function j(){if(q.declaration_statement)return b(q.parent.mode)&&(q.declaration_assignment=!1),d(),void(q.declaration_assignment?(q.declaration_assignment=!1,p(!1,!0)):(z.space_before_token=!0,et.comma_first&&u()));d(),q.mode===l.ObjectLiteral||q.mode===l.Statement&&q.parent.mode===l.ObjectLiteral?(q.mode===l.Statement&&K(),p()):(z.space_before_token=!0,et.comma_first&&u())}function V(){if(R(),"TK_RESERVED"===$&&v(q.last_text))return z.space_before_token=!0,void d();if("*"===F.text&&"TK_DOT"===$)return void d();if(":"===F.text&&q.in_case)return q.case_body=!0,T(),d(),p(),void(q.in_case=!1);if("::"===F.text)return void d();"TK_OPERATOR"===$&&u();var e=!0,n=!0;t(F.text,["--","++","!","~"])||t(F.text,["-","+"])&&(t($,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||t(q.last_text,X.line_starters)||","===q.last_text)?(e=!1,n=!1,!F.wanted_newline||"--"!==F.text&&"++"!==F.text||p(!1,!0),";"===q.last_text&&b(q.mode)&&(e=!0),"TK_RESERVED"===$?e=!0:"TK_END_EXPR"===$?e=!("]"===q.last_text&&("--"===F.text||"++"===F.text)):"TK_OPERATOR"===$&&(e=t(F.text,["--","-","++","+"])&&t(q.last_text,["--","-","++","+"]),t(F.text,["+","-"])&&t(q.last_text,["--","++"])&&(n=!0)),q.mode!==l.BlockStatement&&q.mode!==l.Statement||"{"!==q.last_text&&";"!==q.last_text||p()):":"===F.text?0===q.ternary_depth?e=!1:q.ternary_depth-=1:"?"===F.text?q.ternary_depth+=1:"*"===F.text&&"TK_RESERVED"===$&&"function"===q.last_text&&(e=!1,n=!1),z.space_before_token=z.space_before_token||e,d(),z.space_before_token=n}function P(){if(z.raw)return z.add_raw_token(F),void(F.directives&&"end"===F.directives.preserve&&(et.test_output_raw||(z.raw=!1)));if(F.directives)return p(!1,!0),d(),"start"===F.directives.preserve&&(z.raw=!0),void p(!1,!0);if(!o.newline.test(F.text)&&!F.wanted_newline)return z.space_before_token=!0,d(),void(z.space_before_token=!0);var t,e=c(F.text),i=!1,r=!1,s=F.whitespace_before,_=s.length;for(p(!1,!0),e.length>1&&(m(e.slice(1),"*")?i=!0:y(e.slice(1),s)&&(r=!0)),d(e[0]),t=1;t<e.length;t++)p(!1,!0),i?d(" "+n(e[t])):r&&e[t].length>_?d(e[t].substring(_)):z.add_token(e[t]);p(!1,!0)}function M(){F.wanted_newline?p(!1,!0):z.trim(!0),z.space_before_token=!0,d(),p(!1,!0)}function B(){R(),"TK_RESERVED"===$&&v(q.last_text)?z.space_before_token=!0:u(")"===q.last_text&&et.break_chained_methods),d()}function U(){d(),"\n"===F.text[F.text.length-1]&&p()}function W(){for(;q.mode===l.Statement;)K()}var z,G,X,F,$,Q,Y,q,H,Z,J,tt,et,nt=[],it="";for(tt={TK_START_EXPR:k,TK_END_EXPR:S,TK_START_BLOCK:O,TK_END_BLOCK:N,TK_WORD:D,TK_RESERVED:D,TK_SEMICOLON:C,TK_STRING:L,TK_EQUALS:I,TK_OPERATOR:V,TK_COMMA:j,TK_BLOCK_COMMENT:P,TK_COMMENT:M,TK_DOT:B,TK_UNKNOWN:U,TK_EOF:W},r=r||{},et={},void 0!==r.braces_on_own_line&&(et.brace_style=r.braces_on_own_line?"expand":"collapse"),et.brace_style=r.brace_style?r.brace_style:et.brace_style?et.brace_style:"collapse","expand-strict"===et.brace_style&&(et.brace_style="expand"),et.indent_size=r.indent_size?parseInt(r.indent_size,10):4,et.indent_char=r.indent_char?r.indent_char:" ",et.eol=r.eol?r.eol:"\n",et.preserve_newlines=void 0===r.preserve_newlines||r.preserve_newlines,et.break_chained_methods=void 0!==r.break_chained_methods&&r.break_chained_methods,et.max_preserve_newlines=void 0===r.max_preserve_newlines?0:parseInt(r.max_preserve_newlines,10),et.space_in_paren=void 0!==r.space_in_paren&&r.space_in_paren,et.space_in_empty_paren=void 0!==r.space_in_empty_paren&&r.space_in_empty_paren,et.jslint_happy=void 0!==r.jslint_happy&&r.jslint_happy,et.space_after_anon_function=void 0!==r.space_after_anon_function&&r.space_after_anon_function,et.keep_array_indentation=void 0!==r.keep_array_indentation&&r.keep_array_indentation,et.space_before_conditional=void 0===r.space_before_conditional||r.space_before_conditional,et.unescape_strings=void 0!==r.unescape_strings&&r.unescape_strings,et.wrap_line_length=void 0===r.wrap_line_length?0:parseInt(r.wrap_line_length,10),et.e4x=void 0!==r.e4x&&r.e4x,et.end_with_newline=void 0!==r.end_with_newline&&r.end_with_newline,et.comma_first=void 0!==r.comma_first&&r.comma_first,et.test_output_raw=void 0!==r.test_output_raw&&r.test_output_raw,et.jslint_happy&&(et.space_after_anon_function=!0),r.indent_with_tabs&&(et.indent_char="\t",et.indent_size=1),et.eol=et.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),Y="";et.indent_size>0;)Y+=et.indent_char,et.indent_size-=1;var rt=0;if(i&&i.length){for(;" "===i.charAt(rt)||"\t"===i.charAt(rt);)it+=i.charAt(rt),rt+=1;i=i.substring(rt)}$="TK_START_BLOCK",Q="",z=new _(Y,it),z.raw=et.test_output_raw,Z=[],g(l.BlockStatement),this.beautify=function(){var t,e;for(X=new a(i,et,Y),nt=X.tokenize(),G=0;t=A();){for(var n=0;n<t.comments_before.length;n++)h(t.comments_before[n]);h(t),Q=q.last_text,$=t.type,q.last_text=t.text,G+=1}return e=z.get_code(),et.end_with_newline&&(e+="\n"),"\n"!=et.eol&&(e=e.replace(/[\n]/g,et.eol)),e}}function s(t){var e=0,n=-1,i=[],r=!0;this.set_indent=function(i){e=t.baseIndentLength+i*t.indent_length,n=i},this.get_character_count=function(){return e},this.is_empty=function(){return r},this.last=function(){return this._empty?null:i[i.length-1]},this.push=function(t){i.push(t),e+=t.length,r=!1},this.pop=function(){var t=null;return r||(t=i.pop(),e-=t.length,r=0===i.length),t},this.remove_indent=function(){n>0&&(n-=1,e-=t.indent_length)},this.trim=function(){for(;" "===this.last();){i.pop();e-=1}r=0===i.length},this.toString=function(){var e="";return this._empty||(n>=0&&(e=t.indent_cache[n]),e+=i.join("")),e}}function _(t,e){e=e||"",this.indent_cache=[e],this.baseIndentLength=e.length,this.indent_length=t.length,this.raw=!1;var n=[];this.baseIndentString=e,this.indent_string=t,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new s(this),n.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return n.length},this.add_new_line=function(t){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!t&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(){return n.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(t){if(n.length>1){for(;t>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(t),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(t){for(var e=0;e<t.newlines;e++)this.add_outputline();this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1},this.add_token=function(t){this.add_space_before_token(),this.current_line.push(t)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_redundant_indentation=function(t){if(!t.multiline_frame&&t.mode!==l.ForInitializer&&t.mode!==l.Conditional)for(var e=t.start_line_index,i=n.length;e<i;)n[e].remove_indent(),e++},this.trim=function(i){for(i=void 0!==i&&i,this.current_line.trim(t,e);i&&n.length>1&&this.current_line.is_empty();)n.pop(),this.current_line=n[n.length-1],this.current_line.trim();this.previous_line=n.length>1?n[n.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){if(this.just_added_newline()){if(1===n.length)return!0;return n[n.length-2].is_empty()}return!1}}function a(n,i,r){function s(t){if(!t.match(R))return null;var e={};m.lastIndex=0;for(var n=m.exec(t);n;)e[n[1]]=n[2],n=m.exec(t);return e}function _(){var r,_=[];if(f=0,d="",g>=x)return["","TK_EOF"];var R;R=E.length?E[E.length-1]:new h("TK_START_BLOCK","{");var m=n.charAt(g);for(g+=1;t(m,l);){if(o.newline.test(m)?"\n"===m&&"\r"===n.charAt(g-2)||(f+=1,_=[]):_.push(m),g>=x)return["","TK_EOF"];m=n.charAt(g),g+=1}if(_.length&&(d=_.join("")),c.test(m)){var A=!0,k=!0,S=c;for("0"===m&&g<x&&/[Xx]/.test(n.charAt(g))?(A=!1,k=!1,m+=n.charAt(g),g+=1,S=u):(m="",g-=1);g<x&&S.test(n.charAt(g));)m+=n.charAt(g),g+=1,A&&g<x&&"."===n.charAt(g)&&(m+=n.charAt(g),g+=1,A=!1),k&&g<x&&/[Ee]/.test(n.charAt(g))&&(m+=n.charAt(g),g+=1,g<x&&/[+-]/.test(n.charAt(g))&&(m+=n.charAt(g),g+=1),k=!1,A=!1);return[m,"TK_WORD"]}if(o.isIdentifierStart(n.charCodeAt(g-1))){if(g<x)for(;o.isIdentifierChar(n.charCodeAt(g))&&(m+=n.charAt(g),(g+=1)!==x););return"TK_DOT"===R.type||"TK_RESERVED"===R.type&&t(R.text,["set","get"])||!t(m,b)?[m,"TK_WORD"]:"in"===m?[m,"TK_OPERATOR"]:[m,"TK_RESERVED"]}if("("===m||"["===m)return[m,"TK_START_EXPR"];if(")"===m||"]"===m)return[m,"TK_END_EXPR"];if("{"===m)return[m,"TK_START_BLOCK"];if("}"===m)return[m,"TK_END_BLOCK"];if(";"===m)return[m,"TK_SEMICOLON"];if("/"===m){var O="";if("*"===n.charAt(g)){g+=1,K.lastIndex=g;var N=K.exec(n);O="/*"+N[0],g+=N[0].length;var D=s(O);return D&&"start"===D.ignore&&(y.lastIndex=g,N=y.exec(n),O+=N[0],g+=N[0].length),O=O.replace(o.lineBreak,"\n"),[O,"TK_BLOCK_COMMENT",D]}if("/"===n.charAt(g)){g+=1,w.lastIndex=g;var N=w.exec(n);return O="//"+N[0],g+=N[0].length,[O,"TK_COMMENT"]}}if("`"===m||"'"===m||'"'===m||("/"===m||i.e4x&&"<"===m&&n.slice(g-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===R.type&&t(R.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===R.type&&")"===R.text&&R.parent&&"TK_RESERVED"===R.parent.type&&t(R.parent.text,["if","while","for"])||t(R.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var C=m,L=!1,I=!1;if(r=m,"/"===C)for(var j=!1;g<x&&(L||j||n.charAt(g)!==C)&&!o.newline.test(n.charAt(g));)r+=n.charAt(g),L?L=!1:(L="\\"===n.charAt(g),"["===n.charAt(g)?j=!0:"]"===n.charAt(g)&&(j=!1)),g+=1;else if(i.e4x&&"<"===C){var V=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,P=n.slice(g-1),M=V.exec(P);if(M&&0===M.index){for(var B=M[2],U=0;M;){var W=!!M[1],z=M[2],G=!!M[M.length-1]||"![CDATA["===z.slice(0,8);if(z!==B||G||(W?--U:++U),U<=0)break;M=V.exec(P)}var X=M?M.index+M[0].length:P.length;return P=P.slice(0,X),g+=X-1,P=P.replace(o.lineBreak,"\n"),[P,"TK_STRING"]}}else for(;g<x&&(L||n.charAt(g)!==C&&("`"===C||!o.newline.test(n.charAt(g))));)(L||"`"===C)&&o.newline.test(n.charAt(g))?("\r"===n.charAt(g)&&"\n"===n.charAt(g+1)&&(g+=1),r+="\n"):r+=n.charAt(g),L?("x"!==n.charAt(g)&&"u"!==n.charAt(g)||(I=!0),L=!1):L="\\"===n.charAt(g),g+=1;if(I&&i.unescape_strings&&(r=a(r)),g<x&&n.charAt(g)===C&&(r+=C,g+=1,"/"===C))for(;g<x&&o.isIdentifierStart(n.charCodeAt(g));)r+=n.charAt(g),g+=1;return[r,"TK_STRING"]}if("#"===m){if(0===E.length&&"!"===n.charAt(g)){for(r=m;g<x&&"\n"!==m;)m=n.charAt(g),r+=m,g+=1;return[e(r)+"\n","TK_UNKNOWN"]}var F="#";if(g<x&&c.test(n.charAt(g))){do{m=n.charAt(g),F+=m,g+=1}while(g<x&&"#"!==m&&"="!==m);return"#"===m||("["===n.charAt(g)&&"]"===n.charAt(g+1)?(F+="[]",g+=2):"{"===n.charAt(g)&&"}"===n.charAt(g+1)&&(F+="{}",g+=2)),[F,"TK_WORD"]}}if("<"===m&&("?"===n.charAt(g)||"%"===n.charAt(g))){v.lastIndex=g-1;var $=v.exec(n);if($)return m=$[0],g+=m.length-1,m=m.replace(o.lineBreak,"\n"),[m,"TK_STRING"]}if("<"===m&&"\x3c!--"===n.substring(g-1,g+3)){for(g+=3,m="\x3c!--";!o.newline.test(n.charAt(g))&&g<x;)m+=n.charAt(g),g++;return T=!0,[m,"TK_COMMENT"]}if("-"===m&&T&&"--\x3e"===n.substring(g-1,g+2))return T=!1,g+=2,["--\x3e","TK_COMMENT"];if("."===m)return[m,"TK_DOT"];if(t(m,p)){for(;g<x&&t(m+n.charAt(g),p)&&(m+=n.charAt(g),!((g+=1)>=x)););return","===m?[m,"TK_COMMA"]:"="===m?[m,"TK_EQUALS"]:[m,"TK_OPERATOR"]}return[m,"TK_UNKNOWN"]}function a(t){for(var e,n=!1,i="",r=0,s="",_=0;n||r<t.length;)if(e=t.charAt(r),r++,n){if(n=!1,"x"===e)s=t.substr(r,2),r+=2;else{if("u"!==e){i+="\\"+e;continue}s=t.substr(r,4),r+=4}if(!s.match(/^[0123456789abcdefABCDEF]+$/))return t;if((_=parseInt(s,16))>=0&&_<32){i+="x"===e?"\\x"+s:"\\u"+s;continue}if(34===_||39===_||92===_)i+="\\"+String.fromCharCode(_);else{if("x"===e&&_>126&&_<=255)return t;i+=String.fromCharCode(_)}}else"\\"===e?n=!0:i+=e;return i}var l="\n\r\t ".split(""),c=/[0-9]/,u=/[0123456789abcdefABCDEF]/,p="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: => <%= <% %> <?= <? ?>".split(" ");this.line_starters="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var f,d,T,E,g,x,b=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),K=/([\s\S]*?)((?:\*\/)|$)/g,w=/([^\n\r\u2028\u2029]*)/g,R=/\/\* beautify( \w+[:]\w+)+ \*\//g,m=/ (\w+)[:](\w+)/g,y=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,v=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;this.tokenize=function(){x=n.length,g=0,T=!1,E=[];for(var t,e,i,r=null,s=[],a=[];!e||"TK_EOF"!==e.type;){for(i=_(),t=new h(i[1],i[0],f,d);"TK_COMMENT"===t.type||"TK_BLOCK_COMMENT"===t.type||"TK_UNKNOWN"===t.type;)"TK_BLOCK_COMMENT"===t.type&&(t.directives=i[2]),a.push(t),i=_(),t=new h(i[1],i[0],f,d);a.length&&(t.comments_before=a,a=[]),"TK_START_BLOCK"===t.type||"TK_START_EXPR"===t.type?(t.parent=e,s.push(r),r=t):("TK_END_BLOCK"===t.type||"TK_END_EXPR"===t.type)&&r&&("]"===t.text&&"["===r.text||")"===t.text&&"("===r.text||"}"===t.text&&"{"===r.text)&&(t.parent=r.parent,r=s.pop()),E.push(t),e=t}return E}}var o={};!function(t){var e="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",n=new RegExp("["+e+"]"),i=new RegExp("["+e+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=/\r\n|[\n\r\u2028\u2029]/g,t.isIdentifierStart=function(t){return t<65?36===t:t<91||(t<97?95===t:t<123||t>=170&&n.test(String.fromCharCode(t)))},t.isIdentifierChar=function(t){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||t>=170&&i.test(String.fromCharCode(t))))}}(o);var l={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"},h=function(t,e,n,i,r,s){this.type=t,this.text=e,this.comments_before=[],this.newlines=n||0,this.wanted_newline=n>0,this.whitespace_before=i||"",this.parent=null,this.directives=null};"function"==typeof define&&define.amd?define("beautify.js",[],function(){return{js_beautify:i}}):"undefined"!=typeof exports?exports.js_beautify=i:"undefined"!=typeof window?window.js_beautify=i:"undefined"!=typeof global&&(global.js_beautify=i)}(),function(){function t(t){return t.replace(/^\s+/g,"")}function e(t){return t.replace(/\s+$/g,"")}function n(n,i,r,s){function _(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=o,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:b,in_array:function(t,e){for(var n=0;n<e.length;n++)if(t===e[n])return!0;return!1}},this.is_whitespace=function(t){for(;0<t.length;t++)if(!this.Utils.in_array(t.charAt(0),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var t="";if(t=this.input.charAt(this.pos),this.Utils.in_array(t,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(t,this.Utils.whitespace);)f&&"\n"===t&&this.newlines<=d&&(this.newlines+=1),this.pos++,t=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(t){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,t),this.print_indentation(t)):(this.line_char_count++,t.push(" "))},this.get_content=function(){for(var t="",e=[];"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return e.length?e.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(e);else{if(T){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}t=this.input.charAt(this.pos),this.pos++,this.line_char_count++,e.push(t)}}return e.length?e.join(""):""},this.get_contents_to=function(t){if(this.pos===this.input.length)return["","TK_EOF"];var e="",n=new RegExp("</"+t+"\\s*>","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos<r&&(e=this.input.substring(this.pos,r),this.pos=r),e},this.record_tag=function(t){this.tags[t+"count"]?(this.tags[t+"count"]++,this.tags[t+this.tags[t+"count"]]=this.indent_level):(this.tags[t+"count"]=1,this.tags[t+this.tags[t+"count"]]=this.indent_level),this.tags[t+this.tags[t+"count"]+"parent"]=this.tags.parent,this.tags.parent=t+this.tags[t+"count"]},this.retrieve_tag=function(t){if(this.tags[t+"count"]){for(var e=this.tags.parent;e&&t+this.tags[t+"count"]!==e;)e=this.tags[e+"parent"];e&&(this.indent_level=this.tags[t+this.tags[t+"count"]],this.tags.parent=this.tags[e+"parent"]),delete this.tags[t+this.tags[t+"count"]+"parent"],delete this.tags[t+this.tags[t+"count"]],1===this.tags[t+"count"]?delete this.tags[t+"count"]:this.tags[t+"count"]--}},this.indent_to_tag=function(t){if(this.tags[t+"count"]){for(var e=this.tags.parent;e&&t+this.tags[t+"count"]!==e;)e=this.tags[e+"parent"];e&&(this.indent_level=this.tags[t+this.tags[t+"count"]])}},this.get_tag=function(t){var e,n,i="",r=[],s="",_=!1,a=!0,o=this.pos,l=this.line_char_count;t=void 0!==t&&t;do{if(this.pos>=this.input.length)return t&&(this.pos=o,this.line_char_count=l),r.length?r.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))_=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),_=!0),"="===i&&(_=!1),r.length&&"="!==r[r.length-1]&&">"!==i&&_){if(this.space_or_wrap(r),_=!1,!a&&"force"===E&&"/"!==i){this.print_newline(!0,r),this.print_indentation(r);for(var c=0;c<g;c++)r.push(h)}for(var u=0;u<r.length;u++)if(" "===r[u]){a=!1;break}}if(T&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),r.length&&" "!==r[r.length-1]&&"<"!==r[r.length-1]&&(i=" "+i),_=!0),"<"!==i||n||(e=this.pos-1,n="<"),T&&!n&&r.length>=2&&"{"===r[r.length-1]&&"{"===r[r.length-2]&&(e="#"===i||"/"===i||"!"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,r.push(i),r[1]&&("!"===r[1]||"?"===r[1]||"%"===r[1])){r=[this.get_comment(e)];break}if(T&&r[1]&&"{"===r[1]&&r[2]&&"!"===r[2]){r=[this.get_comment(e)];break}if(T&&"{"===n&&r.length>2&&"}"===r[r.length-2]&&"}"===r[r.length-1])break}}while(">"!==i);var f,d,x=r.join("");f=-1!==x.indexOf(" ")?x.indexOf(" "):"{"===x.charAt(0)?x.indexOf("}"):x.indexOf(">"),d="<"!==x.charAt(0)&&T?"#"===x.charAt(2)?3:2:1;var b=x.substring(d,f).toLowerCase();return"/"===x.charAt(x.length-2)||this.Utils.in_array(b,this.Utils.single_token)?t||(this.tag_type="SINGLE"):T&&"{"===x.charAt(0)&&"else"===b?t||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(b,p)?(s=this.get_unformatted("</"+b+">",x),r.push(s),this.pos-1,this.tag_type="SINGLE"):"script"===b&&(-1===x.search("type")||x.search("type")>-1&&x.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/)>-1)?t||(this.record_tag(b),this.tag_type="SCRIPT"):"style"===b&&(-1===x.search("type")||x.search("type")>-1&&x.search("text/css")>-1)?t||(this.record_tag(b),this.tag_type="STYLE"):"!"===b.charAt(0)?t||(this.tag_type="SINGLE",this.traverse_whitespace()):t||("/"===b.charAt(0)?(this.retrieve_tag(b.substring(1)),this.tag_type="END"):(this.record_tag(b),"html"!==b.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(r),this.Utils.in_array(b,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),t&&(this.pos=o,this.line_char_count=l),r.join("")},this.get_comment=function(t){var e="",n=">",i=!1;for(this.pos=t,input_char=this.input.charAt(this.pos),this.pos++;this.pos<=this.input.length&&(e+=input_char,e.charAt(e.length-1)!==n.charAt(n.length-1)||-1===e.indexOf(n));)!i&&e.length<10&&(0===e.indexOf("<![if")?(n="<![endif]>",i=!0):0===e.indexOf("<![cdata[")?(n="]]>",i=!0):0===e.indexOf("<![")?(n="]>",i=!0):0===e.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===e.indexOf("{{!")?(n="}}",i=!0):0===e.indexOf("<?")?(n="?>",i=!0):0===e.indexOf("<%")&&(n="%>",i=!0)),input_char=this.input.charAt(this.pos),this.pos++;return e},this.get_unformatted=function(t,e){
2
- if(e&&-1!==e.toLowerCase().indexOf(t))return"";var n="",i="",r=0,s=!0;do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,this.line_char_count++,s=!0,T&&"{"===n&&i.length&&"{"===i.charAt(i.length-2)&&(i+=this.get_unformatted("}}"),r=i.length)}while(-1===i.toLowerCase().indexOf(t,r));return i},this.get_token=function(){var t;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var e=this.last_token.substr(7);return t=this.get_contents_to(e),"string"!=typeof t?t:[t,"TK_"+e]}if("CONTENT"===this.current_mode)return t=this.get_content(),"string"!=typeof t?t:[t,"TK_CONTENT"];if("TAG"===this.current_mode){if("string"!=typeof(t=this.get_tag()))return t;return[t,"TK_TAG_"+this.tag_type]}},this.get_full_indent=function(t){return t=this.indent_level+t||0,t<1?"":Array(t+1).join(this.indent_string)},this.is_unformatted=function(t,e){if(!this.Utils.in_array(t,e))return!1;if("a"!==t.toLowerCase()||!this.Utils.in_array("a",e))return!0;var n=this.get_tag(!0),i=(n||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(i&&!this.Utils.in_array(i,e))},this.printer=function(n,i,r,s,_){this.input=n||"",this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n"),this.output=[],this.indent_character=i,this.indent_string="",this.indent_size=r,this.brace_style=_,this.indent_level=0,this.wrap_line_length=s,this.line_char_count=0;for(var a=0;a<this.indent_size;a++)this.indent_string+=this.indent_character;this.print_newline=function(t,n){this.line_char_count=0,n&&n.length&&(t||"\n"!==n[n.length-1])&&("\n"!==n[n.length-1]&&(n[n.length-1]=e(n[n.length-1])),n.push("\n"))},this.print_indentation=function(t){for(var e=0;e<this.indent_level;e++)t.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){this.is_whitespace(e)&&!this.output.length||((e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=t(e)),this.print_token_raw(e))},this.print_token_raw=function(t){this.newlines>0&&(t=e(t)),t&&""!==t&&(t.length>1&&"\n"===t.charAt(t.length-1)?(this.output.push(t.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(t));for(var n=0;n<this.newlines;n++)this.print_newline(n>0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}var a,o,l,h,c,u,p,f,d,T,E,g,x,b,K;for(i=i||{},void 0!==i.wrap_line_length&&0!==parseInt(i.wrap_line_length,10)||void 0===i.max_char||0===parseInt(i.max_char,10)||(i.wrap_line_length=i.max_char),o=void 0!==i.indent_inner_html&&i.indent_inner_html,l=void 0===i.indent_size?4:parseInt(i.indent_size,10),h=void 0===i.indent_char?" ":i.indent_char,u=void 0===i.brace_style?"collapse":i.brace_style,c=0===parseInt(i.wrap_line_length,10)?32786:parseInt(i.wrap_line_length||250,10),p=i.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],f=void 0===i.preserve_newlines||i.preserve_newlines,d=f?isNaN(parseInt(i.max_preserve_newlines,10))?32786:parseInt(i.max_preserve_newlines,10):0,T=void 0!==i.indent_handlebars&&i.indent_handlebars,E=void 0===i.wrap_attributes?"auto":i.wrap_attributes,g=void 0===i.wrap_attributes_indent_size?l:parseInt(i.wrap_attributes_indent_size,10)||l,x=void 0!==i.end_with_newline&&i.end_with_newline,b="object"==typeof i.extra_liners&&i.extra_liners?i.extra_liners.concat():"string"==typeof i.extra_liners?i.extra_liners.split(","):"head,body,/html".split(","),K=i.eol?i.eol:"\n",i.indent_with_tabs&&(h="\t",l=1),K=K.replace(/\\r/,"\r").replace(/\\n/,"\n"),a=new _,a.printer(n,h,l,c,u);;){var w=a.get_token();if(a.token_text=w[0],a.token_type=w[1],"TK_EOF"===a.token_type)break;switch(a.token_type){case"TK_TAG_START":a.print_newline(!1,a.output),a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===a.last_token&&""===a.last_text){var R=a.token_text.match(/\w+/)[0],m=null;a.output.length&&(m=a.output[a.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),(null===m||m[1]!==R&&!a.Utils.in_array(m[1],p))&&a.print_newline(!1,a.output)}a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var y=a.token_text.match(/^\s*<([a-z-]+)/i);y&&a.Utils.in_array(y[1],p)||a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":a.print_token(a.token_text),a.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==a.token_text){a.print_newline(!1,a.output);var v,A=a.token_text,k=1;"TK_SCRIPT"===a.token_type?v="function"==typeof r&&r:"TK_STYLE"===a.token_type&&(v="function"==typeof s&&s),"keep"===i.indent_scripts?k=0:"separate"===i.indent_scripts&&(k=-a.indent_level);var S=a.get_full_indent(k);if(v){var O=function(){this.eol="\n"};O.prototype=i;var N=new O;A=v(A.replace(/^\s*/,S),N)}else{var D=A.match(/^\s*/)[0],C=D.match(/[^\n\r]*$/)[0].split(a.indent_string).length-1,L=a.get_full_indent(k-C);A=A.replace(/^\s*/,S).replace(/\r\n|\r|\n/g,"\n"+L).replace(/\s+$/,"")}A&&(a.print_token_raw(A),a.print_newline(!0,a.output))}a.current_mode="TAG";break;default:""!==a.token_text&&a.print_token(a.token_text)}a.last_token=a.token_type,a.last_text=a.token_text}var I=a.output.join("").replace(/[\r\n\t ]+$/,"");return x&&(I+="\n"),"\n"!=K&&(I=I.replace(/[\n]/g,K)),I}if("function"==typeof define&&define.amd)define("beautify-html.js",["require","./beautify","./beautify-css"],function(t){var e=t("./beautify"),i=t("./beautify-css");return{html_beautify:function(t,r){return n(t,r,e.js_beautify,i.css_beautify)}}});else if("undefined"!=typeof exports){var i=require("./beautify.js"),r=require("./beautify-css.js");exports.html_beautify=function(t,e){return n(t,e,i.js_beautify,r.css_beautify)}}else"undefined"!=typeof window?window.html_beautify=function(t,e){return n(t,e,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(t,e){return n(t,e,global.js_beautify,global.css_beautify)})}(),function(t){"function"==typeof t.define&&(t.define("beautify",["beautify.js"],function(t){return t}),t.define("beautify-css",[],function(){return{css_beautify:void 0}}),t.define("beautifyModule",["beautify","beautify-html.js"],function(e,n){t.js_beautify=e.js_beautify,t.html_beautify=n.html_beautify}))}(this);
1
+ !function(){var e=function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t){var n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i=new RegExp("["+n+"]"),r=new RegExp("["+n+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|"+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g"),t.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||e>=170&&i.test(String.fromCharCode(e)))},t.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||e>=170&&r.test(String.fromCharCode(e))))}},function(e,t,n){function i(e,t){if(!t.multiline_frame&&t.mode!==T.ForInitializer&&t.mode!==T.Conditional){var n=t.start_line_index;e.remove_indent(n)}}function r(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}function s(e){return e.replace(/^\s+|\s+$/g,"")}function a(e){return e.replace(/^\s+/g,"")}function _(e){if(e=e||f.before_newline,!r(e,p))throw new Error("Invalid Option Value: The option 'operator_position' must be one of the following values\n"+p+"\nYou passed in: '"+e+"'");return e}function o(e,t){"use strict";function n(e,t){var n=0;return e&&(n=e.indentation_level,!Q.just_added_newline()&&e.line_indent_level>n&&(n=e.line_indent_level)),{mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:e?e.line_indent_level:n,start_line_index:Q.get_line_number(),ternary_depth:0}}function o(e,t){for(var n=e.newlines,i=ae.keep_array_indentation&&K(te.mode),r=q,s=0;s<e.comments_before.length;s++)q=e.comments_before[s],o(q,t),se[q.type](t);if(q=r,i)for(var a=0;a<n;a+=1)x(a>0,t);else if(ae.max_preserve_newlines&&n>ae.max_preserve_newlines&&(n=ae.max_preserve_newlines),ae.preserve_newlines&&e.newlines>1){x(!1,t);for(var _=1;_<n;_+=1)x(!0,t)}}function p(e){e=e.replace(c.allLineBreaks,"\n");for(var t=[],n=e.indexOf("\n");-1!==n;)t.push(e.substring(0,n)),e=e.substring(n+1),n=e.indexOf("\n");return e.length&&t.push(e),t}function E(e){if(e=void 0!==e&&e,!Q.just_added_newline()){var t=ae.preserve_newlines&&q.wanted_newline||e;if(r(te.last_text,Y.positionable_operators)||r(q.text,Y.positionable_operators)){var n=r(te.last_text,Y.positionable_operators)&&r(ae.operator_position,d)||r(q.text,Y.positionable_operators);t=t&&n}if(t)x(!1,!0);else if(ae.wrap_line_length){if("TK_RESERVED"===H&&r(te.last_text,ue))return;var i=Q.current_line.get_character_count()+q.text.length+(Q.space_before_token?1:0);i>=ae.wrap_line_length&&x(!1,!0)}}}function x(e,t){if(!t&&";"!==te.last_text&&","!==te.last_text&&"="!==te.last_text&&"TK_OPERATOR"!==H)for(var n=N(1);!(te.mode!==T.Statement||te.if_block&&n&&"TK_RESERVED"===n.type&&"else"===n.text||te.do_block);)k();Q.add_new_line(e)&&(te.multiline_frame=!0)}function m(){Q.just_added_newline()&&(ae.keep_array_indentation&&K(te.mode)&&q.wanted_newline?(Q.current_line.push(q.whitespace_before),Q.space_before_token=!1):Q.set_indent(te.indentation_level)&&(te.line_indent_level=te.indentation_level))}function g(e){if(Q.raw)return void Q.add_raw_token(q);if(ae.comma_first&&"TK_COMMA"===H&&Q.just_added_newline()&&","===Q.previous_line.last()){var t=Q.previous_line.pop();Q.previous_line.is_empty()&&(Q.previous_line.push(t),Q.trim(!0),Q.current_line.pop(),Q.trim()),m(),Q.add_token(","),Q.space_before_token=!0}e=e||q.text,m(),Q.add_token(e)}function b(){te.indentation_level+=1}function v(){te.indentation_level>0&&(!te.parent||te.indentation_level>te.parent.indentation_level)&&(te.indentation_level-=1)}function w(e){te?(ie.push(te),ne=te):ne=n(null,e),te=n(ne,e)}function K(e){return e===T.ArrayLiteral}function R(e){return r(e,[T.Expression,T.ForInitializer,T.Conditional])}function k(){ie.length>0&&(ne=te,te=ie.pop(),ne.mode!==T.Statement||ae.unindent_chained_methods||i(Q,ne))}function y(){return te.parent.mode===T.ObjectLiteral&&te.mode===T.Statement&&(":"===te.last_text&&0===te.ternary_depth||"TK_RESERVED"===H&&r(te.last_text,["get","set"]))}function O(){return!!("TK_RESERVED"===H&&r(te.last_text,["var","let","const"])&&"TK_WORD"===q.type||"TK_RESERVED"===H&&"do"===te.last_text||"TK_RESERVED"===H&&r(te.last_text,ue)&&!q.wanted_newline||"TK_RESERVED"===H&&"else"===te.last_text&&("TK_RESERVED"!==q.type||"if"!==q.text||q.comments_before.length)||"TK_END_EXPR"===H&&(ne.mode===T.ForInitializer||ne.mode===T.Conditional)||"TK_WORD"===H&&te.mode===T.BlockStatement&&!te.in_case&&"--"!==q.text&&"++"!==q.text&&"function"!==J&&"TK_WORD"!==q.type&&"TK_RESERVED"!==q.type||te.mode===T.ObjectLiteral&&(":"===te.last_text&&0===te.ternary_depth||"TK_RESERVED"===H&&r(te.last_text,["get","set"])))&&(w(T.Statement),ae.unindent_chained_methods||b(),o(q,!0),y()||E("TK_RESERVED"===q.type&&r(q.text,["do","for","if","while"])),!0)}function S(e,t){for(var n=0;n<e.length;n++){if(s(e[n]).charAt(0)!==t)return!1}return!0}function A(e,t){for(var n,i=0,r=e.length;i<r;i++)if((n=e[i])&&0!==n.indexOf(t))return!1;return!0}function C(e){return r(e,["case","return","do","if","throw","else"])}function N(e){var t=Z+(e||0);return t<0||t>=_e.length?null:_e[t]}function D(){O()||o(q);var e=T.Expression;if("["===q.text){if("TK_WORD"===H||")"===te.last_text)return"TK_RESERVED"===H&&r(te.last_text,Y.line_starters)&&(Q.space_before_token=!0),w(e),g(),b(),void(ae.space_in_paren&&(Q.space_before_token=!0));e=T.ArrayLiteral,K(te.mode)&&("["!==te.last_text&&(","!==te.last_text||"]"!==J&&"}"!==J)||ae.keep_array_indentation||x())}else"TK_RESERVED"===H&&"for"===te.last_text?e=T.ForInitializer:"TK_RESERVED"===H&&r(te.last_text,["if","while"])&&(e=T.Conditional);";"===te.last_text||"TK_START_BLOCK"===H?x():"TK_END_EXPR"===H||"TK_START_EXPR"===H||"TK_END_BLOCK"===H||"."===te.last_text?E(q.wanted_newline):"TK_RESERVED"===H&&"("===q.text||"TK_WORD"===H||"TK_OPERATOR"===H?"TK_RESERVED"===H&&("function"===te.last_word||"typeof"===te.last_word)||"*"===te.last_text&&(r(J,["function","yield"])||te.mode===T.ObjectLiteral&&r(J,["{",","]))?ae.space_after_anon_function&&(Q.space_before_token=!0):"TK_RESERVED"!==H||!r(te.last_text,Y.line_starters)&&"catch"!==te.last_text||ae.space_before_conditional&&(Q.space_before_token=!0):Q.space_before_token=!0,"("===q.text&&"TK_RESERVED"===H&&r(te.last_word,["await","async"])&&(Q.space_before_token=!0),"("===q.text&&("TK_EQUALS"!==H&&"TK_OPERATOR"!==H||y()||E()),"("===q.text&&"TK_WORD"!==H&&"TK_RESERVED"!==H&&E(),w(e),g(),ae.space_in_paren&&(Q.space_before_token=!0),b()}function L(){for(;te.mode===T.Statement;)k();o(q),te.multiline_frame&&E("]"===q.text&&K(te.mode)&&!ae.keep_array_indentation),ae.space_in_paren&&("TK_START_EXPR"!==H||ae.space_in_empty_paren?Q.space_before_token=!0:(Q.trim(),Q.space_before_token=!1)),"]"===q.text&&ae.keep_array_indentation?(g(),k()):(k(),g()),i(Q,ne),te.do_while&&ne.mode===T.Conditional&&(ne.mode=T.Expression,te.do_block=!1,te.do_while=!1)}function j(){o(q);var e=N(1),t=N(2);w(t&&(r(t.text,[":",","])&&r(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||r(e.text,["get","set","..."])&&r(t.type,["TK_WORD","TK_RESERVED"]))?r(J,["class","interface"])?T.BlockStatement:T.ObjectLiteral:"TK_OPERATOR"===H&&"=>"===te.last_text?T.BlockStatement:r(H,["TK_EQUALS","TK_START_EXPR","TK_COMMA","TK_OPERATOR"])||"TK_RESERVED"===H&&r(te.last_text,["return","throw","import","default"])?T.ObjectLiteral:T.BlockStatement);var n=!e.comments_before.length&&"}"===e.text,i=n&&"function"===te.last_word&&"TK_END_EXPR"===H;if(ae.brace_preserve_inline){var s=0,a=null;te.inline_frame=!0;do{if(s+=1,a=N(s),a.wanted_newline){te.inline_frame=!1;break}}while("TK_EOF"!==a.type&&("TK_END_BLOCK"!==a.type||a.opened!==q))}("expand"===ae.brace_style||"none"===ae.brace_style&&q.wanted_newline)&&!te.inline_frame?"TK_OPERATOR"!==H&&(i||"TK_EQUALS"===H||"TK_RESERVED"===H&&C(te.last_text)&&"else"!==te.last_text)?Q.space_before_token=!0:x(!1,!0):(!K(ne.mode)||"TK_START_EXPR"!==H&&"TK_COMMA"!==H||(("TK_COMMA"===H||ae.space_in_paren)&&(Q.space_before_token=!0),("TK_COMMA"===H||"TK_START_EXPR"===H&&te.inline_frame)&&(E(),ne.multiline_frame=ne.multiline_frame||te.multiline_frame,te.multiline_frame=!1)),"TK_OPERATOR"!==H&&"TK_START_EXPR"!==H&&("TK_START_BLOCK"!==H||te.inline_frame?Q.space_before_token=!0:x())),g(),b()}function I(){for(o(q);te.mode===T.Statement;)k();var e="TK_START_BLOCK"===H;te.inline_frame&&!e?Q.space_before_token=!0:"expand"===ae.brace_style?e||x():e||(K(te.mode)&&ae.keep_array_indentation?(ae.keep_array_indentation=!1,x(),ae.keep_array_indentation=!0):x()),k(),g()}function B(){if("TK_RESERVED"===q.type)if(r(q.text,["set","get"])&&te.mode!==T.ObjectLiteral)q.type="TK_WORD";else if(r(q.text,["as","from"])&&!te.import_block)q.type="TK_WORD";else if(te.mode===T.ObjectLiteral){var e=N(1);":"===e.text&&(q.type="TK_WORD")}if(O()?"TK_RESERVED"===H&&r(te.last_text,["var","let","const"])&&"TK_WORD"===q.type&&(te.declaration_statement=!0):!q.wanted_newline||R(te.mode)||"TK_OPERATOR"===H&&"--"!==te.last_text&&"++"!==te.last_text||"TK_EQUALS"===H||!ae.preserve_newlines&&"TK_RESERVED"===H&&r(te.last_text,["var","let","const","set","get"])?o(q):(o(q),x()),te.do_block&&!te.do_while){if("TK_RESERVED"===q.type&&"while"===q.text)return Q.space_before_token=!0,g(),Q.space_before_token=!0,void(te.do_while=!0);x(),te.do_block=!1}if(te.if_block)if(te.else_block||"TK_RESERVED"!==q.type||"else"!==q.text){for(;te.mode===T.Statement;)k();te.if_block=!1,te.else_block=!1}else te.else_block=!0;if("TK_RESERVED"===q.type&&("case"===q.text||"default"===q.text&&te.in_case_statement))return x(),(te.case_body||ae.jslint_happy)&&(v(),te.case_body=!1),g(),te.in_case=!0,void(te.in_case_statement=!0);if("TK_COMMA"!==H&&"TK_START_EXPR"!==H&&"TK_EQUALS"!==H&&"TK_OPERATOR"!==H||y()||E(),"TK_RESERVED"===q.type&&"function"===q.text)return(r(te.last_text,["}",";"])||Q.just_added_newline()&&!r(te.last_text,["(","[","{",":","=",","])&&"TK_OPERATOR"!==H)&&(Q.just_added_blankline()||q.comments_before.length||(x(),x(!0))),"TK_RESERVED"===H||"TK_WORD"===H?"TK_RESERVED"===H&&(r(te.last_text,["get","set","new","export","async"])||r(te.last_text,ue))?Q.space_before_token=!0:"TK_RESERVED"===H&&"default"===te.last_text&&"export"===J?Q.space_before_token=!0:x():"TK_OPERATOR"===H||"="===te.last_text?Q.space_before_token=!0:(te.multiline_frame||!R(te.mode)&&!K(te.mode))&&x(),g(),void(te.last_word=q.text);if(re="NONE","TK_END_BLOCK"===H?ne.inline_frame?re="SPACE":"TK_RESERVED"===q.type&&r(q.text,["else","catch","finally","from"])?"expand"===ae.brace_style||"end-expand"===ae.brace_style||"none"===ae.brace_style&&q.wanted_newline?re="NEWLINE":(re="SPACE",Q.space_before_token=!0):re="NEWLINE":"TK_SEMICOLON"===H&&te.mode===T.BlockStatement?re="NEWLINE":"TK_SEMICOLON"===H&&R(te.mode)?re="SPACE":"TK_STRING"===H?re="NEWLINE":"TK_RESERVED"===H||"TK_WORD"===H||"*"===te.last_text&&(r(J,["function","yield"])||te.mode===T.ObjectLiteral&&r(J,["{",","]))?re="SPACE":"TK_START_BLOCK"===H?re=te.inline_frame?"SPACE":"NEWLINE":"TK_END_EXPR"===H&&(Q.space_before_token=!0,re="NEWLINE"),"TK_RESERVED"===q.type&&r(q.text,Y.line_starters)&&")"!==te.last_text&&(re=te.inline_frame||"else"===te.last_text||"export"===te.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===q.type&&r(q.text,["else","catch","finally"]))if(("TK_END_BLOCK"!==H||ne.mode!==T.BlockStatement||"expand"===ae.brace_style||"end-expand"===ae.brace_style||"none"===ae.brace_style&&q.wanted_newline)&&!te.inline_frame)x();else{Q.trim(!0);var t=Q.current_line;"}"!==t.last()&&x(),Q.space_before_token=!0}else"NEWLINE"===re?"TK_RESERVED"===H&&C(te.last_text)?Q.space_before_token=!0:"TK_END_EXPR"!==H?"TK_START_EXPR"===H&&"TK_RESERVED"===q.type&&r(q.text,["var","let","const"])||":"===te.last_text||("TK_RESERVED"===q.type&&"if"===q.text&&"else"===te.last_text?Q.space_before_token=!0:x()):"TK_RESERVED"===q.type&&r(q.text,Y.line_starters)&&")"!==te.last_text&&x():te.multiline_frame&&K(te.mode)&&","===te.last_text&&"}"===J?x():"SPACE"===re&&(Q.space_before_token=!0);g(),te.last_word=q.text,"TK_RESERVED"===q.type&&("do"===q.text?te.do_block=!0:"if"===q.text?te.if_block=!0:"import"===q.text?te.import_block=!0:te.import_block&&"TK_RESERVED"===q.type&&"from"===q.text&&(te.import_block=!1))}function P(){O()?Q.space_before_token=!1:o(q);for(var e=N(1);!(te.mode!==T.Statement||te.if_block&&e&&"TK_RESERVED"===e.type&&"else"===e.text||te.do_block);)k();te.import_block&&(te.import_block=!1),g()}function M(){O()?Q.space_before_token=!0:(o(q),"TK_RESERVED"===H||"TK_WORD"===H||te.inline_frame?Q.space_before_token=!0:"TK_COMMA"===H||"TK_START_EXPR"===H||"TK_EQUALS"===H||"TK_OPERATOR"===H?y()||E():x()),g()}function V(){O()||o(q),te.declaration_statement&&(te.declaration_assignment=!0),Q.space_before_token=!0,g(),Q.space_before_token=!0}function U(){o(q,!0),g(),Q.space_before_token=!0,te.declaration_statement?(R(te.parent.mode)&&(te.declaration_assignment=!1),te.declaration_assignment?(te.declaration_assignment=!1,x(!1,!0)):ae.comma_first&&E()):te.mode===T.ObjectLiteral||te.mode===T.Statement&&te.parent.mode===T.ObjectLiteral?(te.mode===T.Statement&&k(),te.inline_frame||x()):ae.comma_first&&E()}function W(){var e="*"===q.text&&("TK_RESERVED"===H&&r(te.last_text,["function","yield"])||r(H,["TK_START_BLOCK","TK_COMMA","TK_END_BLOCK","TK_SEMICOLON"])),t=r(q.text,["-","+"])&&(r(H,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||r(te.last_text,Y.line_starters)||","===te.last_text);if(O());else{o(q,!e)}if("TK_RESERVED"===H&&C(te.last_text))return Q.space_before_token=!0,void g();if("*"===q.text&&"TK_DOT"===H)return void g();if("::"===q.text)return void g();if("TK_OPERATOR"===H&&r(ae.operator_position,d)&&E(),":"===q.text&&te.in_case)return te.case_body=!0,b(),g(),x(),void(te.in_case=!1);var n=!0,i=!0,s=!1;if(":"===q.text?0===te.ternary_depth?n=!1:(te.ternary_depth-=1,s=!0):"?"===q.text&&(te.ternary_depth+=1),!t&&!e&&ae.preserve_newlines&&r(q.text,Y.positionable_operators)){var a=":"===q.text,_=a&&s,l=a&&!s;switch(ae.operator_position){case f.before_newline:return Q.space_before_token=!l,g(),a&&!_||E(),void(Q.space_before_token=!0);case f.after_newline:return Q.space_before_token=!0,!a||_?N(1).wanted_newline?x(!1,!0):E():Q.space_before_token=!1,g(),void(Q.space_before_token=!0);case f.preserve_newline:return l||E(),n=!(Q.just_added_newline()||l),Q.space_before_token=n,g(),void(Q.space_before_token=!0)}}if(e){E(),n=!1;var c=N(1);i=c&&r(c.type,["TK_WORD","TK_RESERVED"])}else"..."===q.text?(E(),n="TK_START_BLOCK"===H,i=!1):(r(q.text,["--","++","!","~"])||t)&&(n=!1,i=!1,!q.wanted_newline||"--"!==q.text&&"++"!==q.text||x(!1,!0),";"===te.last_text&&R(te.mode)&&(n=!0),"TK_RESERVED"===H?n=!0:"TK_END_EXPR"===H?n=!("]"===te.last_text&&("--"===q.text||"++"===q.text)):"TK_OPERATOR"===H&&(n=r(q.text,["--","-","++","+"])&&r(te.last_text,["--","-","++","+"]),r(q.text,["+","-"])&&r(te.last_text,["--","++"])&&(i=!0)),(te.mode!==T.BlockStatement||te.inline_frame)&&te.mode!==T.Statement||"{"!==te.last_text&&";"!==te.last_text||x());Q.space_before_token=Q.space_before_token||n,g(),Q.space_before_token=i}function z(e){if(Q.raw)return Q.add_raw_token(q),void(q.directives&&"end"===q.directives.preserve&&(Q.raw=ae.test_output_raw));if(q.directives)return x(!1,e),g(),"start"===q.directives.preserve&&(Q.raw=!0),void x(!1,!0);if(!c.newline.test(q.text)&&!q.wanted_newline)return Q.space_before_token=!0,g(),void(Q.space_before_token=!0);var t,n=p(q.text),i=!1,r=!1,s=q.whitespace_before,_=s.length;for(x(!1,e),n.length>1&&(i=S(n.slice(1),"*"),r=A(n.slice(1),s)),g(n[0]),t=1;t<n.length;t++)x(!1,!0),i?g(" "+a(n[t])):r&&n[t].length>_?g(n[t].substring(_)):Q.add_token(n[t]);x(!1,e)}function X(e){q.wanted_newline?x(!1,e):Q.trim(!0),Q.space_before_token=!0,g(),x(!1,e)}function G(){O()||o(q,!0),"TK_RESERVED"===H&&C(te.last_text)?Q.space_before_token=!0:E(")"===te.last_text&&ae.break_chained_methods),g()}function F(e){g(),"\n"===q.text[q.text.length-1]&&x(!1,e)}function $(){for(;te.mode===T.Statement;)k();o(q)}var Q,Z,Y,q,H,J,ee,te,ne,ie,re,se,ae,_e=[],oe="";se={TK_START_EXPR:D,TK_END_EXPR:L,TK_START_BLOCK:j,TK_END_BLOCK:I,TK_WORD:B,TK_RESERVED:B,TK_SEMICOLON:P,TK_STRING:M,TK_EQUALS:V,TK_OPERATOR:W,TK_COMMA:U,TK_BLOCK_COMMENT:z,TK_COMMENT:X,TK_DOT:G,TK_UNKNOWN:F,TK_EOF:$},t=t||{},t=l(t,"js"),ae={},"expand-strict"===t.brace_style?t.brace_style="expand":"collapse-preserve-inline"===t.brace_style?t.brace_style="collapse,preserve-inline":void 0!==t.braces_on_own_line?t.brace_style=t.braces_on_own_line?"expand":"collapse":t.brace_style||(t.brace_style="collapse");var le=t.brace_style.split(/[^a-zA-Z0-9_\-]+/);ae.brace_preserve_inline=!1,ae.brace_style="collapse";for(var ce=0;ce<le.length;ce++)"preserve-inline"===le[ce]?ae.brace_preserve_inline=!0:ae.brace_style=le[ce];for(ae.indent_size=t.indent_size?parseInt(t.indent_size,10):4,ae.indent_char=t.indent_char?t.indent_char:" ",ae.eol=t.eol?t.eol:"auto",ae.preserve_newlines=void 0===t.preserve_newlines||t.preserve_newlines,ae.unindent_chained_methods=void 0!==t.unindent_chained_methods&&t.unindent_chained_methods,ae.break_chained_methods=void 0!==t.break_chained_methods&&t.break_chained_methods,ae.max_preserve_newlines=void 0===t.max_preserve_newlines?0:parseInt(t.max_preserve_newlines,10),ae.space_in_paren=void 0!==t.space_in_paren&&t.space_in_paren,ae.space_in_empty_paren=void 0!==t.space_in_empty_paren&&t.space_in_empty_paren,ae.jslint_happy=void 0!==t.jslint_happy&&t.jslint_happy,ae.space_after_anon_function=void 0!==t.space_after_anon_function&&t.space_after_anon_function,ae.keep_array_indentation=void 0!==t.keep_array_indentation&&t.keep_array_indentation,ae.space_before_conditional=void 0===t.space_before_conditional||t.space_before_conditional,ae.unescape_strings=void 0!==t.unescape_strings&&t.unescape_strings,ae.wrap_line_length=void 0===t.wrap_line_length?0:parseInt(t.wrap_line_length,10),ae.e4x=void 0!==t.e4x&&t.e4x,ae.end_with_newline=void 0!==t.end_with_newline&&t.end_with_newline,ae.comma_first=void 0!==t.comma_first&&t.comma_first,ae.operator_position=_(t.operator_position),ae.test_output_raw=void 0!==t.test_output_raw&&t.test_output_raw,ae.jslint_happy&&(ae.space_after_anon_function=!0),t.indent_with_tabs&&(ae.indent_char="\t",ae.indent_size=1),"auto"===ae.eol&&(ae.eol="\n",e&&c.lineBreak.test(e||"")&&(ae.eol=e.match(c.lineBreak)[0])),ae.eol=ae.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),ee="";ae.indent_size>0;)ee+=ae.indent_char,ae.indent_size-=1;var he=0;if(e&&e.length){for(;" "===e.charAt(he)||"\t"===e.charAt(he);)he+=1;oe=e.substring(0,he),e=e.substring(he)}H="TK_START_BLOCK",J="",Q=new h(ee,oe),Q.raw=ae.test_output_raw,ie=[],w(T.BlockStatement),this.beautify=function(){for(Y=new u(e,ae,ee),_e=Y.tokenize(),Z=0,q=N();q;)se[q.type](),J=te.last_text,H=q.type,te.last_text=q.text,Z+=1,q=N();return Q.get_code(ae.end_with_newline,ae.eol)};var ue=["break","continue","return","throw","yield"]}var l=n(3).mergeOpts,c=n(0),h=n(4).Output,u=n(7).Tokenizer,p=["before-newline","after-newline","preserve-newline"],f=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].replace(/-/g,"_")]=e[n];return t}(p),d=[f.before_newline,f.preserve_newline],T={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};e.exports.Beautifier=o},function(e,t){function n(e){var t=e,n=t.length,i=0;this.back=function(){i-=1},this.hasNext=function(){return i<n},this.next=function(){var e=null;return this.hasNext()&&(e=t.charAt(i),i+=1),e},this.peek=function(e){var r=null;return e=e||0,e+=i,e>=0&&e<n&&(r=t.charAt(e)),r},this.peekCharCode=function(e){var r=0;return e=e||0,e+=i,e>=0&&e<n&&(r=t.charCodeAt(e)),r},this.test=function(e,n){return n=n||0,e.lastIndex=i+n,e.test(t)},this.testChar=function(e,t){var n=this.peek(t);return null!==n&&e.test(n)},this.match=function(e){e.lastIndex=i;var n=e.exec(t);return n&&n.index===i?i+=n[0].length:n=null,n}}e.exports.InputScanner=n},function(e,t){function n(e,t){var n,i={};for(n in e)n!==t&&(i[n]=e[n]);if(t in e)for(n in e[t])i[n]=e[t][n];return i}e.exports.mergeOpts=n},function(e,t){function n(e){var t=0,n=-1,i=[],r=!0;this.set_indent=function(i){t=e.baseIndentLength+i*e.indent_length,n=i},this.get_character_count=function(){return t},this.is_empty=function(){return r},this.last=function(){return this._empty?null:i[i.length-1]},this.push=function(e){i.push(e),t+=e.length,r=!1},this.pop=function(){var e=null;return r||(e=i.pop(),t-=e.length,r=0===i.length),e},this.remove_indent=function(){n>0&&(n-=1,t-=e.indent_length)},this.trim=function(){for(;" "===this.last();)i.pop(),t-=1;r=0===i.length},this.toString=function(){var t="";return this._empty||(n>=0&&(t=e.indent_cache[n]),t+=i.join("")),t}}function i(e,t){t=t||"",this.indent_cache=[t],this.baseIndentLength=t.length,this.indent_length=e.length,this.raw=!1;var i=[];this.baseIndentString=t,this.indent_string=e,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new n(this),i.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return i.length},this.add_new_line=function(e){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!e&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(e,t){var n=i.join("\n").replace(/[\r\n\t ]+$/,"");return e&&(n+="\n"),"\n"!==t&&(n=n.replace(/[\n]/g,t)),n},this.set_indent=function(e){if(i.length>1){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.add_outputline();this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1},this.add_token=function(e){this.add_space_before_token(),this.current_line.push(e)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_indent=function(e){for(var t=i.length;e<t;)i[e].remove_indent(),e++},this.trim=function(n){for(n=void 0!==n&&n,this.current_line.trim(e,t);n&&i.length>1&&this.current_line.is_empty();)i.pop(),this.current_line=i[i.length-1],this.current_line.trim();this.previous_line=i.length>1?i[i.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){if(this.just_added_newline()){if(1===i.length)return!0;return i[i.length-2].is_empty()}return!1}}e.exports.Output=i},function(e,t){function n(e,t,n,i,r){this.type=e,this.text=t,this.comments_before=[],this.comments_after=[],this.newlines=n||0,this.wanted_newline=n>0,this.whitespace_before=i||"",this.parent=r||null,this.opened=null,this.directives=null}e.exports.Token=n},function(e,t,n){function i(e,t){return new r(e,t).beautify()}var r=n(1).Beautifier;e.exports=i},function(e,t,n){function i(e){return e.replace(/^\s+|\s+$/g,"")}function r(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}function s(e,t){function n(e){if(!e.match(K))return null;var t={};R.lastIndex=0;for(var n=R.exec(e);n;)t[n[1]]=n[2],n=R.exec(e);return t}function s(){var e,s=[];T=0,E="";var a=g.next();if(null===a)return["","TK_EOF"];var K;for(K=m.length?m[m.length-1]:new _("TK_START_BLOCK","{");r(a,c);)if(o.newline.test(a)?"\n"===a&&"\r"===g.peek(-2)||(T+=1,s=[]):s.push(a),null===(a=g.next()))return["","TK_EOF"];if(s.length&&(E=s.join("")),h.test(a)||"."===a&&g.testChar(h)){var R=!0,O=!0,S=h;for("0"===a&&g.testChar(/[XxOoBb]/)?(R=!1,O=!1,S=g.testChar(/[Bb]/)?u:g.testChar(/[Oo]/)?p:f,a+=g.next()):"."===a?R=!1:(a="",g.back());g.testChar(S);)a+=g.next(),R&&"."===g.peek()&&(a+=g.next(),R=!1),O&&g.testChar(/[Ee]/)&&(a+=g.next(),g.testChar(/[+-]/)&&(a+=g.next()),O=!1,R=!1);return[a,"TK_WORD"]}if(o.isIdentifierStart(g.peekCharCode(-1))){if(g.hasNext())for(;o.isIdentifierChar(g.peekCharCode())&&(a+=g.next(),g.hasNext()););return"TK_DOT"===K.type||"TK_RESERVED"===K.type&&r(K.text,["set","get"])||!r(a,b)?[a,"TK_WORD"]:"in"===a||"of"===a?[a,"TK_OPERATOR"]:[a,"TK_RESERVED"]}if("("===a||"["===a)return[a,"TK_START_EXPR"];if(")"===a||"]"===a)return[a,"TK_END_EXPR"];if("{"===a)return[a,"TK_START_BLOCK"];if("}"===a)return[a,"TK_END_BLOCK"];if(";"===a)return[a,"TK_SEMICOLON"];if("/"===a){var A,C="";if("*"===g.peek()){g.next(),A=g.match(v),C="/*"+A[0];var N=n(C);return N&&"start"===N.ignore&&(A=g.match(k),C+=A[0]),C=C.replace(o.allLineBreaks,"\n"),[C,"TK_BLOCK_COMMENT",N]}if("/"===g.peek())return g.next(),A=g.match(w),C="//"+A[0],[C,"TK_COMMENT"]}var D=/<()([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g;if("`"===a||"'"===a||'"'===a||("/"===a||t.e4x&&"<"===a&&g.test(D,-1))&&("TK_RESERVED"===K.type&&r(K.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===K.type&&")"===K.text&&K.parent&&"TK_RESERVED"===K.parent.type&&r(K.parent.text,["if","while","for"])||r(K.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var L=a,j=!1,I=!1;if(e=a,"/"===L)for(var B=!1;g.hasNext()&&(j||B||g.peek()!==L)&&!g.testChar(o.newline);)e+=g.peek(),j?j=!1:(j="\\"===g.peek(),"["===g.peek()?B=!0:"]"===g.peek()&&(B=!1)),g.next();else if(t.e4x&&"<"===L){var P=/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g;g.back();var M="",V=g.match(D);if(V){for(var U=V[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=0===U.indexOf("{"),z=0;V;){var X=!!V[1],G=V[2],F=!!V[V.length-1]||"![CDATA["===G.slice(0,8);if(!F&&(G===U||W&&G.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(X?--z:++z),M+=V[0],z<=0)break;V=g.match(P)}return V||(M+=g.match(/[\s\S]*/g)[0]),M=M.replace(o.allLineBreaks,"\n"),[M,"TK_STRING"]}}else{var $=function(t,n,i){for(var r;g.hasNext()&&(r=g.peek(),j||r!==t&&(n||!o.newline.test(r)));)(j||n)&&o.newline.test(r)?("\r"===r&&"\n"===g.peek(1)&&(g.next(),r=g.peek()),e+="\n"):e+=r,j?("x"!==r&&"u"!==r||(I=!0),j=!1):j="\\"===r,g.next(),i&&-1!==e.indexOf(i,e.length-i.length)&&("`"===t?$("}",n,"`"):$("`",n,"${"),g.hasNext()&&(e+=g.next()))};"`"===L?$("`",!0,"${"):$(L)}if(I&&t.unescape_strings&&(e=l(e)),g.peek()===L&&(e+=L,g.next(),"/"===L))for(;g.hasNext()&&o.isIdentifierStart(g.peekCharCode());)e+=g.next();return[e,"TK_STRING"]}if("#"===a){if(0===m.length&&"!"===g.peek()){for(e=a;g.hasNext()&&"\n"!==a;)a=g.next(),e+=a;return[i(e)+"\n","TK_UNKNOWN"]}var Q="#";if(g.hasNext()&&g.testChar(h)){do{a=g.next(),Q+=a}while(g.hasNext()&&"#"!==a&&"="!==a);return"#"===a||("["===g.peek()&&"]"===g.peek(1)?(Q+="[]",g.next(),g.next()):"{"===g.peek()&&"}"===g.peek(1)&&(Q+="{}",g.next(),g.next())),[Q,"TK_WORD"]}}if("<"===a&&("?"===g.peek()||"%"===g.peek())){g.back();var Z=g.match(y);if(Z)return a=Z[0],a=a.replace(o.allLineBreaks,"\n"),[a,"TK_STRING"]}if("<"===a&&g.match(/\!--/g)){for(a="\x3c!--";g.hasNext()&&!g.testChar(o.newline);)a+=g.next();return x=!0,[a,"TK_COMMENT"]}if("-"===a&&x&&g.match(/->/g))return x=!1,["--\x3e","TK_COMMENT"];if("."===a)return"."===g.peek()&&"."===g.peek(1)?(a+=g.next()+g.next(),[a,"TK_OPERATOR"]):[a,"TK_DOT"];if(r(a,d)){for(;g.hasNext()&&r(a+g.peek(),d)&&(a+=g.next(),g.hasNext()););return","===a?[a,"TK_COMMA"]:"="===a?[a,"TK_EQUALS"]:[a,"TK_OPERATOR"]}return[a,"TK_UNKNOWN"]}function l(e){for(var t="",n=0,i=new a(e),r=null;i.hasNext();)if(r=i.match(/([\s]|[^\\]|\\\\)+/g),r&&(t+=r[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())r=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){t+="\\",i.hasNext()&&(t+=i.next());continue}r=i.match(/u([0-9A-Fa-f]{4})/g)}if(!r)return e;if((n=parseInt(r[1],16))>126&&n<=255&&0===r[0].indexOf("x"))return e;if(n>=0&&n<32){t+="\\"+r[0];continue}t+=34===n||39===n||92===n?"\\"+String.fromCharCode(n):String.fromCharCode(n)}return t}var c="\n\r\t ".split(""),h=/[0-9]/,u=/[01]/,p=/[01234567]/,f=/[0123456789abcdefABCDEF]/;this.positionable_operators="!= !== % & && * ** + - / : < << <= == === > >= >> >>> ? ^ | ||".split(" ");var d=this.positionable_operators.concat("! %= &= *= **= ++ += , -- -= /= :: <<= = => >>= >>>= ^= |= ~ ...".split(" "));this.line_starters="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var T,E,x,m,g,b=this.line_starters.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),v=/([\s\S]*?)((?:\*\/)|$)/g,w=/([^\n\r\u2028\u2029]*)/g,K=/\/\* beautify( \w+[:]\w+)+ \*\//g,R=/ (\w+)[:](\w+)/g,k=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,y=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;this.tokenize=function(){g=new a(e),x=!1,m=[];for(var t,n,i,r=null,o=[],l=[];!n||"TK_EOF"!==n.type;){for(i=s(),t=new _(i[1],i[0],T,E);"TK_COMMENT"===t.type||"TK_BLOCK_COMMENT"===t.type||"TK_UNKNOWN"===t.type;)"TK_BLOCK_COMMENT"===t.type&&(t.directives=i[2]),l.push(t),i=s(),t=new _(i[1],i[0],T,E);l.length&&(t.comments_before=l,l=[]),"TK_START_BLOCK"===t.type||"TK_START_EXPR"===t.type?(t.parent=n,o.push(r),r=t):("TK_END_BLOCK"===t.type||"TK_END_EXPR"===t.type)&&r&&("]"===t.text&&"["===r.text||")"===t.text&&"("===r.text||"}"===t.text&&"{"===r.text)&&(t.parent=r.parent,t.opened=r,r=o.pop()),m.push(t),n=t}return m}}var a=n(2).InputScanner,_=n(5).Token,o=n(0);e.exports.Tokenizer=s}]),t=e;"function"==typeof define&&define.amd?define("beautify.js",[],function(){return{js_beautify:t}}):"undefined"!=typeof exports?exports.js_beautify=t:"undefined"!=typeof window?window.js_beautify=t:"undefined"!=typeof global&&(global.js_beautify=t)}(),function(){var e=function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},
2
+ t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){function i(e){return e.replace(/^\s+/g,"")}function r(e){return e.replace(/\s+$/g,"")}function s(e,t,n,s){function _(){function e(e){var t="";return{add:function(n){var i=t+n.toLowerCase();t=i.length<=e.length?i:i.substr(i.length-e.length,e.length)},doesNotMatch:function(){return-1===t.indexOf(e)}}}return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=h,this.indent_body_inner_html=u,this.indent_head_inner_html=p,this.Utils={whitespace:"\n\r\t ".split(""),single_token:t.void_elements||["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","?php","basefont","isindex"],extra_liners:S,in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])return!0;return!1}},this.is_whitespace=function(e){for(var t=0;t<e.length;t++)if(!this.Utils.in_array(e.charAt(t),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)g&&"\n"===e&&this.newlines<=b&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(e){return this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e),!0):(this.line_char_count++,e.push(" "),!1)},this.get_content=function(){for(var e="",t=[],n=0;"<"!==this.input.charAt(this.pos)||2===n;){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(n<2&&this.traverse_whitespace())this.space_or_wrap(t);else{if(e=this.input.charAt(this.pos),v){if("{"===e?n+=1:n<2&&(n=0),"}"===e&&n>0&&0==n--)break;var i=this.input.substr(this.pos,3);if("{{#"===i||"{{/"===i)break;if("{{!"===i)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",n=new RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos<r&&(t=this.input.substring(this.pos,r),this.pos=r),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,n,i,r="",s=[],a="",_=!1,o=!0,l=!1,c=this.pos,h=this.line_char_count,u=!1;e=void 0!==e&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=c,this.line_char_count=h),s.length?s.join(""):["","TK_EOF"];if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace))_=!0;else{if("'"!==r&&'"'!==r||(r+=this.get_unformatted(r),_=!0),"="===r&&(_=!1),i=this.input.substr(this.pos-1),!k||!l||u||">"!==r&&"/"!==r||i.match(/^\/?\s*>/)&&(_=!1,u=!0,this.print_newline(!1,s),this.print_indentation(s)),s.length&&"="!==s[s.length-1]&&">"!==r&&_){var p=this.space_or_wrap(s),f=p&&"/"!==r&&!R;if(_=!1,R&&"/"!==r){var d=!1;if(k&&o){d=!(null!==i.match(/^\S*(="([^"]|\\")*")?\s*\/?\s*>/))}o&&!d||(this.print_newline(!1,s),this.print_indentation(s),f=!0)}if(f){l=!0;var T=K;y&&(T=s.indexOf(" ")+1);for(var E=0;E<T;E++)s.push(" ")}if(o)for(var g=0;g<s.length;g++)if(" "===s[g]){o=!1;break}}if(v&&"<"===n&&r+this.input.charAt(this.pos)==="{{"&&(r+=this.get_unformatted("}}"),s.length&&" "!==s[s.length-1]&&"<"!==s[s.length-1]&&(r=" "+r),_=!0),"<"!==r||n||(t=this.pos-1,n="<"),v&&!n&&s.length>=2&&"{"===s[s.length-1]&&"{"===s[s.length-2]&&(t="#"===r||"/"===r||"!"===r?this.pos-3:this.pos-2,n="{"),this.line_char_count++,s.push(r),s[1]&&("!"===s[1]||"?"===s[1]||"%"===s[1])){s=[this.get_comment(t)];break}if(v&&s[1]&&"{"===s[1]&&s[2]&&"!"===s[2]){s=[this.get_comment(t)];break}if(v&&"{"===n&&s.length>2&&"}"===s[s.length-2]&&"}"===s[s.length-1])break}}while(">"!==r);var b,w,O=s.join("");b=-1!==O.indexOf(" ")?O.indexOf(" "):-1!==O.indexOf("\n")?O.indexOf("\n"):"{"===O.charAt(0)?O.indexOf("}"):O.indexOf(">"),w="<"!==O.charAt(0)&&v?"#"===O.charAt(2)?3:2:1;var S=O.substring(w,b).toLowerCase();return"/"===O.charAt(O.length-2)||this.Utils.in_array(S,this.Utils.single_token)?e||(this.tag_type="SINGLE"):v&&"{"===O.charAt(0)&&"else"===S?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(S,x)||this.is_unformatted(S,m)?(a=this.get_unformatted("</"+S+">",O),s.push(a),this.pos-1,this.tag_type="SINGLE"):"script"===S&&(-1===O.search("type")||O.search("type")>-1&&O.search(/\b(text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect)/)>-1)?e||(this.record_tag(S),this.tag_type="SCRIPT"):"style"===S&&(-1===O.search("type")||O.search("type")>-1&&O.search("text/css")>-1)?e||(this.record_tag(S),this.tag_type="STYLE"):"!"===S.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===S.charAt(0)?(this.retrieve_tag(S.substring(1)),this.tag_type="END"):(this.record_tag(S),"html"!==S.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(s),this.Utils.in_array(S,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=c,this.line_char_count=h),s.join("")},this.get_comment=function(e){var t="",n=">",i=!1;this.pos=e;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&(t+=r,t.charAt(t.length-1)!==n.charAt(n.length-1)||-1===t.indexOf(n));)!i&&t.length<10&&(0===t.indexOf("<![if")?(n="<![endif]>",i=!0):0===t.indexOf("<![cdata[")?(n="]]>",i=!0):0===t.indexOf("<![")?(n="]>",i=!0):0===t.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===t.indexOf("{{!--")?(n="--}}",i=!0):0===t.indexOf("{{!")?5===t.length&&-1===t.indexOf("{{!--")&&(n="}}",i=!0):0===t.indexOf("<?")?(n="?>",i=!0):0===t.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(t,n){if(n&&-1!==n.toLowerCase().indexOf(t))return"";var i="",r="",s=!0,a=e(t);do{if(this.pos>=this.input.length)return r;if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===i||"\r"===i){r+="\n",this.line_char_count=0;continue}}r+=i,a.add(i),this.line_char_count++,s=!0,v&&"{"===i&&r.length&&"{"===r.charAt(r.length-2)&&(r+=this.get_unformatted("}}"))}while(a.doesNotMatch());return r},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return e=this.get_contents_to(t),"string"!=typeof e?e:[e,"TK_"+t]}if("CONTENT"===this.current_mode)return e=this.get_content(),"string"!=typeof e?e:[e,"TK_CONTENT"];if("TAG"===this.current_mode){if("string"!=typeof(e=this.get_tag()))return e;return[e,"TK_TAG_"+this.tag_type]}},this.get_full_indent=function(e){return e=this.indent_level+e||0,e<1?"":Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!==e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var n=this.get_tag(!0),i=(n||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(i&&!this.Utils.in_array(i[1],t))},this.printer=function(e,t,n,s,a){this.input=e||"",this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n"),this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=a,this.indent_level=0,this.wrap_line_length=s,this.line_char_count=0;for(var _=0;_<this.indent_size;_++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!==t[t.length-1])&&("\n"!==t[t.length-1]&&(t[t.length-1]=r(t[t.length-1])),t.push("\n"))},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){this.is_whitespace(e)&&!this.output.length||((e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=i(e)),this.print_token_raw(e))},this.print_token_raw=function(e){this.newlines>0&&(e=r(e)),e&&""!==e&&(e.length>1&&"\n"===e.charAt(e.length-1)?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(t>0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}e=e||"";var c,h,u,p,f,d,T,E,x,m,g,b,v,w,K,R,k,y,O,S,A;t=t||{},t=a(t,"html"),void 0!==t.wrap_line_length&&0!==parseInt(t.wrap_line_length,10)||void 0===t.max_char||0===parseInt(t.max_char,10)||(t.wrap_line_length=t.max_char),h=void 0!==t.indent_inner_html&&t.indent_inner_html,u=void 0===t.indent_body_inner_html||t.indent_body_inner_html,p=void 0===t.indent_head_inner_html||t.indent_head_inner_html,f=void 0===t.indent_size?4:parseInt(t.indent_size,10),d=void 0===t.indent_char?" ":t.indent_char,E=void 0===t.brace_style?"collapse":t.brace_style,T=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),x=t.unformatted||["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","address","big","dt","ins","strike","tt"],m=t.content_unformatted||["pre"],g=void 0===t.preserve_newlines||t.preserve_newlines,b=g?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,v=void 0!==t.indent_handlebars&&t.indent_handlebars,w=void 0===t.wrap_attributes?"auto":t.wrap_attributes,K=isNaN(parseInt(t.wrap_attributes_indent_size,10))?f:parseInt(t.wrap_attributes_indent_size,10),R="force"===w.substr(0,"force".length),k="force-expand-multiline"===w,y="force-aligned"===w,O=void 0!==t.end_with_newline&&t.end_with_newline,S="object"==typeof t.extra_liners&&t.extra_liners?t.extra_liners.concat():"string"==typeof t.extra_liners?t.extra_liners.split(","):"head,body,/html".split(","),A=t.eol?t.eol:"auto",t.indent_with_tabs&&(d="\t",f=1),"auto"===A&&(A="\n",e&&o.test(e||"")&&(A=e.match(o)[0])),A=A.replace(/\\r/,"\r").replace(/\\n/,"\n"),e=e.replace(l,"\n"),this.beautify=function(){for(c=new _,c.printer(e,d,f,T,E);;){var i=c.get_token();if(c.token_text=i[0],c.token_type=i[1],"TK_EOF"===c.token_type)break;switch(c.token_type){case"TK_TAG_START":c.print_newline(!1,c.output),c.print_token(c.token_text),c.indent_content&&(!c.indent_body_inner_html&&c.token_text.match(/<body(?:.*)>/)||!c.indent_head_inner_html&&c.token_text.match(/<head(?:.*)>/)||c.indent(),c.indent_content=!1),c.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":c.print_newline(!1,c.output),c.print_token(c.token_text),c.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===c.last_token&&""===c.last_text){var r=(c.token_text.match(/\w+/)||[])[0],a=null;c.output.length&&(a=c.output[c.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),(null===a||a[1]!==r&&!c.Utils.in_array(a[1],x))&&c.print_newline(!1,c.output)}c.print_token(c.token_text),c.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var o=c.token_text.match(/^\s*<([a-z-]+)/i);o&&c.Utils.in_array(o[1],x)||c.print_newline(!1,c.output),c.print_token(c.token_text),c.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":for(var l=!1,h=c.output.length-1;h>=0&&"\n"!==c.output[h];h--)if(c.output[h].match(/{{#if/)){l=!0;break}l||c.print_newline(!1,c.output),c.print_token(c.token_text),c.indent_content&&(c.indent(),c.indent_content=!1),c.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":c.print_token(c.token_text),c.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==c.token_text){c.print_newline(!1,c.output);var u,p=c.token_text,m=1;"TK_SCRIPT"===c.token_type?u="function"==typeof n&&n:"TK_STYLE"===c.token_type&&(u="function"==typeof s&&s),"keep"===t.indent_scripts?m=0:"separate"===t.indent_scripts&&(m=-c.indent_level);var g=c.get_full_indent(m);if(u){var b=function(){this.eol="\n"};b.prototype=t;var v=new b;p=u(p.replace(/^\s*/,g),v)}else{var w=p.match(/^\s*/)[0],K=w.match(/[^\n\r]*$/)[0].split(c.indent_string).length-1,R=c.get_full_indent(m-K);p=p.replace(/^\s*/,g).replace(/\r\n|\r|\n/g,"\n"+R).replace(/\s+$/,"")}p&&(c.print_token_raw(p),c.print_newline(!0,c.output))}c.current_mode="TAG";break;default:""!==c.token_text&&c.print_token(c.token_text)}c.last_token=c.token_type,c.last_text=c.token_text}var k=c.output.join("").replace(/[\r\n\t ]+$/,"");return O&&(k+="\n"),"\n"!==A&&(k=k.replace(/[\n]/g,A)),k}}var a=n(2).mergeOpts,_=n(1),o=_.lineBreak,l=_.allLineBreaks;e.exports.Beautifier=s},function(e,t){var n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i=new RegExp("["+n+"]"),r=new RegExp("["+n+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|"+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g"),t.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||e>=170&&i.test(String.fromCharCode(e)))},t.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||e>=170&&r.test(String.fromCharCode(e))))}},function(e,t){function n(e,t){var n,i={};for(n in e)n!==t&&(i[n]=e[n]);if(t in e)for(n in e[t])i[n]=e[t][n];return i}e.exports.mergeOpts=n},function(e,t,n){function i(e,t,n,i){return new r(e,t,n,i).beautify()}var r=n(0).Beautifier;e.exports=i}]),t=e;if("function"==typeof define&&define.amd)define("beautify-html.js",["require","./beautify","./beautify-css"],function(e){var n=e("./beautify"),i=e("./beautify-css");return{html_beautify:function(e,r){return t(e,r,n.js_beautify,i.css_beautify)}}});else if("undefined"!=typeof exports){var n=require("./beautify.js"),i=require("./beautify-css.js");exports.html_beautify=function(e,r){return t(e,r,n.js_beautify,i.css_beautify)}}else"undefined"!=typeof window?window.html_beautify=function(e,n){return t(e,n,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(e,n){return t(e,n,global.js_beautify,global.css_beautify)})}(),function(e){"function"==typeof e.define&&(e.define("beautify",["beautify.js"],function(e){return e}),e.define("beautify-css",[],function(){return{css_beautify:void 0}}),e.define("beautifyModule",["beautify","beautify-html.js"],function(t,n){e.js_beautify=t.js_beautify,e.html_beautify=n.html_beautify}))}(this);
@@ -1,2 +1,2 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/comment/continuecomment.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var i,o=t.listSelections(),r=[],a=0;a<o.length;a++){var l=o[a].head;if(!/\bcomment\b/.test(t.getTokenTypeAt(l)))return e.Pass;var s=t.getModeAt(l);if(i){if(i!=s)return e.Pass}else i=s;var c=null;if(i.blockCommentStart&&i.blockCommentContinue){var f,u=t.getLine(l.line).slice(0,l.ch),d=u.lastIndexOf(i.blockCommentEnd);if(-1!=d&&d==l.ch-i.blockCommentEnd.length);else if((f=u.lastIndexOf(i.blockCommentStart))>-1&&f>d){if(c=u.slice(0,f),/\S/.test(c)){c="";for(var h=0;h<f;++h)c+=" "}}else(f=u.indexOf(i.blockCommentContinue))>-1&&!/\S/.test(u.slice(0,f))&&(c=u.slice(0,f));null!=c&&(c+=i.blockCommentContinue)}if(null==c&&i.lineComment&&n(t)){var u=t.getLine(l.line),f=u.indexOf(i.lineComment);f>-1&&(c=u.slice(0,f),/\S/.test(c)?c=null:c+=i.lineComment+u.slice(f+i.lineComment.length).match(/^\s*/)[0])}if(null==c)return e.Pass;r[a]="\n"+c}t.operation(function(){for(var e=o.length-1;e>=0;e--)t.replaceRange(r[e],o[e].from(),o[e].to(),"+insert")})}function n(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||!1!==t.continueLineComment}e.defineOption("continueComments",null,function(n,i,o){if(o&&o!=e.Init&&n.removeKeyMap("continueComment"),i){var r="Enter";"string"==typeof i?r=i:"object"==typeof i&&i.key&&(r=i.key);var a={name:"continueComment"};a[r]=t,n.addKeyMap(a)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/closebrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:d[t]}function n(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),o="'"+n+"'";m[o]||(m[o]=i(n))}}function i(e){return function(t){return s(t,e)}}function o(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function r(n){var i=o(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var r=t(i,"pairs"),a=n.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var s=f(n,a[l].head);if(!s||r.indexOf(s)%2!=0)return e.Pass}for(var l=a.length-1;l>=0;l--){var c=a[l].head;n.replaceRange("",h(c.line,c.ch-1),h(c.line,c.ch+1),"+delete")}}function a(n){var i=o(n),r=i&&t(i,"explode");if(!r||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var s=f(n,a[l].head);if(!s||r.indexOf(s)%2!=0)return e.Pass}n.operation(function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),n.execCommand("goCharLeft"),a=n.listSelections();for(var t=0;t<a.length;t++){var i=a[t].head.line;n.indentLine(i,null,!0),n.indentLine(i+1,null,!0)}})}function l(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new h(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new h(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var r=o(n);if(!r||n.getOption("disableInput"))return e.Pass;var a=t(r,"pairs"),s=a.indexOf(i);if(-1==s)return e.Pass;for(var f,d=t(r,"triples"),m=a.charAt(s+1)==i,g=n.listSelections(),p=s%2==0,v=0;v<g.length;v++){var b,x=g[v],y=x.head,C=n.getRange(y,h(y.line,y.ch+1));if(p&&!x.empty())b="surround";else if(!m&&p||C!=i)if(m&&y.ch>1&&d.indexOf(i)>=0&&n.getRange(h(y.line,y.ch-2),y)==i+i&&(y.ch<=2||n.getRange(h(y.line,y.ch-3),h(y.line,y.ch-2))!=i))b="addFour";else if(m){var k=0==y.ch?" ":n.getRange(h(y.line,y.ch-1),y);if(e.isWordChar(C)||k==i||e.isWordChar(k))return e.Pass;b="both"}else{if(!p||n.getLine(y.line).length!=y.ch&&!c(C,a)&&!/\s/.test(C))return e.Pass;b="both"}else b=m&&u(n,y)?"both":d.indexOf(i)>=0&&n.getRange(y,h(y.line,y.ch+3))==i+i+i?"skipThree":"skip";if(f){if(f!=b)return e.Pass}else f=b}var L=s%2?a.charAt(s-1):i,S=s%2?i:a.charAt(s+1);n.operation(function(){if("skip"==f)n.execCommand("goCharRight");else if("skipThree"==f)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==f){for(var t=n.getSelections(),e=0;e<t.length;e++)t[e]=L+t[e]+S;n.replaceSelections(t,"around"),t=n.listSelections().slice();for(var e=0;e<t.length;e++)t[e]=l(t[e]);n.setSelections(t)}else"both"==f?(n.replaceSelection(L+S,null),n.triggerElectric(L+S),n.execCommand("goCharLeft")):"addFour"==f&&(n.replaceSelection(L+L+L+L,"before"),n.execCommand("goCharRight"))})}function c(e,t){var n=t.lastIndexOf(e);return n>-1&&n%2==1}function f(e,t){var n=e.getRange(h(t.line,t.ch-1),h(t.line,t.ch+1));return 2==n.length?n:null}function u(e,t){var n=e.getTokenAt(h(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}var d={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},h=e.Pos;e.defineOption("autoCloseBrackets",!1,function(i,o,r){r&&r!=e.Init&&(i.removeKeyMap(m),i.state.closeBrackets=null),o&&(n(t(o,"pairs")),i.state.closeBrackets=o,i.addKeyMap(m))});var m={Backspace:r,Enter:a};n(d.pairs+"`")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/xml-fold",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(d(e.line,t));return n&&/\btag\b/.test(n)}function o(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function r(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(o(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(r(e))continue;return}if(i(e,t+1)){m.lastIndex=t,e.ch=t;var n=m.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function s(e){for(;;){m.lastIndex=e.ch;var t=m.exec(e.text);if(!t){if(o(e))continue;return}{if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(r(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t}}}function f(e,t){for(var n=[];;){var i,o=s(e),r=e.line,l=e.ch-(o?o[0].length:0);if(!o||!(i=a(e)))return;if("selfClose"!=i)if(o[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==o[2]){n.length=c;break}if(c<0&&(!t||t==o[2]))return{tag:o[2],from:d(r,l),to:d(e.line,e.ch)}}else n.push(o[2])}}function u(e,t){for(var n=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var o=e.line,r=e.ch,a=l(e);if(!a)return;if(a[1])n.push(a[2]);else{for(var s=n.length-1;s>=0;--s)if(n[s]==a[2]){n.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:d(e.line,e.ch),to:d(o,r)}}}else l(e)}}var d=e.Pos,h="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",m=new RegExp("<(/?)(["+h+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,t){for(var i=new n(e,t.line,0);;){var o,r=s(i);if(!r||i.line!=t.line||!(o=a(i)))return;if(!r[1]&&"selfClose"!=o){var l=d(i.line,i.ch),c=f(i,r[2]);return c&&{from:l,to:c.from}}}}),e.findMatchingTag=function(e,i,o){var r=new n(e,i.line,i.ch,o);if(-1!=r.text.indexOf(">")||-1!=r.text.indexOf("<")){var s=a(r),c=s&&d(r.line,r.ch),h=s&&l(r);if(s&&h&&!(t(r,i)>0)){var m={from:d(r.line,r.ch),to:c,tag:h[2]};return"selfClose"==s?{open:m,close:null,at:"open"}:h[1]?{open:u(r,h[2]),close:m,at:"close"}:(r=new n(e,c.line,c.ch,o),{open:m,close:f(r,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,i,o){for(var r=new n(e,t.line,t.ch,i);;){var a=u(r,o);if(!a)break;var l=new n(e,t.line,t.ch,i),s=f(l,a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,i,o){return f(new n(e,t.line,t.ch,o?{from:0,to:o}:null),i)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/closetag.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),i=[],s=t.getOption("autoCloseTags"),c=0;c<n.length;c++){if(!n[c].empty())return e.Pass;var f=n[c].head,u=t.getTokenAt(f),d=e.innerMode(t.getMode(),u.state),h=d.state;if("xml"!=d.mode.name||!h.tagName)return e.Pass;var m="html"==d.mode.configuration,g="object"==typeof s&&s.dontCloseTags||m&&a,p="object"==typeof s&&s.indentTags||m&&l,v=h.tagName;u.end>f.ch&&(v=v.slice(0,v.length-u.end+f.ch));var b=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=f.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==h.type||u.string.indexOf("/")==u.string.length-1||g&&o(g,b)>-1||r(t,v,f,h,!0))return e.Pass;var x=p&&o(p,b)>-1;i[c]={indent:x,text:">"+(x?"\n\n":"")+"</"+v+">",newPos:x?e.Pos(f.line+1,0):e.Pos(f.line,f.ch+1)}}for(var y="object"==typeof s&&s.dontIndentOnAutoClose,c=n.length-1;c>=0;c--){var C=i[c];t.replaceRange(C.text,n[c].head,n[c].anchor,"+insert");var k=t.listSelections().slice(0);k[c]={head:C.newPos,anchor:C.newPos},t.setSelections(k),!y&&C.indent&&(t.indentLine(C.newPos.line,null,!0),t.indentLine(C.newPos.line+1,null,!0))}}function n(t,n){for(var i=t.listSelections(),o=[],a=n?"/":"</",l=t.getOption("autoCloseTags"),s="object"==typeof l&&l.dontIndentOnSlash,c=0;c<i.length;c++){if(!i[c].empty())return e.Pass;var f=i[c].head,u=t.getTokenAt(f),d=e.innerMode(t.getMode(),u.state),h=d.state;if(n&&("string"==u.type||"<"!=u.string.charAt(0)||u.start!=f.ch-1))return e.Pass;var m;if("xml"!=d.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==d.mode.name)m=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=d.mode.name)return e.Pass;m=a+"style"}else{if(!h.context||!h.context.tagName||r(t,h.context.tagName,f,h))return e.Pass;m=a+h.context.tagName}">"!=t.getLine(f.line).charAt(u.end)&&(m+=">"),o[c]=m}if(t.replaceSelections(o),i=t.listSelections(),!s)for(var c=0;c<i.length;c++)(c==i.length-1||i[c].head.line<i[c+1].head.line)&&t.indentLine(i[c].head.line)}function i(t){return t.getOption("disableInput")?e.Pass:n(t,!0)}function o(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;++n)if(e[n]==t)return n;return-1}function r(t,n,i,o,r){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,i.line+500),l=e.scanForClosingTag(t,i,null,a);if(!l||l.tag!=n)return!1;for(var s=o.context,c=r?1:0;s&&s.tagName==n;s=s.prev)++c;i=l.to;for(var f=1;f<c;f++){var u=e.scanForClosingTag(t,i,null,a);if(!u||u.tag!=n)return!1;i=u.to}return!0}e.defineOption("autoCloseTags",!1,function(n,o,r){if(r!=e.Init&&r&&n.removeKeyMap("autoCloseTags"),o){var a={name:"autoCloseTags"};("object"!=typeof o||o.whenClosing)&&(a["'/'"]=function(e){return i(e)}),("object"!=typeof o||o.whenOpening)&&(a["'>'"]=function(e){return t(e)}),n.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/matchbrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,i){var o=e.getLineHandle(t.line),r=t.ch-1,s=i&&i.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=!s&&r>=0&&l[o.text.charAt(r)]||l[o.text.charAt(++r)];if(!c)return null;var f=">"==c.charAt(1)?1:-1;if(i&&i.strict&&f>0!=(r==t.ch))return null;var u=e.getTokenTypeAt(a(t.line,r+1)),d=n(e,a(t.line,r+(f>0?1:0)),f,u||null,i);return null==d?null:{from:a(t.line,r),to:d&&d.pos,match:d&&d.ch==c.charAt(0),forward:f>0}}function n(e,t,n,i,o){for(var r=o&&o.maxScanLineLength||1e4,s=o&&o.maxScanLines||1e3,c=[],f=o&&o.bracketRegex?o.bracketRegex:/[(){}[\]]/,u=n>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),d=t.line;d!=u;d+=n){var h=e.getLine(d);if(h){var m=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>r))for(d==t.line&&(m=t.ch-(n<0?1:0));m!=g;m+=n){var p=h.charAt(m);if(f.test(p)&&(void 0===i||e.getTokenTypeAt(a(d,m+1))==i)){var v=l[p];if(">"==v.charAt(1)==n>0)c.push(p);else{if(!c.length)return{pos:a(d,m),ch:p};c.pop()}}}}}return d-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var o=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],s=e.listSelections(),c=0;c<s.length;c++){var f=s[c].empty()&&t(e,s[c].head,i);if(f&&e.getLine(f.from.line).length<=o){var u=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(f.from,a(f.from.line,f.from.ch+1),{className:u})),f.to&&e.getLine(f.to.line).length<=o&&l.push(e.markText(f.to,a(f.to.line,f.to.ch+1),{className:u}))}}if(l.length){r&&e.state.focused&&e.focus();var d=function(){e.operation(function(){for(var e=0;e<l.length;e++)l[e].clear()})};if(!n)return d;setTimeout(d,800)}}function o(e){e.operation(function(){s&&(s(),s=null),s=i(e,!1,e.state.matchBrackets)})}var r=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",o),s&&(s(),s=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",o))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return(i||"boolean"==typeof n)&&(i?(i.strict=n,n=i):n=n?{strict:!0}:null),t(this,e,n)}),e.defineExtension("scanForBracket",function(e,t,i,o){return n(this,e,t,i,o)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/matchtags.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var i=n.getCursor(),o=n.getViewport();o.from=Math.min(o.from,i.line),o.to=Math.max(i.line+1,o.to);var r=e.findMatchingTag(n,i,o);if(r){if(n.state.matchBothTags){var a="open"==r.at?r.open:r.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==r.at?r.open:r.close;l?n.state.tagOther=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(o,r,a){a&&a!=e.Init&&(o.off("cursorActivity",n),o.off("viewportChange",i),t(o)),r&&(o.state.matchBothTags="object"==typeof r&&r.bothTags,o.on("cursorActivity",n),o.on("viewportChange",i),n(o))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var i="close"==n.at?n.open:n.close;i&&t.extendSelection(i.to,i.from)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/trailingspace.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineOption("showTrailingSpace",!1,function(t,n,i){i==e.Init&&(i=!1),i&&!n?t.removeOverlay("trailingspace"):!i&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/foldcode",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,o,r,a){function l(e){var n=s(t,o);if(!n||n.to.line-n.from.line<c)return null;for(var i=t.findMarksAt(n.from),r=0;r<i.length;++r)if(i[r].__isFold&&"fold"!==a){if(!e)return null;n.cleared=!0,i[r].clear()}return n}if(r&&r.call){var s=r;r=null}else var s=i(t,r,"rangeFinder");"number"==typeof o&&(o=e.Pos(o,0));var c=i(t,r,"minFoldSize"),f=l(!0);if(i(t,r,"scanUp"))for(;!f&&o.line>t.firstLine();)o=e.Pos(o.line-1,0),f=l(!1);if(f&&!f.cleared&&"unfold"!==a){var u=n(t,r);e.on(u,"mousedown",function(t){d.clear(),e.e_preventDefault(t)});var d=t.markText(f.from,f.to,{replacedWith:u,clearOnEnter:i(t,r,"clearOnEnter"),__isFold:!0});d.on("clear",function(n,i){e.signal(t,"unfold",t,n,i)}),e.signal(t,"fold",t,f.from,f.to)}}function n(e,t){var n=i(e,t,"widget");if("string"==typeof n){var o=document.createTextNode(n);n=document.createElement("span"),n.appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:o[n]}e.newFoldFunction=function(e,n){return function(i,o){t(i,o,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,i){t(this,e,n,i)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),null,"fold")})},e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),null,"unfold")})},e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var i=0;i<e.length;++i){var o=e[i](t,n);if(o)return o}}}),e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),i=0;i<n.length;i++){var o=n[i](e,t);if(o)return o}});var o={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};e.defineOption("foldOptions",null),e.defineExtension("foldOption",function(e,t){return i(this,e,t)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define("addon/fold/foldgutter.js",["../../lib/codemirror","./foldcode"],e):e(CodeMirror)}(function(e){"use strict";function t(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,t){for(var n=e.findMarks(u(t,0),u(t+1,0)),i=0;i<n.length;++i)if(n[i].__isFold&&n[i].find().from.line==t)return n[i]}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function r(e,t,n){var r=e.state.foldGutter.options,a=t,l=e.foldOption(r,"minFoldSize"),s=e.foldOption(r,"rangeFinder");e.eachLine(t,n,function(t){var n=null;if(i(e,a))n=o(r.indicatorFolded);else{var c=u(a,0),f=s&&s(e,c);f&&f.to.line-f.from.line>=l&&(n=o(r.indicatorOpen))}e.setGutterMarker(t,r.gutter,n),++a})}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){r(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var o=e.state.foldGutter;if(o){var r=o.options;if(n==r.gutter){var a=i(e,t);a?a.clear():e.foldCode(u(t,0),r.rangeFinder)}}}function s(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation(function(){n.from<t.from&&(r(e,n.from,t.from),t.from=n.from),n.to>t.to&&(r(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&i<n.to&&r(e,i,i+1)}}e.defineOption("foldGutter",!1,function(i,o,r){r&&r!=e.Init&&(i.clearGutter(i.state.foldGutter.options.gutter),i.state.foldGutter=null,i.off("gutterClick",l),i.off("change",s),i.off("viewportChange",c),i.off("fold",f),i.off("unfold",f),i.off("swapDoc",s)),o&&(i.state.foldGutter=new t(n(o)),a(i),i.on("gutterClick",l),i.on("change",s),i.on("viewportChange",c),i.on("fold",f),i.on("unfold",f),i.on("swapDoc",s))});var u=e.Pos}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/brace-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function i(i){for(var l=n.ch,s=0;;){var c=l<=0?-1:a.lastIndexOf(i,l-1);if(-1!=c){if(1==s&&c<n.ch)break;if(o=t.getTokenTypeAt(e.Pos(r,c+1)),!/^(comment|string)/.test(o))return c+1;l=c-1}else{if(1==s)break;s=1,l=a.length}}}var o,r=n.line,a=t.getLine(r),l="{",s="}",c=i("{");if(null==c&&(l="[",s="]",c=i("[")),null!=c){var f,u,d=1,h=t.lastLine();e:for(var m=r;m<=h;++m)for(var g=t.getLine(m),p=m==r?c:0;;){var v=g.indexOf(l,p),b=g.indexOf(s,p);if(v<0&&(v=g.length),b<0&&(b=g.length),(p=Math.min(v,b))==g.length)break;if(t.getTokenTypeAt(e.Pos(m,p+1))==o)if(p==v)++d;else if(!--d){f=m,u=p;break e}++p}if(null!=f&&(r!=f||u!=c))return{from:e.Pos(r,c),to:e.Pos(f,u)}}}),e.registerHelper("fold","import",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));if(/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"keyword"!=i.type||"import"!=i.string)return null;for(var o=n,r=Math.min(t.lastLine(),n+10);o<=r;++o){var a=t.getLine(o),l=a.indexOf(";");if(-1!=l)return{startCh:i.end,end:e.Pos(o,l)}}}var o,r=n.line,a=i(r);if(!a||i(r-1)||(o=i(r-2))&&o.end.line==r-1)return null;for(var l=a.end;;){var s=i(l.line+1);if(null==s)break;l=s.end}return{from:t.clipPos(e.Pos(r,a.startCh+1)),to:l}}),e.registerHelper("fold","include",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));return/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var o=n.line,r=i(o);if(null==r||null!=i(o-1))return null;for(var a=o;;){if(null==i(a+1))break;++a}return{from:e.Pos(o,r+1),to:t.clipPos(e.Pos(a))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/comment-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var i=t.getModeAt(n),o=i.blockCommentStart,r=i.blockCommentEnd;if(o&&r){for(var a,l=n.line,s=t.getLine(l),c=n.ch,f=0;;){var u=c<=0?-1:s.lastIndexOf(o,c-1);if(-1!=u){if(1==f&&u<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(l,u+1)))&&(0==u||s.slice(u-r.length,u)==r||!/comment/.test(t.getTokenTypeAt(e.Pos(l,u))))){a=u+o.length;break}c=u-1}else{if(1==f)return;f=1,c=s.length}}var d,h,m=1,g=t.lastLine();e:for(var p=l;p<=g;++p)for(var v=t.getLine(p),b=p==l?a:0;;){var x=v.indexOf(o,b),y=v.indexOf(r,b);if(x<0&&(x=v.length),y<0&&(y=v.length),(b=Math.min(x,y))==v.length)break;if(b==x)++m;else if(!--m){d=p,h=b;break e}++b}if(null!=d&&(l!=d||h!=a))return{from:e.Pos(l,a),to:e.Pos(d,h)}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/indent-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,n){var i=t.getLine(n),o=i.search(/\S/);return-1==o||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(n,o+1)))?-1:e.countColumn(i,null,t.getOption("tabSize"))}e.registerHelper("fold","indent",function(n,i){var o=t(n,i.line);if(!(o<0)){for(var r=null,a=i.line+1,l=n.lastLine();a<=l;++a){var s=t(n,a);if(-1==s);else{if(!(s>o))break;r=a}}return r?{from:e.Pos(i.line,n.getLine(i.line).length),to:e.Pos(r,n.getLine(r).length)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/format/autoFormatAll.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineExtension("autoFormatAll",function(t,n){function i(){c+="\n",u=!0,++f}for(var o=this,r=o.getMode(),a=o.getRange(t,n).split("\n"),l=e.copyState(r,o.getTokenAt(t).state),s=o.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;d<a.length;++d){for(var h=new e.StringStream(a[d],s);!h.eol();){var m=e.innerMode(r,l),g=r.token(h,l),p=h.current();h.start=h.pos,u&&!/\S/.test(p)||(c+=p,u=!1),!u&&m.mode.newlineAfterToken&&m.mode.newlineAfterToken(g,p,h.string.slice(h.pos)||a[d+1]||"",m.state)&&i()}!h.pos&&r.blankLine&&r.blankLine(l),!u&&d<a.length-1&&i()}o.operation(function(){o.replaceRange(c,t,n);for(var e=t.line+1,i=t.line+f;e<=i;++e)o.indentLine(e,"smart");o.setCursor({line:0,ch:0})})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/format/formatting.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e){for(var t=[/for\s*?\((.*?)\)/g,/&#?[a-z0-9]+;[\s\S]/g,/\"(.*?)((\")|$)/g,/\/\*(.*?)(\*\/|$)/g,/^\/\/.*/g],n=[],i=0;i<t.length;i++)for(var o=0;o<e.length;){var r=e.substr(o).match(t[i]);if(null==r)break;n.push({start:o+r.index,end:o+r.index+r[0].length}),o+=r.index+Math.max(1,r[0].length)}return n.sort(function(e,t){return e.start-t.start}),n}e.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(e,t){return/^[;{}]$/.test(t)}}),e.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",wordWrapChars:[";","\\{","\\}"],autoFormatLineBreaks:function(e){var n=0,i=this.jsonMode?function(e){return e.replace(/([,{])/g,"$1\n").replace(/}/g,"\n}")}:function(e){return e.replace(/(;|\{|\})([^\r\n;])/g,"$1\n$2")},o=t(e),r="";if(null!=o){for(var a=0;a<o.length;a++)o[a].start>n&&(r+=i(e.substring(n,o[a].start)),n=o[a].start),o[a].start<=n&&o[a].end>=n&&(r+=e.substring(n,o[a].end),n=o[a].end);n<e.length&&(r+=i(e.substr(n)))}else r=i(e);return r.replace(/^\n*|\n*$/,"")}});e.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",noBreak:!1,noBreakEmpty:null,tagType:"",tagName:"",isXML:!1,newlineAfterToken:function(e,t,n,i){var o="a|b|bdi|bdo|big|center|cite|del|em|font|i|img|ins|s|small|span|strike|strong|sub|sup|u",r="label|li|option|textarea|title|"+o,a=!1,l=null,s="";if(this.isXML="xml"==this.configuration,"comment"==e||/<!--/.test(n))return!1;if("tag"==e){if(0==t.indexOf("<")&&0==!t.indexOf("</")){this.tagType="open",l=t.match(/^<\s*?([\w]+?)$/i),this.tagName=null!=l?l[1]:"";var s=this.tagName.toLowerCase();-1!=("|"+r+"|").indexOf("|"+s+"|")&&(this.noBreak=!0)}if(0==t.indexOf(">")&&"open"==this.tagType){this.tagType="";var c=this.isXML?"[^<]*?":"";return RegExp("^"+c+"</s*?"+this.tagName+"s*?>","i").test(n)?(this.noBreak=!1,this.isXML||(this.tagName=""),!1):(a=this.noBreak,this.noBreak=!1,!a)}if(0==t.indexOf("</")&&(this.tagType="close",l=t.match(/^<\/\s*?([\w]+?)$/i),null!=l&&(s=l[1].toLowerCase()),-1!=("|"+o+"|").indexOf("|"+s+"|")&&(this.noBreak=!0)),0==t.indexOf(">")&&"close"==this.tagType)return this.tagType="",0==n.indexOf("<")&&(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+r+"|").indexOf("|"+s+"|"))?(this.noBreak=!1,!0):(a=this.noBreak,this.noBreak=!1,!a)}return 0==n.indexOf("<")&&(this.noBreak=!1,this.isXML&&""!=this.tagName?(this.tagName="",!1):(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+r+"|").indexOf("|"+s+"|")))}}),e.defineExtension("commentRange",function(t,n,i){var o=this,r=e.innerMode(o.getMode(),o.getTokenAt(n).state).mode;o.operation(function(){if(t)o.replaceRange(r.commentEnd,i),o.replaceRange(r.commentStart,n),o.setSelection(n,{line:i.line,ch:i.ch+r.commentStart.length+r.commentEnd.length}),n.line==i.line&&n.ch==i.ch&&o.setCursor(n.line,n.ch+r.commentStart.length);else{var e=o.getRange(n,i),a=e.indexOf(r.commentStart),l=e.lastIndexOf(r.commentEnd);a>-1&&l>-1&&l>a&&(e=e.substr(0,a)+e.substring(a+r.commentStart.length,l)+e.substr(l+r.commentEnd.length)),o.replaceRange(e,n,i),o.setSelection(n,{line:i.line,ch:i.ch-r.commentStart.length-r.commentEnd.length})}})}),e.defineExtension("autoIndentRange",function(e,t){var n=this;this.operation(function(){for(var i=e.line;i<=t.line;i++)n.indentLine(i,"smart")})}),e.defineExtension("autoFormatRange",function(t,n){function i(){c+="\n",u=!0,++f}for(var o=this,r=o.getMode(),a=o.getRange(t,n).split("\n"),l=e.copyState(r,o.getTokenAt(t).state),s=o.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;d<a.length;++d){for(var h=new e.StringStream(a[d],s);!h.eol();){var m=e.innerMode(r,l),g=r.token(h,l),p=h.current();h.start=h.pos,u&&!/\S/.test(p)||(c+=p,u=!1),!u&&m.mode.newlineAfterToken&&m.mode.newlineAfterToken(g,p,h.string.slice(h.pos)||a[d+1]||"",m.state)&&i()}!h.pos&&r.blankLine&&r.blankLine(l),!u&&d<a.length-1&&i()}o.operation(function(){o.replaceRange(c,t,n);for(var e=t.line+1,i=t.line+f;e<=i;++e)o.indentLine(e,"smart");o.setSelection(t,o.getCursor(!1))})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/selection/active-line.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",r),e.removeLineClass(e.state.activeLines[t],"background",a),e.removeLineClass(e.state.activeLines[t],"gutter",l)}function n(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function i(e,i){for(var o=[],s=0;s<i.length;s++){var c=i[s],f=e.getOption("styleActiveLine");if("object"==typeof f&&f.nonEmpty?c.anchor.line==c.head.line:c.empty()){var u=e.getLineHandleVisualStart(c.head.line);o[o.length-1]!=u&&o.push(u)}}n(e.state.activeLines,o)||e.operation(function(){t(e);for(var n=0;n<o.length;n++)e.addLineClass(o[n],"wrap",r),e.addLineClass(o[n],"background",a),e.addLineClass(o[n],"gutter",l);e.state.activeLines=o})}function o(e,t){i(e,t.ranges)}var r="CodeMirror-activeline",a="CodeMirror-activeline-background",l="CodeMirror-activeline-gutter";e.defineOption("styleActiveLine",!1,function(n,r,a){var l=a!=e.Init&&a;r!=l&&(l&&(n.off("beforeSelectionChange",o),t(n),delete n.state.activeLines),r&&(n.state.activeLines=[],i(n,n.listSelections()),n.on("beforeSelectionChange",o)))})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/search/searchcursor",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function n(e){
2
- return e.global?e:new RegExp(e.source,t(e)+"g")}function i(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function o(e,t,i){t=n(t);for(var o=i.line,r=i.ch,a=e.lastLine();o<=a;o++,r=0){t.lastIndex=r;var l=e.getLine(o),s=t.exec(l);if(s)return{from:g(o,s.index),to:g(o,s.index+s[0].length),match:s}}}function r(e,t,r){if(!i(t))return o(e,t,r);t=n(t);for(var a,l=1,s=r.line,c=e.lastLine();s<=c;){for(var f=0;f<l;f++){var u=e.getLine(s++);a=null==a?u:a+"\n"+u}l*=2,t.lastIndex=r.ch;var d=t.exec(a);if(d){var h=a.slice(0,d.index).split("\n"),m=d[0].split("\n"),p=r.line+h.length-1,v=h[h.length-1].length;return{from:g(p,v),to:g(p+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:d}}}}function a(e,t){for(var n,i=0;;){t.lastIndex=i;var o=t.exec(e);if(!o)return n;if(n=o,(i=n.index+(n[0].length||1))==e.length)return n}}function l(e,t,i){t=n(t);for(var o=i.line,r=i.ch,l=e.firstLine();o>=l;o--,r=-1){var s=e.getLine(o);r>-1&&(s=s.slice(0,r));var c=a(s,t);if(c)return{from:g(o,c.index),to:g(o,c.index+c[0].length),match:c}}}function s(e,t,i){t=n(t);for(var o,r=1,l=i.line,s=e.firstLine();l>=s;){for(var c=0;c<r;c++){var f=e.getLine(l--);o=null==o?f.slice(0,i.ch):f+"\n"+o}r*=2;var u=a(o,t);if(u){var d=o.slice(0,u.index).split("\n"),h=u[0].split("\n"),m=l+d.length,p=d[d.length-1].length;return{from:g(m,p),to:g(m+h.length-1,1==h.length?p+h[0].length:h[h.length-1].length),match:u}}}}function c(e,t,n,i){if(e.length==t.length)return n;for(var o=0,r=n+Math.max(0,e.length-t.length);;){if(o==r)return o;var a=o+r>>1,l=i(e.slice(0,a)).length;if(l==n)return a;l>n?r=a:o=a+1}}function f(e,t,n,i){if(!t.length)return null;var o=i?h:m,r=o(t).split(/\r|\n\r?/);e:for(var a=n.line,l=n.ch,s=e.lastLine()+1-r.length;a<=s;a++,l=0){var f=e.getLine(a).slice(l),u=o(f);if(1==r.length){var d=u.indexOf(r[0]);if(-1==d)continue e;var n=c(f,u,d,o)+l;return{from:g(a,c(f,u,d,o)+l),to:g(a,c(f,u,d+r[0].length,o)+l)}}var p=u.length-r[0].length;if(u.slice(p)==r[0]){for(var v=1;v<r.length-1;v++)if(o(e.getLine(a+v))!=r[v])continue e;var b=e.getLine(a+r.length-1),x=o(b),y=r[r.length-1];if(x.slice(0,y.length)==y)return{from:g(a,c(f,u,p,o)+l),to:g(a+r.length-1,c(b,x,y.length,o))}}}}function u(e,t,n,i){if(!t.length)return null;var o=i?h:m,r=o(t).split(/\r|\n\r?/);e:for(var a=n.line,l=n.ch,s=e.firstLine()-1+r.length;a>=s;a--,l=-1){var f=e.getLine(a);l>-1&&(f=f.slice(0,l));var u=o(f);if(1==r.length){var d=u.lastIndexOf(r[0]);if(-1==d)continue e;return{from:g(a,c(f,u,d,o)),to:g(a,c(f,u,d+r[0].length,o))}}var p=r[r.length-1];if(u.slice(0,p.length)==p){for(var v=1,n=a-r.length+1;v<r.length-1;v++)if(o(e.getLine(n+v))!=r[v])continue e;var b=e.getLine(a+1-r.length),x=o(b);if(x.slice(x.length-r[0].length)==r[0])return{from:g(a+1-r.length,c(b,x,b.length-r[0].length,o)),to:g(a,c(f,u,p.length,o))}}}}function d(e,t,i,a){this.atOccurrence=!1,this.doc=e,i=i?e.clipPos(i):g(0,0),this.pos={from:i,to:i};var c;"object"==typeof a?c=a.caseFold:(c=a,a=null),"string"==typeof t?(null==c&&(c=!1),this.matches=function(n,i){return(n?u:f)(e,t,i,c)}):(t=n(t),a&&!1===a.multiline?this.matches=function(n,i){return(n?l:o)(e,t,i)}:this.matches=function(n,i){return(n?s:r)(e,t,i)})}var h,m,g=e.Pos;String.prototype.normalize?(h=function(e){return e.normalize("NFD").toLowerCase()},m=function(e){return e.normalize("NFD")}):(h=function(e){return e.toLowerCase()},m=function(e){return e}),d.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var n=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));n&&0==e.cmpPos(n.from,n.to);)t?n.from.ch?n.from=g(n.from.line,n.from.ch-1):n=n.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(g(n.from.line-1))):n.to.ch<this.doc.getLine(n.to.line).length?n.to=g(n.to.line,n.to.ch+1):n=n.to.line==this.doc.lastLine()?null:this.matches(t,g(n.to.line+1,0));if(n)return this.pos=n,this.atOccurrence=!0,this.pos.match||!0;var i=g(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=g(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,t,n){return new d(this.doc,e,t,n)}),e.defineDocExtension("getSearchCursor",function(e,t,n){return new d(this,e,t,n)}),e.defineExtension("selectMatches",function(t,n){for(var i=[],o=this.getSearchCursor(t,this.getCursor("from"),n);o.findNext()&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)i.push({anchor:o.from(),head:o.to()});i.length&&this.setSelections(i,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/scroll/annotatescrollbar",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){function n(e){clearTimeout(i.doRedraw),i.doRedraw=setTimeout(function(){i.redraw()},e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var i=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(i.doUpdate),i.doUpdate=setTimeout(function(){i.computeScale()&&n(20)},100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("change",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)}),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){function t(e,t){return s!=e.line&&(s=e.line,c=n.getLineHandle(s)),c.widgets&&c.widgets.length||a&&c.height>l?n.charCoords(e,"local")[t?"top":"bottom"]:n.heightAtLine(c,"local")+(t?0:c.height)}!1!==e&&this.computeScale();var n=this.cm,i=this.hScale,o=document.createDocumentFragment(),r=this.annotations,a=n.getOption("lineWrapping"),l=a&&1.5*n.defaultTextHeight(),s=null,c=null,f=n.lastLine();if(n.display.barWidth)for(var u,d=0;d<r.length;d++){var h=r[d];if(!(h.to.line>f)){for(var m=u||t(h.from,!0)*i,g=t(h.to,!1)*i;d<r.length-1&&!(r[d+1].to.line>f)&&!((u=t(r[d+1].from,!0)*i)>g+.9);)h=r[++d],g=t(h.to,!1)*i;if(g!=m){var p=Math.max(g-m,3),v=o.appendChild(document.createElement("div"));v.style.cssText="position: absolute; right: 0px; width: "+Math.max(n.display.barWidth-1,2)+"px; top: "+(m+this.buttonHeight)+"px; height: "+p+"px",v.className=this.options.className,h.id&&v.setAttribute("annotation-id",h.id)}}}this.div.textContent="",this.div.appendChild(o)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define("addon/search/matchesonscrollbar",["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,i){this.cm=e,this.options=i;var o={listenForChanges:!1};for(var r in i)o[r]=i[r];o.className||(o.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(o),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}function n(e,t,n){return e<=t?e:Math.max(t,e+n)}e.defineExtension("showMatchesOnScrollbar",function(e,n,i){return"string"==typeof i&&(i={className:i}),i||(i={}),new t(this,e,n,i)});t.prototype.findMatches=function(){if(this.gap){for(var t=0;t<this.matches.length;t++){var n=this.matches[t];if(n.from.line>=this.gap.to)break;n.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var i=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),this.caseFold),o=this.options&&this.options.maxMatches||1e3;i.findNext();){var n={from:i.from(),to:i.to()};if(n.from.line>=this.gap.to)break;if(this.matches.splice(t++,0,n),this.matches.length>o)break}this.gap=null}},t.prototype.onChange=function(t){var i=t.from.line,o=e.changeEnd(t).line,r=o-t.to.line;if(this.gap?(this.gap.from=Math.min(n(this.gap.from,i,r),t.from.line),this.gap.to=Math.max(n(this.gap.to,i,r),t.from.line)):this.gap={from:t.from.line,to:o+1},r)for(var a=0;a<this.matches.length;a++){var l=this.matches[a],s=n(l.from.line,i,r);s!=l.from.line&&(l.from=e.Pos(s,l.from.ch));var c=n(l.to.line,i,r);c!=l.to.line&&(l.to=e.Pos(c,l.to.ch))}clearTimeout(this.update);var f=this;this.update=setTimeout(function(){f.updateAfterChange()},250)},t.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},t.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define("addon/search/match-highlighter.js",["../../lib/codemirror","./matchesonscrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e){this.options={};for(var t in u)this.options[t]=(e&&e.hasOwnProperty(t)?e:u)[t];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function n(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&o(e,t)}function i(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,o(e,t))}function o(e,t){clearTimeout(t.timeout),t.timeout=setTimeout(function(){l(e)},t.options.delay)}function r(e,t,n,i){var o=e.state.matchHighlighter;if(e.addOverlay(o.overlay=f(t,n,i)),o.options.annotateScrollbar&&e.showMatchesOnScrollbar){var r=n?new RegExp("\\b"+t+"\\b"):t;o.matchesonscroll=e.showMatchesOnScrollbar(r,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function a(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(e){e.operation(function(){var t=e.state.matchHighlighter;if(a(e),!e.somethingSelected()&&t.options.showToken){for(var n=!0===t.options.showToken?/[\w$]/:t.options.showToken,i=e.getCursor(),o=e.getLine(i.line),l=i.ch,c=l;l&&n.test(o.charAt(l-1));)--l;for(;c<o.length&&n.test(o.charAt(c));)++c;return void(l<c&&r(e,o.slice(l,c),n,t.options.style))}var f=e.getCursor("from"),u=e.getCursor("to");if(f.line==u.line&&(!t.options.wordsOnly||s(e,f,u))){var d=e.getRange(f,u);t.options.trim&&(d=d.replace(/^\s+|\s+$/g,"")),d.length>=t.options.minChars&&r(e,d,!1,t.options.style)}})}function s(e,t,n){if(null!==e.getRange(t,n).match(/^\w+$/)){if(t.ch>0){var i={line:t.line,ch:t.ch-1},o=e.getRange(i,t);if(null===o.match(/\W/))return!1}if(n.ch<e.getLine(t.line).length){var i={line:n.line,ch:n.ch+1},o=e.getRange(n,i);if(null===o.match(/\W/))return!1}return!0}return!1}function c(e,t){return!(e.start&&t.test(e.string.charAt(e.start-1))||e.pos!=e.string.length&&t.test(e.string.charAt(e.pos)))}function f(e,t,n){return{token:function(i){if(i.match(e)&&(!t||c(i,t)))return n;i.next(),i.skipTo(e.charAt(0))||i.skipToEnd()}}}var u={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};e.defineOption("highlightSelectionMatches",!1,function(o,r,s){if(s&&s!=e.Init&&(a(o),clearTimeout(o.state.matchHighlighter.timeout),o.state.matchHighlighter=null,o.off("cursorActivity",n),o.off("focus",i)),r){var c=o.state.matchHighlighter=new t(r);o.hasFocus()?(c.active=!0,l(o)):o.on("focus",i),o.on("cursorActivity",n)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function n(e,t,n,i){if("string"==typeof t){var o=e.indexOf(t,n);return i&&o>-1?o+t.length:o}var r=t.exec(n?e.slice(n):e);return r?r.index+n+(i?r[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(o,r){if(r.innerActive){var a=r.innerActive,l=o.string;if(!a.close&&o.sol())return r.innerActive=r.inner=null,this.token(o,r);var s=a.close?n(l,a.close,o.pos,a.parseDelimiters):-1;if(s==o.pos&&!a.parseDelimiters)return o.match(a.close),r.innerActive=r.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(o.string=l.slice(0,s));var c=a.mode.token(o,r.inner);return s>-1&&(o.string=l),s==o.pos&&a.parseDelimiters&&(r.innerActive=r.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var f=1/0,l=o.string,u=0;u<i.length;++u){var d=i[u],s=n(l,d.open,o.pos);if(s==o.pos)return d.parseDelimiters||o.match(d.open),r.innerActive=d,r.inner=e.startState(d.mode,t.indent?t.indent(r.outer,""):0),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open";-1!=s&&s<f&&(f=s)}f!=1/0&&(o.string=l.slice(0,f));var h=t.token(o,r.outer);return f!=1/0&&(o.string=l),h},indent:function(n,i){var o=n.innerActive?n.innerActive.mode:t;return o.indent?o.indent(n.innerActive?n.inner:n.outer,i):e.Pass},blankLine:function(n){var o=n.innerActive?n.innerActive.mode:t;if(o.blankLine&&o.blankLine(n.innerActive?n.inner:n.outer),n.innerActive)"\n"===n.innerActive.close&&(n.innerActive=n.inner=null);else for(var r=0;r<i.length;++r){var a=i[r];"\n"===a.open&&(n.innerActive=a,n.inner=e.startState(a.mode,o.indent?o.indent(n.outer,""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}),function(e){"function"==typeof e.define&&e.define("addons",["addon/comment/continuecomment.js","addon/edit/closebrackets.js","addon/edit/closetag.js","addon/edit/matchbrackets.js","addon/edit/matchtags.js","addon/edit/trailingspace.js","addon/fold/foldgutter.js","addon/fold/brace-fold.js","addon/fold/comment-fold.js","addon/fold/indent-fold.js","addon/format/autoFormatAll.js","addon/format/formatting.js","addon/selection/active-line.js","addon/search/match-highlighter.js","addon/mode/multiplex.js"],function(){})}(this);
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/comment/continuecomment.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var i,r=t.listSelections(),o=[],a=0;a<r.length;a++){var l=r[a].head;if(!/\bcomment\b/.test(t.getTokenTypeAt(l)))return e.Pass;var s=t.getModeAt(l);if(i){if(i!=s)return e.Pass}else i=s;var c=null;if(i.blockCommentStart&&i.blockCommentContinue){var f,u=t.getLine(l.line).slice(0,l.ch),d=u.lastIndexOf(i.blockCommentEnd);if(-1!=d&&d==l.ch-i.blockCommentEnd.length);else if((f=u.lastIndexOf(i.blockCommentStart))>-1&&f>d){if(c=u.slice(0,f),/\S/.test(c)){c="";for(var h=0;h<f;++h)c+=" "}}else(f=u.indexOf(i.blockCommentContinue))>-1&&!/\S/.test(u.slice(0,f))&&(c=u.slice(0,f));null!=c&&(c+=i.blockCommentContinue)}if(null==c&&i.lineComment&&n(t)){var u=t.getLine(l.line),f=u.indexOf(i.lineComment);f>-1&&(c=u.slice(0,f),/\S/.test(c)?c=null:c+=i.lineComment+u.slice(f+i.lineComment.length).match(/^\s*/)[0])}if(null==c)return e.Pass;o[a]="\n"+c}t.operation(function(){for(var e=r.length-1;e>=0;e--)t.replaceRange(o[e],r[e].from(),r[e].to(),"+insert")})}function n(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||!1!==t.continueLineComment}e.defineOption("continueComments",null,function(n,i,r){if(r&&r!=e.Init&&n.removeKeyMap("continueComment"),i){var o="Enter";"string"==typeof i?o=i:"object"==typeof i&&i.key&&(o=i.key);var a={name:"continueComment"};a[o]=t,n.addKeyMap(a)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/closebrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:d[t]}function n(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";m[r]||(m[r]=i(n))}}function i(e){return function(t){return s(t,e)}}function r(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function o(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var o=t(i,"pairs"),a=n.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var s=f(n,a[l].head);if(!s||o.indexOf(s)%2!=0)return e.Pass}for(var l=a.length-1;l>=0;l--){var c=a[l].head;n.replaceRange("",h(c.line,c.ch-1),h(c.line,c.ch+1),"+delete")}}function a(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var s=f(n,a[l].head);if(!s||o.indexOf(s)%2!=0)return e.Pass}n.operation(function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),n.execCommand("goCharLeft"),a=n.listSelections();for(var t=0;t<a.length;t++){var i=a[t].head.line;n.indentLine(i,null,!0),n.indentLine(i+1,null,!0)}})}function l(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new h(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new h(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var o=r(n);if(!o||n.getOption("disableInput"))return e.Pass;var a=t(o,"pairs"),s=a.indexOf(i);if(-1==s)return e.Pass;for(var f,d=t(o,"triples"),m=a.charAt(s+1)==i,g=n.listSelections(),p=s%2==0,v=0;v<g.length;v++){var b,x=g[v],y=x.head,C=n.getRange(y,h(y.line,y.ch+1));if(p&&!x.empty())b="surround";else if(!m&&p||C!=i)if(m&&y.ch>1&&d.indexOf(i)>=0&&n.getRange(h(y.line,y.ch-2),y)==i+i){if(y.ch>2&&/\bstring/.test(n.getTokenTypeAt(h(y.line,y.ch-2))))return e.Pass;b="addFour"}else if(m){var k=0==y.ch?" ":n.getRange(h(y.line,y.ch-1),y);if(e.isWordChar(C)||k==i||e.isWordChar(k))return e.Pass;b="both"}else{if(!p||n.getLine(y.line).length!=y.ch&&!c(C,a)&&!/\s/.test(C))return e.Pass;b="both"}else b=m&&u(n,y)?"both":d.indexOf(i)>=0&&n.getRange(y,h(y.line,y.ch+3))==i+i+i?"skipThree":"skip";if(f){if(f!=b)return e.Pass}else f=b}var L=s%2?a.charAt(s-1):i,S=s%2?i:a.charAt(s+1);n.operation(function(){if("skip"==f)n.execCommand("goCharRight");else if("skipThree"==f)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==f){for(var t=n.getSelections(),e=0;e<t.length;e++)t[e]=L+t[e]+S;n.replaceSelections(t,"around"),t=n.listSelections().slice();for(var e=0;e<t.length;e++)t[e]=l(t[e]);n.setSelections(t)}else"both"==f?(n.replaceSelection(L+S,null),n.triggerElectric(L+S),n.execCommand("goCharLeft")):"addFour"==f&&(n.replaceSelection(L+L+L+L,"before"),n.execCommand("goCharRight"))})}function c(e,t){var n=t.lastIndexOf(e);return n>-1&&n%2==1}function f(e,t){var n=e.getRange(h(t.line,t.ch-1),h(t.line,t.ch+1));return 2==n.length?n:null}function u(e,t){var n=e.getTokenAt(h(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}var d={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},h=e.Pos;e.defineOption("autoCloseBrackets",!1,function(i,r,o){o&&o!=e.Init&&(i.removeKeyMap(m),i.state.closeBrackets=null),r&&(n(t(r,"pairs")),i.state.closeBrackets=r,i.addKeyMap(m))});var m={Backspace:o,Enter:a};n(d.pairs+"`")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/xml-fold",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(d(e.line,t));return n&&/\btag\b/.test(n)}function r(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(r(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(i(e,t+1)){m.lastIndex=t,e.ch=t;var n=m.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function s(e){for(;;){m.lastIndex=e.ch;var t=m.exec(e.text);if(!t){if(r(e))continue;return}{if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}}function f(e,t){for(var n=[];;){var i,r=s(e),o=e.line,l=e.ch-(r?r[0].length:0);if(!r||!(i=a(e)))return;if("selfClose"!=i)if(r[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==r[2]){n.length=c;break}if(c<0&&(!t||t==r[2]))return{tag:r[2],from:d(o,l),to:d(e.line,e.ch)}}else n.push(r[2])}}function u(e,t){for(var n=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var r=e.line,o=e.ch,a=l(e);if(!a)return;if(a[1])n.push(a[2]);else{for(var s=n.length-1;s>=0;--s)if(n[s]==a[2]){n.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:d(e.line,e.ch),to:d(r,o)}}}else l(e)}}var d=e.Pos,h="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",m=new RegExp("<(/?)(["+h+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,i){for(var r=new n(e,i.line,0);;){var o=s(r);if(!o||r.line!=i.line)return;var l=a(r);if(!l)return;if(!o[1]&&"selfClose"!=l){var c=d(r.line,r.ch),u=f(r,o[2]);return u&&t(u.from,c)>0?{from:c,to:u.from}:null}}}),e.findMatchingTag=function(e,i,r){var o=new n(e,i.line,i.ch,r);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=a(o),c=s&&d(o.line,o.ch),h=s&&l(o);if(s&&h&&!(t(o,i)>0)){var m={from:d(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==s?{open:m,close:null,at:"open"}:h[1]?{open:u(o,h[2]),close:m,at:"close"}:(o=new n(e,c.line,c.ch,r),{open:m,close:f(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,i,r){for(var o=new n(e,t.line,t.ch,i);;){var a=u(o,r);if(!a)break;var l=new n(e,t.line,t.ch,i),s=f(l,a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,i,r){return f(new n(e,t.line,t.ch,r?{from:0,to:r}:null),i)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/closetag.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),i=[],s=t.getOption("autoCloseTags"),c=0;c<n.length;c++){if(!n[c].empty())return e.Pass;var f=n[c].head,u=t.getTokenAt(f),d=e.innerMode(t.getMode(),u.state),h=d.state;if("xml"!=d.mode.name||!h.tagName)return e.Pass;var m="html"==d.mode.configuration,g="object"==typeof s&&s.dontCloseTags||m&&a,p="object"==typeof s&&s.indentTags||m&&l,v=h.tagName;u.end>f.ch&&(v=v.slice(0,v.length-u.end+f.ch));var b=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=f.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==h.type||u.string.indexOf("/")==u.string.length-1||g&&r(g,b)>-1||o(t,v,f,h,!0))return e.Pass;var x=p&&r(p,b)>-1;i[c]={indent:x,text:">"+(x?"\n\n":"")+"</"+v+">",newPos:x?e.Pos(f.line+1,0):e.Pos(f.line,f.ch+1)}}for(var y="object"==typeof s&&s.dontIndentOnAutoClose,c=n.length-1;c>=0;c--){var C=i[c];t.replaceRange(C.text,n[c].head,n[c].anchor,"+insert");var k=t.listSelections().slice(0);k[c]={head:C.newPos,anchor:C.newPos},t.setSelections(k),!y&&C.indent&&(t.indentLine(C.newPos.line,null,!0),t.indentLine(C.newPos.line+1,null,!0))}}function n(t,n){for(var i=t.listSelections(),r=[],a=n?"/":"</",l=t.getOption("autoCloseTags"),s="object"==typeof l&&l.dontIndentOnSlash,c=0;c<i.length;c++){if(!i[c].empty())return e.Pass;var f=i[c].head,u=t.getTokenAt(f),d=e.innerMode(t.getMode(),u.state),h=d.state;if(n&&("string"==u.type||"<"!=u.string.charAt(0)||u.start!=f.ch-1))return e.Pass;var m;if("xml"!=d.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==d.mode.name)m=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=d.mode.name)return e.Pass;m=a+"style"}else{if(!h.context||!h.context.tagName||o(t,h.context.tagName,f,h))return e.Pass;m=a+h.context.tagName}">"!=t.getLine(f.line).charAt(u.end)&&(m+=">"),r[c]=m}if(t.replaceSelections(r),i=t.listSelections(),!s)for(var c=0;c<i.length;c++)(c==i.length-1||i[c].head.line<i[c+1].head.line)&&t.indentLine(i[c].head.line)}function i(t){return t.getOption("disableInput")?e.Pass:n(t,!0)}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;++n)if(e[n]==t)return n;return-1}function o(t,n,i,r,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,i.line+500),l=e.scanForClosingTag(t,i,null,a);if(!l||l.tag!=n)return!1;for(var s=r.context,c=o?1:0;s&&s.tagName==n;s=s.prev)++c;i=l.to;for(var f=1;f<c;f++){var u=e.scanForClosingTag(t,i,null,a);if(!u||u.tag!=n)return!1;i=u.to}return!0}e.defineOption("autoCloseTags",!1,function(n,r,o){if(o!=e.Init&&o&&n.removeKeyMap("autoCloseTags"),r){var a={name:"autoCloseTags"};("object"!=typeof r||r.whenClosing)&&(a["'/'"]=function(e){return i(e)}),("object"!=typeof r||r.whenOpening)&&(a["'>'"]=function(e){return t(e)}),n.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/matchbrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,i){var r=e.getLineHandle(t.line),o=t.ch-1,s=i&&i.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=!s&&o>=0&&l[r.text.charAt(o)]||l[r.text.charAt(++o)];if(!c)return null;var f=">"==c.charAt(1)?1:-1;if(i&&i.strict&&f>0!=(o==t.ch))return null;var u=e.getTokenTypeAt(a(t.line,o+1)),d=n(e,a(t.line,o+(f>0?1:0)),f,u||null,i);return null==d?null:{from:a(t.line,o),to:d&&d.pos,match:d&&d.ch==c.charAt(0),forward:f>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,s=r&&r.maxScanLines||1e3,c=[],f=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,u=n>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),d=t.line;d!=u;d+=n){var h=e.getLine(d);if(h){var m=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>o))for(d==t.line&&(m=t.ch-(n<0?1:0));m!=g;m+=n){var p=h.charAt(m);if(f.test(p)&&(void 0===i||e.getTokenTypeAt(a(d,m+1))==i)){var v=l[p];if(">"==v.charAt(1)==n>0)c.push(p);else{if(!c.length)return{pos:a(d,m),ch:p};c.pop()}}}}}return d-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],s=e.listSelections(),c=0;c<s.length;c++){var f=s[c].empty()&&t(e,s[c].head,i);if(f&&e.getLine(f.from.line).length<=r){var u=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(f.from,a(f.from.line,f.from.ch+1),{className:u})),f.to&&e.getLine(f.to.line).length<=r&&l.push(e.markText(f.to,a(f.to.line,f.to.ch+1),{className:u}))}}if(l.length){o&&e.state.focused&&e.focus();var d=function(){e.operation(function(){for(var e=0;e<l.length;e++)l[e].clear()})};if(!n)return d;setTimeout(d,800)}}function r(e){e.operation(function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=i(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return(i||"boolean"==typeof n)&&(i?(i.strict=n,n=i):n=n?{strict:!0}:null),t(this,e,n)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/matchtags.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var i=n.getCursor(),r=n.getViewport();r.from=Math.min(r.from,i.line),r.to=Math.max(i.line+1,r.to);var o=e.findMatchingTag(n,i,r);if(o){if(n.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?n.state.tagOther=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(r,o,a){a&&a!=e.Init&&(r.off("cursorActivity",n),r.off("viewportChange",i),t(r)),o&&(r.state.matchBothTags="object"==typeof o&&o.bothTags,r.on("cursorActivity",n),r.on("viewportChange",i),n(r))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var i="close"==n.at?n.open:n.close;i&&t.extendSelection(i.to,i.from)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/trailingspace.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineOption("showTrailingSpace",!1,function(t,n,i){i==e.Init&&(i=!1),i&&!n?t.removeOverlay("trailingspace"):!i&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/foldcode",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,r,o,a){function l(e){var n=s(t,r);if(!n||n.to.line-n.from.line<c)return null;for(var i=t.findMarksAt(n.from),o=0;o<i.length;++o)if(i[o].__isFold&&"fold"!==a){if(!e)return null;n.cleared=!0,i[o].clear()}return n}if(o&&o.call){var s=o;o=null}else var s=i(t,o,"rangeFinder");"number"==typeof r&&(r=e.Pos(r,0));var c=i(t,o,"minFoldSize"),f=l(!0);if(i(t,o,"scanUp"))for(;!f&&r.line>t.firstLine();)r=e.Pos(r.line-1,0),f=l(!1);if(f&&!f.cleared&&"unfold"!==a){var u=n(t,o);e.on(u,"mousedown",function(t){d.clear(),e.e_preventDefault(t)});var d=t.markText(f.from,f.to,{replacedWith:u,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});d.on("clear",function(n,i){e.signal(t,"unfold",t,n,i)}),e.signal(t,"fold",t,f.from,f.to)}}function n(e,t){var n=i(e,t,"widget");if("string"==typeof n){var r=document.createTextNode(n);n=document.createElement("span"),n.appendChild(r),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.newFoldFunction=function(e,n){return function(i,r){t(i,r,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,i){t(this,e,n,i)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),null,"fold")})},e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),null,"unfold")})},e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var i=0;i<e.length;++i){var r=e[i](t,n);if(r)return r}}}),e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),i=0;i<n.length;i++){var r=n[i](e,t);if(r)return r}});var r={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};e.defineOption("foldOptions",null),e.defineExtension("foldOption",function(e,t){return i(this,e,t)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define("addon/fold/foldgutter.js",["../../lib/codemirror","./foldcode"],e):e(CodeMirror)}(function(e){"use strict";function t(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,t){for(var n=e.findMarks(u(t,0),u(t+1,0)),i=0;i<n.length;++i)if(n[i].__isFold&&n[i].find().from.line==t)return n[i]}function r(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function o(e,t,n){var o=e.state.foldGutter.options,a=t,l=e.foldOption(o,"minFoldSize"),s=e.foldOption(o,"rangeFinder");e.eachLine(t,n,function(t){var n=null;if(i(e,a))n=r(o.indicatorFolded);else{var c=u(a,0),f=s&&s(e,c);f&&f.to.line-f.from.line>=l&&(n=r(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n),++a})}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){o(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var r=e.state.foldGutter;if(r){var o=r.options;if(n==o.gutter){var a=i(e,t);a?a.clear():e.foldCode(u(t,0),o.rangeFinder)}}}function s(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation(function(){n.from<t.from&&(o(e,n.from,t.from),t.from=n.from),n.to>t.to&&(o(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&i<n.to&&o(e,i,i+1)}}e.defineOption("foldGutter",!1,function(i,r,o){o&&o!=e.Init&&(i.clearGutter(i.state.foldGutter.options.gutter),i.state.foldGutter=null,i.off("gutterClick",l),i.off("change",s),i.off("viewportChange",c),i.off("fold",f),i.off("unfold",f),i.off("swapDoc",s)),r&&(i.state.foldGutter=new t(n(r)),a(i),i.on("gutterClick",l),i.on("change",s),i.on("viewportChange",c),i.on("fold",f),i.on("unfold",f),i.on("swapDoc",s))});var u=e.Pos}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/brace-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function i(i){for(var l=n.ch,s=0;;){var c=l<=0?-1:a.lastIndexOf(i,l-1);if(-1!=c){if(1==s&&c<n.ch)break;if(r=t.getTokenTypeAt(e.Pos(o,c+1)),!/^(comment|string)/.test(r))return c+1;l=c-1}else{if(1==s)break;s=1,l=a.length}}}var r,o=n.line,a=t.getLine(o),l="{",s="}",c=i("{");if(null==c&&(l="[",s="]",c=i("[")),null!=c){var f,u,d=1,h=t.lastLine();e:for(var m=o;m<=h;++m)for(var g=t.getLine(m),p=m==o?c:0;;){var v=g.indexOf(l,p),b=g.indexOf(s,p);if(v<0&&(v=g.length),b<0&&(b=g.length),(p=Math.min(v,b))==g.length)break;if(t.getTokenTypeAt(e.Pos(m,p+1))==r)if(p==v)++d;else if(!--d){f=m,u=p;break e}++p}if(null!=f&&(o!=f||u!=c))return{from:e.Pos(o,c),to:e.Pos(f,u)}}}),e.registerHelper("fold","import",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));if(/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"keyword"!=i.type||"import"!=i.string)return null;for(var r=n,o=Math.min(t.lastLine(),n+10);r<=o;++r){var a=t.getLine(r),l=a.indexOf(";");if(-1!=l)return{startCh:i.end,end:e.Pos(r,l)}}}var r,o=n.line,a=i(o);if(!a||i(o-1)||(r=i(o-2))&&r.end.line==o-1)return null;for(var l=a.end;;){var s=i(l.line+1);if(null==s)break;l=s.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:l}}),e.registerHelper("fold","include",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));return/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var r=n.line,o=i(r);if(null==o||null!=i(r-1))return null;for(var a=r;;){if(null==i(a+1))break;++a}return{from:e.Pos(r,o+1),to:t.clipPos(e.Pos(a))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/comment-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var i=t.getModeAt(n),r=i.blockCommentStart,o=i.blockCommentEnd;if(r&&o){for(var a,l=n.line,s=t.getLine(l),c=n.ch,f=0;;){var u=c<=0?-1:s.lastIndexOf(r,c-1);if(-1!=u){if(1==f&&u<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(l,u+1)))&&(0==u||s.slice(u-o.length,u)==o||!/comment/.test(t.getTokenTypeAt(e.Pos(l,u))))){a=u+r.length;break}c=u-1}else{if(1==f)return;f=1,c=s.length}}var d,h,m=1,g=t.lastLine();e:for(var p=l;p<=g;++p)for(var v=t.getLine(p),b=p==l?a:0;;){var x=v.indexOf(r,b),y=v.indexOf(o,b);if(x<0&&(x=v.length),y<0&&(y=v.length),(b=Math.min(x,y))==v.length)break;if(b==x)++m;else if(!--m){d=p,h=b;break e}++b}if(null!=d&&(l!=d||h!=a))return{from:e.Pos(l,a),to:e.Pos(d,h)}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/indent-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,n){var i=t.getLine(n),r=i.search(/\S/);return-1==r||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(n,r+1)))?-1:e.countColumn(i,null,t.getOption("tabSize"))}e.registerHelper("fold","indent",function(n,i){var r=t(n,i.line);if(!(r<0)){for(var o=null,a=i.line+1,l=n.lastLine();a<=l;++a){var s=t(n,a);if(-1==s);else{if(!(s>r))break;o=a}}return o?{from:e.Pos(i.line,n.getLine(i.line).length),to:e.Pos(o,n.getLine(o).length)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/format/autoFormatAll.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineExtension("autoFormatAll",function(t,n){function i(){c+="\n",u=!0,++f}for(var r=this,o=r.getMode(),a=r.getRange(t,n).split("\n"),l=e.copyState(o,r.getTokenAt(t).state),s=r.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;d<a.length;++d){for(var h=new e.StringStream(a[d],s);!h.eol();){var m=e.innerMode(o,l),g=o.token(h,l),p=h.current();h.start=h.pos,u&&!/\S/.test(p)||(c+=p,u=!1),!u&&m.mode.newlineAfterToken&&m.mode.newlineAfterToken(g,p,h.string.slice(h.pos)||a[d+1]||"",m.state)&&i()}!h.pos&&o.blankLine&&o.blankLine(l),!u&&d<a.length-1&&i()}r.operation(function(){r.replaceRange(c,t,n);for(var e=t.line+1,i=t.line+f;e<=i;++e)r.indentLine(e,"smart");r.setCursor({line:0,ch:0})})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/format/formatting.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e){for(var t=[/for\s*?\((.*?)\)/g,/&#?[a-z0-9]+;[\s\S]/g,/\"(.*?)((\")|$)/g,/\/\*(.*?)(\*\/|$)/g,/^\/\/.*/g],n=[],i=0;i<t.length;i++)for(var r=0;r<e.length;){var o=e.substr(r).match(t[i]);if(null==o)break;n.push({start:r+o.index,end:r+o.index+o[0].length}),r+=o.index+Math.max(1,o[0].length)}return n.sort(function(e,t){return e.start-t.start}),n}e.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(e,t){return/^[;{}]$/.test(t)}}),e.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",wordWrapChars:[";","\\{","\\}"],autoFormatLineBreaks:function(e){var n=0,i=this.jsonMode?function(e){return e.replace(/([,{])/g,"$1\n").replace(/}/g,"\n}")}:function(e){return e.replace(/(;|\{|\})([^\r\n;])/g,"$1\n$2")},r=t(e),o="";if(null!=r){for(var a=0;a<r.length;a++)r[a].start>n&&(o+=i(e.substring(n,r[a].start)),n=r[a].start),r[a].start<=n&&r[a].end>=n&&(o+=e.substring(n,r[a].end),n=r[a].end);n<e.length&&(o+=i(e.substr(n)))}else o=i(e);return o.replace(/^\n*|\n*$/,"")}});e.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",noBreak:!1,noBreakEmpty:null,tagType:"",tagName:"",isXML:!1,newlineAfterToken:function(e,t,n,i){var r="a|b|bdi|bdo|big|center|cite|del|em|font|i|img|ins|s|small|span|strike|strong|sub|sup|u",o="label|li|option|textarea|title|"+r,a=!1,l=null,s="";if(this.isXML="xml"==this.configuration,"comment"==e||/<!--/.test(n))return!1;if("tag"==e){if(0==t.indexOf("<")&&0==!t.indexOf("</")){this.tagType="open",l=t.match(/^<\s*?([\w]+?)$/i),this.tagName=null!=l?l[1]:"";var s=this.tagName.toLowerCase();-1!=("|"+o+"|").indexOf("|"+s+"|")&&(this.noBreak=!0)}if(0==t.indexOf(">")&&"open"==this.tagType){this.tagType="";var c=this.isXML?"[^<]*?":"";return RegExp("^"+c+"</s*?"+this.tagName+"s*?>","i").test(n)?(this.noBreak=!1,this.isXML||(this.tagName=""),!1):(a=this.noBreak,this.noBreak=!1,!a)}if(0==t.indexOf("</")&&(this.tagType="close",l=t.match(/^<\/\s*?([\w]+?)$/i),null!=l&&(s=l[1].toLowerCase()),-1!=("|"+r+"|").indexOf("|"+s+"|")&&(this.noBreak=!0)),0==t.indexOf(">")&&"close"==this.tagType)return this.tagType="",0==n.indexOf("<")&&(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+o+"|").indexOf("|"+s+"|"))?(this.noBreak=!1,!0):(a=this.noBreak,this.noBreak=!1,!a)}return 0==n.indexOf("<")&&(this.noBreak=!1,this.isXML&&""!=this.tagName?(this.tagName="",!1):(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+o+"|").indexOf("|"+s+"|")))}}),e.defineExtension("commentRange",function(t,n,i){var r=this,o=e.innerMode(r.getMode(),r.getTokenAt(n).state).mode;r.operation(function(){if(t)r.replaceRange(o.commentEnd,i),r.replaceRange(o.commentStart,n),r.setSelection(n,{line:i.line,ch:i.ch+o.commentStart.length+o.commentEnd.length}),n.line==i.line&&n.ch==i.ch&&r.setCursor(n.line,n.ch+o.commentStart.length);else{var e=r.getRange(n,i),a=e.indexOf(o.commentStart),l=e.lastIndexOf(o.commentEnd);a>-1&&l>-1&&l>a&&(e=e.substr(0,a)+e.substring(a+o.commentStart.length,l)+e.substr(l+o.commentEnd.length)),r.replaceRange(e,n,i),r.setSelection(n,{line:i.line,ch:i.ch-o.commentStart.length-o.commentEnd.length})}})}),e.defineExtension("autoIndentRange",function(e,t){var n=this;this.operation(function(){for(var i=e.line;i<=t.line;i++)n.indentLine(i,"smart")})}),e.defineExtension("autoFormatRange",function(t,n){function i(){c+="\n",u=!0,++f}for(var r=this,o=r.getMode(),a=r.getRange(t,n).split("\n"),l=e.copyState(o,r.getTokenAt(t).state),s=r.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;d<a.length;++d){for(var h=new e.StringStream(a[d],s);!h.eol();){var m=e.innerMode(o,l),g=o.token(h,l),p=h.current();h.start=h.pos,u&&!/\S/.test(p)||(c+=p,u=!1),!u&&m.mode.newlineAfterToken&&m.mode.newlineAfterToken(g,p,h.string.slice(h.pos)||a[d+1]||"",m.state)&&i()}!h.pos&&o.blankLine&&o.blankLine(l),!u&&d<a.length-1&&i()}r.operation(function(){r.replaceRange(c,t,n);for(var e=t.line+1,i=t.line+f;e<=i;++e)r.indentLine(e,"smart");r.setSelection(t,r.getCursor(!1))})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/selection/active-line.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",o),e.removeLineClass(e.state.activeLines[t],"background",a),e.removeLineClass(e.state.activeLines[t],"gutter",l)}function n(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function i(e,i){for(var r=[],s=0;s<i.length;s++){var c=i[s],f=e.getOption("styleActiveLine");if("object"==typeof f&&f.nonEmpty?c.anchor.line==c.head.line:c.empty()){var u=e.getLineHandleVisualStart(c.head.line);r[r.length-1]!=u&&r.push(u)}}n(e.state.activeLines,r)||e.operation(function(){t(e);for(var n=0;n<r.length;n++)e.addLineClass(r[n],"wrap",o),e.addLineClass(r[n],"background",a),e.addLineClass(r[n],"gutter",l);e.state.activeLines=r})}function r(e,t){i(e,t.ranges)}var o="CodeMirror-activeline",a="CodeMirror-activeline-background",l="CodeMirror-activeline-gutter";e.defineOption("styleActiveLine",!1,function(n,o,a){var l=a!=e.Init&&a;o!=l&&(l&&(n.off("beforeSelectionChange",r),t(n),delete n.state.activeLines),o&&(n.state.activeLines=[],i(n,n.listSelections()),n.on("beforeSelectionChange",r)))})}),function(e){
2
+ "object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/search/searchcursor",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function n(e,n){for(var i=t(e),r=i,o=0;o<n.length;o++)-1==r.indexOf(n.charAt(o))&&(r+=n.charAt(o));return i==r?e:new RegExp(e.source,r)}function i(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function r(e,t,i){t=n(t,"g");for(var r=i.line,o=i.ch,a=e.lastLine();r<=a;r++,o=0){t.lastIndex=o;var l=e.getLine(r),s=t.exec(l);if(s)return{from:g(r,s.index),to:g(r,s.index+s[0].length),match:s}}}function o(e,t,o){if(!i(t))return r(e,t,o);t=n(t,"gm");for(var a,l=1,s=o.line,c=e.lastLine();s<=c;){for(var f=0;f<l&&!(s>c);f++){var u=e.getLine(s++);a=null==a?u:a+"\n"+u}l*=2,t.lastIndex=o.ch;var d=t.exec(a);if(d){var h=a.slice(0,d.index).split("\n"),m=d[0].split("\n"),p=o.line+h.length-1,v=h[h.length-1].length;return{from:g(p,v),to:g(p+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:d}}}}function a(e,t){for(var n,i=0;;){t.lastIndex=i;var r=t.exec(e);if(!r)return n;if(n=r,(i=n.index+(n[0].length||1))==e.length)return n}}function l(e,t,i){t=n(t,"g");for(var r=i.line,o=i.ch,l=e.firstLine();r>=l;r--,o=-1){var s=e.getLine(r);o>-1&&(s=s.slice(0,o));var c=a(s,t);if(c)return{from:g(r,c.index),to:g(r,c.index+c[0].length),match:c}}}function s(e,t,i){t=n(t,"gm");for(var r,o=1,l=i.line,s=e.firstLine();l>=s;){for(var c=0;c<o;c++){var f=e.getLine(l--);r=null==r?f.slice(0,i.ch):f+"\n"+r}o*=2;var u=a(r,t);if(u){var d=r.slice(0,u.index).split("\n"),h=u[0].split("\n"),m=l+d.length,p=d[d.length-1].length;return{from:g(m,p),to:g(m+h.length-1,1==h.length?p+h[0].length:h[h.length-1].length),match:u}}}}function c(e,t,n,i){if(e.length==t.length)return n;for(var r=0,o=n+Math.max(0,e.length-t.length);;){if(r==o)return r;var a=r+o>>1,l=i(e.slice(0,a)).length;if(l==n)return a;l>n?o=a:r=a+1}}function f(e,t,n,i){if(!t.length)return null;var r=i?h:m,o=r(t).split(/\r|\n\r?/);e:for(var a=n.line,l=n.ch,s=e.lastLine()+1-o.length;a<=s;a++,l=0){var f=e.getLine(a).slice(l),u=r(f);if(1==o.length){var d=u.indexOf(o[0]);if(-1==d)continue e;var n=c(f,u,d,r)+l;return{from:g(a,c(f,u,d,r)+l),to:g(a,c(f,u,d+o[0].length,r)+l)}}var p=u.length-o[0].length;if(u.slice(p)==o[0]){for(var v=1;v<o.length-1;v++)if(r(e.getLine(a+v))!=o[v])continue e;var b=e.getLine(a+o.length-1),x=r(b),y=o[o.length-1];if(x.slice(0,y.length)==y)return{from:g(a,c(f,u,p,r)+l),to:g(a+o.length-1,c(b,x,y.length,r))}}}}function u(e,t,n,i){if(!t.length)return null;var r=i?h:m,o=r(t).split(/\r|\n\r?/);e:for(var a=n.line,l=n.ch,s=e.firstLine()-1+o.length;a>=s;a--,l=-1){var f=e.getLine(a);l>-1&&(f=f.slice(0,l));var u=r(f);if(1==o.length){var d=u.lastIndexOf(o[0]);if(-1==d)continue e;return{from:g(a,c(f,u,d,r)),to:g(a,c(f,u,d+o[0].length,r))}}var p=o[o.length-1];if(u.slice(0,p.length)==p){for(var v=1,n=a-o.length+1;v<o.length-1;v++)if(r(e.getLine(n+v))!=o[v])continue e;var b=e.getLine(a+1-o.length),x=r(b);if(x.slice(x.length-o[0].length)==o[0])return{from:g(a+1-o.length,c(b,x,b.length-o[0].length,r)),to:g(a,c(f,u,p.length,r))}}}}function d(e,t,i,a){this.atOccurrence=!1,this.doc=e,i=i?e.clipPos(i):g(0,0),this.pos={from:i,to:i};var c;"object"==typeof a?c=a.caseFold:(c=a,a=null),"string"==typeof t?(null==c&&(c=!1),this.matches=function(n,i){return(n?u:f)(e,t,i,c)}):(t=n(t,"gm"),a&&!1===a.multiline?this.matches=function(n,i){return(n?l:r)(e,t,i)}:this.matches=function(n,i){return(n?s:o)(e,t,i)})}var h,m,g=e.Pos;String.prototype.normalize?(h=function(e){return e.normalize("NFD").toLowerCase()},m=function(e){return e.normalize("NFD")}):(h=function(e){return e.toLowerCase()},m=function(e){return e}),d.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var n=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));n&&0==e.cmpPos(n.from,n.to);)t?n.from.ch?n.from=g(n.from.line,n.from.ch-1):n=n.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(g(n.from.line-1))):n.to.ch<this.doc.getLine(n.to.line).length?n.to=g(n.to.line,n.to.ch+1):n=n.to.line==this.doc.lastLine()?null:this.matches(t,g(n.to.line+1,0));if(n)return this.pos=n,this.atOccurrence=!0,this.pos.match||!0;var i=g(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=g(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,t,n){return new d(this.doc,e,t,n)}),e.defineDocExtension("getSearchCursor",function(e,t,n){return new d(this,e,t,n)}),e.defineExtension("selectMatches",function(t,n){for(var i=[],r=this.getSearchCursor(t,this.getCursor("from"),n);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)i.push({anchor:r.from(),head:r.to()});i.length&&this.setSelections(i,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/scroll/annotatescrollbar",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){function n(e){clearTimeout(i.doRedraw),i.doRedraw=setTimeout(function(){i.redraw()},e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var i=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(i.doUpdate),i.doUpdate=setTimeout(function(){i.computeScale()&&n(20)},100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("change",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)}),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){function t(e,t){return s!=e.line&&(s=e.line,c=n.getLineHandle(s)),c.widgets&&c.widgets.length||a&&c.height>l?n.charCoords(e,"local")[t?"top":"bottom"]:n.heightAtLine(c,"local")+(t?0:c.height)}!1!==e&&this.computeScale();var n=this.cm,i=this.hScale,r=document.createDocumentFragment(),o=this.annotations,a=n.getOption("lineWrapping"),l=a&&1.5*n.defaultTextHeight(),s=null,c=null,f=n.lastLine();if(n.display.barWidth)for(var u,d=0;d<o.length;d++){var h=o[d];if(!(h.to.line>f)){for(var m=u||t(h.from,!0)*i,g=t(h.to,!1)*i;d<o.length-1&&!(o[d+1].to.line>f)&&!((u=t(o[d+1].from,!0)*i)>g+.9);)h=o[++d],g=t(h.to,!1)*i;if(g!=m){var p=Math.max(g-m,3),v=r.appendChild(document.createElement("div"));v.style.cssText="position: absolute; right: 0px; width: "+Math.max(n.display.barWidth-1,2)+"px; top: "+(m+this.buttonHeight)+"px; height: "+p+"px",v.className=this.options.className,h.id&&v.setAttribute("annotation-id",h.id)}}}this.div.textContent="",this.div.appendChild(r)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define("addon/search/matchesonscrollbar",["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,i){this.cm=e,this.options=i;var r={listenForChanges:!1};for(var o in i)r[o]=i[o];r.className||(r.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(r),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}function n(e,t,n){return e<=t?e:Math.max(t,e+n)}e.defineExtension("showMatchesOnScrollbar",function(e,n,i){return"string"==typeof i&&(i={className:i}),i||(i={}),new t(this,e,n,i)});t.prototype.findMatches=function(){if(this.gap){for(var t=0;t<this.matches.length;t++){var n=this.matches[t];if(n.from.line>=this.gap.to)break;n.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var i=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),this.caseFold),r=this.options&&this.options.maxMatches||1e3;i.findNext();){var n={from:i.from(),to:i.to()};if(n.from.line>=this.gap.to)break;if(this.matches.splice(t++,0,n),this.matches.length>r)break}this.gap=null}},t.prototype.onChange=function(t){var i=t.from.line,r=e.changeEnd(t).line,o=r-t.to.line;if(this.gap?(this.gap.from=Math.min(n(this.gap.from,i,o),t.from.line),this.gap.to=Math.max(n(this.gap.to,i,o),t.from.line)):this.gap={from:t.from.line,to:r+1},o)for(var a=0;a<this.matches.length;a++){var l=this.matches[a],s=n(l.from.line,i,o);s!=l.from.line&&(l.from=e.Pos(s,l.from.ch));var c=n(l.to.line,i,o);c!=l.to.line&&(l.to=e.Pos(c,l.to.ch))}clearTimeout(this.update);var f=this;this.update=setTimeout(function(){f.updateAfterChange()},250)},t.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},t.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define("addon/search/match-highlighter.js",["../../lib/codemirror","./matchesonscrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e){this.options={};for(var t in u)this.options[t]=(e&&e.hasOwnProperty(t)?e:u)[t];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function n(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&r(e,t)}function i(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,r(e,t))}function r(e,t){clearTimeout(t.timeout),t.timeout=setTimeout(function(){l(e)},t.options.delay)}function o(e,t,n,i){var r=e.state.matchHighlighter;if(e.addOverlay(r.overlay=f(t,n,i)),r.options.annotateScrollbar&&e.showMatchesOnScrollbar){var o=n?new RegExp("\\b"+t.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+"\\b"):t;r.matchesonscroll=e.showMatchesOnScrollbar(o,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function a(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(e){e.operation(function(){var t=e.state.matchHighlighter;if(a(e),!e.somethingSelected()&&t.options.showToken){for(var n=!0===t.options.showToken?/[\w$]/:t.options.showToken,i=e.getCursor(),r=e.getLine(i.line),l=i.ch,c=l;l&&n.test(r.charAt(l-1));)--l;for(;c<r.length&&n.test(r.charAt(c));)++c;return void(l<c&&o(e,r.slice(l,c),n,t.options.style))}var f=e.getCursor("from"),u=e.getCursor("to");if(f.line==u.line&&(!t.options.wordsOnly||s(e,f,u))){var d=e.getRange(f,u);t.options.trim&&(d=d.replace(/^\s+|\s+$/g,"")),d.length>=t.options.minChars&&o(e,d,!1,t.options.style)}})}function s(e,t,n){if(null!==e.getRange(t,n).match(/^\w+$/)){if(t.ch>0){var i={line:t.line,ch:t.ch-1},r=e.getRange(i,t);if(null===r.match(/\W/))return!1}if(n.ch<e.getLine(t.line).length){var i={line:n.line,ch:n.ch+1},r=e.getRange(n,i);if(null===r.match(/\W/))return!1}return!0}return!1}function c(e,t){return!(e.start&&t.test(e.string.charAt(e.start-1))||e.pos!=e.string.length&&t.test(e.string.charAt(e.pos)))}function f(e,t,n){return{token:function(i){if(i.match(e)&&(!t||c(i,t)))return n;i.next(),i.skipTo(e.charAt(0))||i.skipToEnd()}}}var u={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};e.defineOption("highlightSelectionMatches",!1,function(r,o,s){if(s&&s!=e.Init&&(a(r),clearTimeout(r.state.matchHighlighter.timeout),r.state.matchHighlighter=null,r.off("cursorActivity",n),r.off("focus",i)),o){var c=r.state.matchHighlighter=new t(o);r.hasFocus()?(c.active=!0,l(r)):r.on("focus",i),r.on("cursorActivity",n)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function n(e,t,n,i){if("string"==typeof t){var r=e.indexOf(t,n);return i&&r>-1?r+t.length:r}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(r,o){if(o.innerActive){var a=o.innerActive,l=r.string;if(!a.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);var s=a.close?n(l,a.close,r.pos,a.parseDelimiters):-1;if(s==r.pos&&!a.parseDelimiters)return r.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(r.string=l.slice(0,s));var c=a.mode.token(r,o.inner);return s>-1&&(r.string=l),s==r.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var f=1/0,l=r.string,u=0;u<i.length;++u){var d=i[u],s=n(l,d.open,r.pos);if(s==r.pos){d.parseDelimiters||r.match(d.open),o.innerActive=d;var h=0;if(t.indent){var m=t.indent(o.outer,"");m!==e.Pass&&(h=m)}return o.inner=e.startState(d.mode,h),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open"}-1!=s&&s<f&&(f=s)}f!=1/0&&(r.string=l.slice(0,f));var g=t.token(r,o.outer);return f!=1/0&&(r.string=l),g},indent:function(n,i){var r=n.innerActive?n.innerActive.mode:t;return r.indent?r.indent(n.innerActive?n.inner:n.outer,i):e.Pass},blankLine:function(n){var r=n.innerActive?n.innerActive.mode:t;if(r.blankLine&&r.blankLine(n.innerActive?n.inner:n.outer),n.innerActive)"\n"===n.innerActive.close&&(n.innerActive=n.inner=null);else for(var o=0;o<i.length;++o){var a=i[o];"\n"===a.open&&(n.innerActive=a,n.inner=e.startState(a.mode,r.indent?r.indent(n.outer,""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}),function(e){"function"==typeof e.define&&e.define("addons",["addon/comment/continuecomment.js","addon/edit/closebrackets.js","addon/edit/closetag.js","addon/edit/matchbrackets.js","addon/edit/matchtags.js","addon/edit/trailingspace.js","addon/fold/foldgutter.js","addon/fold/brace-fold.js","addon/fold/comment-fold.js","addon/fold/indent-fold.js","addon/format/autoFormatAll.js","addon/format/formatting.js","addon/selection/active-line.js","addon/search/match-highlighter.js","addon/mode/multiplex.js"],function(){})}(this);
@@ -1 +1 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/search/searchcursor",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e){var n=e.flags;return null!=n?n:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function t(e){return e.global?e:new RegExp(e.source,n(e)+"g")}function o(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function r(e,n,o){n=t(n);for(var r=o.line,i=o.ch,s=e.lastLine();r<=s;r++,i=0){n.lastIndex=i;var c=e.getLine(r),l=n.exec(c);if(l)return{from:g(r,l.index),to:g(r,l.index+l[0].length),match:l}}}function i(e,n,i){if(!o(n))return r(e,n,i);n=t(n);for(var s,c=1,l=i.line,a=e.lastLine();l<=a;){for(var u=0;u<c;u++){var f=e.getLine(l++);s=null==s?f:s+"\n"+f}c*=2,n.lastIndex=i.ch;var h=n.exec(s);if(h){var d=s.slice(0,h.index).split("\n"),p=h[0].split("\n"),m=i.line+d.length-1,v=d[d.length-1].length;return{from:g(m,v),to:g(m+p.length-1,1==p.length?v+p[0].length:p[p.length-1].length),match:h}}}}function s(e,n){for(var t,o=0;;){n.lastIndex=o;var r=n.exec(e);if(!r)return t;if(t=r,(o=t.index+(t[0].length||1))==e.length)return t}}function c(e,n,o){n=t(n);for(var r=o.line,i=o.ch,c=e.firstLine();r>=c;r--,i=-1){var l=e.getLine(r);i>-1&&(l=l.slice(0,i));var a=s(l,n);if(a)return{from:g(r,a.index),to:g(r,a.index+a[0].length),match:a}}}function l(e,n,o){n=t(n);for(var r,i=1,c=o.line,l=e.firstLine();c>=l;){for(var a=0;a<i;a++){var u=e.getLine(c--);r=null==r?u.slice(0,o.ch):u+"\n"+r}i*=2;var f=s(r,n);if(f){var h=r.slice(0,f.index).split("\n"),d=f[0].split("\n"),p=c+h.length,m=h[h.length-1].length;return{from:g(p,m),to:g(p+d.length-1,1==d.length?m+d[0].length:d[d.length-1].length),match:f}}}}function a(e,n,t,o){if(e.length==n.length)return t;for(var r=0,i=t+Math.max(0,e.length-n.length);;){if(r==i)return r;var s=r+i>>1,c=o(e.slice(0,s)).length;if(c==t)return s;c>t?i=s:r=s+1}}function u(e,n,t,o){if(!n.length)return null;var r=o?d:p,i=r(n).split(/\r|\n\r?/);e:for(var s=t.line,c=t.ch,l=e.lastLine()+1-i.length;s<=l;s++,c=0){var u=e.getLine(s).slice(c),f=r(u);if(1==i.length){var h=f.indexOf(i[0]);if(-1==h)continue e;var t=a(u,f,h,r)+c;return{from:g(s,a(u,f,h,r)+c),to:g(s,a(u,f,h+i[0].length,r)+c)}}var m=f.length-i[0].length;if(f.slice(m)==i[0]){for(var v=1;v<i.length-1;v++)if(r(e.getLine(s+v))!=i[v])continue e;var y=e.getLine(s+i.length-1),x=r(y),C=i[i.length-1];if(x.slice(0,C.length)==C)return{from:g(s,a(u,f,m,r)+c),to:g(s+i.length-1,a(y,x,C.length,r))}}}}function f(e,n,t,o){if(!n.length)return null;var r=o?d:p,i=r(n).split(/\r|\n\r?/);e:for(var s=t.line,c=t.ch,l=e.firstLine()-1+i.length;s>=l;s--,c=-1){var u=e.getLine(s);c>-1&&(u=u.slice(0,c));var f=r(u);if(1==i.length){var h=f.lastIndexOf(i[0]);if(-1==h)continue e;return{from:g(s,a(u,f,h,r)),to:g(s,a(u,f,h+i[0].length,r))}}var m=i[i.length-1];if(f.slice(0,m.length)==m){for(var v=1,t=s-i.length+1;v<i.length-1;v++)if(r(e.getLine(t+v))!=i[v])continue e;var y=e.getLine(s+1-i.length),x=r(y);if(x.slice(x.length-i[0].length)==i[0])return{from:g(s+1-i.length,a(y,x,y.length-i[0].length,r)),to:g(s,a(u,f,m.length,r))}}}}function h(e,n,o,s){this.atOccurrence=!1,this.doc=e,o=o?e.clipPos(o):g(0,0),this.pos={from:o,to:o};var a;"object"==typeof s?a=s.caseFold:(a=s,s=null),"string"==typeof n?(null==a&&(a=!1),this.matches=function(t,o){return(t?f:u)(e,n,o,a)}):(n=t(n),s&&!1===s.multiline?this.matches=function(t,o){return(t?c:r)(e,n,o)}:this.matches=function(t,o){return(t?l:i)(e,n,o)})}var d,p,g=e.Pos;String.prototype.normalize?(d=function(e){return e.normalize("NFD").toLowerCase()},p=function(e){return e.normalize("NFD")}):(d=function(e){return e.toLowerCase()},p=function(e){return e}),h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){for(var t=this.matches(n,this.doc.clipPos(n?this.pos.from:this.pos.to));t&&0==e.cmpPos(t.from,t.to);)n?t.from.ch?t.from=g(t.from.line,t.from.ch-1):t=t.from.line==this.doc.firstLine()?null:this.matches(n,this.doc.clipPos(g(t.from.line-1))):t.to.ch<this.doc.getLine(t.to.line).length?t.to=g(t.to.line,t.to.ch+1):t=t.to.line==this.doc.lastLine()?null:this.matches(n,g(t.to.line+1,0));if(t)return this.pos=t,this.atOccurrence=!0,this.pos.match||!0;var o=g(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,t){if(this.atOccurrence){var o=e.splitLines(n);this.doc.replaceRange(o,this.pos.from,this.pos.to,t),this.pos.to=g(this.pos.from.line+o.length-1,o[o.length-1].length+(1==o.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,t){return new h(this.doc,e,n,t)}),e.defineDocExtension("getSearchCursor",function(e,n,t){return new h(this,e,n,t)}),e.defineExtension("selectMatches",function(n,t){for(var o=[],r=this.getSearchCursor(n,this.getCursor("from"),t);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)o.push({anchor:r.from(),head:r.to()});o.length&&this.setSelections(o,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/dialog/dialog",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function n(e,n,t){var o,r=e.getWrapperElement();return o=r.appendChild(document.createElement("div")),o.className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?o.innerHTML=n:o.appendChild(n),o}function t(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",function(o,r,i){function s(e){if("string"==typeof e)f.value=e;else{if(a)return;a=!0,l.parentNode.removeChild(l),u.focus(),i.onClose&&i.onClose(l)}}i||(i={}),t(this,null);var c,l=n(this,o,i.bottom),a=!1,u=this,f=l.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",function(e){i.onInput(e,f.value,s)}),i.onKeyUp&&e.on(f,"keyup",function(e){i.onKeyUp(e,f.value,s)}),e.on(f,"keydown",function(n){i&&i.onKeyDown&&i.onKeyDown(n,f.value,s)||((27==n.keyCode||!1!==i.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),s()),13==n.keyCode&&r(f.value,n))}),!1!==i.closeOnBlur&&e.on(f,"blur",s)):(c=l.getElementsByTagName("button")[0])&&(e.on(c,"click",function(){s(),u.focus()}),!1!==i.closeOnBlur&&e.on(c,"blur",s),c.focus()),s}),e.defineExtension("openConfirm",function(o,r,i){function s(){a||(a=!0,c.parentNode.removeChild(c),u.focus())}t(this,null);var c=n(this,o,i&&i.bottom),l=c.getElementsByTagName("button"),a=!1,u=this,f=1;l[0].focus();for(var h=0;h<l.length;++h){var d=l[h];!function(n){e.on(d,"click",function(t){e.e_preventDefault(t),s(),n&&n(u)})}(r[h]),e.on(d,"blur",function(){--f,setTimeout(function(){f<=0&&s()},200)}),e.on(d,"focus",function(){++f})}}),e.defineExtension("openNotification",function(o,r){function i(){l||(l=!0,clearTimeout(s),c.parentNode.removeChild(c))}t(this,i);var s,c=n(this,o,r&&r.bottom),l=!1,a=r&&void 0!==r.duration?r.duration:5e3;return e.on(c,"click",function(n){e.e_preventDefault(n),i()}),a&&(s=setTimeout(i,a)),i})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define("addon/search/search.js",["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function n(e,n){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var t=e.exec(n.string);if(t&&t.index==n.pos)return n.pos+=t[0].length||1,"searching";t?n.pos=t.index:n.skipToEnd()}}}function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function o(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,n,t){return e.getSearchCursor(n,t,{caseFold:r(n),multiline:!0})}function s(e,n,t,o,r){e.openDialog(n,o,{value:t,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){p(e)},onKeyDown:r})}function c(e,n,t,o,r){e.openDialog?e.openDialog(n,r,{value:o,selectValueOnOpen:!0}):r(prompt(t,o))}function l(e,n,t,o){e.openConfirm?e.openConfirm(n,o):confirm(t)&&o[0]()}function a(e){return e.replace(/\\(.)/g,function(e,n){return"n"==n?"\n":"r"==n?"\r":n})}function u(e){var n=e.match(/^\/(.*)\/([a-z]*)$/);if(n)try{e=new RegExp(n[1],-1==n[2].indexOf("i")?"":"i")}catch(e){}else e=a(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,t,o){t.queryText=o,t.query=u(o),e.removeOverlay(t.overlay,r(t.query)),t.overlay=n(t.query,r(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,r(t.query)))}function h(n,t,r,i){var l=o(n);if(l.query)return d(n,t);var a=n.getSelection()||l.lastQuery;if(a instanceof RegExp&&"x^"==a.source&&(a=null),r&&n.openDialog){var u=null,h=function(t,o){e.e_stop(o),t&&(t!=l.queryText&&(f(n,l,t),l.posFrom=l.posTo=n.getCursor()),u&&(u.style.opacity=1),d(n,o.shiftKey,function(e,t){var o;t.line<3&&document.querySelector&&(o=n.display.wrapper.querySelector(".CodeMirror-dialog"))&&o.getBoundingClientRect().bottom-4>n.cursorCoords(t,"window").top&&((u=o).style.opacity=.4)}))};s(n,v,a,h,function(t,r){var i=e.keyName(t),s=n.getOption("extraKeys"),c=s&&s[i]||e.keyMap[n.getOption("keyMap")][i];"findNext"==c||"findPrev"==c||"findPersistentNext"==c||"findPersistentPrev"==c?(e.e_stop(t),f(n,o(n),r),n.execCommand(c)):"find"!=c&&"findPersistent"!=c||(e.e_stop(t),h(r,t))}),i&&a&&(f(n,l,a),d(n,t))}else c(n,v,"Search for:",a,function(e){e&&!l.query&&n.operation(function(){f(n,l,e),l.posFrom=l.posTo=n.getCursor(),d(n,t)})})}function d(n,t,r){n.operation(function(){var s=o(n),c=i(n,s.query,t?s.posFrom:s.posTo);(c.find(t)||(c=i(n,s.query,t?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0)),c.find(t)))&&(n.setSelection(c.from(),c.to()),n.scrollIntoView({from:c.from(),to:c.to()},20),s.posFrom=c.from(),s.posTo=c.to(),r&&r(c.from(),c.to()))})}function p(e){e.operation(function(){var n=o(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function g(e,n,t){e.operation(function(){for(var o=i(e,n);o.findNext();)if("string"!=typeof n){var r=e.getRange(o.from(),o.to()).match(n);o.replace(t.replace(/\$(\d)/g,function(e,n){return r[n]}))}else o.replace(t)})}function m(e,n){if(!e.getOption("readOnly")){var t=e.getSelection()||o(e).lastQuery,r='<span class="CodeMirror-search-label">'+(n?"Replace all:":"Replace:")+"</span>";c(e,r+y,r,t,function(t){t&&(t=u(t),c(e,x,"Replace with:","",function(o){if(o=a(o),n)g(e,t,o);else{p(e);var r=i(e,t,e.getCursor("from")),s=function(){var n,a=r.from();!(n=r.findNext())&&(r=i(e,t),!(n=r.findNext())||a&&r.from().line==a.line&&r.from().ch==a.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),l(e,C,"Replace?",[function(){c(n)},s,function(){g(e,t,o)}]))},c=function(e){r.replace("string"==typeof t?o:o.replace(/\$(\d)/g,function(n,t){return e[t]})),s()};s()}}))})}}var v='<span class="CodeMirror-search-label">Search:</span> <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>',y=' <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>',x='<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',C='<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>';e.commands.find=function(e){p(e),h(e)},e.commands.findPersistent=function(e){p(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=p,e.commands.replace=m,e.commands.replaceAll=function(e){m(e,!0)}}),function(e){"function"==typeof e.define&&e.define("addonSearch",["addon/search/search.js"],function(){})}(this);
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/search/searchcursor",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e){var n=e.flags;return null!=n?n:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function t(e,t){for(var o=n(e),r=o,i=0;i<t.length;i++)-1==r.indexOf(t.charAt(i))&&(r+=t.charAt(i));return o==r?e:new RegExp(e.source,r)}function o(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function r(e,n,o){n=t(n,"g");for(var r=o.line,i=o.ch,s=e.lastLine();r<=s;r++,i=0){n.lastIndex=i;var l=e.getLine(r),c=n.exec(l);if(c)return{from:g(r,c.index),to:g(r,c.index+c[0].length),match:c}}}function i(e,n,i){if(!o(n))return r(e,n,i);n=t(n,"gm");for(var s,l=1,c=i.line,a=e.lastLine();c<=a;){for(var u=0;u<l&&!(c>a);u++){var f=e.getLine(c++);s=null==s?f:s+"\n"+f}l*=2,n.lastIndex=i.ch;var h=n.exec(s);if(h){var d=s.slice(0,h.index).split("\n"),p=h[0].split("\n"),m=i.line+d.length-1,v=d[d.length-1].length;return{from:g(m,v),to:g(m+p.length-1,1==p.length?v+p[0].length:p[p.length-1].length),match:h}}}}function s(e,n){for(var t,o=0;;){n.lastIndex=o;var r=n.exec(e);if(!r)return t;if(t=r,(o=t.index+(t[0].length||1))==e.length)return t}}function l(e,n,o){n=t(n,"g");for(var r=o.line,i=o.ch,l=e.firstLine();r>=l;r--,i=-1){var c=e.getLine(r);i>-1&&(c=c.slice(0,i));var a=s(c,n);if(a)return{from:g(r,a.index),to:g(r,a.index+a[0].length),match:a}}}function c(e,n,o){n=t(n,"gm");for(var r,i=1,l=o.line,c=e.firstLine();l>=c;){for(var a=0;a<i;a++){var u=e.getLine(l--);r=null==r?u.slice(0,o.ch):u+"\n"+r}i*=2;var f=s(r,n);if(f){var h=r.slice(0,f.index).split("\n"),d=f[0].split("\n"),p=l+h.length,m=h[h.length-1].length;return{from:g(p,m),to:g(p+d.length-1,1==d.length?m+d[0].length:d[d.length-1].length),match:f}}}}function a(e,n,t,o){if(e.length==n.length)return t;for(var r=0,i=t+Math.max(0,e.length-n.length);;){if(r==i)return r;var s=r+i>>1,l=o(e.slice(0,s)).length;if(l==t)return s;l>t?i=s:r=s+1}}function u(e,n,t,o){if(!n.length)return null;var r=o?d:p,i=r(n).split(/\r|\n\r?/);e:for(var s=t.line,l=t.ch,c=e.lastLine()+1-i.length;s<=c;s++,l=0){var u=e.getLine(s).slice(l),f=r(u);if(1==i.length){var h=f.indexOf(i[0]);if(-1==h)continue e;var t=a(u,f,h,r)+l;return{from:g(s,a(u,f,h,r)+l),to:g(s,a(u,f,h+i[0].length,r)+l)}}var m=f.length-i[0].length;if(f.slice(m)==i[0]){for(var v=1;v<i.length-1;v++)if(r(e.getLine(s+v))!=i[v])continue e;var y=e.getLine(s+i.length-1),x=r(y),C=i[i.length-1];if(x.slice(0,C.length)==C)return{from:g(s,a(u,f,m,r)+l),to:g(s+i.length-1,a(y,x,C.length,r))}}}}function f(e,n,t,o){if(!n.length)return null;var r=o?d:p,i=r(n).split(/\r|\n\r?/);e:for(var s=t.line,l=t.ch,c=e.firstLine()-1+i.length;s>=c;s--,l=-1){var u=e.getLine(s);l>-1&&(u=u.slice(0,l));var f=r(u);if(1==i.length){var h=f.lastIndexOf(i[0]);if(-1==h)continue e;return{from:g(s,a(u,f,h,r)),to:g(s,a(u,f,h+i[0].length,r))}}var m=i[i.length-1];if(f.slice(0,m.length)==m){for(var v=1,t=s-i.length+1;v<i.length-1;v++)if(r(e.getLine(t+v))!=i[v])continue e;var y=e.getLine(s+1-i.length),x=r(y);if(x.slice(x.length-i[0].length)==i[0])return{from:g(s+1-i.length,a(y,x,y.length-i[0].length,r)),to:g(s,a(u,f,m.length,r))}}}}function h(e,n,o,s){this.atOccurrence=!1,this.doc=e,o=o?e.clipPos(o):g(0,0),this.pos={from:o,to:o};var a;"object"==typeof s?a=s.caseFold:(a=s,s=null),"string"==typeof n?(null==a&&(a=!1),this.matches=function(t,o){return(t?f:u)(e,n,o,a)}):(n=t(n,"gm"),s&&!1===s.multiline?this.matches=function(t,o){return(t?l:r)(e,n,o)}:this.matches=function(t,o){return(t?c:i)(e,n,o)})}var d,p,g=e.Pos;String.prototype.normalize?(d=function(e){return e.normalize("NFD").toLowerCase()},p=function(e){return e.normalize("NFD")}):(d=function(e){return e.toLowerCase()},p=function(e){return e}),h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){for(var t=this.matches(n,this.doc.clipPos(n?this.pos.from:this.pos.to));t&&0==e.cmpPos(t.from,t.to);)n?t.from.ch?t.from=g(t.from.line,t.from.ch-1):t=t.from.line==this.doc.firstLine()?null:this.matches(n,this.doc.clipPos(g(t.from.line-1))):t.to.ch<this.doc.getLine(t.to.line).length?t.to=g(t.to.line,t.to.ch+1):t=t.to.line==this.doc.lastLine()?null:this.matches(n,g(t.to.line+1,0));if(t)return this.pos=t,this.atOccurrence=!0,this.pos.match||!0;var o=g(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,t){if(this.atOccurrence){var o=e.splitLines(n);this.doc.replaceRange(o,this.pos.from,this.pos.to,t),this.pos.to=g(this.pos.from.line+o.length-1,o[o.length-1].length+(1==o.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,t){return new h(this.doc,e,n,t)}),e.defineDocExtension("getSearchCursor",function(e,n,t){return new h(this,e,n,t)}),e.defineExtension("selectMatches",function(n,t){for(var o=[],r=this.getSearchCursor(n,this.getCursor("from"),t);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)o.push({anchor:r.from(),head:r.to()});o.length&&this.setSelections(o,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/dialog/dialog",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function n(n,t,o){var r,i=n.getWrapperElement();return r=i.appendChild(document.createElement("div")),r.className=o?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?r.innerHTML=t:r.appendChild(t),e.addClass(i,"dialog-opened"),r}function t(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",function(o,r,i){function s(n){if("string"==typeof n)f.value=n;else{if(a)return;a=!0,e.rmClass(c.parentNode,"dialog-opened"),c.parentNode.removeChild(c),u.focus(),i.onClose&&i.onClose(c)}}i||(i={}),t(this,null);var l,c=n(this,o,i.bottom),a=!1,u=this,f=c.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",function(e){i.onInput(e,f.value,s)}),i.onKeyUp&&e.on(f,"keyup",function(e){i.onKeyUp(e,f.value,s)}),e.on(f,"keydown",function(n){i&&i.onKeyDown&&i.onKeyDown(n,f.value,s)||((27==n.keyCode||!1!==i.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),s()),13==n.keyCode&&r(f.value,n))}),!1!==i.closeOnBlur&&e.on(f,"blur",s)):(l=c.getElementsByTagName("button")[0])&&(e.on(l,"click",function(){s(),u.focus()}),!1!==i.closeOnBlur&&e.on(l,"blur",s),l.focus()),s}),e.defineExtension("openConfirm",function(o,r,i){function s(){a||(a=!0,e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),u.focus())}t(this,null);var l=n(this,o,i&&i.bottom),c=l.getElementsByTagName("button"),a=!1,u=this,f=1;c[0].focus();for(var h=0;h<c.length;++h){var d=c[h];!function(n){e.on(d,"click",function(t){e.e_preventDefault(t),s(),n&&n(u)})}(r[h]),e.on(d,"blur",function(){--f,setTimeout(function(){f<=0&&s()},200)}),e.on(d,"focus",function(){++f})}}),e.defineExtension("openNotification",function(o,r){function i(){c||(c=!0,clearTimeout(s),e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l))}t(this,i);var s,l=n(this,o,r&&r.bottom),c=!1,a=r&&void 0!==r.duration?r.duration:5e3;return e.on(l,"click",function(n){e.e_preventDefault(n),i()}),a&&(s=setTimeout(i,a)),i})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define("addon/search/search.js",["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function n(e,n){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var t=e.exec(n.string);if(t&&t.index==n.pos)return n.pos+=t[0].length||1,"searching";t?n.pos=t.index:n.skipToEnd()}}}function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function o(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,n,t){return e.getSearchCursor(n,t,{caseFold:r(n),multiline:!0})}function s(e,n,t,o,r){e.openDialog(n,o,{value:t,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){p(e)},onKeyDown:r})}function l(e,n,t,o,r){e.openDialog?e.openDialog(n,r,{value:o,selectValueOnOpen:!0}):r(prompt(t,o))}function c(e,n,t,o){e.openConfirm?e.openConfirm(n,o):confirm(t)&&o[0]()}function a(e){return e.replace(/\\(.)/g,function(e,n){return"n"==n?"\n":"r"==n?"\r":n})}function u(e){var n=e.match(/^\/(.*)\/([a-z]*)$/);if(n)try{e=new RegExp(n[1],-1==n[2].indexOf("i")?"":"i")}catch(e){}else e=a(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,t,o){t.queryText=o,t.query=u(o),e.removeOverlay(t.overlay,r(t.query)),t.overlay=n(t.query,r(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,r(t.query)))}function h(n,t,r,i){var c=o(n);if(c.query)return d(n,t);var a=n.getSelection()||c.lastQuery;if(a instanceof RegExp&&"x^"==a.source&&(a=null),r&&n.openDialog){var u=null,h=function(t,o){e.e_stop(o),t&&(t!=c.queryText&&(f(n,c,t),c.posFrom=c.posTo=n.getCursor()),u&&(u.style.opacity=1),d(n,o.shiftKey,function(e,t){var o;t.line<3&&document.querySelector&&(o=n.display.wrapper.querySelector(".CodeMirror-dialog"))&&o.getBoundingClientRect().bottom-4>n.cursorCoords(t,"window").top&&((u=o).style.opacity=.4)}))};s(n,v,a,h,function(t,r){var i=e.keyName(t),s=n.getOption("extraKeys"),l=s&&s[i]||e.keyMap[n.getOption("keyMap")][i];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(t),f(n,o(n),r),n.execCommand(l)):"find"!=l&&"findPersistent"!=l||(e.e_stop(t),h(r,t))}),i&&a&&(f(n,c,a),d(n,t))}else l(n,v,"Search for:",a,function(e){e&&!c.query&&n.operation(function(){f(n,c,e),c.posFrom=c.posTo=n.getCursor(),d(n,t)})})}function d(n,t,r){n.operation(function(){var s=o(n),l=i(n,s.query,t?s.posFrom:s.posTo);(l.find(t)||(l=i(n,s.query,t?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0)),l.find(t)))&&(n.setSelection(l.from(),l.to()),n.scrollIntoView({from:l.from(),to:l.to()},20),s.posFrom=l.from(),s.posTo=l.to(),r&&r(l.from(),l.to()))})}function p(e){e.operation(function(){var n=o(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function g(e,n,t){e.operation(function(){for(var o=i(e,n);o.findNext();)if("string"!=typeof n){var r=e.getRange(o.from(),o.to()).match(n);o.replace(t.replace(/\$(\d)/g,function(e,n){return r[n]}))}else o.replace(t)})}function m(e,n){if(!e.getOption("readOnly")){var t=e.getSelection()||o(e).lastQuery,r='<span class="CodeMirror-search-label">'+(n?"Replace all:":"Replace:")+"</span>";l(e,r+y,r,t,function(t){t&&(t=u(t),l(e,x,"Replace with:","",function(o){if(o=a(o),n)g(e,t,o);else{p(e);var r=i(e,t,e.getCursor("from")),s=function(){var n,a=r.from();!(n=r.findNext())&&(r=i(e,t),!(n=r.findNext())||a&&r.from().line==a.line&&r.from().ch==a.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),c(e,C,"Replace?",[function(){l(n)},s,function(){g(e,t,o)}]))},l=function(e){r.replace("string"==typeof t?o:o.replace(/\$(\d)/g,function(n,t){return e[t]})),s()};s()}}))})}}var v='<span class="CodeMirror-search-label">Search:</span> <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>',y=' <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>',x='<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',C='<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>';e.commands.find=function(e){p(e),h(e)},e.commands.findPersistent=function(e){p(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=p,e.commands.replace=m,e.commands.replaceAll=function(e){m(e,!0)}}),function(e){"function"==typeof e.define&&e.define("addonSearch",["addon/search/search.js"],function(){})}(this);
@@ -1,6 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("codemirror.js",t):e.CodeMirror=t()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function i(e,t,r,i){var o=n(e,t,r,i);return o.setAttribute("role","presentation"),o}function o(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function l(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function s(t,r){var n=t.className;e(r).test(n)||(t.className+=(n?" ":"")+r)}function a(t,r){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!e(n[i]).test(r)&&(r+=" "+n[i]);return r}function u(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function f(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}function h(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function d(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function p(e){for(;Yl.length<=e;)Yl.push(g(Yl)+" ");return Yl[e]}function g(e){return e[e.length-1]}function v(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function m(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function y(){}function b(e,t){var r;return Object.create?r=Object.create(e):(y.prototype=e,r=new y),t&&c(t,r),r}function w(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||_l.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&w(e))||t.test(e):w(e)}function C(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function S(e){return e.charCodeAt(0)>=768&&ql.test(e)}function L(e,t,r){for(;(r<0?t>0:t<e.length)&&S(e.charAt(t));)t+=r;return t}function k(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function T(e,t,r){var o=this;this.input=r,o.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=n("div",null,"CodeMirror-cursors"),o.measure=n("div",null,"CodeMirror-measure"),o.lineMeasure=n("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var l=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=n("div",[l],null,"position: relative"),o.sizer=n("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=n("div",null,null,"position: absolute; height: "+Ul+"px; width: 1px;"),o.gutters=n("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=n("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=n("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),yl&&bl<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),wl||pl&&Ol||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,r.init(o)}function M(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function N(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function O(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function A(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function W(e){if(null==e.parent)return null;for(var t=e.parent,r=h(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function D(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l],a=s.height;if(t<a)break;t-=a}return r+l}function H(e,t){return t>=e.first&&t<e.first+e.size}function F(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function P(e,t,r){if(void 0===r&&(r=null),!(this instanceof P))return new P(e,t,r);this.line=e,this.ch=t,this.sticky=r}function E(e,t){return e.line-t.line||e.ch-t.ch}function z(e,t){return e.sticky==t.sticky&&0==E(e,t)}function I(e){return P(e.line,e.ch)}function R(e,t){return E(e,t)<0?t:e}function B(e,t){return E(e,t)<0?e:t}function G(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function U(e,t){if(t.line<e.first)return P(e.first,0);var r=e.first+e.size-1;return t.line>r?P(r,M(e,r).text.length):V(t,M(e,t.line).text.length)}function V(e,t){var r=e.ch;return null==r||r>t?P(e.line,t):r<0?P(e.line,0):e}function K(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=U(e,t[n]);return r}function j(){$l=!0}function X(){Zl=!0}function Y(e,t,r){this.marker=e,this.from=t,this.to=r}function _(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function q(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function $(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Z(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var a=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Y(l,o.from,a?null:o.to))}}return n}function Q(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Y(l,a?null:o.from-t,null==o.to?null:o.to-t))}}return n}function J(e,t){if(t.full)return null;var r=H(e,t.from.line)&&M(e,t.from.line).markedSpans,n=H(e,t.to.line)&&M(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==E(t.from,t.to),s=Z(r,i,l),a=Q(n,o,l),u=1==t.text.length,c=g(t.text).length+(u?i:0);if(s)for(var f=0;f<s.length;++f){var h=s[f];if(null==h.to){var d=_(a,h.marker);d?u&&(h.to=null==d.to?null:d.to+c):h.to=i}}if(a)for(var p=0;p<a.length;++p){var v=a[p];if(null!=v.to&&(v.to+=c),null==v.from){var m=_(s,v.marker);m||(v.from=c,u&&(s||(s=[])).push(v))}else v.from+=c,u&&(s||(s=[])).push(v)}s&&(s=ee(s)),a&&a!=s&&(a=ee(a));var y=[s];if(!u){var b,w=t.text.length-2;if(w>0&&s)for(var x=0;x<s.length;++x)null==s[x].to&&(b||(b=[])).push(new Y(s[x].marker,null,null));for(var C=0;C<w;++C)y.push(b);y.push(a)}return y}function ee(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function te(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=h(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(E(u.to,s.from)<0||E(u.from,s.to)>0)){var c=[a,1],f=E(u.from,s.from),d=E(u.to,s.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}function re(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function ne(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function ie(e){return e.inclusiveLeft?-1:0}function oe(e){return e.inclusiveRight?1:0}function le(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=E(n.from,i.from)||ie(e)-ie(t);if(o)return-o;var l=E(n.to,i.to)||oe(e)-oe(t);return l||t.id-e.id}function se(e,t){var r,n=Zl&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||le(r,i.marker)<0)&&(r=i.marker);return r}function ae(e){return se(e,!0)}function ue(e){return se(e,!1)}function ce(e,t,r,n,i){var o=M(e,t),l=Zl&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=E(u.from,r)||ie(a.marker)-ie(i),f=E(u.to,n)||oe(a.marker)-oe(i);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?E(u.to,r)>=0:E(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?E(u.from,n)<=0:E(u.from,n)<0)))return!0}}}function fe(e){for(var t;t=ae(e);)e=t.find(-1,!0).line;return e}function he(e){for(var t;t=ue(e);)e=t.find(1,!0).line;return e}function de(e){for(var t,r;t=ue(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function pe(e,t){var r=M(e,t),n=fe(r);return r==n?t:W(n)}function ge(e,t){if(t>e.lastLine())return t;var r,n=M(e,t);if(!ve(e,n))return t;for(;r=ue(n);)n=r.find(1,!0).line;return W(n)+1}function ve(e,t){var r=Zl&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&me(e,t,n))return!0}}function me(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return me(e,n.line,_(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&me(e,t,i))return!0}function ye(e){e=fe(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function be(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=ae(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ue(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function we(e){var t=e.display,r=e.doc;t.maxLine=M(r,r.first),t.maxLineLength=be(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=be(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function xe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}function Ce(e,t,r){var n;Ql=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Ql=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Ql=i)}return null!=n?n:Ql}function Se(e,t){var r=e.order;return null==r&&(r=e.order=Jl(e.text,t)),r}function Le(e,t){return e._handlers&&e._handlers[t]||es}function ke(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=h(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Te(e,t){var r=Le(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Me(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Te(e,r||t.type,e,t),He(t)||t.codemirrorIgnore}function Ne(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==h(r,t[n])&&r.push(t[n])}function Oe(e,t){return Le(e,t).length>0}function Ae(e){e.prototype.on=function(e,t){ts(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function We(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function De(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function He(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Fe(e){We(e),De(e)}function Pe(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Al&&e.ctrlKey&&1==t&&(t=3),t}function ze(e){if(null==Bl){var t=n("span","​");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Bl=t.offsetWidth<=1&&t.offsetHeight>2&&!(yl&&bl<8))}var i=Bl?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ie(e){if(null!=Gl)return Gl;var n=r(e,document.createTextNode("AخA")),i=Fl(n,0,1).getBoundingClientRect(),o=Fl(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Gl=o.right-i.right<3)}function Re(e){if(null!=ls)return ls;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=Fl(t,0,1).getBoundingClientRect();return ls=Math.abs(i.left-o.left)>1}function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ss[e]=t}function Ge(e,t){as[e]=t}function Ue(e){if("string"==typeof e&&as.hasOwnProperty(e))e=as[e];else if(e&&"string"==typeof e.name&&as.hasOwnProperty(e.name)){var t=as[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=Ue(t);var r=ss[t.name];if(!r)return Ve(e,"text/plain");var n=r(e,t);if(us.hasOwnProperty(t.name)){var i=us[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}function Ke(e,t){c(t,us.hasOwnProperty(e)?us[e]:us[e]={})}function je(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Xe(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ye(e,t,r){return!e.startState||e.startState(t,r)}function _e(e,t,r,n){var i=[e.state.modeGen],o={};rt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=0;s<e.state.overlays.length;++s)!function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,rt(e,t.text,s.mode,r,function(e,t){for(var r=a;u<e;){var n=i[a];n>e&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=l,r.baseTokens=null,r.baseTokenPos=1}(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function qe(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=$e(e,W(t)),i=t.text.length>e.options.maxHighlightLength&&je(e.doc.mode,n.state),o=_e(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function $e(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new hs(n,!0,t);var o=nt(e,t,r),l=o>n.first&&M(n,o-1).stateAfter,s=l?hs.fromSaved(n,l,o):new hs(n,Ye(n.mode),o);return n.iter(o,t,function(r){Ze(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Ze(e,t,r,n){var i=e.doc.mode,o=new cs(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Qe(i,r.state);!o.eol();)Je(i,o,r.state),o.start=o.pos}function Qe(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Xe(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Je(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Xe(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function et(e,t,r,n){var i,o=e.doc,l=o.mode;t=U(o,t);var s,a=M(o,t.line),u=$e(e,t.line,r),c=new cs(a.text,e.options.tabSize,u);for(n&&(s=[]);(n||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=Je(l,c,u.state),n&&s.push(new ds(c,i,je(o.mode,u.state)));return n?s:new ds(c,i,u.state)}function tt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function rt(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,f=new cs(t,e.options.tabSize,n),h=e.options.addModeClass&&[null];for(""==t&&tt(Qe(r,n.state),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,l&&Ze(e,t,n,f.pos),f.pos=t.length,a=null):a=tt(Je(r,f,n.state,h),o),h){var d=h[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u<f.start;)u=Math.min(f.start,u+5e3),i(u,c);c=a}f.start=f.pos}for(;u<f.pos;){var p=Math.min(f.pos,u+5e3);i(p,c),u=p}}function nt(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=M(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof fs?u.lookAhead:0)<=o.modeFrontier))return s;var c=f(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}function it(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=M(e,n).stateAfter;if(i&&(!(i instanceof fs)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}function ot(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),re(e),ne(e,r);var i=n?n(e):1;i!=e.height&&A(e,i)}function lt(e){e.parent=null,re(e)}function st(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?ms:vs;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function at(e,t){var r=i("span",null,null,wl?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(yl||wl)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var l=o?t.rest[o-1]:t.line,s=void 0;n.pos=0,n.addToken=ct,Ie(e.display.measure)&&(s=Se(l,e.doc.direction))&&(n.addToken=ht(n.addToken,s)),n.map=[];pt(l,n,qe(e,l,t!=e.display.externalMeasured&&W(l))),l.styleClasses&&(l.styleClasses.bgClass&&(n.bgClass=a(l.styleClasses.bgClass,n.bgClass||"")),l.styleClasses.textClass&&(n.textClass=a(l.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(ze(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(wl){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Te(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=a(n.pre.className,n.textClass||"")),n}function ut(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ct(e,t,r,i,o,l,s){if(t){var a,u=e.splitSpaces?ft(t,e.trailingSpace):t,c=e.cm.state.specialChars,f=!1;if(c.test(t)){a=document.createDocumentFragment();for(var h=0;;){c.lastIndex=h;var d=c.exec(t),g=d?d.index-h:t.length-h;if(g){var v=document.createTextNode(u.slice(h,h+g));yl&&bl<9?a.appendChild(n("span",[v])):a.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!d)break;h+=g+1;var m=void 0;if("\t"==d[0]){var y=e.cm.options.tabSize,b=y-e.col%y;m=a.appendChild(n("span",p(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==d[0]||"\n"==d[0]?(m=a.appendChild(n("span","\r"==d[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",d[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(d[0]),m.setAttribute("cm-text",d[0]),yl&&bl<9?a.appendChild(n("span",[m])):a.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,a=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,a),yl&&bl<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||i||o||f||s){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[a],w,s);return l&&(x.title=l),e.content.appendChild(x)}e.content.appendChild(a)}}function ft(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function ht(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var f=void 0,h=0;h<t.length&&(f=t[h],!(f.to>u&&f.from<=u));h++);if(f.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,f.to-u),i,o,null,s,a),o=null,n=n.slice(f.to-u),u=f.to}}}function dt(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function pt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,f,h,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=f=s="",h=null,m=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],C=x.marker;"bookmark"==C.type&&x.from==p&&C.widgetNode?y.push(C):x.from<=p&&(null==x.to||x.to>p||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||le(h.marker,C)<0)&&(h=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==m&&(u+=" "+b[S]);if(!h||h.from==p)for(var L=0;L<y.length;++L)dt(t,0,y[L]);if(h&&(h.from||0)==p){if(dt(t,(null==h.to?d+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(p>=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!h){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",f,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=st(r[g++],t.cm.options)}}else for(var N=1;N<r.length;N+=2)t.addToken(t,i.slice(o,o=r[N]),st(r[N+1],t.cm.options))}function gt(e,t,r){this.line=t,this.rest=de(t),this.size=this.rest?W(g(this.rest))-r+1:1,this.node=this.text=null,this.hidden=ve(e,t)}function vt(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new gt(e.doc,M(e.doc,o),o);n=o+l.size,i.push(l)}return i}function mt(e){ys?ys.ops.push(e):e.ownsGroup=ys={ops:[e],delayedCallbacks:[]}}function yt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function bt(e,t){var r=e.ownsGroup;if(r)try{yt(r)}finally{ys=null,t(r)}}function wt(e,t){var r=Le(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);ys?n=ys.delayedCallbacks:bs?n=bs:(n=bs=[],setTimeout(xt,0));for(var o=0;o<r.length;++o)!function(e){n.push(function(){return r[e].apply(null,i)})}(o)}}function xt(){var e=bs;bs=null;for(var t=0;t<e.length;++t)e[t]()}function Ct(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Tt(e,t):"gutter"==o?Nt(e,t,r,n):"class"==o?Mt(e,t):"widget"==o&&Ot(e,t,n)}t.changes=null}function St(e){return e.node==e.text&&(e.node=n("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),yl&&bl<8&&(e.node.style.zIndex=2)),e.node}function Lt(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var i=St(t);t.background=i.insertBefore(n("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}function kt(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):at(e,t)}function Tt(e,t){var r=t.text.className,n=kt(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Mt(e,t)):r&&(t.text.className=r)}function Mt(e,t){Lt(e,t),t.line.wrapClass?St(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Nt(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=St(t);t.gutterBackground=n("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var l=t.line.gutterMarkers;if(e.options.lineNumbers||l){var s=St(t),a=t.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),s.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||l&&l["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(n("div",F(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),l)for(var u=0;u<e.options.gutters.length;++u){var c=e.options.gutters[u],f=l.hasOwnProperty(c)&&l[c];f&&a.appendChild(n("div",[f],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function Ot(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);Wt(e,t,r)}function At(e,t,r,n){var i=kt(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Mt(e,t),Nt(e,t,r,n),Wt(e,t,n),t.node}function Wt(e,t,r){if(Dt(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Dt(e,t.rest[n],t,r,!1)}function Dt(e,t,r,i,o){if(t.widgets)for(var l=St(r),s=0,a=t.widgets;s<a.length;++s){var u=a[s],c=n("div",[u.node],"CodeMirror-linewidget");u.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Ht(u,c,r,i),e.display.input.setUneditable(c),o&&u.above?l.insertBefore(c,r.gutter||r.text):l.appendChild(c),wt(u,"redraw")}}function Ht(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Ft(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!o(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),r(t.display.measure,n("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Pt(e,t){for(var r=Pe(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Et(e){return e.lineSpace.offsetTop}function zt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function It(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=r(e.measure,n("pre","x")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function Rt(e){return Ul-e.display.nativeBarWidth}function Bt(e){return e.display.scroller.clientWidth-Rt(e)-e.display.barWidth}function Gt(e){return e.display.scroller.clientHeight-Rt(e)-e.display.barHeight}function Ut(e,t,r){var n=e.options.lineWrapping,i=n&&Bt(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Vt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(W(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Kt(e,t){t=fe(t);var n=W(t),i=e.display.externalMeasured=new gt(e.doc,t,n);i.lineN=n;var o=i.built=at(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function jt(e,t,r,n){return _t(e,Yt(e,t),r,n)}function Xt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[kr(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Yt(e,t){var r=W(t),n=Xt(e,r);n&&!n.text?n=null:n&&n.changes&&(Ct(e,n,r,wr(e)),e.curOp.forceUpdate=!0),n||(n=Kt(e,t));var i=Vt(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function _t(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ut(e,t.view,t.rect),t.hasHeights=!0),o=Zt(e,t,r,n),o.bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function qt(e,t,r){for(var n,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?(i=t-s,o=i+1):(u==e.length-3||t==a&&e[u+3]>t)&&(o=a-s,i=o-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function $t(e,t){var r=ws;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function Zt(e,t,r,n){
2
- var i,o=qt(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;c<4;c++){for(;s&&S(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a<o.coverEnd&&S(t.line.text.charAt(o.coverStart+a));)++a;if(i=yl&&bl<9&&0==s&&a==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():$t(Fl(l,s,a).getClientRects(),n),i.left||i.right||0==s)break;a=s,s-=1,u="right"}yl&&bl<11&&(i=Qt(e.display.measure,i))}else{s>0&&(u=n="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==n?f.length-1:0]:l.getBoundingClientRect()}if(yl&&bl<9&&!s&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+br(e.display),top:h.top,bottom:h.bottom}:ws}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,m=0;m<v.length-1&&!(g<v[m]);m++);var y=m?v[m-1]:0,b=v[m],w={left:("right"==u?i.right:i.left)-t.rect.left,right:("left"==u?i.left:i.right)-t.rect.left,top:y,bottom:b};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=d,w.rbottom=p),w}function Qt(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Re(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Jt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function er(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)Jt(e.display.view[r])}function tr(e){er(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function rr(){return Cl&&Nl?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function nr(){return Cl&&Nl?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ir(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Ft(e.widgets[r]));return t}function or(e,t,r,n,i){if(!i){var o=ir(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=ye(t);if("local"==n?l+=Et(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:nr());var a=s.left+("window"==n?0:rr());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function lr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=rr(),i-=nr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function sr(e,t,r,n,i){return n||(n=M(e.doc,t.line)),or(e,n,jt(e,n,t.ch,i),r)}function ar(e,t,r,n,i,o){function l(t,l){var s=_t(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,or(e,n,s,r)}function s(e,t,r){var n=a[t],i=1==n.level;return l(r?e-1:e,i!=r)}n=n||M(e.doc,t.line),i||(i=Yt(e,n));var a=Se(n,e.doc.direction),u=t.ch,c=t.sticky;if(u>=n.text.length?(u=n.text.length,c="before"):u<=0&&(u=0,c="after"),!a)return l("before"==c?u-1:u,"before"==c);var f=Ce(a,u,c),h=Ql,d=s(u,f,"before"==c);return null!=h&&(d.other=s(u,h,"before"!=c)),d}function ur(e,t){var r=0;t=U(e.doc,t),e.options.lineWrapping||(r=br(e.display)*t.ch);var n=M(e.doc,t.line),i=ye(n)+Et(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function cr(e,t,r,n,i){var o=P(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function fr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return cr(n.first,0,null,!0,-1);var i=D(n,r),o=n.first+n.size-1;if(i>o)return cr(n.first+n.size-1,M(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=M(n,i);;){var s=gr(e,l,i,t,r),a=ue(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=W(l=u.to.line)}}function hr(e,t,r,n){n-=ir(t);var i=t.text.length,o=k(function(t){return _t(e,r,t-1).bottom<=n},i,0);return i=k(function(t){return _t(e,r,t).top>n},o,i),{begin:o,end:i}}function dr(e,t,r,n){return r||(r=Yt(e,t)),hr(e,t,r,or(e,t,_t(e,r,n),"line").top)}function pr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function gr(e,t,r,n,i){i-=ye(t);var o=Yt(e,t),l=ir(t),s=0,a=t.text.length,u=!0,c=Se(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?mr:vr)(e,t,r,o,c,n,i);u=1!=f.level,s=u?f.from:f.to-1,a=u?f.to:f.from-1}var h,d,p=null,g=null,v=k(function(t){var r=_t(e,o,t);return r.top+=l,r.bottom+=l,!!pr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left<g.right-n,b=y==u;v=p+(b?0:1),d=b?"after":"before",h=y?g.left:g.right}else{u||v!=a&&v!=s||v++,d=0==v?"after":v==t.text.length?"before":_t(e,o,v-(u?1:0)).bottom+l<=i==u?"after":"before";var w=ar(e,P(r,v,d),"line",t,o);h=w.left,m=i<w.top||i>=w.bottom}return v=L(t.text,v,1),cr(r,v,d,m,n-h)}function vr(e,t,r,n,i,o,l){var s=k(function(s){var a=i[s],u=1!=a.level;return pr(ar(e,P(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=ar(e,P(r,u?a.from:a.to,u?"after":"before"),"line",t,n);pr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a}function mr(e,t,r,n,i,o,l){var s=hr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,h=0;h<i.length;h++){var d=i[h];if(!(d.from>=u||d.to<=a)){var p=1!=d.level,g=_t(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=g<o?o-g+1e9:g-o;(!c||f>v)&&(c=d,f=v)}}return c||(c=i[i.length-1]),c.from<a&&(c={from:a,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function yr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==gs){gs=n("pre");for(var i=0;i<49;++i)gs.appendChild(document.createTextNode("x")),gs.appendChild(n("br"));gs.appendChild(document.createTextNode("x"))}r(e.measure,gs);var o=gs.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function br(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function wr(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:xr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function xr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Cr(e){var t=yr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/br(e.display)-3);return function(i){if(ve(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Sr(e){var t=e.doc,r=Cr(e);t.iter(function(e){var t=r(e);t!=e.height&&A(e,t)})}function Lr(e,t,r,n){var i=e.display;if(!r&&"true"==Pe(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(t){return null}var a,u=fr(e,o,l);if(n&&1==u.xRel&&(a=M(e.doc,u.line).text).length==u.ch){var c=f(a,a.length,e.options.tabSize)-a.length;u=P(u.line,Math.max(0,Math.round((o-It(e.display).left)/br(e.display))-c))}return u}function kr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Tr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Mr(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&Nr(e,s.head,i),a||Ar(e,s,o)}}return n}function Nr(e,t,r){var i=ar(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(n("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var l=r.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=i.other.left+"px",l.style.top=i.other.top+"px",l.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Or(e,t){return e.top-t.top||e.left-t.left}function Ar(e,t,r){function i(e,t,r,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),a.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?f-e:r)+"px;\n height: "+(i-t)+"px"))}function o(t,r,n){function o(r,n){return sr(e,P(t,r),"div",d,n)}function l(t,r,n){var i=dr(e,d,null,t),l="ltr"==r==("after"==n)?"left":"right";return o("after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),l)[l]}var a,u,d=M(s,t),p=d.text.length,g=Se(d,s.direction);return xe(g,r||0,null==n?p:n,function(e,t,s,d){var v="ltr"==s,m=o(e,v?"left":"right"),y=o(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==p,x=0==d,C=!g||d==g.length-1;if(y.top-m.top<=3){var S=(h?b:w)&&x,L=(h?w:b)&&C,k=S?c:(v?m:y).left,T=L?f:(v?y:m).right;i(k,m.top,T-k,m.bottom)}else{var M,N,O,A;v?(M=h&&b&&x?c:m.left,N=h?f:l(e,s,"before"),O=h?c:l(t,s,"after"),A=h&&w&&C?f:y.right):(M=h?l(e,s,"before"):c,N=!h&&b&&x?f:m.right,O=!h&&w&&C?c:y.left,A=h?l(t,s,"after"):f),i(M,m.top,N-M,m.bottom),m.bottom<y.top&&i(c,m.bottom,null,y.top),i(O,y.top,A-O,y.bottom)}(!a||Or(m,a)<0)&&(a=m),Or(y,a)<0&&(a=y),(!u||Or(m,u)<0)&&(u=m),Or(y,u)<0&&(u=y)}),{start:a,end:u}}var l=e.display,s=e.doc,a=document.createDocumentFragment(),u=It(e.display),c=u.left,f=Math.max(l.sizerWidth,Bt(e)-l.sizer.offsetLeft)-u.right,h="ltr"==s.direction,d=t.from(),p=t.to();if(d.line==p.line)o(d.line,d.ch,p.ch);else{var g=M(s,d.line),v=M(s,p.line),m=fe(g)==fe(v),y=o(d.line,d.ch,m?g.text.length+1:null).end,b=o(p.line,m?0:null,p.ch).start;m&&(y.top<b.top-2?(i(y.right,y.top,null,y.bottom),i(c,b.top,b.left,b.bottom)):i(y.right,y.top,b.left-y.right,y.bottom)),y.bottom<b.top&&i(c,y.bottom,null,b.top)}r.appendChild(a)}function Wr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Dr(e){e.state.focused||(e.display.input.focus(),Fr(e))}function Hr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Pr(e))},100)}function Fr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Te(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),wl&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wr(e))}function Pr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Te(e,"blur",e,t),e.state.focused=!1,zl(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Er(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(yl&&bl<8){var l=i.node.offsetTop+i.node.offsetHeight;o=l-r,r=l}else{var s=i.node.getBoundingClientRect();o=s.bottom-s.top}var a=i.line.height-o;if(o<2&&(o=yr(t)),(a>.005||a<-.005)&&(A(i.line,o),zr(i.line),i.rest))for(var u=0;u<i.rest.length;u++)zr(i.rest[u])}}}function zr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Ir(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Et(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=D(t,n),l=D(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?(o=s,l=D(t,ye(M(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=D(t,ye(M(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Rr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=xr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Br(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=F(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var o=i.measure.appendChild(n("div",[n("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),l=o.firstChild.offsetWidth,s=o.offsetWidth-l;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(l,i.lineGutter.offsetWidth-s)+1,i.lineNumWidth=i.lineNumInnerWidth+s,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Dn(e),!0}return!1}function Gr(e,t){if(!Me(e,"scrollCursorIntoView")){var r=e.display,i=r.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Tl){var l=n("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Et(e.display))+"px;\n height: "+(t.bottom-t.top+Rt(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(o),e.display.lineSpace.removeChild(l)}}}function Ur(e,t,r,n){null==n&&(n=0);var i;e.options.lineWrapping||t!=r||(t=t.ch?P(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,r="before"==t.sticky?P(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=ar(e,t),a=r&&r!=t?ar(e,r):s;i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n};var u=Kr(e,i),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Zr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Jr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function Vr(e,t){var r=Kr(e,t);null!=r.scrollTop&&Zr(e,r.scrollTop),null!=r.scrollLeft&&Jr(e,r.scrollLeft)}function Kr(e,t){var r=e.display,n=yr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Gt(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+zt(r),a=t.top<n,u=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,h=Bt(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>h;return d&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.left<f?l.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>h+f-3&&(l.scrollLeft=t.right+(d?0:10)-h),l}function jr(e,t){null!=t&&(qr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Xr(e){qr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yr(e,t,r){null==t&&null==r||qr(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function _r(e,t){qr(e),e.curOp.scrollToPos=t}function qr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;$r(e,ur(e,t.from),ur(e,t.to),t.margin)}}function $r(e,t,r,n){var i=Kr(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yr(e,i.scrollLeft,i.scrollTop)}function Zr(e,t){Math.abs(e.doc.scrollTop-t)<2||(pl||An(e,{top:t}),Qr(e,t,!0),pl&&An(e),Sn(e,100))}function Qr(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Jr(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Rr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function en(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+zt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Rt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function tn(e,t){t||(t=en(e));var r=e.display.barWidth,n=e.display.barHeight;rn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Er(e),rn(e,en(e)),r=e.display.barWidth,n=e.display.barHeight}function rn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function nn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&zl(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ss[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ts(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Jr(e,t):Zr(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function on(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Ls},mt(e.curOp)}function ln(e){bt(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;sn(e)})}function sn(e){for(var t=e.ops,r=0;r<t.length;r++)an(t[r]);for(var n=0;n<t.length;n++)un(t[n]);for(var i=0;i<t.length;i++)cn(t[i]);for(var o=0;o<t.length;o++)fn(t[o]);for(var l=0;l<t.length;l++)hn(t[l])}function an(e){var t=e.cm,r=t.display;kn(t),e.updateMaxLine&&we(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ks(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function un(e){e.updatedDisplay=e.mustUpdate&&Nn(e.cm,e.update)}function cn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Er(t),e.barMeasure=en(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=jt(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Rt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Bt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function fn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Jr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==l();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&tn(t,e.barMeasure),e.updatedDisplay&&Hn(t,e.barMeasure),e.selectionChanged&&Wr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Dr(e.cm)}function hn(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&On(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Qr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Jr(t,e.scrollLeft,!0,!0),e.scrollToPos){Gr(t,Ur(t,U(n,e.scrollToPos.from),U(n,e.scrollToPos.to),e.scrollToPos.margin))}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||Te(i[l],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&Te(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Te(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function dn(e,t){if(e.curOp)return t();on(e);try{return t()}finally{ln(e)}}function pn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);on(e);try{return t.apply(e,arguments)}finally{ln(e)}}}function gn(e){return function(){if(this.curOp)return e.apply(this,arguments);on(this);try{return e.apply(this,arguments)}finally{ln(this)}}}function vn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);on(t);try{return e.apply(this,arguments)}finally{ln(t)}}}function mn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Zl&&pe(e.doc,t)<i.viewTo&&bn(e);else if(r<=i.viewFrom)Zl&&ge(e.doc,r+n)>i.viewFrom?bn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)bn(e);else if(t<=i.viewFrom){var o=wn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):bn(e)}else if(r>=i.viewTo){var l=wn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):bn(e)}else{var s=wn(e,t,t,-1),a=wn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(vt(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):bn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function yn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[kr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==h(l,r)&&l.push(r)}}}function bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function wn(e,t,r,n){var i,o=kr(e,t),l=e.display.view;if(!Zl||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(n>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;pe(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function xn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=vt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=vt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(kr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(vt(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,kr(e,r)))),n.viewTo=r}function Cn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function Sn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,u(Ln,e))}function Ln(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=$e(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?je(t.mode,n.state):null,a=_e(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!f&&h<l.length;++h)f=l[h]!=o.styles[h];f&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Ze(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Sn(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&dn(e,function(){for(var t=0;t<i.length;t++)yn(e,i[t],"text")})}}function kn(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Rt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Rt(e)+"px",t.scrollbarsClipped=!0)}function Tn(e){if(e.hasFocus())return null;var t=l();if(!t||!o(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&o(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Mn(e){if(e&&e.activeElt&&e.activeElt!=l()&&(e.activeElt.focus(),e.anchorNode&&o(document.body,e.anchorNode)&&o(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Nn(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return bn(e),!1;if(!r.force&&r.visible.from>=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Cn(e))return!1;Br(e)&&(bn(e),r.dims=wr(e));var o=i.first+i.size,l=Math.max(r.visible.from-e.options.viewportMargin,i.first),s=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFrom<l&&l-n.viewFrom<20&&(l=Math.max(i.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(o,n.viewTo)),Zl&&(l=pe(e.doc,l),s=ge(e.doc,s));var a=l!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;xn(e,l,s),n.viewOffset=ye(M(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Cn(e);if(!a&&0==u&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Tn(e);return u>4&&(n.lineDiv.style.display="none"),Wn(e,n.updateLineNumbers,r.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Mn(c),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,Sn(e,400)),n.updateLineNumbers=null,!0}function On(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Bt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+zt(e.display)-Gt(e),r.top)}),t.visible=Ir(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Nn(e,t);n=!1){Er(e);var i=en(e);Tr(e),tn(e,i),Hn(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function An(e,t){var r=new ks(e,t);if(Nn(e,r)){Er(e),On(e,r);var n=en(e);Tr(e),tn(e,n),Hn(e,n),r.finish()}}function Wn(e,r,n){function i(t){var r=t.nextSibling;return wl&&Al&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,l=e.options.lineNumbers,s=o.lineDiv,a=s.firstChild,u=o.view,c=o.viewFrom,f=0;f<u.length;f++){var d=u[f];if(d.hidden);else if(d.node&&d.node.parentNode==s){for(;a!=d.node;)a=i(a);var p=l&&null!=r&&r<=c&&d.lineNumber;d.changes&&(h(d.changes,"gutter")>-1&&(p=!1),Ct(e,d,c,n)),p&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(F(e.options,c)))),a=d.node.nextSibling}else{var g=At(e,d,c,n);s.insertBefore(g,a)}c+=d.size}for(;a;)a=i(a)}function Dn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Hn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Rt(e)+"px"}function Fn(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o<i.length;++o){var l=i[o],s=r.appendChild(n("div",null,"CodeMirror-gutter "+l));"CodeMirror-linenumbers"==l&&(e.display.lineGutter=s,s.style.width=(e.display.lineNumWidth||1)+"px")}r.style.display=o?"":"none",Dn(e)}function Pn(e){var t=h(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function En(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function zn(e){var t=En(e);return t.x*=Ms,t.y*=Ms,t}function In(e,t){var r=En(t),n=r.x,i=r.y,o=e.display,l=o.scroller,s=l.scrollWidth>l.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&Al&&wl)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var f=0;f<c.length;f++)if(c[f].node==u){e.display.currentWheelTarget=u;break e}if(n&&!pl&&!Sl&&null!=Ms)return i&&a&&Zr(e,Math.max(0,l.scrollTop+i*Ms)),Jr(e,Math.max(0,l.scrollLeft+n*Ms)),(!i||i&&a)&&We(t),void(o.wheelStartX=null);if(i&&null!=Ms){var h=i*Ms,d=e.doc.scrollTop,p=d+o.wrapper.clientHeight;h<0?d=Math.max(0,d+h-50):p=Math.min(e.doc.height,p+h+50),An(e,{top:d,bottom:p})}Ts<20&&(null==o.wheelStartX?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=l.scrollLeft-o.wheelStartX,t=l.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(Ms=(Ms*Ts+r)/(Ts+1),++Ts)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function Rn(e,t){var r=e[t];e.sort(function(e,t){return E(e.from(),t.from())}),t=h(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(E(o.to(),i.from())>=0){var l=B(o.from(),i.from()),s=R(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new Os(a?s:l,a?l:s))}}return new Ns(e,t)}function Bn(e,t){return new Ns([new Os(e,t||e)],0)}function Gn(e){return e.text?P(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Un(e,t){if(E(e,t.from)<0)return e;if(E(e,t.to)<=0)return Gn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Gn(t).ch-t.to.ch),P(r,n)}function Vn(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new Os(Un(i.anchor,t),Un(i.head,t)))}return Rn(r,e.sel.primIndex)}function Kn(e,t,r){return e.line==t.line?P(r.line,e.ch-t.ch+r.ch):P(r.line+(e.line-t.line),e.ch)}function jn(e,t,r){for(var n=[],i=P(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=Kn(s.from,i,o),u=Kn(Gn(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],f=E(c.head,c.anchor)<0;n[l]=new Os(f?u:a,f?a:u)}else n[l]=new Os(a,a)}return new Ns(n,e.sel.primIndex)}function Xn(e){e.doc.mode=Ve(e.options,e.doc.modeOption),Yn(e)}function Yn(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),
3
- e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Sn(e,100),e.state.modeGen++,e.curOp&&mn(e)}function _n(e,t){return 0==t.from.ch&&0==t.to.ch&&""==g(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function qn(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){ot(e,r,i,n),wt(e,"change",e,t)}function l(e,t){for(var r=[],o=e;o<t;++o)r.push(new ps(u[o],i(o),n));return r}var s=t.from,a=t.to,u=t.text,c=M(e,s.line),f=M(e,a.line),h=g(u),d=i(u.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(_n(e,t)){var v=l(0,u.length-1);o(f,f.text,d),p&&e.remove(s.line,p),v.length&&e.insert(s.line,v)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+h+c.text.slice(a.ch),d);else{var m=l(1,u.length-1);m.push(new ps(h+c.text.slice(a.ch),d,n)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,m)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,h+f.text.slice(a.ch),d);var y=l(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,y)}wt(e,"change",e,t)}function $n(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l<e.linked.length;++l){var s=e.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;r&&!a||(t(s.doc,a),n(s.doc,e,a))}}}n(e,null,!0)}function Zn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Sr(e),Xn(e),Qn(e),e.options.lineWrapping||we(e),e.options.mode=t.modeOption,mn(e)}function Qn(e){("rtl"==e.doc.direction?s:zl)(e.display.lineDiv,"CodeMirror-rtl")}function Jn(e){dn(e,function(){Qn(e),mn(e)})}function ei(e){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=e||1}function ti(e,t){var r={from:I(t.from),to:Gn(t),text:N(e,t.from,t.to)};return ai(e,r,t.from.line,t.to.line+1),$n(e,function(e){return ai(e,r,t.from.line,t.to.line+1)},!0),r}function ri(e){for(;e.length;){if(!g(e).ranges)break;e.pop()}}function ni(e,t){return t?(ri(e.done),g(e.done)):e.done.length&&!g(e.done).ranges?g(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}function ii(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ni(i,i.lastOp==n)))l=g(o.changes),0==E(t.from,t.to)&&0==E(t.from,l.to)?l.to=Gn(t):o.changes.push(ti(e,t));else{var a=g(i.done);for(a&&a.ranges||si(e.sel,i.done),o={changes:[ti(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Te(e,"historyAdded")}function oi(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function li(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||oi(e,o,g(i.done),t))?i.done[i.done.length-1]=t:si(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&ri(i.undone)}function si(e,t){var r=g(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ai(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function ui(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function ci(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ui(r[i]));return n}function fi(e,t){var r=ci(e,t),n=J(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function hi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?Ns.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&h(t,Number(c[1]))>-1&&(g(s)[f]=u[f],delete u[f])}}}return n}function di(e,t,r,n){if(n){var i=e.anchor;if(r){var o=E(t,i)<0;o!=E(r,i)<0?(i=t,t=r):o!=E(t,r)<0&&(t=r)}return new Os(i,t)}return new Os(r||t,t)}function pi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),wi(e,new Ns([di(e.sel.primary(),t,r,i)],0),n)}function gi(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=di(e.sel.ranges[o],t[o],null,i);wi(e,Rn(n,e.sel.primIndex),r)}function vi(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,wi(e,Rn(i,e.sel.primIndex),n)}function mi(e,t,r,n){wi(e,Bn(t,r),n)}function yi(e,t,r){var n={ranges:t.ranges,update:function(t){var r=this;this.ranges=[];for(var n=0;n<t.length;n++)r.ranges[n]=new Os(U(e,t[n].anchor),U(e,t[n].head))},origin:r&&r.origin};return Te(e,"beforeSelectionChange",e,n),e.cm&&Te(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Rn(n.ranges,n.ranges.length-1):t}function bi(e,t,r){var n=e.history.done,i=g(n);i&&i.ranges?(n[n.length-1]=t,xi(e,t,r)):wi(e,t,r)}function wi(e,t,r){xi(e,t,r),li(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function xi(e,t,r){(Oe(e,"beforeSelectionChange")||e.cm&&Oe(e.cm,"beforeSelectionChange"))&&(t=yi(e,t,r)),Ci(e,Li(e,t,r&&r.bias||(E(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||Xr(e.cm)}function Ci(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Ne(e.cm)),wt(e,"cursorActivity",e))}function Si(e){Ci(e,Li(e,e.sel,null,!1))}function Li(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=Ti(e,l.anchor,s&&s.anchor,r,n),u=Ti(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Os(a,u))}return i?Rn(i,t.primIndex):t}function ki(e,t,r,n,i){var o=M(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker;if((null==s.from||(a.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(a.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(Te(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=Mi(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=E(u,r))&&(n<0?c<0:c>0))return ki(e,u,t,n,i)}var f=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(f=Mi(e,f,n,f.line==t.line?o:null)),f?ki(e,f,t,n,i):null}}return t}function Ti(e,t,r,n,i){var o=n||1,l=ki(e,t,r,o,i)||!i&&ki(e,t,r,o,!0)||ki(e,t,r,-o,i)||!i&&ki(e,t,r,-o,!0);return l||(e.cantEdit=!0,P(e.first,0))}function Mi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?U(e,P(t.line-1)):null:r>0&&t.ch==(n||M(e,t.line)).text.length?t.line<e.first+e.size-1?P(t.line+1,0):null:new P(t.line,t.ch+r)}function Ni(e){e.setSelection(P(e.firstLine(),0),P(e.lastLine()),Kl)}function Oi(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=U(e,t)),r&&(n.to=U(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),Te(e,"beforeChange",e,n),e.cm&&Te(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ai(e,t,r){if(e.cm){if(!e.cm.curOp)return pn(e.cm,Ai)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"))||(t=Oi(e,t,!0))){var n=$l&&!r&&te(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Wi(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Wi(e,t)}}function Wi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=E(t.from,t.to)){var r=Vn(e,t);ii(e,t,r,e.cm?e.cm.curOp.id:NaN),Fi(e,t,r,J(e,t));var n=[];$n(e,function(e,r){r||-1!=h(n,e.history)||(Ri(e.history,t),n.push(e.history)),Fi(e,t,null,J(e,t))})}}function Di(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a<l.length&&(n=l[a],r?!n.ranges||n.equals(e.sel):n.ranges);a++);if(a!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;n=l.pop(),n.ranges;){if(si(n,s),r&&!n.equals(e.sel))return void wi(e,n,{clearRedo:!1});o=n}var u=[];si(o,s),s.push({changes:u,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var c=Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"),f=n.changes.length-1;f>=0;--f){var d=function(r){var i=n.changes[r];if(i.origin=t,c&&!Oi(e,i,!1))return l.length=0,{};u.push(ti(e,i));var o=r?Vn(e,i):g(l);Fi(e,i,o,fi(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Gn(i)});var s=[];$n(e,function(e,t){t||-1!=h(s,e.history)||(Ri(e.history,i),s.push(e.history)),Fi(e,i,null,fi(e,i))})}(f);if(d)return d.v}}}}function Hi(e,t){if(0!=t&&(e.first+=t,e.sel=new Ns(v(e.sel.ranges,function(e){return new Os(P(e.anchor.line+t,e.anchor.ch),P(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){mn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)yn(e.cm,n,"gutter")}}function Fi(e,t,r,n){if(e.cm&&!e.cm.curOp)return pn(e.cm,Fi)(e,t,r,n);if(t.to.line<e.first)return void Hi(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Hi(e,i),t={from:P(e.first,0),to:P(t.to.line+i,t.to.ch),text:[g(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:P(o,M(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=N(e,t.from,t.to),r||(r=Vn(e,t)),e.cm?Pi(e.cm,t,n):qn(e,t,n),xi(e,r,Kl)}}function Pi(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=W(fe(M(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ne(e),qn(n,t,r,Cr(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=be(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),it(n,o.line),Sn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?mn(e):o.line!=l.line||1!=t.text.length||_n(e.doc,t)?mn(e,o.line,l.line+1,u):yn(e,o.line,"text");var c=Oe(e,"changes"),f=Oe(e,"change");if(f||c){var h={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&wt(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Ei(e,t,r,n,i){if(n||(n=r),E(n,r)<0){var o;o=[n,r],r=o[0],n=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Ai(e,{from:r,to:n,text:t,origin:i})}function zi(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Ii(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var s=0;s<o.ranges.length;s++)zi(o.ranges[s].anchor,t,r,n),zi(o.ranges[s].head,t,r,n)}else{for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(r<u.from.line)u.from=P(u.from.line+n,u.from.ch),u.to=P(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function Ri(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Ii(e.done,r,n,i),Ii(e.undone,r,n,i)}function Bi(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=M(e,G(e,t)):i=W(t),null==i?null:(n(o,i)&&e.cm&&yn(e.cm,i,r),o)}function Gi(e){var t=this;this.lines=e,this.parent=null;for(var r=0,n=0;n<e.length;++n)e[n].parent=t,r+=e[n].height;this.height=r}function Ui(e){var t=this;this.children=e;for(var r=0,n=0,i=0;i<e.length;++i){var o=e[i];r+=o.chunkSize(),n+=o.height,o.parent=t}this.size=r,this.height=n,this.parent=null}function Vi(e,t,r){ye(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&jr(e,r)}function Ki(e,t,r,n){var i=new As(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Bi(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!ve(e,t)){var n=ye(t)<e.scrollTop;A(t,t.height+Ft(i)),n&&jr(o,i.height),o.curOp.forceUpdate=!0}return!0}),wt(o,"lineWidgetAdded",o,i,"number"==typeof t?t:W(t)),i}function ji(e,t,r,n,o){if(n&&n.shared)return Xi(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return pn(e.cm,ji)(e,t,r,n,o);var l=new Ds(e,o),s=E(t,r);if(n&&c(n,l,!1),s>0||0==s&&!1!==l.clearWhenEmpty)return l;if(l.replacedWith&&(l.collapsed=!0,l.widgetNode=i("span",[l.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||l.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(l.widgetNode.insertLeft=!0)),l.collapsed){if(ce(e,t.line,t,r,l)||t.line!=r.line&&ce(e,r.line,t,r,l))throw new Error("Inserting collapsed marker partially overlapping an existing one");X()}l.addToHistory&&ii(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,u=t.line,f=e.cm;if(e.iter(u,r.line+1,function(e){f&&l.collapsed&&!f.options.lineWrapping&&fe(e)==f.display.maxLine&&(a=!0),l.collapsed&&u!=t.line&&A(e,0),$(e,new Y(l,u==t.line?t.ch:null,u==r.line?r.ch:null)),++u}),l.collapsed&&e.iter(t.line,r.line+1,function(t){ve(e,t)&&A(t,0)}),l.clearOnEnter&&ts(l,"beforeCursorEnter",function(){return l.clear()}),l.readOnly&&(j(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),l.collapsed&&(l.id=++Ws,l.atomic=!0),f){if(a&&(f.curOp.updateMaxLine=!0),l.collapsed)mn(f,t.line,r.line+1);else if(l.className||l.title||l.startStyle||l.endStyle||l.css)for(var h=t.line;h<=r.line;h++)yn(f,h,"text");l.atomic&&Si(f.doc),wt(f,"markerAdded",f,l)}return l}function Xi(e,t,r,n,i){n=c(n),n.shared=!1;var o=[ji(e,t,r,n,i)],l=o[0],s=n.widgetNode;return $n(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(ji(e,U(e,t),U(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=g(o)}),new Hs(o,l)}function Yi(e){return e.findMarks(P(e.first,0),e.clipPos(P(e.lastLine())),function(e){return e.parent})}function _i(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(E(o,l)){var s=ji(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function qi(e){for(var t=0;t<e.length;t++)!function(t){var r=e[t],n=[r.primary.doc];$n(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==h(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}}(t)}function $i(e){var t=this;if(Ji(t),!Me(t,e)&&!Pt(t.display,e)){We(e),yl&&(Es=+new Date);var r=Lr(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),l=0,s=0;s<i;++s)!function(e,n){if(!t.options.allowDropFileTypes||-1!=h(t.options.allowDropFileTypes,e.type)){var s=new FileReader;s.onload=pn(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++l==i){r=U(t.doc,r);var a={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Ai(t.doc,a),bi(t.doc,Bn(r,Gn(a)))}}),s.readAsText(e)}}(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var a=e.dataTransfer.getData("Text");if(a){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),xi(t.doc,Bn(r,r)),u)for(var c=0;c<u.length;++c)Ei(t.doc,"",u[c].anchor,u[c].head,"drag");t.replaceSelection(a,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Zi(e,t){if(yl&&(!e.state.draggingText||+new Date-Es<100))return void Fe(t);if(!Me(e,t)&&!Pt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ll)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Sl&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),Sl&&r.parentNode.removeChild(r)}}function Qi(e,t){var i=Lr(e,t);if(i){var o=document.createDocumentFragment();Nr(e,i,o),e.display.dragCursor||(e.display.dragCursor=n("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),r(e.display.dragCursor,o)}}function Ji(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function eo(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function to(){zs||(ro(),zs=!0)}function ro(){var e;ts(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,eo(no)},100))}),ts(window,"blur",function(){return eo(Pr)})}function no(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function io(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,l=0;l<t.length-1;l++){var s=t[l];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function oo(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=v(r.split(" "),io),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function lo(e,t,r,n){t=co(t);var i=t.call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return lo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=lo(e,t.fallthrough[o],r,n);if(l)return l}}}function so(e){var t="string"==typeof e?e:Is[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function ao(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(Pl?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(Pl?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function uo(e,t){if(Sl&&34==e.keyCode&&e.char)return!1;var r=Is[e.keyCode];return null!=r&&!e.altGraphKey&&ao(r,e,t)}function co(e){return"string"==typeof e?Us[e]:e}function fo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&E(o.from,g(n).to)<=0;){var l=n.pop();if(E(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}dn(e,function(){for(var t=n.length-1;t>=0;t--)Ei(e.doc,"",n[t].from,n[t].to,"+delete");Xr(e)})}function ho(e,t,r){var n=L(e.text,t+r,r);return n<0||n>e.text.length?null:n}function po(e,t,r){var n=ho(e,t.ch,r);return null==n?null:new P(t.line,n,r<0?"after":"before")}function go(e,t,r,n,i){if(e){var o=Se(r,t.doc.direction);if(o){var l,s=i<0?g(o):o[0],a=i<0==(1==s.level),u=a?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Yt(t,r);l=i<0?r.text.length-1:0;var f=_t(t,c,l).top;l=k(function(e){return _t(t,c,e).top==f},i<0==(1==s.level)?s.from:s.to-1,l),"before"==u&&(l=ho(r,l,1))}else l=i<0?s.to:s.from;return new P(n,l,u)}}return new P(n,i<0?r.text.length:0,i<0?"before":"after")}function vo(e,t,r,n){var i=Se(t,e.doc.direction);if(!i)return po(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from<r.ch))return po(t,r,n);var s,a=function(e,r){return ho(t,e instanceof P?e.ch:e,r)},u=function(r){return e.options.lineWrapping?(s=s||Yt(e,t),dr(e,t,s,r)):{begin:0,end:t.text.length}},c=u("before"==r.sticky?a(r,-1):r.ch);if("rtl"==e.doc.direction||1==l.level){var f=1==l.level==n<0,h=a(r,f?1:-1);if(null!=h&&(f?h<=l.to&&h<=c.end:h>=l.from&&h>=c.begin)){var d=f?"before":"after";return new P(r.line,h,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new P(r.line,a(e,1),"before"):new P(r.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],s=t>0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u<l.to)return o(u,s);if(u=s?l.from:a(l.to,-1),n.begin<=u&&u<n.end)return o(u,s)}},g=p(o+n,n,c);if(g)return g;var v=n>0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}function mo(e,t){var r=M(e.doc,t),n=fe(r);return n!=r&&(t=W(n)),go(!0,e,n,t,1)}function yo(e,t){var r=M(e.doc,t),n=he(r);return n!=r&&(t=W(n)),go(!0,e,r,t,-1)}function bo(e,t){var r=mo(e,t.line),n=M(e.doc,r.line),i=Se(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return P(r.line,l?0:o,r.sticky)}return r}function wo(e,t,r){if("string"==typeof t&&!(t=Vs[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Vl}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function xo(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=lo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&lo(t,e.options.extraKeys,r,e)||lo(t,e.options.keyMap,r,e)}function Co(e,t,r,n){var i=e.state.keySeq;if(i){if(so(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ks.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),So(e,i+" "+t,r,n))return!0}return So(e,t,r,n)}function So(e,t,r,n){var i=xo(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&wt(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(We(r),Wr(e)),!!i}function Lo(e,t){var r=uo(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+r,t,function(t){return wo(e,t,!0)})||Co(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return wo(e,t)}):Co(e,r,t,function(t){return wo(e,t)}))}function ko(e,t,r){return Co(e,"'"+r+"'",t,function(t){return wo(e,t,!0)})}function To(e){var t=this;if(t.curOp.focus=l(),!Me(t,e)){yl&&bl<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=Lo(t,e);Sl&&(js=n?r:null,!n&&88==r&&!os&&(Al?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||Mo(t)}}function Mo(e){function t(e){18!=e.keyCode&&e.altKey||(zl(r,"CodeMirror-crosshair"),ke(document,"keyup",t),ke(document,"mouseover",t))}var r=e.display.lineDiv;s(r,"CodeMirror-crosshair"),ts(document,"keyup",t),ts(document,"mouseover",t)}function No(e){16==e.keyCode&&(this.doc.sel.shift=!1),Me(this,e)}function Oo(e){var t=this;if(!(Pt(t.display,e)||Me(t,e)||e.ctrlKey&&!e.altKey||Al&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(Sl&&r==js)return js=null,void We(e);if(!Sl||e.which&&!(e.which<10)||!Lo(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(ko(t,e,i)||t.display.input.onKeyPress(e))}}}function Ao(e,t){var r=+new Date;return _s&&_s.compare(r,e,t)?(Ys=_s=null,"triple"):Ys&&Ys.compare(r,e,t)?(_s=new Xs(r,e,t),Ys=null,"double"):(Ys=new Xs(r,e,t),_s=null,"single")}function Wo(e){var t=this,r=t.display;if(!(Me(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,Pt(r,e))return void(wl||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100)));if(!Bo(t,e)){var n=Lr(t,e),i=Ee(e),o=n?Ao(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&Do(t,i,n,o,e)||(1==i?n?Fo(t,n,o,e):Pe(e)==r.scroller&&We(e):2==i?(n&&pi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(El?Go(t,e):Hr(t)))}}}function Do(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),o=(1==t?"Left":2==t?"Middle":"Right")+o,Co(e,ao(o,i),i,function(t){if("string"==typeof t&&(t=Vs[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=Vl}finally{e.state.suppressEdits=!1}return n})}function Ho(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=Wl?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=Al?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(Al?r.altKey:r.ctrlKey)),i}function Fo(e,t,r,n){yl?setTimeout(u(Dr,e),0):e.curOp.focus=l();var i,o=Ho(e,r,n),s=e.doc.sel;e.options.dragDrop&&rs&&!e.isReadOnly()&&"single"==r&&(i=s.contains(t))>-1&&(E((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(E(i.to(),t)>0||t.xRel<0)?Po(e,n,t,o):zo(e,n,t,o)}function Po(e,t,r,n){var i=e.display,o=!1,l=pn(e,function(t){wl&&(i.scroller.draggable=!1),e.state.draggingText=!1,ke(document,"mouseup",l),ke(document,"mousemove",s),ke(i.scroller,"dragstart",a),ke(i.scroller,"drop",l),o||(We(t),n.addNew||pi(e.doc,r,null,null,n.extend),wl||yl&&9==bl?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),s=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},a=function(){return o=!0};wl&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ts(document,"mouseup",l),ts(document,"mousemove",s),ts(i.scroller,"dragstart",a),ts(i.scroller,"drop",l),Hr(e),setTimeout(function(){return i.input.focus()},20)}function Eo(e,t,r){if("char"==r)return new Os(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new Os(P(t.line,0),U(e.doc,P(t.line+1,0)));var n=r(e,t);return new Os(n.from,n.to)}function zo(e,t,r,n){function i(t){if(0!=E(m,t))if(m=t,"rectangle"==n.unit){for(var i=[],o=e.options.tabSize,l=f(M(u,r.line).text,r.ch,o),s=f(M(u,t.line).text,t.ch,o),a=Math.min(l,s),g=Math.max(l,s),v=Math.min(r.line,t.line),y=Math.min(e.lastLine(),Math.max(r.line,t.line));v<=y;v++){var b=M(u,v).text,w=d(b,a,o);a==g?i.push(new Os(P(v,w),P(v,w))):b.length>w&&i.push(new Os(P(v,w),P(v,d(b,g,o))))}i.length||i.push(new Os(r,r)),wi(u,Rn(p.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,C=c,S=Eo(e,t,n.unit),L=C.anchor;E(S.anchor,L)>0?(x=S.head,L=B(C.from(),S.anchor)):(x=S.anchor,L=R(C.to(),S.head));var k=p.ranges.slice(0);k[h]=Io(e,new Os(U(u,L),x)),wi(u,Rn(k,h),jl)}}function o(t){var r=++b,s=Lr(e,t,!0,"rectangle"==n.unit);if(s)if(0!=E(s,m)){e.curOp.focus=l(),i(s);var c=Ir(a,u);(s.line>=c.to||s.line<c.from)&&setTimeout(pn(e,function(){b==r&&o(t)}),150)}else{var f=t.clientY<y.top?-20:t.clientY>y.bottom?20:0;f&&setTimeout(pn(e,function(){b==r&&(a.scroller.scrollTop+=f,o(t))}),50)}}function s(t){e.state.selectingText=!1,b=1/0,We(t),a.input.focus(),ke(document,"mousemove",w),ke(document,"mouseup",x),u.history.lastSelOrigin=null}var a=e.display,u=e.doc;We(t);var c,h,p=u.sel,g=p.ranges;if(n.addNew&&!n.extend?(h=u.sel.contains(r),c=h>-1?g[h]:new Os(r,r)):(c=u.sel.primary(),h=u.sel.primIndex),"rectangle"==n.unit)n.addNew||(c=new Os(r,r)),r=Lr(e,t,!0,!0),h=-1;else{var v=Eo(e,r,n.unit);c=n.extend?di(c,v.anchor,v.head,n.extend):v}n.addNew?-1==h?(h=g.length,wi(u,Rn(g.concat([c]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"char"==n.unit&&!n.extend?(wi(u,Rn(g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):vi(u,h,c,jl):(h=0,wi(u,new Ns([c],0),jl),p=u.sel);var m=r,y=a.wrapper.getBoundingClientRect(),b=0,w=pn(e,function(e){Ee(e)?o(e):s(e)}),x=pn(e,s);e.state.selectingText=x,ts(document,"mousemove",w),ts(document,"mouseup",x)}function Io(e,t){var r=t.anchor,n=t.head,i=M(e.doc,r.line);if(0==E(r,n)&&r.sticky==n.sticky)return t;var o=Se(i);if(!o)return t;var l=Ce(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==a||a==o.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=Ce(o,n.ch,n.sticky),f=c-l||(n.ch-r.ch)*(1==s.level?-1:1);u=c==a-1||c==a?f<0:f>0}var h=o[a+(u?-1:0)],d=u==(1==h.level),p=d?h.from:h.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new Os(new P(r.line,p,g),n)}function Ro(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&We(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!Oe(e,r))return He(t);o-=s.top-l.viewOffset;for(var a=0;a<e.options.gutters.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i){return Te(e,r,e,D(e.doc,o),e.options.gutters[a],t),He(t)}}}function Bo(e,t){return Ro(e,t,"gutterClick",!0)}function Go(e,t){Pt(e.display,t)||Uo(e,t)||Me(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Uo(e,t){return!!Oe(e,"gutterContextMenu")&&Ro(e,t,"gutterContextMenu",!1)}function Vo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tr(e)}function Ko(e){Fn(e),mn(e),Rr(e)}function jo(e,t,r){if(!t!=!(r&&r!=qs)){var n=e.display.dragFunctions,i=t?ts:ke;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Xo(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(zl(e.display.wrapper,"CodeMirror-wrap"),we(e)),Sr(e),mn(e),tr(e),setTimeout(function(){return tn(e)},100)}function Yo(e,t){var r=this;if(!(this instanceof Yo))return new Yo(e,t);this.options=t=t?c(t):{},c($s,t,!1),Pn(t);var n=t.value;"string"==typeof n&&(n=new Ps(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Yo.inputStyles[t.inputStyle](this),o=this.display=new T(e,n,i);o.wrapper.CodeMirror=this,Fn(this),Vo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),nn(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 Rl,keySeq:null,specialChars:null},t.autofocus&&!Ol&&o.input.focus(),yl&&bl<11&&setTimeout(function(){return r.display.input.reset(!0)},20),_o(this),to(),on(this),this.curOp.forceUpdate=!0,Zn(this,n),t.autofocus&&!Ol||this.hasFocus()?setTimeout(u(Fr,this),20):Pr(this);for(var l in Zs)Zs.hasOwnProperty(l)&&Zs[l](r,t[l],qs);Br(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Qs.length;++s)Qs[s](r);ln(this),wl&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function _o(e){function t(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),l=i.activeTouch,l.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var i=e.display;ts(i.scroller,"mousedown",pn(e,Wo)),yl&&bl<11?ts(i.scroller,"dblclick",pn(e,function(t){if(!Me(e,t)){var r=Lr(e,t);if(r&&!Bo(e,t)&&!Pt(e.display,t)){We(t);var n=e.findWordAt(r);pi(e.doc,n.anchor,n.head)}}})):ts(i.scroller,"dblclick",function(t){return Me(e,t)||We(t)}),El||ts(i.scroller,"contextmenu",function(t){return Go(e,t)});var o,l={end:0};ts(i.scroller,"touchstart",function(t){if(!Me(e,t)&&!r(t)&&!Bo(e,t)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),ts(i.scroller,"touchmove",function(){
4
- i.activeTouch&&(i.activeTouch.moved=!0)}),ts(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!Pt(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,s=e.coordsChar(i.activeTouch,"page");l=!o.prev||n(o,o.prev)?new Os(s,s):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(s):new Os(P(s.line,0),U(e.doc,P(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),We(r)}t()}),ts(i.scroller,"touchcancel",t),ts(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zr(e,i.scroller.scrollTop),Jr(e,i.scroller.scrollLeft,!0),Te(e,"scroll",e))}),ts(i.scroller,"mousewheel",function(t){return In(e,t)}),ts(i.scroller,"DOMMouseScroll",function(t){return In(e,t)}),ts(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Me(e,t)||Fe(t)},over:function(t){Me(e,t)||(Qi(e,t),Fe(t))},start:function(t){return Zi(e,t)},drop:pn(e,$i),leave:function(t){Me(e,t)||Ji(e)}};var s=i.input.getField();ts(s,"keyup",function(t){return No.call(e,t)}),ts(s,"keydown",pn(e,To)),ts(s,"keypress",pn(e,Oo)),ts(s,"focus",function(t){return Fr(e,t)}),ts(s,"blur",function(t){return Pr(e,t)})}function qo(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=$e(e,t).state:r="prev");var l=e.options.tabSize,s=M(o,t),a=f(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==Vl||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?f(M(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",d=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/l);g;--g)d+=l,h+="\t";if(d<u&&(h+=p(u-d)),h!=c)return Ei(o,h,P(t,0),P(t,c.length),"+input"),s.stateAfter=null,!0;for(var v=0;v<o.sel.ranges.length;v++){var m=o.sel.ranges[v];if(m.head.line==t&&m.head.ch<c.length){var y=P(t,c.length);vi(o,v,new Os(y,y));break}}}function $o(e){Js=e}function Zo(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l=e.state.pasteIncoming||"paste"==i,s=ns(t),a=null;if(l&&n.ranges.length>1)if(Js&&Js.text.join("\n")==t){if(n.ranges.length%Js.text.length==0){a=[];for(var u=0;u<Js.text.length;u++)a.push(o.splitLines(Js.text[u]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(a=v(s,function(e){return[e]}));for(var c,f=n.ranges.length-1;f>=0;f--){var h=n.ranges[f],d=h.from(),p=h.to();h.empty()&&(r&&r>0?d=P(d.line,d.ch-r):e.state.overwrite&&!l?p=P(p.line,Math.min(M(o,p.line).text.length,p.ch+g(s).length)):Js&&Js.lineWise&&Js.text.join("\n")==t&&(d=p=P(d.line,0))),c=e.curOp.updateInput;var m={from:d,to:p,text:a?a[f%a.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};Ai(e.doc,m),wt(e,"inputRead",e,m)}t&&!l&&Jo(e,t),Xr(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Qo(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||dn(t,function(){return Zo(t,r,0,null,"paste")}),!0}function Jo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=qo(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=qo(e,i.head.line,"smart"));l&&wt(e,"electricInput",e,i.head.line)}}}function el(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:P(i,0),head:P(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function tl(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function rl(){var e=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=n("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return wl?e.style.width="1000px":e.setAttribute("wrap","off"),Ml&&(e.style.border="1px solid black"),tl(e),t}function nl(e,t,r,n,i){function o(){var n=t.line+r;return!(n<e.first||n>=e.first+e.size)&&(t=new P(n,t.ch,t.sticky),u=M(e,n))}function l(n){var l;if(null==(l=i?vo(e.cm,u,t,r):po(u,t,r))){if(n||!o())return!1;t=go(i,e.cm,u,t.line,r)}else t=l;return!0}var s=t,a=r,u=M(e,t.line);if("char"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var c=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||l(!d);d=!1){var p=u.text.charAt(t.ch)||"\n",g=x(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||g||(g="s"),c&&c!=g){r<0&&(r=1,l(),t.sticky="after");break}if(g&&(c=g),r>0&&!l(!d))break}var v=Ti(e,t,s,a,!0);return z(s,v)&&(v.hitSide=!0),v}function il(e,t,r,n){var i,o=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),a=Math.max(s-.5*yr(e.display),3);i=(r>0?t.bottom:t.top)+r*a}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var u;u=fr(e,l,i),u.outside;){if(r<0?i<=0:i>=o.height){u.hitSide=!0;break}i+=5*r}return u}function ol(e,t){var r=Xt(e,t.line);if(!r||r.hidden)return null;var n=M(e.doc,t.line),i=Vt(r,n,t.line),o=Se(n,e.doc.direction),l="left";if(o){l=Ce(o,t.ch)%2?"right":"left"}var s=qt(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function ll(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function sl(e,t){return t&&(e.bad=!0),e}function al(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function l(){c&&(u+=f,c=!1)}function s(e){e&&(l(),u+=e)}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void s(r||t.textContent.replace(/\u200b/g,""));var u,h=t.getAttribute("cm-marker");if(h){var d=e.findMarks(P(n,0),P(i+1,0),o(+h));return void(d.length&&(u=d[0].find(0))&&s(N(e.doc,u.from,u.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(t.nodeName);p&&l();for(var g=0;g<t.childNodes.length;g++)a(t.childNodes[g]);p&&(c=!0)}else 3==t.nodeType&&s(t.nodeValue)}for(var u="",c=!1,f=e.doc.lineSeparator();a(t),t!=r;)t=t.nextSibling;return u}function ul(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return sl(e.clipPos(P(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return cl(o,t,r)}}function cl(e,t,r){function n(t,r,n){for(var i=-1;i<(f?f.length:0);i++)for(var o=i<0?c.map:f[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var a=W(i<0?e.line:e.rest[i]),u=o[l]+n;return(n<0||s!=t)&&(u=o[l+(n?1:0)]),P(a,u)}}}var i=e.text.firstChild,l=!1;if(!t||!o(i,t))return sl(P(W(e.line),0),!0);if(t==i&&(l=!0,t=i.childNodes[r],r=0,!t)){var s=e.rest?g(e.rest):e.line;return sl(P(W(s),s.text.length),l)}var a=3==t.nodeType?t:null,u=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));u.parentNode!=i;)u=u.parentNode;var c=e.measure,f=c.maps,h=n(a,u,r);if(h)return sl(h,l);for(var d=u.nextSibling,p=a?a.nodeValue.length-r:0;d;d=d.nextSibling){if(h=n(d,d.firstChild,0))return sl(P(h.line,h.ch-p),l);p+=d.textContent.length}for(var v=u.previousSibling,m=r;v;v=v.previousSibling){if(h=n(v,v.firstChild,-1))return sl(P(h.line,h.ch+m),l);m+=v.textContent.length}}function fl(e,t){function r(){e.value=a.getValue()}if(t=t?c(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=l();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}var i;if(e.form&&(ts(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var s=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=s}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(ke(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var a=Yo(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a}var hl=navigator.userAgent,dl=navigator.platform,pl=/gecko\/\d/i.test(hl),gl=/MSIE \d/.test(hl),vl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hl),ml=/Edge\/(\d+)/.exec(hl),yl=gl||vl||ml,bl=yl&&(gl?document.documentMode||6:+(ml||vl)[1]),wl=!ml&&/WebKit\//.test(hl),xl=wl&&/Qt\/\d+\.\d+/.test(hl),Cl=!ml&&/Chrome\//.test(hl),Sl=/Opera\//.test(hl),Ll=/Apple Computer/.test(navigator.vendor),kl=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(hl),Tl=/PhantomJS/.test(hl),Ml=!ml&&/AppleWebKit/.test(hl)&&/Mobile\/\w+/.test(hl),Nl=/Android/.test(hl),Ol=Ml||Nl||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(hl),Al=Ml||/Mac/.test(dl),Wl=/\bCrOS\b/.test(hl),Dl=/win/i.test(dl),Hl=Sl&&hl.match(/Version\/(\d*\.\d*)/);Hl&&(Hl=Number(Hl[1])),Hl&&Hl>=15&&(Sl=!1,wl=!0);var Fl,Pl=Al&&(xl||Sl&&(null==Hl||Hl<12.11)),El=pl||yl&&bl>=9,zl=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};Fl=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var Il=function(e){e.select()};Ml?Il=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:yl&&(Il=function(e){try{e.select()}catch(e){}});var Rl=function(){this.id=null};Rl.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Bl,Gl,Ul=30,Vl={toString:function(){return"CodeMirror.Pass"}},Kl={scroll:!1},jl={origin:"*mouse"},Xl={origin:"+move"},Yl=[""],_l=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ql=/[\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]/,$l=!1,Zl=!1,Ql=null,Jl=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;return function(r,n){var u="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1;for(var c=r.length,f=[],h=0;h<c;++h)f.push(e(r.charCodeAt(h)));for(var d=0,p=u;d<c;++d){var v=f[d];"m"==v?f[d]=p:p=v}for(var m=0,y=u;m<c;++m){var b=f[m];"1"==b&&"r"==y?f[m]="n":l.test(b)&&(y=b,"r"==b&&(f[m]="R"))}for(var w=1,x=f[0];w<c-1;++w){var C=f[w];"+"==C&&"1"==x&&"1"==f[w+1]?f[w]="1":","!=C||x!=f[w+1]||"1"!=x&&"n"!=x||(f[w]=x),x=C}for(var S=0;S<c;++S){var L=f[S];if(","==L)f[S]="N";else if("%"==L){var k=void 0;for(k=S+1;k<c&&"%"==f[k];++k);for(var T=S&&"!"==f[S-1]||k<c&&"1"==f[k]?"1":"N",M=S;M<k;++M)f[M]=T;S=k-1}}for(var N=0,O=u;N<c;++N){var A=f[N];"L"==O&&"1"==A?f[N]="L":l.test(A)&&(O=A)}for(var W=0;W<c;++W)if(o.test(f[W])){var D=void 0;for(D=W+1;D<c&&o.test(f[D]);++D);for(var H="L"==(W?f[W-1]:u),F="L"==(D<c?f[D]:u),P=H==F?H?"L":"R":u,E=W;E<D;++E)f[E]=P;W=D-1}for(var z,I=[],R=0;R<c;)if(s.test(f[R])){var B=R;for(++R;R<c&&s.test(f[R]);++R);I.push(new t(0,B,R))}else{var G=R,U=I.length;for(++R;R<c&&"L"!=f[R];++R);for(var V=G;V<R;)if(a.test(f[V])){G<V&&I.splice(U,0,new t(1,G,V));var K=V;for(++V;V<R&&a.test(f[V]);++V);I.splice(U,0,new t(2,K,V)),G=V}else++V;G<R&&I.splice(U,0,new t(1,G,R))}return"ltr"==n&&(1==I[0].level&&(z=r.match(/^\s+/))&&(I[0].from=z[0].length,I.unshift(new t(0,0,z[0].length))),1==g(I).level&&(z=r.match(/\s+$/))&&(g(I).to-=z[0].length,I.push(new t(0,c-z[0].length,c)))),"rtl"==n?I.reverse():I}}(),es=[],ts=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||es).concat(r)}},rs=function(){if(yl&&bl<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),ns=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},is=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},os=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ls=null,ss={},as={},us={},cs=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};cs.prototype.eol=function(){return this.pos>=this.string.length},cs.prototype.sol=function(){return this.pos==this.lineStart},cs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},cs.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},cs.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},cs.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},cs.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},cs.prototype.skipToEnd=function(){this.pos=this.string.length},cs.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},cs.prototype.backUp=function(e){this.pos-=e},cs.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=f(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},cs.prototype.indentation=function(){return f(this.string,null,this.tabSize)-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},cs.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},cs.prototype.current=function(){return this.string.slice(this.start,this.pos)},cs.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},cs.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},cs.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var fs=function(e,t){this.state=e,this.lookAhead=t},hs=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};hs.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},hs.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},hs.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},hs.fromSaved=function(e,t,r){return t instanceof fs?new hs(e,je(e.mode,t.state),r,t.lookAhead):new hs(e,je(e.mode,t),r)},hs.prototype.save=function(e){var t=!1!==e?je(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fs(t,this.maxLookAhead):t};var ds=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},ps=function(e,t,r){this.text=e,ne(this,t),this.height=r?r(this):1};ps.prototype.lineNo=function(){return W(this)},Ae(ps);var gs,vs={},ms={},ys=null,bs=null,ws={left:0,right:0,top:0,bottom:0},xs=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),ts(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),ts(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,yl&&bl<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xs.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},xs.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xs.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xs.prototype.zeroWidthHack=function(){var e=Al&&!kl?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Rl,this.disableVert=new Rl},xs.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},xs.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Cs=function(){};Cs.prototype.update=function(){return{bottom:0,right:0}},Cs.prototype.setScrollLeft=function(){},Cs.prototype.setScrollTop=function(){},Cs.prototype.clear=function(){};var Ss={native:xs,null:Cs},Ls=0,ks=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ir(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Bt(e),this.force=r,this.dims=wr(e),this.events=[]};ks.prototype.signal=function(e,t){Oe(e,t)&&this.events.push(arguments)},ks.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)Te.apply(null,e.events[t])};var Ts=0,Ms=null;yl?Ms=-.53:pl?Ms=15:Cl?Ms=-.7:Ll&&(Ms=-1/3);var Ns=function(e,t){this.ranges=e,this.primIndex=t};Ns.prototype.primary=function(){return this.ranges[this.primIndex]},Ns.prototype.equals=function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var n=t.ranges[r],i=e.ranges[r];if(!z(n.anchor,i.anchor)||!z(n.head,i.head))return!1}return!0},Ns.prototype.deepCopy=function(){for(var e=this,t=[],r=0;r<this.ranges.length;r++)t[r]=new Os(I(e.ranges[r].anchor),I(e.ranges[r].head));return new Ns(t,this.primIndex)},Ns.prototype.somethingSelected=function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},Ns.prototype.contains=function(e,t){var r=this;t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=r.ranges[n];if(E(t,i.from())>=0&&E(e,i.to())<=0)return n}return-1};var Os=function(e,t){this.anchor=e,this.head=t};Os.prototype.from=function(){return B(this.anchor,this.head)},Os.prototype.to=function(){return R(this.anchor,this.head)},Os.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Gi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=this,n=e,i=e+t;n<i;++n){var o=r.lines[n];r.height-=o.height,lt(o),wt(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){var n=this;this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=n},iterN:function(e,t,r){for(var n=this,i=e+t;e<i;++e)if(r(n.lines[e]))return!0}},Ui.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){var r=this;this.size-=t;for(var n=0;n<this.children.length;++n){var i=r.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e),s=i.height;if(i.removeInner(e,l),r.height-=s-i.height,o==l&&(r.children.splice(n--,1),i.parent=null),0==(t-=l))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Gi))){var a=[];this.collapse(a),this.children=[new Gi(a)],this.children[0].parent=this}},collapse:function(e){for(var t=this,r=0;r<this.children.length;++r)t.children[r].collapse(e)},insertInner:function(e,t,r){var n=this;this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var o=n.children[i],l=o.chunkSize();if(e<=l){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var s=o.lines.length%25+25,a=s;a<o.lines.length;){var u=new Gi(o.lines.slice(a,a+=25));o.height-=u.height,n.children.splice(++i,0,u),u.parent=n}o.lines=o.lines.slice(0,s),n.maybeSpill()}break}e-=l}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new Ui(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=h(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new Ui(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=this,i=0;i<this.children.length;++i){var o=n.children[i],l=o.chunkSize();if(e<l){var s=Math.min(t,l-e);if(o.iterN(e,s,r))return!0;if(0==(t-=s))break;e=0}else e-=l}}};var As=function(e,t,r){var n=this;if(r)for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);this.doc=e,this.node=t};As.prototype.clear=function(){var e=this,t=this.doc.cm,r=this.line.widgets,n=this.line,i=W(n);if(null!=i&&r){for(var o=0;o<r.length;++o)r[o]==e&&r.splice(o--,1);r.length||(n.widgets=null);var l=Ft(this);A(n,Math.max(0,n.height-l)),t&&(dn(t,function(){Vi(t,n,-l),yn(t,i,"widget")}),wt(t,"lineWidgetCleared",t,this,i))}},As.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Ft(this)-t;i&&(A(n,n.height+i),r&&dn(r,function(){r.curOp.forceUpdate=!0,Vi(r,n,i),wt(r,"lineWidgetChanged",r,e,W(n))}))},Ae(As);var Ws=0,Ds=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ws};Ds.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&on(t),Oe(this,"clear")){var n=this.find();n&&wt(this,"clear",n.from,n.to)}for(var i=null,o=null,l=0;l<this.lines.length;++l){var s=e.lines[l],a=_(s.markedSpans,e);t&&!e.collapsed?yn(t,W(s),"text"):t&&(null!=a.to&&(o=W(s)),null!=a.from&&(i=W(s))),s.markedSpans=q(s.markedSpans,a),null==a.from&&e.collapsed&&!ve(e.doc,s)&&t&&A(s,yr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var c=fe(e.lines[u]),f=be(c);f>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&mn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Si(t.doc)),t&&wt(t,"markerCleared",t,this,i,o),r&&ln(t),this.parent&&this.parent.clear()}},Ds.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o<this.lines.length;++o){var l=r.lines[o],s=_(l.markedSpans,r);if(null!=s.from&&(n=P(t?l:W(l),s.from),-1==e))return n;if(null!=s.to&&(i=P(t?l:W(l),s.to),1==e))return i}return n&&{from:n,to:i}},Ds.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&dn(n,function(){var i=t.line,o=W(t.line),l=Xt(n,o);if(l&&(Jt(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!ve(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var a=Ft(r)-s;a&&A(i,i.height+a)}wt(n,"markerChanged",n,e)})},Ds.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=h(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ds.prototype.detachLine=function(e){if(this.lines.splice(h(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ae(Ds);var Hs=function(e,t){var r=this;this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=r};Hs.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();wt(this,"clear")}},Hs.prototype.find=function(e,t){return this.primary.find(e,t)},Ae(Hs);var Fs=0,Ps=function(e,t,r,n,i){if(!(this instanceof Ps))return new Ps(e,t,r,n,i);null==r&&(r=0),Ui.call(this,[new Gi([new ps("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=P(r,0);this.sel=Bn(o),this.history=new ei(null),this.id=++Fs,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),qn(this,{from:o,to:o,text:e}),wi(this,Bn(o),Kl)};Ps.prototype=b(Ui.prototype,{constructor:Ps,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=O(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:vn(function(e){var t=P(this.first,0),r=this.first+this.size-1;Ai(this,{from:t,to:P(r,M(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yr(this.cm,0,0),wi(this,Bn(t),Kl)}),replaceRange:function(e,t,r,n){t=U(this,t),r=r?U(this,r):t,Ei(this,e,t,r,n)},getRange:function(e,t,r){var n=N(this,U(this,e),U(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(H(this,e))return M(this,e)},getLineNumber:function(e){return W(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=M(this,e)),fe(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return U(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:vn(function(e,t,r){mi(this,U(this,"number"==typeof e?P(e,t||0):e),null,r)}),setSelection:vn(function(e,t,r){mi(this,U(this,e),U(this,t||e),r)}),extendSelection:vn(function(e,t,r){pi(this,U(this,e),t&&U(this,t),r)}),extendSelections:vn(function(e,t){gi(this,K(this,e),t)}),extendSelectionsBy:vn(function(e,t){gi(this,K(this,v(this.sel.ranges,e)),t)}),setSelections:vn(function(e,t,r){var n=this;if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new Os(U(n,e[o].anchor),U(n,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),wi(this,Rn(i,t),r)}}),addSelection:vn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Os(U(this,e),U(this,t||e))),wi(this,Rn(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this,n=this.sel.ranges,i=0;i<n.length;i++){var o=N(r,n[i].from(),n[i].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,r=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=N(t,n[i].from(),n[i].to());!1!==e&&(o=o.join(e||t.lineSeparator())),r[i]=o}return r},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:vn(function(e,t,r){for(var n=this,i=[],o=this.sel,l=0;l<o.ranges.length;l++){var s=o.ranges[l];i[l]={from:s.from(),to:s.to(),text:n.splitLines(e[l]),origin:r}}for(var a=t&&"end"!=t&&jn(this,i,t),u=i.length-1;u>=0;u--)Ai(n,i[u]);a?bi(this,a):this.cm&&Xr(this.cm)}),undo:vn(function(){Di(this,"undo")}),redo:vn(function(){Di(this,"redo")}),undoSelection:vn(function(){Di(this,"undo",!0)}),redoSelection:vn(function(){Di(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){
5
- this.history=new ei(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:hi(this.history.done),undone:hi(this.history.undone)}},setHistory:function(e){var t=this.history=new ei(this.history.maxGeneration);t.done=hi(e.done.slice(0),null,!0),t.undone=hi(e.undone.slice(0),null,!0)},setGutterMarker:vn(function(e,t,r){return Bi(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&C(n)&&(e.gutterMarkers=null),!0})}),clearGutter:vn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&Bi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,C(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!H(this,e))return null;if(t=e,!(e=M(this,e)))return null}else if(null==(t=W(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:vn(function(t,r,n){return Bi(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(t[i]){if(e(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0})}),removeLineClass:vn(function(t,r,n){return Bi(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==n)t[i]=null;else{var l=o.match(e(n));if(!l)return!1;var s=l.index+l[0].length;t[i]=o.slice(0,l.index)+(l.index&&s!=o.length?" ":"")+o.slice(s)||null}return!0})}),addLineWidget:vn(function(e,t,r){return Ki(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ji(this,U(this,e),U(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=U(this,e),ji(this,e,e,r,"bookmark")},findMarksAt:function(e){e=U(this,e);var t=[],r=M(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=U(this,e),t=U(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),U(this,P(r,t))},indexFromPos:function(e){e=U(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new Ps(O(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Ps(O(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],_i(n,Yi(this)),n},unlinkDoc:function(e){var t=this;if(e instanceof Yo&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=t.linked[r];if(n.doc==e){t.linked.splice(r,1),e.unlinkDoc(t),qi(Yi(t));break}}if(e.history==this.history){var i=[e.id];$n(e,function(e){return i.push(e.id)},!0),e.history=new ei(null),e.history.done=hi(this.history.done,i),e.history.undone=hi(this.history.undone,i)}},iterLinkedDocs:function(e){$n(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ns(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:vn(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Jn(this.cm))})}),Ps.prototype.eachLine=Ps.prototype.iter;for(var Es=0,zs=!1,Is={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"},Rs=0;Rs<10;Rs++)Is[Rs+48]=Is[Rs+96]=String(Rs);for(var Bs=65;Bs<=90;Bs++)Is[Bs]=String.fromCharCode(Bs);for(var Gs=1;Gs<=12;Gs++)Is[Gs+111]=Is[Gs+63235]="F"+Gs;var Us={};Us.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"},Us.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"},Us.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","Ctrl-O":"openLine"},Us.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"]},Us.default=Al?Us.macDefault:Us.pcDefault;var Vs={selectAll:Ni,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Kl)},killLine:function(e){return fo(e,function(t){if(t.empty()){var r=M(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:P(t.head.line+1,0)}:{from:t.head,to:P(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return fo(e,function(t){return{from:P(t.from().line,0),to:U(e.doc,P(t.to().line+1,0))}})},delLineLeft:function(e){return fo(e,function(e){return{from:P(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return fo(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return fo(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(P(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(P(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return mo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return bo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return yo(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Xl)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Xl)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?bo(e,t.head):n},Xl)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=f(e.getLine(o.line),o.ch,n);t.push(p(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return dn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=M(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new P(i.line,i.ch-1)),i.ch>0)i=new P(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),P(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=M(e.doc,i.line-1).text;l&&(i=new P(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),P(i.line-1,l.length-1),i,"+transpose"))}r.push(new Os(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return dn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Xr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},Ks=new Rl,js=null,Xs=function(e,t,r){this.time=e,this.pos=t,this.button=r};Xs.prototype.compare=function(e,t,r){return this.time+400>e&&0==E(t,this.pos)&&r==this.button};var Ys,_s,qs={toString:function(){return"CodeMirror.Init"}},$s={},Zs={};Yo.defaults=$s,Yo.optionHandlers=Zs;var Qs=[];Yo.defineInitHook=function(e){return Qs.push(e)};var Js=null,ea=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Rl,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ea.prototype.init=function(e){function t(e){if(!Me(i,e)){if(i.somethingSelected())$o({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=el(i);$o({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Kl),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=Js.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var l=rl(),s=l.firstChild;i.display.lineSpace.insertBefore(l,i.display.lineSpace.firstChild),s.value=Js.text.join("\n");var a=document.activeElement;Il(s),setTimeout(function(){i.display.lineSpace.removeChild(l),a.focus(),a==o&&n.showPrimarySelection()},50)}}var r=this,n=this,i=n.cm,o=n.div=e.lineDiv;tl(o,i.options.spellcheck),ts(o,"paste",function(e){Me(i,e)||Qo(e,i)||bl<=11&&setTimeout(pn(i,function(){return r.updateFromDOM()}),20)}),ts(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),ts(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),ts(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),ts(o,"touchstart",function(){return n.forceCompositionEnd()}),ts(o,"input",function(){r.composing||r.readFromDOMSoon()}),ts(o,"copy",t),ts(o,"cut",t)},ea.prototype.prepareSelection=function(){var e=Mr(this.cm,!1);return e.focus=this.cm.state.focused,e},ea.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ea.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom)return void e.removeAllRanges();var o=ul(t,e.anchorNode,e.anchorOffset),l=ul(t,e.focusNode,e.focusOffset);if(!o||o.bad||!l||l.bad||0!=E(B(o,l),n)||0!=E(R(o,l),i)){var s=t.display.view,a=n.line>=t.display.viewFrom&&ol(t,n)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&ol(t,i);if(!u){var c=s[s.length-1].measure,f=c.maps?c.maps[c.maps.length-1]:c.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!a||!u)return void e.removeAllRanges();var h,d=e.rangeCount&&e.getRangeAt(0);try{h=Fl(a.node,a.offset,u.offset,u.node)}catch(e){}h&&(!pl&&t.state.focused?(e.collapse(a.node,a.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),d&&null==e.anchorNode?e.addRange(d):pl&&this.startGracePeriod()),this.rememberSelection()}},ea.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},ea.prototype.showMultipleSelections=function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},ea.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ea.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return o(this.div,t)},ea.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},ea.prototype.blur=function(){this.div.blur()},ea.prototype.getField=function(){return this.div},ea.prototype.supportsTouch=function(){return!0},ea.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():dn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},ea.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ea.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(Nl&&Cl&&this.cm.options.gutters.length&&ll(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=ul(t,e.anchorNode,e.anchorOffset),n=ul(t,e.focusNode,e.focusOffset);r&&n&&dn(t,function(){wi(t.doc,Bn(r,n),Kl),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},ea.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(0==n.ch&&n.line>e.firstLine()&&(n=P(n.line-1,M(e.doc,n.line-1).length)),i.ch==M(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=P(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,l,s;n.line==t.viewFrom||0==(o=kr(e,n.line))?(l=W(t.view[0].line),s=t.view[0].node):(l=W(t.view[o].line),s=t.view[o-1].node.nextSibling);var a,u,c=kr(e,i.line);if(c==t.view.length-1?(a=t.viewTo-1,u=t.lineDiv.lastChild):(a=W(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(al(e,s,u,l,a)),h=N(e.doc,P(l,0),P(a,M(e.doc,a).text.length));f.length>1&&h.length>1;)if(g(f)==g(h))f.pop(),h.pop(),a--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),l++}for(var d=0,p=0,v=f[0],m=h[0],y=Math.min(v.length,m.length);d<y&&v.charCodeAt(d)==m.charCodeAt(d);)++d;for(var b=g(f),w=g(h),x=Math.min(b.length-(1==f.length?d:0),w.length-(1==h.length?d:0));p<x&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)++p;if(1==f.length&&1==h.length&&l==n.line)for(;d&&d>n.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)d--,p++;f[f.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var C=P(l,d),S=P(a,h.length?g(h).length-p:0);return f.length>1||f[0]||E(C,S)?(Ei(e.doc,f,C,S,"+input"),!0):void 0},ea.prototype.ensurePolled=function(){this.forceCompositionEnd()},ea.prototype.reset=function(){this.forceCompositionEnd()},ea.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ea.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},ea.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||dn(this.cm,function(){return mn(e.cm)})},ea.prototype.setUneditable=function(e){e.contentEditable="false"},ea.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||pn(this.cm,Zo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ea.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ea.prototype.onContextMenu=function(){},ea.prototype.resetPosition=function(){},ea.prototype.needsContentAttribute=!0;var ta=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Rl,this.hasSelection=!1,this.composing=null};ta.prototype.init=function(e){function t(e){if(!Me(i,e)){if(i.somethingSelected())$o({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=el(i);$o({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Kl):(n.prevInput="",l.value=t.text.join("\n"),Il(l))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=rl(),l=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Ml&&(l.style.width="0px"),ts(l,"input",function(){yl&&bl>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),ts(l,"paste",function(e){Me(i,e)||Qo(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),ts(l,"cut",t),ts(l,"copy",t),ts(e.scroller,"paste",function(t){Pt(e,t)||Me(i,t)||(i.state.pasteIncoming=!0,n.focus())}),ts(e.lineSpace,"selectstart",function(t){Pt(e,t)||We(t)}),ts(l,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),ts(l,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},ta.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Mr(e);if(e.options.moveInputWithCursor){var i=ar(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},ta.prototype.showSelection=function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ta.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&Il(this.textarea),yl&&bl>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",yl&&bl>=9&&(this.hasSelection=null))}},ta.prototype.getField=function(){return this.textarea},ta.prototype.supportsTouch=function(){return!1},ta.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Ol||l()!=this.textarea))try{this.textarea.focus()}catch(e){}},ta.prototype.blur=function(){this.textarea.blur()},ta.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ta.prototype.receivedFocus=function(){this.slowPoll()},ta.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ta.prototype.fastPoll=function(){function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},ta.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||is(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(yl&&bl>=9&&this.hasSelection===i||Al&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(n.length,i.length);l<s&&n.charCodeAt(l)==i.charCodeAt(l);)++l;return dn(t,function(){Zo(t,i.slice(l),n.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ta.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ta.prototype.onKeyPress=function(){yl&&bl>=9&&(this.hasSelection=null),this.fastPoll()},ta.prototype.onContextMenu=function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t="​"+(e?l.value:"");l.value="⇚",l.value=t,n.prevInput=e?"":"​",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=c,l.style.cssText=u,yl&&bl<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=a),null!=l.selectionStart){(!yl||yl&&bl<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&"​"==n.prevInput?pn(i,Ni)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,l=n.textarea,s=Lr(i,e),a=o.scroller.scrollTop;if(s&&!Sl){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&pn(i,wi)(i.doc,Bn(s),Kl);var u=l.style.cssText,c=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(yl?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(wl&&(h=window.scrollY),o.input.focus(),wl&&window.scrollTo(null,h),o.input.reset(),i.somethingSelected()||(l.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),yl&&bl>=9&&t(),El){Fe(e);var d=function(){ke(window,"mouseup",d),setTimeout(r,20)};ts(window,"mouseup",d)}else setTimeout(r,50)}},ta.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},ta.prototype.setUneditable=function(){},ta.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=qs&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=qs,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Xn(e)},!0),t("indentUnit",2,Xn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Yn(e),tr(e),mn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(P(n,o))}n++});for(var i=r.length-1;i>=0;i--)Ei(e.doc,t,r[i],P(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=qs&&e.refresh()}),t("specialCharPlaceholder",ut,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Ol?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Dl),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Vo(e),Ko(e)},!0),t("keyMap","default",function(e,t,r){var n=co(t),i=r!=qs&&co(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Xo,!0),t("gutters",[],function(e){Pn(e.options),Ko(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?xr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return tn(e)},!0),t("scrollbarStyle","native",function(e){nn(e),tn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Pn(e.options),Ko(e)},!0),t("firstLineNumber",1,Ko,!0),t("lineNumberFormatter",function(e){return e},Ko,!0),t("showCursorWhenSelecting",!1,Tr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Pr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,jo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Tr,!0),t("singleCursorHeightPerLine",!0,Tr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Yn,!0),t("addModeClass",!1,Yn,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Yn,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Yo),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&pn(this,t[e])(this,r,i),Te(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](co(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:gn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");m(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,mn(this)}),removeOverlay:gn(function(e){for(var t=this,r=this.state.overlays,n=0;n<r.length;++n){var i=r[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return r.splice(n,1),t.state.modeGen++,void mn(t)}}),indentLine:gn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),H(this.doc,e)&&qo(this,e,t,r)}),indentSelection:gn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(qo(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Xr(t));else{var l=o.from(),s=o.to(),a=Math.max(n,l.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;u<n;++u)qo(t,u,e);var c=t.doc.sel.ranges;0==l.ch&&r.length==c.length&&c[i].from().ch>0&&vi(t.doc,i,new Os(l,c[i].to()),Kl)}}}),getTokenAt:function(e,t){return et(this,e,t)},getLineTokens:function(e,t){return et(this,P(e),t,!0)},getTokenTypeAt:function(e){e=U(this.doc,e);var t,r=qe(this,M(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=this,i=[];if(!r.hasOwnProperty(t))return i;var o=r[t],l=this.getModeAt(e);if("string"==typeof l[t])o[l[t]]&&i.push(o[l[t]]);else if(l[t])for(var s=0;s<l[t].length;s++){var a=o[l[t][s]];a&&i.push(a)}else l.helperType&&o[l.helperType]?i.push(o[l.helperType]):o[l.name]&&i.push(o[l.name]);for(var u=0;u<o._global.length;u++){var c=o._global[u];c.pred(l,n)&&-1==h(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(e,t){var r=this.doc;return e=G(r,null==e?r.first+r.size-1:e),$e(this,e+1,t).state},cursorCoords:function(e,t){
6
- var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?U(this.doc,e):e?n.from():n.to(),ar(this,r,t||"page")},charCoords:function(e,t){return sr(this,U(this.doc,e),t||"page")},coordsChar:function(e,t){return e=lr(this,e,t||"page"),fr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=lr(this,{top:e,left:0},t||"page").top,D(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=M(this.doc,e)}else n=e;return or(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ye(n):0)},defaultTextHeight:function(){return yr(this.display)},defaultCharWidth:function(){return br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=ar(this,U(this.doc,e));var l=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&Vr(this,{left:s,top:l,right:s+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:gn(To),triggerOnKeyPress:gn(Oo),triggerOnKeyUp:No,triggerOnMouseDown:gn(Wo),execCommand:function(e){if(Vs.hasOwnProperty(e))return Vs[e].call(null,this)},triggerElectric:gn(function(e){Jo(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var l=U(this.doc,e),s=0;s<t&&(l=nl(i.doc,l,o,r,n),!l.hitSide);++s);return l},moveH:gn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?nl(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},Xl)}),deleteH:gn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):fo(this,function(r){var i=nl(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=this,o=1,l=n;t<0&&(o=-1,t=-t);for(var s=U(this.doc,e),a=0;a<t;++a){var u=ar(i,s,"div");if(null==l?l=u.left:u.left=l,s=il(i,u,o,r),s.hitSide)break}return s},moveV:gn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(l){if(o)return e<0?l.from():l.to();var s=ar(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=il(r,s,e,t);return"page"==t&&l==n.sel.primary()&&jr(r,sr(r,a,"div").top-s.top),a},Xl),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=this.doc,r=M(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=r.length||!n?++i:--n;for(var l=r.charAt(n),s=x(l,o)?function(e){return x(e,o)}:/\s/.test(l)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!x(e)};n>0&&s(r.charAt(n-1));)--n;for(;i<r.length&&s(r.charAt(i));)++i}return new Os(P(e.line,n),P(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?s(this.display.cursorDiv,"CodeMirror-overwrite"):zl(this.display.cursorDiv,"CodeMirror-overwrite"),Te(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==l()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:gn(function(e,t){Yr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Rt(this)-this.display.barHeight,width:e.scrollWidth-Rt(this)-this.display.barWidth,clientHeight:Gt(this),clientWidth:Bt(this)}},scrollIntoView:gn(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:P(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?_r(this,e):$r(this,e.from,e.to,e.margin)}),setSize:gn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&er(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){yn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Te(this,"refresh",this)}),operation:function(e){return dn(this,e)},startOperation:function(){return on(this)},endOperation:function(){return ln(this)},refresh:gn(function(){var e=this.display.cachedTextHeight;mn(this),this.curOp.forceUpdate=!0,tr(this),Yr(this,this.doc.scrollLeft,this.doc.scrollTop),Dn(this),(null==e||Math.abs(e-yr(this.display))>.5)&&Sr(this),Te(this,"refresh",this)}),swapDoc:gn(function(e){var t=this.doc;return t.cm=null,Zn(this,e),tr(this),this.display.input.reset(),Yr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,wt(this,"swapDoc",this,t),t}),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}},Ae(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Yo);var ra="iter insert remove copy getEditor constructor".split(" ");for(var na in Ps.prototype)Ps.prototype.hasOwnProperty(na)&&h(ra,na)<0&&(Yo.prototype[na]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ps.prototype[na]));return Ae(Ps),Yo.inputStyles={textarea:ta,contenteditable:ea},Yo.defineMode=function(e){Yo.defaults.mode||"null"==e||(Yo.defaults.mode=e),Be.apply(this,arguments)},Yo.defineMIME=Ge,Yo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Yo.defineMIME("text/plain","null"),Yo.defineExtension=function(e,t){Yo.prototype[e]=t},Yo.defineDocExtension=function(e,t){Ps.prototype[e]=t},Yo.fromTextArea=fl,function(e){e.off=ke,e.on=ts,e.wheelEventPixels=zn,e.Doc=Ps,e.splitLines=ns,e.countColumn=f,e.findColumn=d,e.isWordChar=w,e.Pass=Vl,e.signal=Te,e.Line=ps,e.changeEnd=Gn,e.scrollbarModel=Ss,e.Pos=P,e.cmpPos=E,e.modes=ss,e.mimeModes=as,e.resolveMode=Ue,e.getMode=Ve,e.modeExtensions=us,e.extendMode=Ke,e.copyState=je,e.startState=Ye,e.innerMode=Xe,e.commands=Vs,e.keyMap=Us,e.keyName=uo,e.isModifierKey=so,e.lookupKey=lo,e.normalizeKeyMap=oo,e.StringStream=cs,e.SharedTextMarker=Hs,e.TextMarker=Ds,e.LineWidget=As,e.e_preventDefault=We,e.e_stopPropagation=De,e.e_stop=Fe,e.addClass=s,e.contains=o,e.rmClass=zl,e.keyNames=Is}(Yo),Yo.version="5.33.0",Yo}),function(e){"function"==typeof e.define&&e.define("core",["codemirror.js"],function(t){e.CodeMirror=t})}(this);
1
+ (function(b,a){typeof exports==="object"&&typeof module!=="undefined"?module.exports=a():typeof define==="function"&&define.amd?define("codemirror.js",a):(b.CodeMirror=a())}(this,(function(){var eC=navigator.userAgent;var eN=navigator.platform;var cR=/gecko\/\d/i.test(eC);var fw=/MSIE \d/.test(eC);var b4=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(eC);var c5=/Edge\/(\d+)/.exec(eC);var ei=fw||b4||c5;var m=ei&&(fw?document.documentMode||6:+(c5||b4)[1]);var dv=!c5&&/WebKit\//.test(eC);var el=dv&&/Qt\/\d+\.\d+/.test(eC);var dL=!c5&&/Chrome\//.test(eC);var eE=/Opera\//.test(eC);var aM=/Apple Computer/.test(navigator.vendor);var dD=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(eC);var gi=/PhantomJS/.test(eC);var fQ=!c5&&/AppleWebKit/.test(eC)&&/Mobile\/\w+/.test(eC);var aY=/Android/.test(eC);var eT=fQ||aY||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(eC);var cu=fQ||/Mac/.test(eN);var gC=/\bCrOS\b/.test(eC);var a1=/win/i.test(eN);var bc=eE&&eC.match(/Version\/(\d*\.\d*)/);if(bc){bc=Number(bc[1])}if(bc&&bc>=15){eE=false;dv=true}var cc=cu&&(el||eE&&(bc==null||bc<12.11));var hf=cR||(ei&&m>=9);function Y(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}var h=function(hr,i){var hs=hr.className;var hq=Y(i).exec(hs);if(hq){var ht=hs.slice(hq.index+hq[0].length);hr.className=hs.slice(0,hq.index)+(ht?hq[1]+ht:"")}};function eD(hq){for(var i=hq.childNodes.length;i>0;--i){hq.removeChild(hq.firstChild)}return hq}function ce(i,hq){return eD(i).appendChild(hq)}function g5(hq,hu,ht,hs){var hv=document.createElement(hq);if(ht){hv.className=ht}if(hs){hv.style.cssText=hs}if(typeof hu=="string"){hv.appendChild(document.createTextNode(hu))}else{if(hu){for(var hr=0;hr<hu.length;++hr){hv.appendChild(hu[hr])}}}return hv}function hc(i,hs,hr,hq){var ht=g5(i,hs,hr,hq);ht.setAttribute("role","presentation");return ht}var cO;if(document.createRange){cO=function(hs,ht,hq,i){var hr=document.createRange();hr.setEnd(i||hs,hq);hr.setStart(hs,ht);return hr}}else{cO=function(hr,ht,i){var hq=document.body.createTextRange();try{hq.moveToElementText(hr.parentNode)}catch(hs){return hq}hq.collapse(true);hq.moveEnd("character",i);hq.moveStart("character",ht);return hq}}function hg(i,hq){if(hq.nodeType==3){hq=hq.parentNode}if(i.contains){return i.contains(hq)}do{if(hq.nodeType==11){hq=hq.host}if(hq==i){return true}}while(hq=hq.parentNode)}function em(){var i;try{i=document.activeElement}catch(hq){i=document.body||null}while(i&&i.shadowRoot&&i.shadowRoot.activeElement){i=i.shadowRoot.activeElement}return i}function gs(hq,i){var hr=hq.className;if(!Y(i).test(hr)){hq.className+=(hr?" ":"")+i}}function gS(hs,hq){var hr=hs.split(" ");for(var ht=0;ht<hr.length;ht++){if(hr[ht]&&!Y(hr[ht]).test(hq)){hq+=" "+hr[ht]}}return hq}var ej=function(i){i.select()};if(fQ){ej=function(i){i.selectionStart=0;i.selectionEnd=i.value.length}}else{if(ei){ej=function(hq){try{hq.select()}catch(i){}}}}function cY(hq){var i=Array.prototype.slice.call(arguments,1);return function(){return hq.apply(null,i)}}function aZ(hr,hq,i){if(!hq){hq={}}for(var hs in hr){if(hr.hasOwnProperty(hs)&&(i!==false||!hq.hasOwnProperty(hs))){hq[hs]=hr[hs]}}return hq}function cd(ht,hr,hv,hw,hs){if(hr==null){hr=ht.search(/[^\s\u00a0]/);if(hr==-1){hr=ht.length}}for(var hu=hw||0,hx=hs||0;;){var hq=ht.indexOf("\t",hu);if(hq<0||hq>=hr){return hx+(hr-hu)}hx+=hq-hu;hx+=hv-(hx%hv);hu=hq+1}}var hp=function(){this.id=null};hp.prototype.set=function(i,hq){clearTimeout(this.id);this.id=setTimeout(hq,i)};function dR(hs,hq){for(var hr=0;hr<hs.length;++hr){if(hs[hr]==hq){return hr}}return -1}var eg=30;var cz={toString:function(){return"CodeMirror.Pass"}};var ah={scroll:false};var R={origin:"*mouse"};var dr={origin:"+move"};function e5(ht,hs,hu){for(var hv=0,hr=0;;){var hq=ht.indexOf("\t",hv);if(hq==-1){hq=ht.length}var i=hq-hv;if(hq==ht.length||hr+i>=hs){return hv+Math.min(i,hs-hr)}hr+=hq-hv;hr+=hu-(hr%hu);hv=hq+1;if(hr>=hs){return hv}}}var bd=[""];function cS(i){while(bd.length<=i){bd.push(gy(bd)+" ")}return bd[i]}function gy(i){return i[i.length-1]}function cf(ht,hs){var hq=[];for(var hr=0;hr<ht.length;hr++){hq[hr]=hs(ht[hr],hr)}return hq}function cx(ht,hq,hr){var hs=0,i=hr(hq);while(hs<ht.length&&hr(ht[hs])<=i){hs++}ht.splice(hs,0,hq)}function gT(){}function cM(hr,i){var hq;if(Object.create){hq=Object.create(hr)}else{gT.prototype=hr;hq=new gT()}if(i){aZ(i,hq)}return hq}var bp=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function gv(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||bp.test(i))}function c3(i,hq){if(!hq){return gv(i)}if(hq.source.indexOf("\\w")>-1&&gv(i)){return true}return hq.test(i)}function fI(i){for(var hq in i){if(i.hasOwnProperty(hq)&&i[hq]){return false}}return true}var fv=/[\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]/;function gd(i){return i.charCodeAt(0)>=768&&fv.test(i)}function eX(hq,hr,i){while((i<0?hr>0:hr<hq.length)&&gd(hq.charAt(hr))){hr+=i}return hr}function cP(i,hu,ht){var hr=hu>ht?-1:1;for(;;){if(hu==ht){return hu}var hs=(hu+ht)/2,hq=hr<0?Math.ceil(hs):Math.floor(hs);if(hq==hu){return i(hq)?hu:ht}if(i(hq)){ht=hq}else{hu=hq+hr}}}function ft(hq,hs,hr){var ht=this;this.input=hr;ht.scrollbarFiller=g5("div",null,"CodeMirror-scrollbar-filler");ht.scrollbarFiller.setAttribute("cm-not-content","true");ht.gutterFiller=g5("div",null,"CodeMirror-gutter-filler");ht.gutterFiller.setAttribute("cm-not-content","true");ht.lineDiv=hc("div",null,"CodeMirror-code");ht.selectionDiv=g5("div",null,null,"position: relative; z-index: 1");ht.cursorDiv=g5("div",null,"CodeMirror-cursors");ht.measure=g5("div",null,"CodeMirror-measure");ht.lineMeasure=g5("div",null,"CodeMirror-measure");ht.lineSpace=hc("div",[ht.measure,ht.lineMeasure,ht.selectionDiv,ht.cursorDiv,ht.lineDiv],null,"position: relative; outline: none");var i=hc("div",[ht.lineSpace],"CodeMirror-lines");ht.mover=g5("div",[i],null,"position: relative");ht.sizer=g5("div",[ht.mover],"CodeMirror-sizer");ht.sizerWidth=null;ht.heightForcer=g5("div",null,null,"position: absolute; height: "+eg+"px; width: 1px;");ht.gutters=g5("div",null,"CodeMirror-gutters");ht.lineGutter=null;ht.scroller=g5("div",[ht.sizer,ht.heightForcer,ht.gutters],"CodeMirror-scroll");ht.scroller.setAttribute("tabIndex","-1");ht.wrapper=g5("div",[ht.scrollbarFiller,ht.gutterFiller,ht.scroller],"CodeMirror");if(ei&&m<8){ht.gutters.style.zIndex=-1;ht.scroller.style.paddingRight=0}if(!dv&&!(cR&&eT)){ht.scroller.draggable=true}if(hq){if(hq.appendChild){hq.appendChild(ht.wrapper)}else{hq(ht.wrapper)}}ht.viewFrom=ht.viewTo=hs.first;ht.reportedViewFrom=ht.reportedViewTo=hs.first;ht.view=[];ht.renderedView=null;ht.externalMeasured=null;ht.viewOffset=0;ht.lastWrapHeight=ht.lastWrapWidth=0;ht.updateLineNumbers=null;ht.nativeBarWidth=ht.barHeight=ht.barWidth=0;ht.scrollbarsClipped=false;ht.lineNumWidth=ht.lineNumInnerWidth=ht.lineNumChars=null;ht.alignWidgets=false;ht.cachedCharWidth=ht.cachedTextHeight=ht.cachedPaddingH=null;ht.maxLine=null;ht.maxLineLength=0;ht.maxLineChanged=false;ht.wheelDX=ht.wheelDY=ht.wheelStartX=ht.wheelStartY=null;ht.shift=false;ht.selForContextMenu=null;ht.activeTouch=null;hr.init(ht)}function f4(ht,hv){hv-=ht.first;if(hv<0||hv>=ht.size){throw new Error("There is no line "+(hv+ht.first)+" in the document.")}var hq=ht;while(!hq.lines){for(var hr=0;;++hr){var hu=hq.children[hr],hs=hu.chunkSize();if(hv<hs){hq=hu;break}hv-=hs}}return hq.lines[hv]}function g8(hr,ht,i){var hq=[],hs=ht.line;hr.iter(ht.line,i.line+1,function(hu){var hv=hu.text;if(hs==i.line){hv=hv.slice(0,i.ch)}if(hs==ht.line){hv=hv.slice(ht.ch)}hq.push(hv);++hs});return hq}function bf(hq,hs,hr){var i=[];hq.iter(hs,hr,function(ht){i.push(ht.text)});return i}function hb(hq,i){var hr=i-hq.height;if(hr){for(var hs=hq;hs;hs=hs.parent){hs.height+=hr}}}function b8(hq){if(hq.parent==null){return null}var hu=hq.parent,ht=dR(hu.lines,hq);for(var hr=hu.parent;hr;hu=hr,hr=hr.parent){for(var hs=0;;++hs){if(hr.children[hs]==hu){break}ht+=hr.children[hs].chunkSize()}}return ht+hu.first}function b1(hw,hv){var ht=hw.first;outer:do{for(var hs=0;hs<hw.children.length;++hs){var hr=hw.children[hs],hq=hr.height;if(hv<hq){hw=hr;continue outer}hv-=hq;ht+=hr.chunkSize()}return ht}while(!hw.lines);var hu=0;for(;hu<hw.lines.length;++hu){var hy=hw.lines[hu],hx=hy.height;if(hv<hx){break}hv-=hx}return ht+hu}function cw(hq,i){return i>=hq.first&&i<hq.first+hq.size}function e8(hq,hr){return String(hq.lineNumberFormatter(hr+hq.firstLineNumber))}function ac(i,hq,hr){if(hr===void 0){hr=null}if(!(this instanceof ac)){return new ac(i,hq,hr)}this.line=i;this.ch=hq;this.sticky=hr}function cF(hq,i){return hq.line-i.line||hq.ch-i.ch}function ad(hq,i){return hq.sticky==i.sticky&&cF(hq,i)==0}function cI(i){return ac(i.line,i.ch)}function bR(hq,i){return cF(hq,i)<0?i:hq}function aB(hq,i){return cF(hq,i)<0?hq:i}function dA(i,hq){return Math.max(i.first,Math.min(hq,i.first+i.size-1))}function gD(hq,hr){if(hr.line<hq.first){return ac(hq.first,0)}var i=hq.first+hq.size-1;if(hr.line>i){return ac(i,f4(hq,i).text.length)}return gg(hr,f4(hq,hr.line).text.length)}function gg(hr,hq){var i=hr.ch;if(i==null||i>hq){return ac(hr.line,hq)}else{if(i<0){return ac(hr.line,0)}else{return hr}}}function eB(hs,ht){var hq=[];for(var hr=0;hr<ht.length;hr++){hq[hr]=gD(hs,ht[hr])}return hq}var hk=false;var bk=false;function gq(){hk=true}function bQ(){bk=true}function eW(i,hr,hq){this.marker=i;this.from=hr;this.to=hq}function fZ(hs,hq){if(hs){for(var hr=0;hr<hs.length;++hr){var ht=hs[hr];if(ht.marker==hq){return ht}}}}function fs(hr,hs){var ht;for(var hq=0;hq<hr.length;++hq){if(hr[hq]!=hs){(ht||(ht=[])).push(hr[hq])}}return ht}function cC(i,hq){i.markedSpans=i.markedSpans?i.markedSpans.concat([hq]):[hq];hq.marker.attachLine(i)}function a3(hr,hs,hw){var hx;if(hr){for(var hu=0;hu<hr.length;++hu){var hy=hr[hu],hv=hy.marker;var hq=hy.from==null||(hv.inclusiveLeft?hy.from<=hs:hy.from<hs);if(hq||hy.from==hs&&hv.type=="bookmark"&&(!hw||!hy.marker.insertLeft)){var ht=hy.to==null||(hv.inclusiveRight?hy.to>=hs:hy.to>hs);(hx||(hx=[])).push(new eW(hv,hy.from,ht?null:hy.to))}}}return hx}function aL(hr,ht,hw){var hx;if(hr){for(var hu=0;hu<hr.length;++hu){var hy=hr[hu],hv=hy.marker;var hs=hy.to==null||(hv.inclusiveRight?hy.to>=ht:hy.to>ht);if(hs||hy.from==ht&&hv.type=="bookmark"&&(!hw||hy.marker.insertLeft)){var hq=hy.from==null||(hv.inclusiveLeft?hy.from<=ht:hy.from<ht);(hx||(hx=[])).push(new eW(hv,hq?null:hy.from-ht,hy.to==null?null:hy.to-ht))}}}return hx}function eY(hL,hB){if(hB.full){return null}var hs=cw(hL,hB.from.line)&&f4(hL,hB.from.line).markedSpans;var hz=cw(hL,hB.to.line)&&f4(hL,hB.to.line).markedSpans;if(!hs&&!hz){return null}var hy=hB.from.ch,hG=hB.to.ch,hD=cF(hB.from,hB.to)==0;var hx=a3(hs,hy,hD);var hA=aL(hz,hG,hD);var hE=hB.text.length==1,hv=gy(hB.text).length+(hE?hy:0);if(hx){for(var hJ=0;hJ<hx.length;++hJ){var hI=hx[hJ];if(hI.to==null){var hC=fZ(hA,hI.marker);if(!hC){hI.to=hy}else{if(hE){hI.to=hC.to==null?null:hC.to+hv}}}}}if(hA){for(var hw=0;hw<hA.length;++hw){var hH=hA[hw];if(hH.to!=null){hH.to+=hv}if(hH.from==null){var hr=fZ(hx,hH.marker);if(!hr){hH.from=hv;if(hE){(hx||(hx=[])).push(hH)}}}else{hH.from+=hv;if(hE){(hx||(hx=[])).push(hH)}}}}if(hx){hx=s(hx)}if(hA&&hA!=hx){hA=s(hA)}var hK=[hx];if(!hE){var hF=hB.text.length-2,hq;if(hF>0&&hx){for(var hu=0;hu<hx.length;++hu){if(hx[hu].to==null){(hq||(hq=[])).push(new eW(hx[hu].marker,null,null))}}}for(var ht=0;ht<hF;++ht){hK.push(hq)}hK.push(hA)}return hK}function s(hr){for(var hq=0;hq<hr.length;++hq){var hs=hr[hq];if(hs.from!=null&&hs.from==hs.to&&hs.marker.clearWhenEmpty!==false){hr.splice(hq--,1)}}if(!hr.length){return null}return hr}function dc(hC,hA,hB){var hu=null;hC.iter(hA.line,hB.line+1,function(hD){if(hD.markedSpans){for(var hE=0;hE<hD.markedSpans.length;++hE){var hF=hD.markedSpans[hE].marker;if(hF.readOnly&&(!hu||dR(hu,hF)==-1)){(hu||(hu=[])).push(hF)}}}});if(!hu){return null}var hv=[{from:hA,to:hB}];for(var hw=0;hw<hu.length;++hw){var hx=hu[hw],hs=hx.find(0);for(var ht=0;ht<hv.length;++ht){var hr=hv[ht];if(cF(hr.to,hs.from)<0||cF(hr.from,hs.to)>0){continue}var hz=[ht,1],hq=cF(hr.from,hs.from),hy=cF(hr.to,hs.to);if(hq<0||!hx.inclusiveLeft&&!hq){hz.push({from:hr.from,to:hs.from})}if(hy>0||!hx.inclusiveRight&&!hy){hz.push({from:hs.to,to:hr.to})}hv.splice.apply(hv,hz);ht+=hz.length-3}}return hv}function he(hq){var hs=hq.markedSpans;if(!hs){return}for(var hr=0;hr<hs.length;++hr){hs[hr].marker.detachLine(hq)}hq.markedSpans=null}function dy(hq,hs){if(!hs){return}for(var hr=0;hr<hs.length;++hr){hs[hr].marker.attachLine(hq)}hq.markedSpans=hs}function w(i){return i.inclusiveLeft?-1:0}function ci(i){return i.inclusiveRight?1:0}function eq(hs,hq){var hu=hs.lines.length-hq.lines.length;if(hu!=0){return hu}var hr=hs.find(),hv=hq.find();var i=cF(hr.from,hv.from)||w(hs)-w(hq);if(i){return -i}var ht=cF(hr.to,hv.to)||ci(hs)-ci(hq);if(ht){return ht}return hq.id-hs.id}function bj(hr,hv){var hq=bk&&hr.markedSpans,hu;if(hq){for(var ht=(void 0),hs=0;hs<hq.length;++hs){ht=hq[hs];if(ht.marker.collapsed&&(hv?ht.from:ht.to)==null&&(!hu||eq(hu,ht.marker)<0)){hu=ht.marker}}}return hu}function fC(i){return bj(i,true)}function fd(i){return bj(i,false)}function cE(hr,ht){var hq=bk&&hr.markedSpans,hv;if(hq){for(var hs=0;hs<hq.length;++hs){var hu=hq[hs];if(hu.marker.collapsed&&(hu.from==null||hu.from<ht)&&(hu.to==null||hu.to>ht)&&(!hv||eq(hv,hu.marker)<0)){hv=hu.marker}}}return hv}function A(hy,hs,hw,hx,hu){var hB=f4(hy,hs);var hq=bk&&hB.markedSpans;if(hq){for(var ht=0;ht<hq.length;++ht){var hr=hq[ht];if(!hr.marker.collapsed){continue}var hA=hr.marker.find(0);var hz=cF(hA.from,hw)||w(hr.marker)-w(hu);var hv=cF(hA.to,hx)||ci(hr.marker)-ci(hu);if(hz>=0&&hv<=0||hz<=0&&hv>=0){continue}if(hz<=0&&(hr.marker.inclusiveRight&&hu.inclusiveLeft?cF(hA.to,hw)>=0:cF(hA.to,hw)>0)||hz>=0&&(hr.marker.inclusiveRight&&hu.inclusiveLeft?cF(hA.from,hx)<=0:cF(hA.from,hx)<0)){return true}}}}function z(hq){var i;while(i=fC(hq)){hq=i.find(-1,true).line}return hq}function cL(hq){var i;while(i=fd(hq)){hq=i.find(1,true).line}return hq}function g(hr){var i,hq;while(i=fd(hr)){hr=i.find(1,true).line;(hq||(hq=[])).push(hr)}return hq}function a9(hs,hq){var i=f4(hs,hq),hr=z(i);if(i==hr){return hq}return b8(hr)}function eF(hs,hr){if(hr>hs.lastLine()){return hr}var hq=f4(hs,hr),i;if(!gl(hs,hq)){return hr}while(i=fd(hq)){hq=i.find(1,true).line}return b8(hq)+1}function gl(hu,hr){var hq=bk&&hr.markedSpans;if(hq){for(var ht=(void 0),hs=0;hs<hq.length;++hs){ht=hq[hs];if(!ht.marker.collapsed){continue}if(ht.from==null){return true}if(ht.marker.widgetNode){continue}if(ht.from==0&&ht.marker.inclusiveLeft&&Z(hu,hr,ht)){return true}}}}function Z(hv,hr,ht){if(ht.to==null){var hq=ht.marker.find(1,true);return Z(hv,hq.line,fZ(hq.line.markedSpans,ht.marker))}if(ht.marker.inclusiveRight&&ht.to==hr.text.length){return true}for(var hu=(void 0),hs=0;hs<hr.markedSpans.length;++hs){hu=hr.markedSpans[hs];if(hu.marker.collapsed&&!hu.marker.widgetNode&&hu.from==ht.to&&(hu.to==null||hu.to!=ht.from)&&(hu.marker.inclusiveLeft||ht.marker.inclusiveRight)&&Z(hv,hr,hu)){return true}}}function b7(hs){hs=z(hs);var hu=0,hr=hs.parent;for(var ht=0;ht<hr.lines.length;++ht){var hq=hr.lines[ht];if(hq==hs){break}else{hu+=hq.height}}for(var hv=hr.parent;hv;hr=hv,hv=hr.parent){for(var hx=0;hx<hv.children.length;++hx){var hw=hv.children[hx];if(hw==hr){break}else{hu+=hw.height}}}return hu}function e1(hr){if(hr.height==0){return 0}var hq=hr.text.length,i,hu=hr;while(i=fC(hu)){var hs=i.find(0,true);hu=hs.from.line;hq+=hs.from.ch-hs.to.ch}hu=hr;while(i=fd(hu)){var ht=i.find(0,true);hq-=hu.text.length-ht.from.ch;hu=ht.to.line;hq+=hu.text.length-ht.to.ch}return hq}function f(i){var hr=i.display,hq=i.doc;hr.maxLine=f4(hq,hq.first);hr.maxLineLength=e1(hr.maxLine);hr.maxLineChanged=true;hq.iter(function(ht){var hs=e1(ht);if(hs>hr.maxLineLength){hr.maxLineLength=hs;hr.maxLine=ht}})}function eG(hq,hw,hv,hu){if(!hq){return hu(hw,hv,"ltr",0)}var ht=false;for(var hs=0;hs<hq.length;++hs){var hr=hq[hs];if(hr.from<hv&&hr.to>hw||hw==hv&&hr.to==hw){hu(Math.max(hr.from,hw),Math.min(hr.to,hv),hr.level==1?"rtl":"ltr",hs);ht=true}}if(!ht){hu(hw,hv,"ltr")}}var fS=null;function aS(hq,hs,hu){var ht;fS=null;for(var hr=0;hr<hq.length;++hr){var hv=hq[hr];if(hv.from<hs&&hv.to>hs){return hr}if(hv.to==hs){if(hv.from!=hv.to&&hu=="before"){ht=hr}else{fS=hr}}if(hv.from==hs){if(hv.from!=hv.to&&hu!="before"){ht=hr}else{fS=hr}}}return ht!=null?ht:fS}var bv=(function(){var hv="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var ht="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function hs(hy){if(hy<=247){return hv.charAt(hy)}else{if(1424<=hy&&hy<=1524){return"R"}else{if(1536<=hy&&hy<=1785){return ht.charAt(hy-1536)}else{if(1774<=hy&&hy<=2220){return"r"}else{if(8192<=hy&&hy<=8203){return"w"}else{if(hy==8204){return"b"}else{return"L"}}}}}}}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var hx=/[stwN]/,hr=/[LRr]/,hq=/[Lb1n]/,hu=/[1n]/;function hw(hA,hz,hy){this.level=hA;this.from=hz;this.to=hy}return function(hV,hB){var hK=hB=="ltr"?"L":"R";if(hV.length==0||hB=="ltr"&&!i.test(hV)){return false}var hE=hV.length,h4=[];for(var h7=0;h7<hE;++h7){h4.push(hs(hV.charCodeAt(h7)))}for(var hS=0,hR=hK;hS<hE;++hS){var h8=h4[hS];if(h8=="m"){h4[hS]=hR}else{hR=h8}}for(var hQ=0,hA=hK;hQ<hE;++hQ){var h3=h4[hQ];if(h3=="1"&&hA=="r"){h4[hQ]="n"}else{if(hr.test(h3)){hA=h3;if(h3=="r"){h4[hQ]="R"}}}}for(var hP=1,hz=h4[0];hP<hE-1;++hP){var h2=h4[hP];if(h2=="+"&&hz=="1"&&h4[hP+1]=="1"){h4[hP]="1"}else{if(h2==","&&hz==h4[hP+1]&&(hz=="1"||hz=="n")){h4[hP]=hz}}hz=h2}for(var hO=0;hO<hE;++hO){var h1=h4[hO];if(h1==","){h4[hO]="N"}else{if(h1=="%"){var hD=(void 0);for(hD=hO+1;hD<hE&&h4[hD]=="%";++hD){}var hI=(hO&&h4[hO-1]=="!")||(hD<hE&&h4[hD]=="1")?"1":"N";for(var h6=hO;h6<hD;++h6){h4[h6]=hI}hO=hD-1}}}for(var hN=0,hH=hK;hN<hE;++hN){var hZ=h4[hN];if(hH=="L"&&hZ=="1"){h4[hN]="L"}else{if(hr.test(hZ)){hH=hZ}}}for(var hM=0;hM<hE;++hM){if(hx.test(h4[hM])){var hW=(void 0);for(hW=hM+1;hW<hE&&hx.test(h4[hW]);++hW){}var hY=(hM?h4[hM-1]:hK)=="L";var h0=(hW<hE?h4[hW]:hK)=="L";var hU=hY==h0?(hY?"L":"R"):hK;for(var hG=hM;hG<hW;++hG){h4[hG]=hU}hM=hW-1}}var hX=[],h5;for(var hL=0;hL<hE;){if(hq.test(h4[hL])){var hJ=hL;for(++hL;hL<hE&&hq.test(h4[hL]);++hL){}hX.push(new hw(0,hJ,hL))}else{var hT=hL,hy=hX.length;for(++hL;hL<hE&&h4[hL]!="L";++hL){}for(var hF=hT;hF<hL;){if(hu.test(h4[hF])){if(hT<hF){hX.splice(hy,0,new hw(1,hT,hF))}var hC=hF;for(++hF;hF<hL&&hu.test(h4[hF]);++hF){}hX.splice(hy,0,new hw(2,hC,hF));hT=hF}else{++hF}}if(hT<hL){hX.splice(hy,0,new hw(1,hT,hL))}}}if(hB=="ltr"){if(hX[0].level==1&&(h5=hV.match(/^\s+/))){hX[0].from=h5[0].length;hX.unshift(new hw(0,0,h5[0].length))}if(gy(hX).level==1&&(h5=hV.match(/\s+$/))){gy(hX).to-=h5[0].length;hX.push(new hw(0,hE-h5[0].length,hE))}}return hB=="rtl"?hX.reverse():hX}})();function a(hq,hr){var i=hq.order;if(i==null){i=hq.order=bv(hq.text,hr)}return i}var fV=[];var cj=function(hr,i,hq){if(hr.addEventListener){hr.addEventListener(i,hq,false)}else{if(hr.attachEvent){hr.attachEvent("on"+i,hq)}else{var hs=hr._handlers||(hr._handlers={});hs[i]=(hs[i]||fV).concat(hq)}}};function eZ(hq,i){return hq._handlers&&hq._handlers[i]||fV}function eS(ht,hr,hs){if(ht.removeEventListener){ht.removeEventListener(hr,hs,false)}else{if(ht.detachEvent){ht.detachEvent("on"+hr,hs)}else{var hu=ht._handlers,i=hu&&hu[hr];if(i){var hq=dR(i,hs);if(hq>-1){hu[hr]=i.slice(0,hq).concat(i.slice(hq+1))}}}}}function aO(hu,ht){var hq=eZ(hu,ht);if(!hq.length){return}var hr=Array.prototype.slice.call(arguments,2);for(var hs=0;hs<hq.length;++hs){hq[hs].apply(null,hr)}}function a4(i,hr,hq){if(typeof hr=="string"){hr={type:hr,preventDefault:function(){this.defaultPrevented=true}}}aO(i,hq||hr.type,i,hr);return b6(hr)||hr.codemirrorIgnore}function ab(hr){var hq=hr._handlers&&hr._handlers.cursorActivity;if(!hq){return}var ht=hr.curOp.cursorActivityHandlers||(hr.curOp.cursorActivityHandlers=[]);for(var hs=0;hs<hq.length;++hs){if(dR(ht,hq[hs])==-1){ht.push(hq[hs])}}}function f9(hq,i){return eZ(hq,i).length>0}function bT(i){i.prototype.on=function(hq,hr){cj(this,hq,hr)};i.prototype.off=function(hq,hr){eS(this,hq,hr)}}function c9(i){if(i.preventDefault){i.preventDefault()}else{i.returnValue=false}}function dZ(i){if(i.stopPropagation){i.stopPropagation()}else{i.cancelBubble=true}}function b6(i){return i.defaultPrevented!=null?i.defaultPrevented:i.returnValue==false}function e6(i){c9(i);dZ(i)}function Q(i){return i.target||i.srcElement}function gJ(hq){var i=hq.which;if(i==null){if(hq.button&1){i=1}else{if(hq.button&2){i=3}else{if(hq.button&4){i=2}}}}if(cu&&hq.ctrlKey&&i==1){i=3}return i}var fx=function(){if(ei&&m<9){return false}var i=g5("div");return"draggable" in i||"dragDrop" in i}();var gH;function bF(i){if(gH==null){var hr=g5("span","\u200b");ce(i,g5("span",[hr,document.createTextNode("x")]));if(i.firstChild.offsetHeight!=0){gH=hr.offsetWidth<=1&&hr.offsetHeight>2&&!(ei&&m<8)}}var hq=gH?g5("span","\u200b"):g5("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px");hq.setAttribute("cm-text","");return hq}var gI;function b9(hs){if(gI!=null){return gI}var i=ce(hs,document.createTextNode("A\u062eA"));var hr=cO(i,0,1).getBoundingClientRect();var hq=cO(i,1,2).getBoundingClientRect();eD(hs);if(!hr||hr.left==hr.right){return false}return gI=(hq.right-hr.right<3)}var gO="\n\nb".split(/\n/).length!=3?function(hu){var hv=0,i=[],ht=hu.length;while(hv<=ht){var hs=hu.indexOf("\n",hv);if(hs==-1){hs=hu.length}var hr=hu.slice(hv,hu.charAt(hs-1)=="\r"?hs-1:hs);var hq=hr.indexOf("\r");if(hq!=-1){i.push(hr.slice(0,hq));hv+=hq+1}else{i.push(hr);hv=hs+1}}return i}:function(i){return i.split(/\r\n?|\n/)};var bL=window.getSelection?function(hq){try{return hq.selectionStart!=hq.selectionEnd}catch(i){return false}}:function(hr){var i;try{i=hr.ownerDocument.selection.createRange()}catch(hq){}if(!i||i.parentElement()!=hr){return false}return i.compareEndPoints("StartToEnd",i)!=0};var dI=(function(){var i=g5("div");if("oncopy" in i){return true}i.setAttribute("oncopy","return;");return typeof i.oncopy=="function"})();var fW=null;function aW(hq){if(fW!=null){return fW}var hr=ce(hq,g5("span","x"));var hs=hr.getBoundingClientRect();var i=cO(hr,0,1).getBoundingClientRect();return fW=Math.abs(hs.left-i.left)>1}var d1={};var a5={};function fa(i,hq){if(arguments.length>2){hq.dependencies=Array.prototype.slice.call(arguments,2)}d1[i]=hq}function bE(hq,i){a5[hq]=i}function hh(i){if(typeof i=="string"&&a5.hasOwnProperty(i)){i=a5[i]}else{if(i&&typeof i.name=="string"&&a5.hasOwnProperty(i.name)){var hq=a5[i.name];if(typeof hq=="string"){hq={name:hq}}i=cM(hq,i);i.name=hq.name}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(i)){return hh("application/xml")}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(i)){return hh("application/json")}}}}if(typeof i=="string"){return{name:i}}else{return i||{name:"null"}}}function gr(hr,hq){hq=hh(hq);var ht=d1[hq.name];if(!ht){return gr(hr,"text/plain")}var hu=ht(hr,hq);if(dY.hasOwnProperty(hq.name)){var hs=dY[hq.name];for(var hv in hs){if(!hs.hasOwnProperty(hv)){continue}if(hu.hasOwnProperty(hv)){hu["_"+hv]=hu[hv]}hu[hv]=hs[hv]}}hu.name=hq.name;if(hq.helperType){hu.helperType=hq.helperType}if(hq.modeProps){for(var i in hq.modeProps){hu[i]=hq.modeProps[i]}}return hu}var dY={};function fn(hr,hq){var i=dY.hasOwnProperty(hr)?dY[hr]:(dY[hr]={});aZ(hq,i)}function cq(hs,i){if(i===true){return i}if(hs.copyState){return hs.copyState(i)}var hr={};for(var ht in i){var hq=i[ht];if(hq instanceof Array){hq=hq.concat([])}hr[ht]=hq}return hr}function hd(hr,i){var hq;while(hr.innerMode){hq=hr.innerMode(i);if(!hq||hq.mode==hr){break}i=hq.state;hr=hq.mode}return hq||{mode:hr,state:i}}function cn(hr,hq,i){return hr.startState?hr.startState(hq,i):true}var fH=function(i,hr,hq){this.pos=this.start=0;this.string=i;this.tabSize=hr||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0;this.lineOracle=hq};fH.prototype.eol=function(){return this.pos>=this.string.length};fH.prototype.sol=function(){return this.pos==this.lineStart};fH.prototype.peek=function(){return this.string.charAt(this.pos)||undefined};fH.prototype.next=function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}};fH.prototype.eat=function(i){var hr=this.string.charAt(this.pos);var hq;if(typeof i=="string"){hq=hr==i}else{hq=hr&&(i.test?i.test(hr):i(hr))}if(hq){++this.pos;return hr}};fH.prototype.eatWhile=function(i){var hq=this.pos;while(this.eat(i)){}return this.pos>hq};fH.prototype.eatSpace=function(){var hq=this;var i=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++hq.pos}return this.pos>i};fH.prototype.skipToEnd=function(){this.pos=this.string.length};fH.prototype.skipTo=function(i){var hq=this.string.indexOf(i,this.pos);if(hq>-1){this.pos=hq;return true}};fH.prototype.backUp=function(i){this.pos-=i};fH.prototype.column=function(){if(this.lastColumnPos<this.start){this.lastColumnValue=cd(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?cd(this.string,this.lineStart,this.tabSize):0)};fH.prototype.indentation=function(){return cd(this.string,null,this.tabSize)-(this.lineStart?cd(this.string,this.lineStart,this.tabSize):0)};fH.prototype.match=function(ht,hq,i){if(typeof ht=="string"){var hu=function(hv){return i?hv.toLowerCase():hv};var hs=this.string.substr(this.pos,ht.length);if(hu(hs)==hu(ht)){if(hq!==false){this.pos+=ht.length}return true}}else{var hr=this.string.slice(this.pos).match(ht);if(hr&&hr.index>0){return null}if(hr&&hq!==false){this.pos+=hr[0].length}return hr}};fH.prototype.current=function(){return this.string.slice(this.start,this.pos)};fH.prototype.hideFirstChars=function(hq,i){this.lineStart+=hq;try{return i()}finally{this.lineStart-=hq}};fH.prototype.lookAhead=function(hq){var i=this.lineOracle;return i&&i.lookAhead(hq)};fH.prototype.baseToken=function(){var i=this.lineOracle;return i&&i.baseToken(this.pos)};var aQ=function(hq,i){this.state=hq;this.lookAhead=i};var ag=function(hs,hr,i,hq){this.state=hr;this.doc=hs;this.line=i;this.maxLookAhead=hq||0;this.baseTokens=null;this.baseTokenPos=1};ag.prototype.lookAhead=function(hq){var i=this.doc.getLine(this.line+hq);if(i!=null&&hq>this.maxLookAhead){this.maxLookAhead=hq}return i};ag.prototype.baseToken=function(hr){var hq=this;if(!this.baseTokens){return null}while(this.baseTokens[this.baseTokenPos]<=hr){hq.baseTokenPos+=2}var i=this.baseTokens[this.baseTokenPos+1];return{type:i&&i.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-hr}};ag.prototype.nextLine=function(){this.line++;if(this.maxLookAhead>0){this.maxLookAhead--}};ag.fromSaved=function(hr,hq,i){if(hq instanceof aQ){return new ag(hr,cq(hr.mode,hq.state),i,hq.lookAhead)}else{return new ag(hr,cq(hr.mode,hq),i)}};ag.prototype.save=function(hq){var i=hq!==false?cq(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new aQ(i,this.maxLookAhead):i};function gp(hv,hx,hq,ht){var hw=[hv.state.modeGen],hs={};x(hv,hx.text,hv.doc.mode,hq,function(hy,hz){return hw.push(hy,hz)},hs,ht);var i=hq.state;var hu=function(hB){hq.baseTokens=hw;var hz=hv.state.overlays[hB],hA=1,hy=0;hq.state=true;x(hv,hx.text,hz.mode,hq,function(hC,hE){var hG=hA;while(hy<hC){var hD=hw[hA];if(hD>hC){hw.splice(hA,1,hC,hw[hA+1],hD)}hA+=2;hy=Math.min(hC,hD)}if(!hE){return}if(hz.opaque){hw.splice(hG,hA-hG,hC,"overlay "+hE);hA=hG+2}else{for(;hG<hA;hG+=2){var hF=hw[hG+1];hw[hG+1]=(hF?hF+" ":"")+"overlay "+hE}}},hs);hq.state=i;hq.baseTokens=null;hq.baseTokenPos=1};for(var hr=0;hr<hv.state.overlays.length;++hr){hu(hr)}return{styles:hw,classes:hs.bgClass||hs.textClass?hs:null}}function dE(hq,hs,hu){if(!hs.styles||hs.styles[0]!=hq.state.modeGen){var ht=fL(hq,b8(hs));var hr=hs.text.length>hq.options.maxHighlightLength&&cq(hq.doc.mode,ht.state);var i=gp(hq,hs,ht);if(hr){ht.state=hr}hs.stateAfter=ht.save(!hr);hs.styles=i.styles;if(i.classes){hs.styleClasses=i.classes}else{if(hs.styleClasses){hs.styleClasses=null}}if(hu===hq.doc.highlightFrontier){hq.doc.modeFrontier=Math.max(hq.doc.modeFrontier,++hq.doc.highlightFrontier)}}return hs.styles}function fL(i,hw,hq){var hu=i.doc,ht=i.display;if(!hu.mode.startState){return new ag(hu,true,hw)}var hv=c1(i,hw,hq);var hs=hv>hu.first&&f4(hu,hv-1).stateAfter;var hr=hs?ag.fromSaved(hu,hs,hv):new ag(hu,cn(hu.mode),hv);hu.iter(hv,hw,function(hx){d6(i,hx.text,hr);var hy=hr.line;hx.stateAfter=hy==hw-1||hy%5==0||hy>=ht.viewFrom&&hy<ht.viewTo?hr.save():null;hr.nextLine()});if(hq){hu.modeFrontier=hr.line}return hr}function d6(i,hu,hr,hq){var ht=i.doc.mode;var hs=new fH(hu,i.options.tabSize,hr);hs.start=hs.pos=hq||0;if(hu==""){ge(ht,hr.state)}while(!hs.eol()){fl(ht,hs,hr.state);hs.start=hs.pos}}function ge(hr,hq){if(hr.blankLine){return hr.blankLine(hq)}if(!hr.innerMode){return}var i=hd(hr,hq);if(i.mode.blankLine){return i.mode.blankLine(i.state)}}function fl(hv,hu,ht,hq){for(var hr=0;hr<10;hr++){if(hq){hq[0]=hd(hv,ht).mode}var hs=hv.token(hu,ht);if(hu.pos>hu.start){return hs}}throw new Error("Mode "+hv.name+" failed to advance stream.")}var dH=function(hr,i,hq){this.start=hr.start;this.end=hr.pos;this.string=hr.current();this.type=i||null;this.state=hq};function cT(hx,hv,hs,hr){var hw=hx.doc,ht=hw.mode,i;hv=gD(hw,hv);var hz=f4(hw,hv.line),hq=fL(hx,hv.line,hs);var hy=new fH(hz.text,hx.options.tabSize,hq),hu;if(hr){hu=[]}while((hr||hy.pos<hv.ch)&&!hy.eol()){hy.start=hy.pos;i=fl(ht,hy,hq.state);if(hr){hu.push(new dH(hy,i,cq(hw.mode,hq.state)))}}return hr?hu:new dH(hy,i,hq.state)}function dS(hr,hq){if(hr){for(;;){var i=hr.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i){break}hr=hr.slice(0,i.index)+hr.slice(i.index+i[0].length);var hs=i[1]?"bgClass":"textClass";if(hq[hs]==null){hq[hs]=i[2]}else{if(!(new RegExp("(?:^|s)"+i[2]+"(?:$|s)")).test(hq[hs])){hq[hs]+=" "+i[2]}}}}return hr}function x(hz,hB,hu,hr,hv,hs,ht){var hq=hu.flattenSpans;if(hq==null){hq=hz.options.flattenSpans}var hx=0,hw=null;var hA=new fH(hB,hz.options.tabSize,hr),i;var hD=hz.options.addModeClass&&[null];if(hB==""){dS(ge(hu,hr.state),hs)}while(!hA.eol()){if(hA.pos>hz.options.maxHighlightLength){hq=false;if(ht){d6(hz,hB,hr,hA.pos)}hA.pos=hB.length;i=null}else{i=dS(fl(hu,hA,hr.state,hD),hs)}if(hD){var hC=hD[0].name;if(hC){i="m-"+(i?hC+" "+i:hC)}}if(!hq||hw!=i){while(hx<hA.start){hx=Math.min(hA.start,hx+5000);hv(hx,hw)}hw=i}hA.start=hA.pos}while(hx<hA.pos){var hy=Math.min(hA.pos,hx+5000);hv(hy,hw);hx=hy}}function c1(hw,hq,ht){var hr,hu,hv=hw.doc;var hs=ht?-1:hq-(hw.doc.mode.innerMode?1000:100);for(var hz=hq;hz>hs;--hz){if(hz<=hv.first){return hv.first}var hy=f4(hv,hz-1),i=hy.stateAfter;if(i&&(!ht||hz+(i instanceof aQ?i.lookAhead:0)<=hv.modeFrontier)){return hz}var hx=cd(hy.text,null,hw.options.tabSize);if(hu==null||hr>hx){hu=hz-1;hr=hx}}return hu}function hj(hr,ht){hr.modeFrontier=Math.min(hr.modeFrontier,ht);if(hr.highlightFrontier<ht-10){return}var hs=hr.first;for(var i=ht-1;i>hs;i--){var hq=f4(hr,i).stateAfter;if(hq&&(!(hq instanceof aQ)||i+hq.lookAhead<ht)){hs=i+1;break}}hr.highlightFrontier=Math.min(hr.highlightFrontier,hs)}var ha=function(hr,hq,i){this.text=hr;dy(this,hq);this.height=i?i(this):1};ha.prototype.lineNo=function(){return b8(this)};bT(ha);function e2(hq,ht,hr,i){hq.text=ht;if(hq.stateAfter){hq.stateAfter=null}if(hq.styles){hq.styles=null}if(hq.order!=null){hq.order=null}he(hq);dy(hq,hr);var hs=i?i(hq):1;if(hs!=hq.height){hb(hq,hs)}}function bV(i){i.parent=null;he(i)}var ew={};var cp={};function fK(hr,hq){if(!hr||/^\s*$/.test(hr)){return null}var i=hq.addModeClass?cp:ew;return i[hr]||(i[hr]=hr.replace(/\S+/g,"cm-$&"))}function fF(hw,hv){var hu=hc("span",null,null,dv?"padding-right: .1px":null);var ht={pre:hc("pre",[hu],"CodeMirror-line"),content:hu,col:0,pos:0,cm:hw,trailingSpace:false,splitSpaces:(ei||dv)&&hw.getOption("lineWrapping")};hv.measure={};for(var hs=0;hs<=(hv.rest?hv.rest.length:0);hs++){var hy=hs?hv.rest[hs-1]:hv.line,hr=(void 0);ht.pos=0;ht.addToken=u;if(b9(hw.display.measure)&&(hr=a(hy,hw.doc.direction))){ht.addToken=aa(ht.addToken,hr)}ht.map=[];var hq=hv!=hw.display.externalMeasured&&b8(hy);bG(hy,ht,dE(hw,hy,hq));if(hy.styleClasses){if(hy.styleClasses.bgClass){ht.bgClass=gS(hy.styleClasses.bgClass,ht.bgClass||"")}if(hy.styleClasses.textClass){ht.textClass=gS(hy.styleClasses.textClass,ht.textClass||"")}}if(ht.map.length==0){ht.map.push(0,0,ht.content.appendChild(bF(hw.display.measure)))}if(hs==0){hv.measure.map=ht.map;hv.measure.cache={}}else{(hv.measure.maps||(hv.measure.maps=[])).push(ht.map);(hv.measure.caches||(hv.measure.caches=[])).push({})}}if(dv){var hx=ht.content.lastChild;if(/\bcm-tab\b/.test(hx.className)||(hx.querySelector&&hx.querySelector(".cm-tab"))){ht.content.className="cm-tab-wrap-hack"}}aO(hw,"renderLine",hw,hv.line,ht.pre);if(ht.pre.className){ht.textClass=gS(ht.pre.className,ht.textClass||"")}return ht}function f3(hq){var i=g5("span","\u2022","cm-invalidchar");i.title="\\u"+hq.charCodeAt(0).toString(16);i.setAttribute("aria-label",i.title);return i}function u(hA,hv,hF,hC,hy,hI,hu){if(!hv){return}var hE=hA.splitSpaces?c8(hv,hA.trailingSpace):hv;var i=hA.cm.state.specialChars,hq=false;var hD;if(!i.test(hv)){hA.col+=hv.length;hD=document.createTextNode(hE);hA.map.push(hA.pos,hA.pos+hv.length,hD);if(ei&&m<9){hq=true}hA.pos+=hv.length}else{hD=document.createDocumentFragment();var hs=0;while(true){i.lastIndex=hs;var hB=i.exec(hv);var hH=hB?hB.index-hs:hv.length-hs;if(hH){var hx=document.createTextNode(hE.slice(hs,hs+hH));if(ei&&m<9){hD.appendChild(g5("span",[hx]))}else{hD.appendChild(hx)}hA.map.push(hA.pos,hA.pos+hH,hx);hA.col+=hH;hA.pos+=hH}if(!hB){break}hs+=hH+1;var hG=(void 0);if(hB[0]=="\t"){var hz=hA.cm.options.tabSize,hw=hz-hA.col%hz;hG=hD.appendChild(g5("span",cS(hw),"cm-tab"));hG.setAttribute("role","presentation");hG.setAttribute("cm-text","\t");hA.col+=hw}else{if(hB[0]=="\r"||hB[0]=="\n"){hG=hD.appendChild(g5("span",hB[0]=="\r"?"\u240d":"\u2424","cm-invalidchar"));hG.setAttribute("cm-text",hB[0]);hA.col+=1}else{hG=hA.cm.options.specialCharPlaceholder(hB[0]);hG.setAttribute("cm-text",hB[0]);if(ei&&m<9){hD.appendChild(g5("span",[hG]))}else{hD.appendChild(hG)}hA.col+=1}}hA.map.push(hA.pos,hA.pos+1,hG);hA.pos++}}hA.trailingSpace=hE.charCodeAt(hv.length-1)==32;if(hF||hC||hy||hq||hu){var hr=hF||"";if(hC){hr+=hC}if(hy){hr+=hy}var ht=g5("span",[hD],hr,hu);if(hI){ht.title=hI}return hA.content.appendChild(ht)}hA.content.appendChild(hD)}function c8(hv,hu){if(hv.length>1&&!/ /.test(hv)){return hv}var hr=hu,hq="";for(var hs=0;hs<hv.length;hs++){var ht=hv.charAt(hs);if(ht==" "&&hr&&(hs==hv.length-1||hv.charCodeAt(hs+1)==32)){ht="\u00a0"}hq+=ht;hr=ht==" "}return hq}function aa(hq,i){return function(hy,hA,hr,hv,hB,hz,hx){hr=hr?hr+" cm-force-border":"cm-force-border";var hs=hy.pos,hu=hs+hA.length;for(;;){var ht=(void 0);for(var hw=0;hw<i.length;hw++){ht=i[hw];if(ht.to>hs&&ht.from<=hs){break}}if(ht.to>=hu){return hq(hy,hA,hr,hv,hB,hz,hx)}hq(hy,hA.slice(0,ht.to-hs),hr,hv,null,hz,hx);hv=null;hA=hA.slice(ht.to-hs);hs=ht.to}}}function al(hq,hs,i,hr){var ht=!hr&&i.widgetNode;if(ht){hq.map.push(hq.pos,hq.pos+hs,ht)}if(!hr&&hq.cm.display.input.needsContentAttribute){if(!ht){ht=hq.content.appendChild(document.createElement("span"))}ht.setAttribute("cm-marker",i.id)}if(ht){hq.cm.display.input.setUneditable(ht);hq.content.appendChild(ht)}hq.pos+=hs;hq.trailingSpace=false}function bG(hB,hI,hA){var hv=hB.markedSpans,hy=hB.text,hG=0;if(!hv){for(var hw=1;hw<hA.length;hw+=2){hI.addToken(hI,hy.slice(hG,hG=hA[hw]),fK(hA[hw+1],hI.cm.options))}return}var hM=hy.length,hu=0,hL=1,hE="",hN,hC;var hR=0,hq,hQ,hF,hS,hs;for(;;){if(hR==hu){hq=hQ=hF=hS=hC="";hs=null;hR=Infinity;var hx=[],hz=(void 0);for(var hJ=0;hJ<hv.length;++hJ){var hK=hv[hJ],hH=hK.marker;if(hH.type=="bookmark"&&hK.from==hu&&hH.widgetNode){hx.push(hH)}else{if(hK.from<=hu&&(hK.to==null||hK.to>hu||hH.collapsed&&hK.to==hu&&hK.from==hu)){if(hK.to!=null&&hK.to!=hu&&hR>hK.to){hR=hK.to;hQ=""}if(hH.className){hq+=" "+hH.className}if(hH.css){hC=(hC?hC+";":"")+hH.css}if(hH.startStyle&&hK.from==hu){hF+=" "+hH.startStyle}if(hH.endStyle&&hK.to==hR){(hz||(hz=[])).push(hH.endStyle,hK.to)}if(hH.title&&!hS){hS=hH.title}if(hH.collapsed&&(!hs||eq(hs.marker,hH)<0)){hs=hK}}else{if(hK.from>hu&&hR>hK.from){hR=hK.from}}}}if(hz){for(var hP=0;hP<hz.length;hP+=2){if(hz[hP+1]==hR){hQ+=" "+hz[hP]}}}if(!hs||hs.from==hu){for(var hO=0;hO<hx.length;++hO){al(hI,0,hx[hO])}}if(hs&&(hs.from||0)==hu){al(hI,(hs.to==null?hM+1:hs.to)-hu,hs.marker,hs.from==null);if(hs.to==null){return}if(hs.to==hu){hs=false}}}if(hu>=hM){break}var hD=Math.min(hM,hR);while(true){if(hE){var hr=hu+hE.length;if(!hs){var ht=hr>hD?hE.slice(0,hD-hu):hE;hI.addToken(hI,ht,hN?hN+hq:hq,hF,hu+ht.length==hR?hQ:"",hS,hC)}if(hr>=hD){hE=hE.slice(hD-hu);hu=hD;break}hu=hr;hF=""}hE=hy.slice(hG,hG=hA[hL++]);hN=fK(hA[hL++],hI.cm.options)}}}function bO(hr,i,hq){this.line=i;this.rest=g(i);this.size=this.rest?b8(gy(this.rest))-hq+1:1;this.node=this.text=null;this.hidden=gl(hr,i)}function fJ(i,hv,hu){var ht=[],hr;for(var hs=hv;hs<hu;hs=hr){var hq=new bO(i.doc,f4(i.doc,hs),hs);hr=hs+hq.size;ht.push(hq)}return ht}var bI=null;function fg(i){if(bI){bI.ops.push(i)}else{i.ownsGroup=bI={ops:[i],delayedCallbacks:[]}}}function dp(ht){var hs=ht.delayedCallbacks,hr=0;do{for(;hr<hs.length;hr++){hs[hr].call(null)}for(var hq=0;hq<ht.ops.length;hq++){var hu=ht.ops[hq];if(hu.cursorActivityHandlers){while(hu.cursorActivityCalled<hu.cursorActivityHandlers.length){hu.cursorActivityHandlers[hu.cursorActivityCalled++].call(null,hu.cm)}}}}while(hr<hs.length)}function ck(hr,hq){var i=hr.ownsGroup;if(!i){return}try{dp(i)}finally{bI=null;hq(i)}}var bS=null;function am(hw,hu){var hq=eZ(hw,hu);if(!hq.length){return}var hs=Array.prototype.slice.call(arguments,2),hv;if(bI){hv=bI.delayedCallbacks}else{if(bS){hv=bS}else{hv=bS=[];setTimeout(aX,0)}}var hr=function(hx){hv.push(function(){return hq[hx].apply(null,hs)})};for(var ht=0;ht<hq.length;++ht){hr(ht)}}function aX(){var hq=bS;bS=null;for(var hr=0;hr<hq.length;++hr){hq[hr]()}}function aj(i,hr,ht,hu){for(var hq=0;hq<hr.changes.length;hq++){var hs=hr.changes[hq];if(hs=="text"){ga(i,hr)}else{if(hs=="gutter"){dO(i,hr,ht,hu)}else{if(hs=="class"){ed(i,hr)}else{if(hs=="widget"){ax(i,hr,hu)}}}}}hr.changes=null}function gA(i){if(i.node==i.text){i.node=g5("div",null,null,"position: relative");if(i.text.parentNode){i.text.parentNode.replaceChild(i.node,i.text)}i.node.appendChild(i.text);if(ei&&m<8){i.node.style.zIndex=2}}return i.node}function fc(i,hr){var hq=hr.bgClass?hr.bgClass+" "+(hr.line.bgClass||""):hr.line.bgClass;if(hq){hq+=" CodeMirror-linebackground"}if(hr.background){if(hq){hr.background.className=hq}else{hr.background.parentNode.removeChild(hr.background);hr.background=null}}else{if(hq){var hs=gA(hr);hr.background=hs.insertBefore(g5("div",null,hq),hs.firstChild);i.display.input.setUneditable(hr.background)}}}function ev(i,hq){var hr=i.display.externalMeasured;if(hr&&hr.line==hq.line){i.display.externalMeasured=null;hq.measure=hr.measure;return hr.built}return fF(i,hq)}function ga(i,hs){var hq=hs.text.className;var hr=ev(i,hs);if(hs.text==hs.node){hs.node=hr.pre}hs.text.parentNode.replaceChild(hr.pre,hs.text);hs.text=hr.pre;if(hr.bgClass!=hs.bgClass||hr.textClass!=hs.textClass){hs.bgClass=hr.bgClass;hs.textClass=hr.textClass;ed(i,hs)}else{if(hq){hs.text.className=hq}}}function ed(hq,hr){fc(hq,hr);if(hr.line.wrapClass){gA(hr).className=hr.line.wrapClass}else{if(hr.node!=hr.text){hr.node.className=""}}var i=hr.textClass?hr.textClass+" "+(hr.line.textClass||""):hr.line.textClass;hr.text.className=i||""}function dO(hx,hv,hu,hw){if(hv.gutter){hv.node.removeChild(hv.gutter);hv.gutter=null}if(hv.gutterBackground){hv.node.removeChild(hv.gutterBackground);hv.gutterBackground=null}if(hv.line.gutterClass){var hq=gA(hv);hv.gutterBackground=g5("div",null,"CodeMirror-gutter-background "+hv.line.gutterClass,("left: "+(hx.options.fixedGutter?hw.fixedPos:-hw.gutterTotalWidth)+"px; width: "+(hw.gutterTotalWidth)+"px"));hx.display.input.setUneditable(hv.gutterBackground);hq.insertBefore(hv.gutterBackground,hv.text)}var hs=hv.line.gutterMarkers;if(hx.options.lineNumbers||hs){var hy=gA(hv);var ht=hv.gutter=g5("div",null,"CodeMirror-gutter-wrapper",("left: "+(hx.options.fixedGutter?hw.fixedPos:-hw.gutterTotalWidth)+"px"));hx.display.input.setUneditable(ht);hy.insertBefore(ht,hv.text);if(hv.line.gutterClass){ht.className+=" "+hv.line.gutterClass}if(hx.options.lineNumbers&&(!hs||!hs["CodeMirror-linenumbers"])){hv.lineNumber=ht.appendChild(g5("div",e8(hx.options,hu),"CodeMirror-linenumber CodeMirror-gutter-elt",("left: "+(hw.gutterLeft["CodeMirror-linenumbers"])+"px; width: "+(hx.display.lineNumInnerWidth)+"px")))}if(hs){for(var hr=0;hr<hx.options.gutters.length;++hr){var i=hx.options.gutters[hr],hz=hs.hasOwnProperty(i)&&hs[i];if(hz){ht.appendChild(g5("div",[hz],"CodeMirror-gutter-elt",("left: "+(hw.gutterLeft[i])+"px; width: "+(hw.gutterWidth[i])+"px")))}}}}}function ax(i,hq,ht){if(hq.alignable){hq.alignable=null}for(var hs=hq.node.firstChild,hr=(void 0);hs;hs=hr){hr=hs.nextSibling;if(hs.className=="CodeMirror-linewidget"){hq.node.removeChild(hs)}}gh(i,hq,ht)}function aP(i,hr,hs,ht){var hq=ev(i,hr);hr.text=hr.node=hq.pre;if(hq.bgClass){hr.bgClass=hq.bgClass}if(hq.textClass){hr.textClass=hq.textClass}ed(i,hr);dO(i,hr,hs,ht);gh(i,hr,ht);return hr.node}function gh(hq,hs,ht){g9(hq,hs.line,hs,ht,true);if(hs.rest){for(var hr=0;hr<hs.rest.length;hr++){g9(hq,hs.rest[hr],hs,ht,false)}}}function g9(hy,hz,hv,hx,ht){if(!hz.widgets){return}var hq=gA(hv);for(var hs=0,hw=hz.widgets;hs<hw.length;++hs){var hu=hw[hs],hr=g5("div",[hu.node],"CodeMirror-linewidget");if(!hu.handleMouseEvents){hr.setAttribute("cm-ignore-events","true")}bZ(hu,hr,hv,hx);hy.display.input.setUneditable(hr);if(ht&&hu.above){hq.insertBefore(hr,hv.gutter||hv.text)}else{hq.appendChild(hr)}am(hu,"redraw")}}function bZ(hs,hr,i,ht){if(hs.noHScroll){(i.alignable||(i.alignable=[])).push(hr);var hq=ht.wrapperWidth;hr.style.left=ht.fixedPos+"px";if(!hs.coverGutter){hq-=ht.gutterTotalWidth;hr.style.paddingLeft=ht.gutterTotalWidth+"px"}hr.style.width=hq+"px"}if(hs.coverGutter){hr.style.zIndex=5;hr.style.position="relative";if(!hs.noHScroll){hr.style.marginLeft=-ht.gutterTotalWidth+"px"}}}function dt(hr){if(hr.height!=null){return hr.height}var i=hr.doc.cm;if(!i){return 0}if(!hg(document.body,hr.node)){var hq="position: relative;";if(hr.coverGutter){hq+="margin-left: -"+i.display.gutters.offsetWidth+"px;"}if(hr.noHScroll){hq+="width: "+i.display.wrapper.clientWidth+"px;"}ce(i.display.measure,g5("div",[hr.node],null,hq))}return hr.height=hr.node.parentNode.offsetHeight}function bo(hq,i){for(var hr=Q(i);hr!=hq.wrapper;hr=hr.parentNode){if(!hr||(hr.nodeType==1&&hr.getAttribute("cm-ignore-events")=="true")||(hr.parentNode==hq.sizer&&hr!=hq.mover)){return true}}}function fY(i){return i.lineSpace.offsetTop}function b2(i){return i.mover.offsetHeight-i.lineSpace.offsetHeight}function fU(hs){if(hs.cachedPaddingH){return hs.cachedPaddingH}var hr=ce(hs.measure,g5("pre","x"));var i=window.getComputedStyle?window.getComputedStyle(hr):hr.currentStyle;var hq={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};if(!isNaN(hq.left)&&!isNaN(hq.right)){hs.cachedPaddingH=hq}return hq}function dn(i){return eg-i.display.nativeBarWidth}function dU(i){return i.display.scroller.clientWidth-dn(i)-i.display.barWidth}function dq(i){return i.display.scroller.clientHeight-dn(i)-i.display.barHeight}function cH(hx,ht,hw){var hs=hx.options.lineWrapping;var hu=hs&&dU(hx);if(!ht.measure.heights||hs&&ht.measure.width!=hu){var hv=ht.measure.heights=[];if(hs){ht.measure.width=hu;var hz=ht.text.firstChild.getClientRects();for(var hq=0;hq<hz.length-1;hq++){var hy=hz[hq],hr=hz[hq+1];if(Math.abs(hy.bottom-hr.bottom)>2){hv.push((hy.bottom+hr.top)/2-hw.top)}}}hv.push(hw.bottom-hw.top)}}function cW(hs,hq,ht){if(hs.line==hq){return{map:hs.measure.map,cache:hs.measure.cache}}for(var hr=0;hr<hs.rest.length;hr++){if(hs.rest[hr]==hq){return{map:hs.measure.maps[hr],cache:hs.measure.caches[hr]}}}for(var hu=0;hu<hs.rest.length;hu++){if(b8(hs.rest[hu])>ht){return{map:hs.measure.maps[hu],cache:hs.measure.caches[hu],before:true}}}}function dx(i,hr){hr=z(hr);var ht=b8(hr);var hq=i.display.externalMeasured=new bO(i.doc,hr,ht);hq.lineN=ht;var hs=hq.built=fF(i,hq);hq.text=hs.pre;ce(i.display.lineMeasure,hs.pre);return hq}function eU(i,hq,hs,hr){return F(i,bi(i,hq),hs,hr)}function f1(i,hr){if(hr>=i.display.viewFrom&&hr<i.display.viewTo){return i.display.view[d0(i,hr)]}var hq=i.display.externalMeasured;if(hq&&hr>=hq.lineN&&hr<hq.lineN+hq.size){return hq}}function bi(i,hr){var hs=b8(hr);var hq=f1(i,hs);if(hq&&!hq.text){hq=null}else{if(hq&&hq.changes){aj(i,hq,hs,f2(i));i.curOp.forceUpdate=true}}if(!hq){hq=dx(i,hr)}var ht=cW(hq,hr,hs);return{line:hr,view:hq,rect:null,map:ht.map,cache:ht.cache,before:ht.before,hasHeights:false}}function F(i,hv,ht,hq,hs){if(hv.before){ht=-1}var hr=ht+(hq||""),hu;if(hv.cache.hasOwnProperty(hr)){hu=hv.cache[hr]}else{if(!hv.rect){hv.rect=hv.view.text.getBoundingClientRect()}if(!hv.hasHeights){cH(i,hv.view,hv.rect);hv.hasHeights=true}hu=l(i,hv,ht,hq);if(!hu.bogus){hv.cache[hr]=hu}}return{left:hu.left,right:hu.right,top:hs?hu.rtop:hu.top,bottom:hs?hu.rbottom:hu.bottom}}var fk={left:0,right:0,top:0,bottom:0};function aV(hr,hq,hx){var ht,hs,hv,hy,hu,hz;for(var hw=0;hw<hr.length;hw+=3){hu=hr[hw];hz=hr[hw+1];if(hq<hu){hs=0;hv=1;hy="left"}else{if(hq<hz){hs=hq-hu;hv=hs+1}else{if(hw==hr.length-3||hq==hz&&hr[hw+3]>hq){hv=hz-hu;hs=hv-1;if(hq>=hz){hy="right"}}}}if(hs!=null){ht=hr[hw+2];if(hu==hz&&hx==(ht.insertLeft?"left":"right")){hy=hx}if(hx=="left"&&hs==0){while(hw&&hr[hw-2]==hr[hw-3]&&hr[hw-1].insertLeft){ht=hr[(hw-=3)+2];hy="left"}}if(hx=="right"&&hs==hz-hu){while(hw<hr.length-3&&hr[hw+3]==hr[hw+4]&&!hr[hw+5].insertLeft){ht=hr[(hw+=3)+2];hy="right"}}break}}return{node:ht,start:hs,end:hv,collapse:hy,coverStart:hu,coverEnd:hz}}function fG(hr,hq){var ht=fk;if(hq=="left"){for(var hs=0;hs<hr.length;hs++){if((ht=hr[hs]).left!=ht.right){break}}}else{for(var hu=hr.length-1;hu>=0;hu--){if((ht=hr[hu]).left!=ht.right){break}}}return ht}function l(hy,hI,hB,hv){var hz=aV(hI.map,hB,hv);var hG=hz.node,hu=hz.start,ht=hz.end,hq=hz.collapse;var hr;if(hG.nodeType==3){for(var hw=0;hw<4;hw++){while(hu&&gd(hI.line.text.charAt(hz.coverStart+hu))){--hu}while(hz.coverStart+ht<hz.coverEnd&&gd(hI.line.text.charAt(hz.coverStart+ht))){++ht}if(ei&&m<9&&hu==0&&ht==hz.coverEnd-hz.coverStart){hr=hG.parentNode.getBoundingClientRect()}else{hr=fG(cO(hG,hu,ht).getClientRects(),hv)}if(hr.left||hr.right||hu==0){break}ht=hu;hu=hu-1;hq="right"}if(ei&&m<11){hr=fA(hy.display.measure,hr)}}else{if(hu>0){hq=hv="right"}var hs;if(hy.options.lineWrapping&&(hs=hG.getClientRects()).length>1){hr=hs[hv=="right"?hs.length-1:0]}else{hr=hG.getBoundingClientRect()}}if(ei&&m<9&&!hu&&(!hr||!hr.left&&!hr.right)){var hx=hG.parentNode.getClientRects()[0];if(hx){hr={left:hx.left,right:hx.left+ea(hy.display),top:hx.top,bottom:hx.bottom}}else{hr=fk}}var hE=hr.top-hI.rect.top,hC=hr.bottom-hI.rect.top;var hK=(hE+hC)/2;var hJ=hI.view.measure.heights;var hH=0;for(;hH<hJ.length-1;hH++){if(hK<hJ[hH]){break}}var hF=hH?hJ[hH-1]:0,hD=hJ[hH];var hA={left:(hq=="right"?hr.right:hr.left)-hI.rect.left,right:(hq=="left"?hr.left:hr.right)-hI.rect.left,top:hF,bottom:hD};if(!hr.left&&!hr.right){hA.bogus=true}if(!hy.options.singleCursorHeightPerLine){hA.rtop=hE;hA.rbottom=hC}return hA}function fA(hr,hs){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!aW(hr)){return hs}var hq=screen.logicalXDPI/screen.deviceXDPI;var i=screen.logicalYDPI/screen.deviceYDPI;return{left:hs.left*hq,right:hs.right*hq,top:hs.top*i,bottom:hs.bottom*i}}function aE(hr){if(hr.measure){hr.measure.cache={};hr.measure.heights=null;if(hr.rest){for(var hq=0;hq<hr.rest.length;hq++){hr.measure.caches[hq]={}}}}}function a0(hq){hq.display.externalMeasure=null;eD(hq.display.lineMeasure);for(var hr=0;hr<hq.display.view.length;hr++){aE(hq.display.view[hr])}}function ar(i){a0(i);i.display.cachedCharWidth=i.display.cachedTextHeight=i.display.cachedPaddingH=null;if(!i.options.lineWrapping){i.display.maxLineChanged=true}i.display.lineNumChars=null}function cX(){if(dL&&aY){return -(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft))}return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function cV(){if(dL&&aY){return -(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop))}return window.pageYOffset||(document.documentElement||document.body).scrollTop}function eh(hr){var hq=0;if(hr.widgets){for(var hs=0;hs<hr.widgets.length;++hs){if(hr.widgets[hs].above){hq+=dt(hr.widgets[hs])}}}return hq}function fD(hv,hs,hu,hq,hr){if(!hr){var hw=eh(hs);hu.top+=hw;hu.bottom+=hw}if(hq=="line"){return hu}if(!hq){hq="local"}var ht=b7(hs);if(hq=="local"){ht+=fY(hv.display)}else{ht-=hv.display.viewOffset}if(hq=="page"||hq=="window"){var i=hv.display.lineSpace.getBoundingClientRect();ht+=i.top+(hq=="window"?0:cV());var hx=i.left+(hq=="window"?0:cX());hu.left+=hx;hu.right+=hx}hu.top+=ht;hu.bottom+=ht;return hu}function hl(hq,ht,hr){if(hr=="div"){return ht}var hv=ht.left,hu=ht.top;if(hr=="page"){hv-=cX();hu-=cV()}else{if(hr=="local"||!hr){var hs=hq.display.sizer.getBoundingClientRect();hv+=hs.left;hu+=hs.top}}var i=hq.display.lineSpace.getBoundingClientRect();return{left:hv-i.left,top:hu-i.top}}function de(i,ht,hs,hr,hq){if(!hr){hr=f4(i.doc,ht.line)}return fD(i,hr,eU(i,hr,ht.ch,hq),hs)}function eu(hA,hy,hr,hv,hC,hw){hv=hv||f4(hA.doc,hy.line);if(!hC){hC=bi(hA,hv)}function ht(hF,hE){var hD=F(hA,hC,hF,hE?"right":"left",hw);if(hE){hD.left=hD.right}else{hD.right=hD.left}return fD(hA,hv,hD,hr)}var hu=a(hv,hA.doc.direction),i=hy.ch,hz=hy.sticky;if(i>=hv.text.length){i=hv.text.length;hz="before"}else{if(i<=0){i=0;hz="after"}}if(!hu){return ht(hz=="before"?i-1:i,hz=="before")}function hB(hG,hD,hH){var hE=hu[hD],hF=hE.level==1;return ht(hH?hG-1:hG,hF!=hH)}var hq=aS(hu,i,hz);var hx=fS;var hs=hB(i,hq,hz=="before");if(hx!=null){hs.other=hB(i,hx,hz!="before")}return hs}function ee(i,ht){var hs=0;ht=gD(i.doc,ht);if(!i.options.lineWrapping){hs=ea(i.display)*ht.ch}var hq=f4(i.doc,ht.line);var hr=b7(hq)+fY(i.display);return{left:hs,right:hs,top:hr,bottom:hr+hq.height}}function g3(i,hq,hs,hr,hu){var ht=ac(i,hq,hs);ht.xRel=hu;if(hr){ht.outside=true}return ht}function gL(hw,hu,ht){var hv=hw.doc;ht+=hw.display.viewOffset;if(ht<0){return g3(hv.first,0,null,true,-1)}var hs=b1(hv,ht),hx=hv.first+hv.size-1;if(hs>hx){return g3(hv.first+hv.size-1,f4(hv,hx).text.length,null,true,1)}if(hu<0){hu=0}var hr=f4(hv,hs);for(;;){var hy=du(hw,hr,hs,hu,ht);var hq=cE(hr,hy.ch+(hy.xRel>0?1:0));if(!hq){return hy}var i=hq.find(1);if(i.line==hs){return i}hr=f4(hv,hs=i.line)}}function bD(i,hr,ht,hu){hu-=eh(hr);var hq=hr.text.length;var hs=cP(function(hv){return F(i,ht,hv-1).bottom<=hu},hq,0);hq=cP(function(hv){return F(i,ht,hv).top>hu},hs,hq);return{begin:hs,end:hq}}function bB(i,hq,hs,ht){if(!hs){hs=bi(i,hq)}var hr=fD(i,hq,F(i,hs,ht),"line").top;return bD(i,hq,hs,hr)}function aA(hq,i,hs,hr){return hq.bottom<=hs?false:hq.top>hs?true:(hr?hq.left:hq.right)>i}function du(hs,hq,hw,hv,hu){hu-=b7(hq);var hA=bi(hs,hq);var hJ=eh(hq);var hH=0,hr=hq.text.length,hE=true;var hC=a(hq,hs.doc.direction);if(hC){var hB=(hs.options.lineWrapping?g0:gF)(hs,hq,hw,hA,hC,hv,hu);hE=hB.level!=1;hH=hE?hB.from:hB.to-1;hr=hE?hB.to:hB.from-1}var ht=null,hy=null;var hz=cP(function(hK){var hL=F(hs,hA,hK);hL.top+=hJ;hL.bottom+=hJ;if(!aA(hL,hv,hu,false)){return false}if(hL.top<=hu&&hL.left<=hv){ht=hK;hy=hL}return true},hH,hr);var i,hI,hG=false;if(hy){var hF=hv-hy.left<hy.right-hv,hx=hF==hE;hz=ht+(hx?0:1);hI=hx?"after":"before";i=hF?hy.left:hy.right}else{if(!hE&&(hz==hr||hz==hH)){hz++}hI=hz==0?"after":hz==hq.text.length?"before":(F(hs,hA,hz-(hE?1:0)).bottom+hJ<=hu)==hE?"after":"before";var hD=eu(hs,ac(hw,hz,hI),"line",hq,hA);i=hD.left;hG=hu<hD.top||hu>=hD.bottom}hz=eX(hq.text,hz,1);return g3(hw,hz,hI,hG,hv-i)}function gF(hy,hu,ht,hz,hs,hx,hw){var hv=cP(function(hC){var hA=hs[hC],hB=hA.level!=1;return aA(eu(hy,ac(ht,hB?hA.to:hA.from,hB?"before":"after"),"line",hu,hz),hx,hw,true)},0,hs.length-1);var hr=hs[hv];if(hv>0){var hq=hr.level!=1;var i=eu(hy,ac(ht,hq?hr.from:hr.to,hq?"after":"before"),"line",hu,hz);if(aA(i,hx,hw,true)&&i.top>hw){hr=hs[hv-1]}}return hr}function g0(hD,hy,hB,hG,hv,hC,hA){var hu=bD(hD,hy,hG,hA);var ht=hu.begin;var hw=hu.end;if(/\s/.test(hy.text.charAt(hw-1))){hw--}var hs=null,hE=null;for(var hx=0;hx<hv.length;hx++){var hq=hv[hx];if(hq.from>=hw||hq.to<=ht){continue}var hr=hq.level!=1;var hF=F(hD,hG,hr?Math.min(hw,hq.to)-1:Math.max(ht,hq.from)).right;var hz=hF<hC?hC-hF+1000000000:hF-hC;if(!hs||hE>hz){hs=hq;hE=hz}}if(!hs){hs=hv[hv.length-1]}if(hs.from<ht){hs={from:ht,to:hs.to,level:hs.level}}if(hs.to>hw){hs={from:hs.from,to:hw,level:hs.level}}return hs}var aR;function bb(hs){if(hs.cachedTextHeight!=null){return hs.cachedTextHeight}if(aR==null){aR=g5("pre");for(var hr=0;hr<49;++hr){aR.appendChild(document.createTextNode("x"));aR.appendChild(g5("br"))}aR.appendChild(document.createTextNode("x"))}ce(hs.measure,aR);var hq=aR.offsetHeight/50;if(hq>3){hs.cachedTextHeight=hq}eD(hs.measure);return hq||1}function ea(ht){if(ht.cachedCharWidth!=null){return ht.cachedCharWidth}var i=g5("span","xxxxxxxxxx");var hs=g5("pre",[i]);ce(ht.measure,hs);var hr=i.getBoundingClientRect(),hq=(hr.right-hr.left)/10;if(hq>2){ht.cachedCharWidth=hq}return hq||10}function f2(hq){var hv=hq.display,ht={},hs={};var hu=hv.gutters.clientLeft;for(var hw=hv.gutters.firstChild,hr=0;hw;hw=hw.nextSibling,++hr){ht[hq.options.gutters[hr]]=hw.offsetLeft+hw.clientLeft+hu;hs[hq.options.gutters[hr]]=hw.clientWidth}return{fixedPos:ey(hv),gutterTotalWidth:hv.gutters.offsetWidth,gutterLeft:ht,gutterWidth:hs,wrapperWidth:hv.wrapper.clientWidth}}function ey(i){return i.scroller.getBoundingClientRect().left-i.sizer.getBoundingClientRect().left}function br(i){var hr=bb(i.display),hq=i.options.lineWrapping;var hs=hq&&Math.max(5,i.display.scroller.clientWidth/ea(i.display)-3);return function(hu){if(gl(i.doc,hu)){return 0}var ht=0;if(hu.widgets){for(var hv=0;hv<hu.widgets.length;hv++){if(hu.widgets[hv].height){ht+=hu.widgets[hv].height}}}if(hq){return ht+(Math.ceil(hu.text.length/hs)||1)*hr}else{return ht+hr}}}function af(i){var hr=i.doc,hq=br(i);hr.iter(function(hs){var ht=hq(hs);if(ht!=hs.height){hb(hs,ht)}})}function cQ(hy,ht,hq,hr){var hu=hy.display;if(!hq&&Q(ht).getAttribute("cm-not-content")=="true"){return null}var hx,hv,i=hu.lineSpace.getBoundingClientRect();try{hx=ht.clientX-i.left;hv=ht.clientY-i.top}catch(ht){return null}var hw=gL(hy,hx,hv),hz;if(hr&&hw.xRel==1&&(hz=f4(hy.doc,hw.line).text).length==hw.ch){var hs=cd(hz,hz.length,hy.options.tabSize)-hz.length;hw=ac(hw.line,Math.max(0,Math.round((hx-fU(hy.display).left)/ea(hy.display))-hs))}return hw}function d0(hq,ht){if(ht>=hq.display.viewTo){return null}ht-=hq.display.viewFrom;if(ht<0){return null}var hr=hq.display.view;for(var hs=0;hs<hr.length;hs++){ht-=hr[hs].size;if(ht<0){return hs}}}function bW(i){i.display.input.showSelection(i.display.input.prepareSelection())}function gB(hx,hq){if(hq===void 0){hq=true}var hw=hx.doc,hy={};var hv=hy.cursors=document.createDocumentFragment();var hr=hy.selection=document.createDocumentFragment();for(var ht=0;ht<hw.sel.ranges.length;ht++){if(!hq&&ht==hw.sel.primIndex){continue}var hu=hw.sel.ranges[ht];if(hu.from().line>=hx.display.viewTo||hu.to().line<hx.display.viewFrom){continue}var hs=hu.empty();if(hs||hx.options.showCursorWhenSelecting){C(hx,hu.head,hv)}if(!hs){bX(hx,hu,hr)}}return hy}function C(i,hs,hr){var hu=eu(i,hs,"div",null,null,!i.options.singleCursorHeightPerLine);var ht=hr.appendChild(g5("div","\u00a0","CodeMirror-cursor"));ht.style.left=hu.left+"px";ht.style.top=hu.top+"px";ht.style.height=Math.max(0,hu.bottom-hu.top)*i.options.cursorHeight+"px";if(hu.other){var hq=hr.appendChild(g5("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));hq.style.display="";hq.style.left=hu.other.left+"px";hq.style.top=hu.other.top+"px";hq.style.height=(hu.other.bottom-hu.other.top)*0.85+"px"}}function gV(hq,i){return hq.top-i.top||hq.left-i.left}function bX(hu,hA,hv){var hD=hu.display,hH=hu.doc;var i=document.createDocumentFragment();var hz=fU(hu.display),hs=hz.left;var hE=Math.max(hD.sizerWidth,dU(hu)-hD.sizer.offsetLeft)-hz.right;var ht=hH.direction=="ltr";function hB(hL,hK,hJ,hI){if(hK<0){hK=0}hK=Math.round(hK);hI=Math.round(hI);i.appendChild(g5("div",null,"CodeMirror-selected",("position: absolute; left: "+hL+"px;\n top: "+hK+"px; width: "+(hJ==null?hE-hL:hJ)+"px;\n height: "+(hI-hK)+"px")))}function hq(hR,hJ,hQ){var hN=f4(hH,hR);var hO=hN.text.length;var hI,hM;function hP(hT,hS){return de(hu,ac(hR,hT),"div",hN,hS)}function hK(hX,hS,hT){var hV=bB(hu,hN,null,hX);var hW=(hS=="ltr")==(hT=="after")?"left":"right";var hU=hT=="after"?hV.begin:hV.end-(/\s/.test(hN.text.charAt(hV.end-1))?2:1);return hP(hU,hW)[hW]}var hL=a(hN,hH.direction);eG(hL,hJ||0,hQ==null?hO:hQ,function(h3,hS,hY,h6){var h9=hY=="ltr";var h4=hP(h3,h9?"left":"right");var h2=hP(hS-1,h9?"right":"left");var h8=hJ==null&&h3==0,h5=hQ==null&&hS==hO;var hU=h6==0,hW=!hL||h6==hL.length-1;if(h2.top-h4.top<=3){var hV=(ht?h8:h5)&&hU;var hX=(ht?h5:h8)&&hW;var hT=hV?hs:(h9?h4:h2).left;var ia=hX?hE:(h9?h2:h4).right;hB(hT,h4.top,ia-hT,h4.bottom)}else{var h0,hZ,h7,h1;if(h9){h0=ht&&h8&&hU?hs:h4.left;hZ=ht?hE:hK(h3,hY,"before");h7=ht?hs:hK(hS,hY,"after");h1=ht&&h5&&hW?hE:h2.right}else{h0=!ht?hs:hK(h3,hY,"before");hZ=!ht&&h8&&hU?hE:h4.right;h7=!ht&&h5&&hW?hs:h2.left;h1=!ht?hE:hK(hS,hY,"after")}hB(h0,h4.top,hZ-h0,h4.bottom);if(h4.bottom<h2.top){hB(hs,h4.bottom,null,h2.top)}hB(h7,h2.top,h1-h7,h2.bottom)}if(!hI||gV(h4,hI)<0){hI=h4}if(gV(h2,hI)<0){hI=h2}if(!hM||gV(h4,hM)<0){hM=h4}if(gV(h2,hM)<0){hM=h2}});return{start:hI,end:hM}}var hG=hA.from(),hF=hA.to();if(hG.line==hF.line){hq(hG.line,hG.ch,hF.ch)}else{var hr=f4(hH,hG.line),hx=f4(hH,hF.line);var hw=z(hr)==z(hx);var hy=hq(hG.line,hG.ch,hw?hr.text.length+1:null).end;var hC=hq(hF.line,hw?0:null,hF.ch).start;if(hw){if(hy.top<hC.top-2){hB(hy.right,hy.top,null,hy.bottom);hB(hs,hC.top,hC.left,hC.bottom)}else{hB(hy.right,hy.top,hC.left-hy.right,hy.bottom)}}if(hy.bottom<hC.top){hB(hs,hy.bottom,null,hC.top)}}hv.appendChild(i)}function q(i){if(!i.state.focused){return}var hr=i.display;clearInterval(hr.blinker);var hq=true;hr.cursorDiv.style.visibility="";if(i.options.cursorBlinkRate>0){hr.blinker=setInterval(function(){return hr.cursorDiv.style.visibility=(hq=!hq)?"":"hidden"},i.options.cursorBlinkRate)}else{if(i.options.cursorBlinkRate<0){hr.cursorDiv.style.visibility="hidden"}}}function t(i){if(!i.state.focused){i.display.input.focus();c4(i)}}function at(i){i.state.delayingBlurEvent=true;setTimeout(function(){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false;a8(i)}},100)}function c4(i,hq){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false}if(i.options.readOnly=="nocursor"){return}if(!i.state.focused){aO(i,"focus",i,hq);i.state.focused=true;gs(i.display.wrapper,"CodeMirror-focused");if(!i.curOp&&i.display.selForContextMenu!=i.doc.sel){i.display.input.reset();if(dv){setTimeout(function(){return i.display.input.reset(true)},20)}}i.display.input.receivedFocus()}q(i)}function a8(i,hq){if(i.state.delayingBlurEvent){return}if(i.state.focused){aO(i,"blur",i,hq);i.state.focused=false;h(i.display.wrapper,"CodeMirror-focused")}clearInterval(i.display.blinker);setTimeout(function(){if(!i.state.focused){i.display.shift=false}},150)}function bm(hx){var hv=hx.display;var hr=hv.lineDiv.offsetTop;for(var hs=0;hs<hv.view.length;hs++){var hy=hv.view[hs],hz=(void 0);if(hy.hidden){continue}if(ei&&m<8){var hu=hy.node.offsetTop+hy.node.offsetHeight;hz=hu-hr;hr=hu}else{var ht=hy.node.getBoundingClientRect();hz=ht.bottom-ht.top}var hw=hy.line.height-hz;if(hz<2){hz=bb(hv)}if(hw>0.005||hw<-0.005){hb(hy.line,hz);cy(hy.line);if(hy.rest){for(var hq=0;hq<hy.rest.length;hq++){cy(hy.rest[hq])}}}}}function cy(hr){if(hr.widgets){for(var hs=0;hs<hr.widgets.length;++hs){var hq=hr.widgets[hs],ht=hq.node.parentNode;if(ht){hq.height=ht.offsetHeight}}}}function ct(hs,hw,hr){var ht=hr&&hr.top!=null?Math.max(0,hr.top):hs.scroller.scrollTop;ht=Math.floor(ht-fY(hs));var i=hr&&hr.bottom!=null?hr.bottom:ht+hs.wrapper.clientHeight;var hu=b1(hw,ht),hv=b1(hw,i);if(hr&&hr.ensure){var hq=hr.ensure.from.line,hx=hr.ensure.to.line;if(hq<hu){hu=hq;hv=b1(hw,b7(f4(hw,hq))+hs.wrapper.clientHeight)}else{if(Math.min(hx,hw.lastLine())>=hv){hu=b1(hw,b7(f4(hw,hx))-hs.wrapper.clientHeight);hv=hx}}}return{from:hu,to:Math.max(hv,hu+1)}}function fo(hy){var hw=hy.display,hx=hw.view;if(!hw.alignWidgets&&(!hw.gutters.firstChild||!hy.options.fixedGutter)){return}var hu=ey(hw)-hw.scroller.scrollLeft+hy.doc.scrollLeft;var hq=hw.gutters.offsetWidth,hr=hu+"px";for(var ht=0;ht<hx.length;ht++){if(!hx[ht].hidden){if(hy.options.fixedGutter){if(hx[ht].gutter){hx[ht].gutter.style.left=hr}if(hx[ht].gutterBackground){hx[ht].gutterBackground.style.left=hr}}var hv=hx[ht].alignable;if(hv){for(var hs=0;hs<hv.length;hs++){hv[hs].style.left=hr}}}}if(hy.options.fixedGutter){hw.gutters.style.left=(hu+hq)+"px"}}function eH(i){if(!i.options.lineNumbers){return false}var hu=i.doc,hq=e8(i.options,hu.first+hu.size-1),ht=i.display;if(hq.length!=ht.lineNumChars){var hv=ht.measure.appendChild(g5("div",[g5("div",hq)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var hr=hv.firstChild.offsetWidth,hs=hv.offsetWidth-hr;ht.lineGutter.style.width="";ht.lineNumInnerWidth=Math.max(hr,ht.lineGutter.offsetWidth-hs)+1;ht.lineNumWidth=ht.lineNumInnerWidth+hs;ht.lineNumChars=ht.lineNumInnerWidth?hq.length:-1;ht.lineGutter.style.width=ht.lineNumWidth+"px";dz(i);return true}return false}function eI(hq,hs){if(a4(hq,"scrollCursorIntoView")){return}var hu=hq.display,hr=hu.sizer.getBoundingClientRect(),i=null;if(hs.top+hr.top<0){i=true}else{if(hs.bottom+hr.top>(window.innerHeight||document.documentElement.clientHeight)){i=false}}if(i!=null&&!gi){var ht=g5("div","\u200b",null,("position: absolute;\n top: "+(hs.top-hu.viewOffset-fY(hq.display))+"px;\n height: "+(hs.bottom-hs.top+dn(hq)+hu.barHeight)+"px;\n left: "+(hs.left)+"px; width: "+(Math.max(2,hs.right-hs.left))+"px;"));hq.display.lineSpace.appendChild(ht);ht.scrollIntoView(i);hq.display.lineSpace.removeChild(ht)}}function G(hA,hx,ht,hs){if(hs==null){hs=0}var hy;if(!hA.options.lineWrapping&&hx==ht){hx=hx.ch?ac(hx.line,hx.sticky=="before"?hx.ch-1:hx.ch,"after"):hx;ht=hx.sticky=="before"?ac(hx.line,hx.ch+1,"before"):hx}for(var hu=0;hu<5;hu++){var hv=false;var hz=eu(hA,hx);var i=!ht||ht==hx?hz:eu(hA,ht);hy={left:Math.min(hz.left,i.left),top:Math.min(hz.top,i.top)-hs,right:Math.max(hz.left,i.left),bottom:Math.max(hz.bottom,i.bottom)+hs};var hr=L(hA,hy);var hw=hA.doc.scrollTop,hq=hA.doc.scrollLeft;if(hr.scrollTop!=null){B(hA,hr.scrollTop);if(Math.abs(hA.doc.scrollTop-hw)>1){hv=true}}if(hr.scrollLeft!=null){bY(hA,hr.scrollLeft);if(Math.abs(hA.doc.scrollLeft-hq)>1){hv=true}}if(!hv){break}}return hy}function H(i,hq){var hr=L(i,hq);if(hr.scrollTop!=null){B(i,hr.scrollTop)}if(hr.scrollLeft!=null){bY(i,hr.scrollLeft)}}function L(hy,hx){var hv=hy.display,ht=bb(hy.display);if(hx.top<0){hx.top=0}var hr=hy.curOp&&hy.curOp.scrollTop!=null?hy.curOp.scrollTop:hv.scroller.scrollTop;var hA=dq(hy),hC={};if(hx.bottom-hx.top>hA){hx.bottom=hx.top+hA}var hq=hy.doc.height+b2(hv);var i=hx.top<ht,hu=hx.bottom>hq-ht;if(hx.top<hr){hC.scrollTop=i?0:hx.top}else{if(hx.bottom>hr+hA){var hw=Math.min(hx.top,(hu?hq:hx.bottom)-hA);if(hw!=hr){hC.scrollTop=hw}}}var hB=hy.curOp&&hy.curOp.scrollLeft!=null?hy.curOp.scrollLeft:hv.scroller.scrollLeft;var hz=dU(hy)-(hy.options.fixedGutter?hv.gutters.offsetWidth:0);var hs=hx.right-hx.left>hz;if(hs){hx.right=hx.left+hz}if(hx.left<10){hC.scrollLeft=0}else{if(hx.left<hB){hC.scrollLeft=Math.max(0,hx.left-(hs?0:10))}else{if(hx.right>hz+hB-3){hC.scrollLeft=hx.right+(hs?0:10)-hz}}}return hC}function db(i,hq){if(hq==null){return}gu(i);i.curOp.scrollTop=(i.curOp.scrollTop==null?i.doc.scrollTop:i.curOp.scrollTop)+hq}function gx(i){gu(i);var hq=i.getCursor();i.curOp.scrollToPos={from:hq,to:hq,margin:i.options.cursorScrollMargin}}function fy(hq,i,hr){if(i!=null||hr!=null){gu(hq)}if(i!=null){hq.curOp.scrollLeft=i}if(hr!=null){hq.curOp.scrollTop=hr}}function cB(i,hq){gu(i);i.curOp.scrollToPos=hq}function gu(i){var hq=i.curOp.scrollToPos;if(hq){i.curOp.scrollToPos=null;var hs=ee(i,hq.from),hr=ee(i,hq.to);cb(i,hs,hr,hq.margin)}}function cb(i,ht,hs,hr){var hq=L(i,{left:Math.min(ht.left,hs.left),top:Math.min(ht.top,hs.top)-hr,right:Math.max(ht.right,hs.right),bottom:Math.max(ht.bottom,hs.bottom)+hr});fy(i,hq.scrollLeft,hq.scrollTop)}function B(i,hq){if(Math.abs(i.doc.scrollTop-hq)<2){return}if(!cR){et(i,{top:hq})}T(i,hq,true);if(cR){et(i)}eR(i,100)}function T(i,hr,hq){hr=Math.min(i.display.scroller.scrollHeight-i.display.scroller.clientHeight,hr);if(i.display.scroller.scrollTop==hr&&!hq){return}i.doc.scrollTop=hr;i.display.scrollbars.setScrollTop(hr);if(i.display.scroller.scrollTop!=hr){i.display.scroller.scrollTop=hr}}function bY(i,hs,hr,hq){hs=Math.min(hs,i.display.scroller.scrollWidth-i.display.scroller.clientWidth);if((hr?hs==i.doc.scrollLeft:Math.abs(i.doc.scrollLeft-hs)<2)&&!hq){return}i.doc.scrollLeft=hs;fo(i);if(i.display.scroller.scrollLeft!=hs){i.display.scroller.scrollLeft=hs}i.display.scrollbars.setScrollLeft(hs)}function d8(i){var hs=i.display,hr=hs.gutters.offsetWidth;var hq=Math.round(i.doc.height+b2(i.display));return{clientHeight:hs.scroller.clientHeight,viewHeight:hs.wrapper.clientHeight,scrollWidth:hs.scroller.scrollWidth,clientWidth:hs.scroller.clientWidth,viewWidth:hs.wrapper.clientWidth,barLeft:i.options.fixedGutter?hr:0,docHeight:hq,scrollHeight:hq+dn(i)+hs.barHeight,nativeBarWidth:hs.nativeBarWidth,gutterWidth:hr}}var dT=function(hr,hq,i){this.cm=i;var hs=this.vert=g5("div",[g5("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");var ht=this.horiz=g5("div",[g5("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");hs.tabIndex=ht.tabIndex=-1;hr(hs);hr(ht);cj(hs,"scroll",function(){if(hs.clientHeight){hq(hs.scrollTop,"vertical")}});cj(ht,"scroll",function(){if(ht.clientWidth){hq(ht.scrollLeft,"horizontal")}});this.checkedZeroWidth=false;if(ei&&m<8){this.horiz.style.minHeight=this.vert.style.minWidth="18px"}};dT.prototype.update=function(hs){var ht=hs.scrollWidth>hs.clientWidth+1;var hr=hs.scrollHeight>hs.clientHeight+1;var hu=hs.nativeBarWidth;if(hr){this.vert.style.display="block";this.vert.style.bottom=ht?hu+"px":"0";var hq=hs.viewHeight-(ht?hu:0);this.vert.firstChild.style.height=Math.max(0,hs.scrollHeight-hs.clientHeight+hq)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(ht){this.horiz.style.display="block";this.horiz.style.right=hr?hu+"px":"0";this.horiz.style.left=hs.barLeft+"px";var i=hs.viewWidth-hs.barLeft-(hr?hu:0);this.horiz.firstChild.style.width=Math.max(0,hs.scrollWidth-hs.clientWidth+i)+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedZeroWidth&&hs.clientHeight>0){if(hu==0){this.zeroWidthHack()}this.checkedZeroWidth=true}return{right:hr?hu:0,bottom:ht?hu:0}};dT.prototype.setScrollLeft=function(i){if(this.horiz.scrollLeft!=i){this.horiz.scrollLeft=i}if(this.disableHoriz){this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")}};dT.prototype.setScrollTop=function(i){if(this.vert.scrollTop!=i){this.vert.scrollTop=i}if(this.disableVert){this.enableZeroWidthBar(this.vert,this.disableVert,"vert")}};dT.prototype.zeroWidthHack=function(){var i=cu&&!dD?"12px":"18px";this.horiz.style.height=this.vert.style.width=i;this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new hp;this.disableVert=new hp};dT.prototype.enableZeroWidthBar=function(hr,i,hq){hr.style.pointerEvents="auto";function hs(){var hu=hr.getBoundingClientRect();var ht=hq=="vert"?document.elementFromPoint(hu.right-1,(hu.top+hu.bottom)/2):document.elementFromPoint((hu.right+hu.left)/2,hu.bottom-1);if(ht!=hr){hr.style.pointerEvents="none"}else{i.set(1000,hs)}}i.set(1000,hs)};dT.prototype.clear=function(){var i=this.horiz.parentNode;i.removeChild(this.horiz);i.removeChild(this.vert)};var fT=function(){};fT.prototype.update=function(){return{bottom:0,right:0}};fT.prototype.setScrollLeft=function(){};fT.prototype.setScrollTop=function(){};fT.prototype.clear=function(){};function fN(hs,hu){if(!hu){hu=d8(hs)}var hr=hs.display.barWidth,hq=hs.display.barHeight;a7(hs,hu);for(var ht=0;ht<4&&hr!=hs.display.barWidth||hq!=hs.display.barHeight;ht++){if(hr!=hs.display.barWidth&&hs.options.lineWrapping){bm(hs)}a7(hs,d8(hs));hr=hs.display.barWidth;hq=hs.display.barHeight}}function a7(i,hq){var hs=i.display;var hr=hs.scrollbars.update(hq);hs.sizer.style.paddingRight=(hs.barWidth=hr.right)+"px";hs.sizer.style.paddingBottom=(hs.barHeight=hr.bottom)+"px";hs.heightForcer.style.borderBottom=hr.bottom+"px solid transparent";if(hr.right&&hr.bottom){hs.scrollbarFiller.style.display="block";hs.scrollbarFiller.style.height=hr.bottom+"px";hs.scrollbarFiller.style.width=hr.right+"px"}else{hs.scrollbarFiller.style.display=""}if(hr.bottom&&i.options.coverGutterNextToScrollbar&&i.options.fixedGutter){hs.gutterFiller.style.display="block";hs.gutterFiller.style.height=hr.bottom+"px";hs.gutterFiller.style.width=hq.gutterWidth+"px"}else{hs.gutterFiller.style.display=""}}var bA={"native":dT,"null":fT};function aN(i){if(i.display.scrollbars){i.display.scrollbars.clear();if(i.display.scrollbars.addClass){h(i.display.wrapper,i.display.scrollbars.addClass)}}i.display.scrollbars=new bA[i.options.scrollbarStyle](function(hq){i.display.wrapper.insertBefore(hq,i.display.scrollbarFiller);cj(hq,"mousedown",function(){if(i.state.focused){setTimeout(function(){return i.display.input.focus()},0)}});hq.setAttribute("cm-not-content","true")},function(hr,hq){if(hq=="horizontal"){bY(i,hr)}else{B(i,hr)}},i);if(i.display.scrollbars.addClass){gs(i.display.wrapper,i.display.scrollbars.addClass)}}var eM=0;function dd(i){i.curOp={cm:i,viewChanged:false,startHeight:i.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:false,id:++eM};fg(i.curOp)}function aw(i){var hq=i.curOp;ck(hq,function(hs){for(var hr=0;hr<hs.ops.length;hr++){hs.ops[hr].cm.curOp=null}dg(hs)})}function dg(hv){var hr=hv.ops;for(var hq=0;hq<hr.length;hq++){cs(hr[hq])}for(var hw=0;hw<hr.length;hw++){az(hr[hw])}for(var hu=0;hu<hr.length;hu++){co(hr[hu])}for(var ht=0;ht<hr.length;ht++){ay(hr[ht])}for(var hs=0;hs<hr.length;hs++){fP(hr[hs])}}function cs(hr){var i=hr.cm,hq=i.display;N(i);if(hr.updateMaxLine){f(i)}hr.mustUpdate=hr.viewChanged||hr.forceUpdate||hr.scrollTop!=null||hr.scrollToPos&&(hr.scrollToPos.from.line<hq.viewFrom||hr.scrollToPos.to.line>=hq.viewTo)||hq.maxLineChanged&&i.options.lineWrapping;hr.update=hr.mustUpdate&&new aU(i,hr.mustUpdate&&{top:hr.scrollTop,ensure:hr.scrollToPos},hr.forceUpdate)}function az(i){i.updatedDisplay=i.mustUpdate&&E(i.cm,i.update)}function co(hr){var i=hr.cm,hq=i.display;if(hr.updatedDisplay){bm(i)}hr.barMeasure=d8(i);if(hq.maxLineChanged&&!i.options.lineWrapping){hr.adjustWidthTo=eU(i,hq.maxLine,hq.maxLine.text.length).left+3;i.display.sizerWidth=hr.adjustWidthTo;hr.barMeasure.scrollWidth=Math.max(hq.scroller.clientWidth,hq.sizer.offsetLeft+hr.adjustWidthTo+dn(i)+i.display.barWidth);hr.maxScrollLeft=Math.max(0,hq.sizer.offsetLeft+hr.adjustWidthTo-dU(i))}if(hr.updatedDisplay||hr.selectionChanged){hr.preparedSelection=hq.input.prepareSelection()}}function ay(hr){var i=hr.cm;if(hr.adjustWidthTo!=null){i.display.sizer.style.minWidth=hr.adjustWidthTo+"px";if(hr.maxScrollLeft<i.doc.scrollLeft){bY(i,Math.min(i.display.scroller.scrollLeft,hr.maxScrollLeft),true)}i.display.maxLineChanged=false}var hq=hr.focus&&hr.focus==em();if(hr.preparedSelection){i.display.input.showSelection(hr.preparedSelection,hq)}if(hr.updatedDisplay||hr.startHeight!=i.doc.height){fN(i,hr.barMeasure)}if(hr.updatedDisplay){d7(i,hr.barMeasure)}if(hr.selectionChanged){q(i)}if(i.state.focused&&hr.updateInput){i.display.input.reset(hr.typing)}if(hq){t(hr.cm)}}function fP(ht){var hy=ht.cm,hv=hy.display,hx=hy.doc;if(ht.updatedDisplay){cK(hy,ht.update)}if(hv.wheelStartX!=null&&(ht.scrollTop!=null||ht.scrollLeft!=null||ht.scrollToPos)){hv.wheelStartX=hv.wheelStartY=null}if(ht.scrollTop!=null){T(hy,ht.scrollTop,ht.forceScroll)}if(ht.scrollLeft!=null){bY(hy,ht.scrollLeft,true,true)}if(ht.scrollToPos){var hw=G(hy,gD(hx,ht.scrollToPos.from),gD(hx,ht.scrollToPos.to),ht.scrollToPos.margin);eI(hy,hw)}var hu=ht.maybeHiddenMarkers,hq=ht.maybeUnhiddenMarkers;if(hu){for(var hs=0;hs<hu.length;++hs){if(!hu[hs].lines.length){aO(hu[hs],"hide")}}}if(hq){for(var hr=0;hr<hq.length;++hr){if(hq[hr].lines.length){aO(hq[hr],"unhide")}}}if(hv.wrapper.offsetHeight){hx.scrollTop=hy.display.scroller.scrollTop}if(ht.changeObjs){aO(hy,"changes",hy,ht.changeObjs)}if(ht.update){ht.update.finish()}}function dh(i,hq){if(i.curOp){return hq()}dd(i);try{return hq()}finally{aw(i)}}function dw(i,hq){return function(){if(i.curOp){return hq.apply(i,arguments)}dd(i);try{return hq.apply(i,arguments)}finally{aw(i)}}}function dG(i){return function(){if(this.curOp){return i.apply(this,arguments)}dd(this);try{return i.apply(this,arguments)}finally{aw(this)}}}function c7(i){return function(){var hq=this.cm;if(!hq||hq.curOp){return i.apply(this,arguments)}dd(hq);try{return i.apply(this,arguments)}finally{aw(hq)}}}function ap(hx,hv,hw,hy){if(hv==null){hv=hx.doc.first}if(hw==null){hw=hx.doc.first+hx.doc.size}if(!hy){hy=0}var hs=hx.display;if(hy&&hw<hs.viewTo&&(hs.updateLineNumbers==null||hs.updateLineNumbers>hv)){hs.updateLineNumbers=hv}hx.curOp.viewChanged=true;if(hv>=hs.viewTo){if(bk&&a9(hx.doc,hv)<hs.viewTo){fe(hx)}}else{if(hw<=hs.viewFrom){if(bk&&eF(hx.doc,hw+hy)>hs.viewFrom){fe(hx)}else{hs.viewFrom+=hy;hs.viewTo+=hy}}else{if(hv<=hs.viewFrom&&hw>=hs.viewTo){fe(hx)}else{if(hv<=hs.viewFrom){var hu=dN(hx,hw,hw+hy,1);if(hu){hs.view=hs.view.slice(hu.index);hs.viewFrom=hu.lineN;hs.viewTo+=hy}else{fe(hx)}}else{if(hw>=hs.viewTo){var hq=dN(hx,hv,hv,-1);if(hq){hs.view=hs.view.slice(0,hq.index);hs.viewTo=hq.lineN}else{fe(hx)}}else{var ht=dN(hx,hv,hv,-1);var hr=dN(hx,hw,hw+hy,1);if(ht&&hr){hs.view=hs.view.slice(0,ht.index).concat(fJ(hx,ht.lineN,hr.lineN)).concat(hs.view.slice(hr.index));hs.viewTo+=hy}else{fe(hx)}}}}}}var i=hs.externalMeasured;if(i){if(hw<i.lineN){i.lineN+=hy}else{if(hv<i.lineN+i.size){hs.externalMeasured=null}}}}function W(hq,hr,hu){hq.curOp.viewChanged=true;var hv=hq.display,ht=hq.display.externalMeasured;if(ht&&hr>=ht.lineN&&hr<ht.lineN+ht.size){hv.externalMeasured=null}if(hr<hv.viewFrom||hr>=hv.viewTo){return}var hs=hv.view[d0(hq,hr)];if(hs.node==null){return}var i=hs.changes||(hs.changes=[]);if(dR(i,hu)==-1){i.push(hu)}}function fe(i){i.display.viewFrom=i.display.viewTo=i.doc.first;i.display.view=[];i.display.viewOffset=0}function dN(hy,hs,hu,hr){var hv=d0(hy,hs),hx,hw=hy.display.view;if(!bk||hu==hy.doc.first+hy.doc.size){return{index:hv,lineN:hu}}var hq=hy.display.viewFrom;for(var ht=0;ht<hv;ht++){hq+=hw[ht].size}if(hq!=hs){if(hr>0){if(hv==hw.length-1){return null}hx=(hq+hw[hv].size)-hs;hv++}else{hx=hq-hs}hs+=hx;hu+=hx}while(a9(hy.doc,hu)!=hu){if(hv==(hr<0?0:hw.length-1)){return null}hu+=hr*hw[hv-(hr<0?1:0)].size;hv+=hr}return{index:hv,lineN:hu}}function dm(i,ht,hs){var hr=i.display,hq=hr.view;if(hq.length==0||ht>=hr.viewTo||hs<=hr.viewFrom){hr.view=fJ(i,ht,hs);hr.viewFrom=ht}else{if(hr.viewFrom>ht){hr.view=fJ(i,ht,hr.viewFrom).concat(hr.view)}else{if(hr.viewFrom<ht){hr.view=hr.view.slice(d0(i,ht))}}hr.viewFrom=ht;if(hr.viewTo<hs){hr.view=hr.view.concat(fJ(i,hr.viewTo,hs))}else{if(hr.viewTo>hs){hr.view=hr.view.slice(0,d0(i,hs))}}}hr.viewTo=hs}function dK(hq){var hr=hq.display.view,hu=0;for(var ht=0;ht<hr.length;ht++){var hs=hr[ht];if(!hs.hidden&&(!hs.node||hs.changes)){++hu}}return hu}function eR(i,hq){if(i.doc.highlightFrontier<i.display.viewTo){i.state.highlight.set(hq,cY(dl,i))}}function dl(i){var ht=i.doc;if(ht.highlightFrontier>=i.display.viewTo){return}var hr=+new Date+i.options.workTime;var hs=fL(i,ht.highlightFrontier);var hq=[];ht.iter(hs.line,Math.min(ht.first+ht.size,i.display.viewTo+500),function(hv){if(hs.line>=i.display.viewFrom){var hy=hv.styles;var hu=hv.text.length>i.options.maxHighlightLength?cq(ht.mode,hs.state):null;var hA=gp(i,hv,hs,true);if(hu){hs.state=hu}hv.styles=hA.styles;var hx=hv.styleClasses,hz=hA.classes;if(hz){hv.styleClasses=hz}else{if(hx){hv.styleClasses=null}}var hB=!hy||hy.length!=hv.styles.length||hx!=hz&&(!hx||!hz||hx.bgClass!=hz.bgClass||hx.textClass!=hz.textClass);for(var hw=0;!hB&&hw<hy.length;++hw){hB=hy[hw]!=hv.styles[hw]}if(hB){hq.push(hs.line)}hv.stateAfter=hs.save();hs.nextLine()}else{if(hv.text.length<=i.options.maxHighlightLength){d6(i,hv.text,hs)}hv.stateAfter=hs.line%5==0?hs.save():null;hs.nextLine()}if(+new Date>hr){eR(i,i.options.workDelay);return true}});ht.highlightFrontier=hs.line;ht.modeFrontier=Math.max(ht.modeFrontier,hs.line);if(hq.length){dh(i,function(){for(var hu=0;hu<hq.length;hu++){W(i,hq[hu],"text")}})}}var aU=function(hq,i,hr){var hs=hq.display;this.viewport=i;this.visible=ct(hs,hq.doc,i);this.editorIsHidden=!hs.wrapper.offsetWidth;this.wrapperHeight=hs.wrapper.clientHeight;this.wrapperWidth=hs.wrapper.clientWidth;this.oldDisplayWidth=dU(hq);this.force=hr;this.dims=f2(hq);this.events=[]};aU.prototype.signal=function(hq,i){if(f9(hq,i)){this.events.push(arguments)}};aU.prototype.finish=function(){var hr=this;for(var hq=0;hq<this.events.length;hq++){aO.apply(null,hr.events[hq])}};function N(i){var hq=i.display;if(!hq.scrollbarsClipped&&hq.scroller.offsetWidth){hq.nativeBarWidth=hq.scroller.offsetWidth-hq.scroller.clientWidth;hq.heightForcer.style.height=dn(i)+"px";hq.sizer.style.marginBottom=-hq.nativeBarWidth+"px";hq.sizer.style.borderRightWidth=dn(i)+"px";hq.scrollbarsClipped=true}}function bC(hq){if(hq.hasFocus()){return null}var hs=em();if(!hs||!hg(hq.display.lineDiv,hs)){return null}var i={activeElt:hs};if(window.getSelection){var hr=window.getSelection();if(hr.anchorNode&&hr.extend&&hg(hq.display.lineDiv,hr.anchorNode)){i.anchorNode=hr.anchorNode;i.anchorOffset=hr.anchorOffset;i.focusNode=hr.focusNode;i.focusOffset=hr.focusOffset}}return i}function j(hq){if(!hq||!hq.activeElt||hq.activeElt==em()){return}hq.activeElt.focus();if(hq.anchorNode&&hg(document.body,hq.anchorNode)&&hg(document.body,hq.focusNode)){var hr=window.getSelection(),i=document.createRange();i.setEnd(hq.anchorNode,hq.anchorOffset);i.collapse(false);hr.removeAllRanges();hr.addRange(i);hr.extend(hq.focusNode,hq.focusOffset)}}function E(hy,hs){var ht=hy.display,hx=hy.doc;if(hs.editorIsHidden){fe(hy);return false}if(!hs.force&&hs.visible.from>=ht.viewFrom&&hs.visible.to<=ht.viewTo&&(ht.updateLineNumbers==null||ht.updateLineNumbers>=ht.viewTo)&&ht.renderedView==ht.view&&dK(hy)==0){return false}if(eH(hy)){fe(hy);hs.dims=f2(hy)}var hr=hx.first+hx.size;var hv=Math.max(hs.visible.from-hy.options.viewportMargin,hx.first);var hw=Math.min(hr,hs.visible.to+hy.options.viewportMargin);if(ht.viewFrom<hv&&hv-ht.viewFrom<20){hv=Math.max(hx.first,ht.viewFrom)}if(ht.viewTo>hw&&ht.viewTo-hw<20){hw=Math.min(hr,ht.viewTo)}if(bk){hv=a9(hy.doc,hv);hw=eF(hy.doc,hw)}var hq=hv!=ht.viewFrom||hw!=ht.viewTo||ht.lastWrapHeight!=hs.wrapperHeight||ht.lastWrapWidth!=hs.wrapperWidth;dm(hy,hv,hw);ht.viewOffset=b7(f4(hy.doc,ht.viewFrom));hy.display.mover.style.top=ht.viewOffset+"px";var i=dK(hy);if(!hq&&i==0&&!hs.force&&ht.renderedView==ht.view&&(ht.updateLineNumbers==null||ht.updateLineNumbers>=ht.viewTo)){return false}var hu=bC(hy);if(i>4){ht.lineDiv.style.display="none"}cN(hy,ht.updateLineNumbers,hs.dims);if(i>4){ht.lineDiv.style.display=""}ht.renderedView=ht.view;j(hu);eD(ht.cursorDiv);eD(ht.selectionDiv);ht.gutters.style.height=ht.sizer.style.minHeight=0;if(hq){ht.lastWrapHeight=hs.wrapperHeight;ht.lastWrapWidth=hs.wrapperWidth;eR(hy,400)}ht.updateLineNumbers=null;return true}function cK(hq,ht){var i=ht.viewport;for(var hs=true;;hs=false){if(!hs||!hq.options.lineWrapping||ht.oldDisplayWidth==dU(hq)){if(i&&i.top!=null){i={top:Math.min(hq.doc.height+b2(hq.display)-dq(hq),i.top)}}ht.visible=ct(hq.display,hq.doc,i);if(ht.visible.from>=hq.display.viewFrom&&ht.visible.to<=hq.display.viewTo){break}}if(!E(hq,ht)){break}bm(hq);var hr=d8(hq);bW(hq);fN(hq,hr);d7(hq,hr);ht.force=false}ht.signal(hq,"update",hq);if(hq.display.viewFrom!=hq.display.reportedViewFrom||hq.display.viewTo!=hq.display.reportedViewTo){ht.signal(hq,"viewportChange",hq,hq.display.viewFrom,hq.display.viewTo);hq.display.reportedViewFrom=hq.display.viewFrom;hq.display.reportedViewTo=hq.display.viewTo}}function et(hq,i){var hs=new aU(hq,i);if(E(hq,hs)){bm(hq);cK(hq,hs);var hr=d8(hq);bW(hq);fN(hq,hr);d7(hq,hr);hs.finish()}}function cN(hB,hs,hA){var hx=hB.display,hD=hB.options.lineNumbers;var hq=hx.lineDiv,hC=hq.firstChild;function hw(hE){var i=hE.nextSibling;if(dv&&cu&&hB.display.currentWheelTarget==hE){hE.style.display="none"}else{hE.parentNode.removeChild(hE)}return i}var hy=hx.view,hv=hx.viewFrom;for(var ht=0;ht<hy.length;ht++){var hu=hy[ht];if(hu.hidden){}else{if(!hu.node||hu.node.parentNode!=hq){var hr=aP(hB,hu,hv,hA);hq.insertBefore(hr,hC)}else{while(hC!=hu.node){hC=hw(hC)}var hz=hD&&hs!=null&&hs<=hv&&hu.lineNumber;if(hu.changes){if(dR(hu.changes,"gutter")>-1){hz=false}aj(hB,hu,hv,hA)}if(hz){eD(hu.lineNumber);hu.lineNumber.appendChild(document.createTextNode(e8(hB.options,hv)))}hC=hu.node.nextSibling}}hv+=hu.size}while(hC){hC=hw(hC)}}function dz(i){var hq=i.display.gutters.offsetWidth;i.display.sizer.style.marginLeft=hq+"px"}function d7(i,hq){i.display.sizer.style.minHeight=hq.docHeight+"px";i.display.heightForcer.style.top=hq.docHeight+"px";i.display.gutters.style.height=(hq.docHeight+i.display.barHeight+dn(i))+"px"}function eP(hq){var hr=hq.display.gutters,hv=hq.options.gutters;eD(hr);var hs=0;for(;hs<hv.length;++hs){var ht=hv[hs];var hu=hr.appendChild(g5("div",null,"CodeMirror-gutter "+ht));if(ht=="CodeMirror-linenumbers"){hq.display.lineGutter=hu;hu.style.width=(hq.display.lineNumWidth||1)+"px"}}hr.style.display=hs?"":"none";dz(hq)}function cD(i){var hq=dR(i.gutters,"CodeMirror-linenumbers");if(hq==-1&&i.lineNumbers){i.gutters=i.gutters.concat(["CodeMirror-linenumbers"])}else{if(hq>-1&&!i.lineNumbers){i.gutters=i.gutters.slice(0);i.gutters.splice(hq,1)}}}var gb=0;var cG=null;if(ei){cG=-0.53}else{if(cR){cG=15}else{if(dL){cG=-0.7}else{if(aM){cG=-1/3}}}}function dk(hr){var hq=hr.wheelDeltaX,i=hr.wheelDeltaY;if(hq==null&&hr.detail&&hr.axis==hr.HORIZONTAL_AXIS){hq=hr.detail}if(i==null&&hr.detail&&hr.axis==hr.VERTICAL_AXIS){i=hr.detail}else{if(i==null){i=hr.wheelDelta}}return{x:hq,y:i}}function aJ(i){var hq=dk(i);hq.x*=cG;hq.y*=cG;return hq}function c(hA,hu){var hC=dk(hu),hE=hC.x,hD=hC.y;var hw=hA.display,hz=hw.scroller;var ht=hz.scrollWidth>hz.clientWidth;var hs=hz.scrollHeight>hz.clientHeight;if(!(hE&&ht||hD&&hs)){return}if(hD&&cu&&dv){outer:for(var hB=hu.target,hy=hw.view;hB!=hz;hB=hB.parentNode){for(var hr=0;hr<hy.length;hr++){if(hy[hr].node==hB){hA.display.currentWheelTarget=hB;break outer}}}}if(hE&&!cR&&!eE&&cG!=null){if(hD&&hs){B(hA,Math.max(0,hz.scrollTop+hD*cG))}bY(hA,Math.max(0,hz.scrollLeft+hE*cG));if(!hD||(hD&&hs)){c9(hu)}hw.wheelStartX=null;return}if(hD&&cG!=null){var hq=hD*cG;var hx=hA.doc.scrollTop,hv=hx+hw.wrapper.clientHeight;if(hq<0){hx=Math.max(0,hx+hq-50)}else{hv=Math.min(hA.doc.height,hv+hq+50)}et(hA,{top:hx,bottom:hv})}if(gb<20){if(hw.wheelStartX==null){hw.wheelStartX=hz.scrollLeft;hw.wheelStartY=hz.scrollTop;hw.wheelDX=hE;hw.wheelDY=hD;setTimeout(function(){if(hw.wheelStartX==null){return}var i=hz.scrollLeft-hw.wheelStartX;var hG=hz.scrollTop-hw.wheelStartY;var hF=(hG&&hw.wheelDY&&hG/hw.wheelDY)||(i&&hw.wheelDX&&i/hw.wheelDX);hw.wheelStartX=hw.wheelStartY=null;if(!hF){return}cG=(cG*gb+hF)/(gb+1);++gb},200)}else{hw.wheelDX+=hE;hw.wheelDY+=hD}}}var g4=function(i,hq){this.ranges=i;this.primIndex=hq};g4.prototype.primary=function(){return this.ranges[this.primIndex]};g4.prototype.equals=function(hq){var hu=this;if(hq==this){return true}if(hq.primIndex!=this.primIndex||hq.ranges.length!=this.ranges.length){return false}for(var hs=0;hs<this.ranges.length;hs++){var hr=hu.ranges[hs],ht=hq.ranges[hs];if(!ad(hr.anchor,ht.anchor)||!ad(hr.head,ht.head)){return false}}return true};g4.prototype.deepCopy=function(){var hs=this;var hq=[];for(var hr=0;hr<this.ranges.length;hr++){hq[hr]=new ex(cI(hs.ranges[hr].anchor),cI(hs.ranges[hr].head))}return new g4(hq,this.primIndex)};g4.prototype.somethingSelected=function(){var hr=this;for(var hq=0;hq<this.ranges.length;hq++){if(!hr.ranges[hq].empty()){return true}}return false};g4.prototype.contains=function(hu,hq){var ht=this;if(!hq){hq=hu}for(var hs=0;hs<this.ranges.length;hs++){var hr=ht.ranges[hs];if(cF(hq,hr.from())>=0&&cF(hu,hr.to())<=0){return hs}}return -1};var ex=function(i,hq){this.anchor=i;this.head=hq};ex.prototype.from=function(){return aB(this.anchor,this.head)};ex.prototype.to=function(){return bR(this.anchor,this.head)};ex.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function cZ(hq,hx){var hs=hq[hx];hq.sort(function(hz,i){return cF(hz.from(),i.from())});hx=dR(hq,hs);for(var hu=1;hu<hq.length;hu++){var hy=hq[hu],hr=hq[hu-1];if(cF(hr.to(),hy.from())>=0){var hv=aB(hr.from(),hy.from()),hw=bR(hr.to(),hy.to());var ht=hr.empty()?hy.from()==hy.head:hr.from()==hr.head;if(hu<=hx){--hx}hq.splice(--hu,2,new ex(ht?hw:hv,ht?hv:hw))}}return new g4(hq,hx)}function fE(i,hq){return new g4([new ex(i,hq||i)],0)}function ds(i){if(!i.text){return i.to}return ac(i.from.line+i.text.length-1,gy(i.text).length+(i.text.length==1?i.from.ch:0))}function cm(hs,hr){if(cF(hs,hr.from)<0){return hs}if(cF(hs,hr.to)<=0){return ds(hr)}var i=hs.line+hr.text.length-(hr.to.line-hr.from.line)-1,hq=hs.ch;if(hs.line==hr.to.line){hq+=ds(hr).ch-hr.to.ch}return ac(i,hq)}function f8(ht,hu){var hr=[];for(var hs=0;hs<ht.sel.ranges.length;hs++){var hq=ht.sel.ranges[hs];hr.push(new ex(cm(hq.anchor,hu),cm(hq.head,hu)))}return cZ(hr,ht.sel.primIndex)}function bN(hr,hq,i){if(hr.line==hq.line){return ac(i.line,hr.ch-hq.ch+i.ch)}else{return ac(i.line+(hr.line-hq.line),hr.ch)}}function an(hA,hx,hr){var hs=[];var hq=ac(hA.first,0),hB=hq;for(var hu=0;hu<hx.length;hu++){var hw=hx[hu];var hz=bN(hw.from,hq,hB);var hy=bN(ds(hw),hq,hB);hq=hw.to;hB=hy;if(hr=="around"){var hv=hA.sel.ranges[hu],ht=cF(hv.head,hv.anchor)<0;hs[hu]=new ex(ht?hy:hz,ht?hz:hy)}else{hs[hu]=new ex(hz,hz)}}return new g4(hs,hA.sel.primIndex)}function bK(i){i.doc.mode=gr(i.options,i.doc.modeOption);e0(i)}function e0(i){i.doc.iter(function(hq){if(hq.stateAfter){hq.stateAfter=null}if(hq.styles){hq.styles=null}});i.doc.modeFrontier=i.doc.highlightFrontier=i.doc.first;eR(i,100);i.state.modeGen++;if(i.curOp){ap(i)}}function er(i,hq){return hq.from.ch==0&&hq.to.ch==0&&gy(hq.text)==""&&(!i.cm||i.cm.options.wholeLineUpdateBefore)}function go(hG,hz,ht,hx){function hs(hH){return ht?ht[hH]:null}function hy(hH,hJ,hI){e2(hH,hJ,hI,hx);am(hH,"change",hH,hz)}function hD(hK,hI){var hH=[];for(var hJ=hK;hJ<hI;++hJ){hH.push(new ha(hB[hJ],hs(hJ),hx))}return hH}var hE=hz.from,hq=hz.to,hB=hz.text;var hA=f4(hG,hE.line),i=f4(hG,hq.line);var hr=gy(hB),hF=hs(hB.length-1),hC=hq.line-hE.line;if(hz.full){hG.insert(0,hD(0,hB.length));hG.remove(hB.length,hG.size-hB.length)}else{if(er(hG,hz)){var hw=hD(0,hB.length-1);hy(i,i.text,hF);if(hC){hG.remove(hE.line,hC)}if(hw.length){hG.insert(hE.line,hw)}}else{if(hA==i){if(hB.length==1){hy(hA,hA.text.slice(0,hE.ch)+hr+hA.text.slice(hq.ch),hF)}else{var hv=hD(1,hB.length-1);hv.push(new ha(hr+hA.text.slice(hq.ch),hF,hx));hy(hA,hA.text.slice(0,hE.ch)+hB[0],hs(0));hG.insert(hE.line+1,hv)}}else{if(hB.length==1){hy(hA,hA.text.slice(0,hE.ch)+hB[0]+i.text.slice(hq.ch),hs(0));hG.remove(hE.line+1,hC)}else{hy(hA,hA.text.slice(0,hE.ch)+hB[0],hs(0));hy(i,hr+i.text.slice(hq.ch),hF);var hu=hD(1,hB.length-1);if(hC>1){hG.remove(hE.line+1,hC-1)}hG.insert(hE.line+1,hu)}}}}am(hG,"change",hG,hz)}function eJ(hs,hr,hq){function i(hy,hw,hu){if(hy.linked){for(var hv=0;hv<hy.linked.length;++hv){var ht=hy.linked[hv];if(ht.doc==hw){continue}var hx=hu&&ht.sharedHist;if(hq&&!hx){continue}hr(ht.doc,hx);i(ht.doc,hy,hx)}}}i(hs,null,true)}function eO(i,hq){if(hq.cm){throw new Error("This document is already in use.")}i.doc=hq;hq.cm=i;af(i);bK(i);D(i);if(!i.options.lineWrapping){f(i)}i.options.mode=hq.modeOption;ap(i)}function D(i){(i.doc.direction=="rtl"?gs:h)(i.display.lineDiv,"CodeMirror-rtl")}function eA(i){dh(i,function(){D(i);ap(i)})}function gR(i){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=this.lastSelOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=i||1}function d4(i,hr){var hq={from:cI(hr.from),to:ds(hr),text:g8(i,hr.from,hr.to)};cl(i,hq,hr.from.line,hr.to.line+1);eJ(i,function(hs){return cl(hs,hq,hr.from.line,hr.to.line+1)},true);return hq}function gt(hq){while(hq.length){var i=gy(hq);if(i.ranges){hq.pop()}else{break}}}function fz(hq,i){if(i){gt(hq.done);return gy(hq.done)}else{if(hq.done.length&&!gy(hq.done).ranges){return gy(hq.done)}else{if(hq.done.length>1&&!hq.done[hq.done.length-2].ranges){hq.done.pop();return gy(hq.done)}}}}function gG(hv,ht,i,hs){var hr=hv.history;hr.undone.length=0;var hq=+new Date,hw;var hx;if((hr.lastOp==hs||hr.lastOrigin==ht.origin&&ht.origin&&((ht.origin.charAt(0)=="+"&&hr.lastModTime>hq-(hv.cm?hv.cm.options.historyEventDelay:500))||ht.origin.charAt(0)=="*"))&&(hw=fz(hr,hr.lastOp==hs))){hx=gy(hw.changes);if(cF(ht.from,ht.to)==0&&cF(ht.from,hx.to)==0){hx.to=ds(ht)}else{hw.changes.push(d4(hv,ht))}}else{var hu=gy(hr.done);if(!hu||!hu.ranges){dj(hv.sel,hr.done)}hw={changes:[d4(hv,ht)],generation:hr.generation};hr.done.push(hw);while(hr.done.length>hr.undoDepth){hr.done.shift();if(!hr.done[0].ranges){hr.done.shift()}}}hr.done.push(i);hr.generation=++hr.maxGeneration;hr.lastModTime=hr.lastSelTime=hq;hr.lastOp=hr.lastSelOp=hs;hr.lastOrigin=hr.lastSelOrigin=ht.origin;if(!hx){aO(hv,"historyAdded")}}function bU(ht,i,hr,hs){var hq=i.charAt(0);return hq=="*"||hq=="+"&&hr.ranges.length==hs.ranges.length&&hr.somethingSelected()==hs.somethingSelected()&&new Date-ht.history.lastSelTime<=(ht.cm?ht.cm.options.historyEventDelay:500)}function hi(hu,hs,i,hr){var ht=hu.history,hq=hr&&hr.origin;if(i==ht.lastSelOp||(hq&&ht.lastSelOrigin==hq&&(ht.lastModTime==ht.lastSelTime&&ht.lastOrigin==hq||bU(hu,hq,gy(ht.done),hs)))){ht.done[ht.done.length-1]=hs}else{dj(hs,ht.done)}ht.lastSelTime=+new Date;ht.lastSelOrigin=hq;ht.lastSelOp=i;if(hr&&hr.clearRedo!==false){gt(ht.undone)}}function dj(hq,i){var hr=gy(i);if(!(hr&&hr.ranges&&hr.equals(hq))){i.push(hq)}}function cl(hq,hu,ht,hs){var i=hu["spans_"+hq.id],hr=0;hq.iter(Math.max(hq.first,ht),Math.min(hq.first+hq.size,hs),function(hv){if(hv.markedSpans){(i||(i=hu["spans_"+hq.id]={}))[hr]=hv.markedSpans}++hr})}function by(hs){if(!hs){return null}var hq;for(var hr=0;hr<hs.length;++hr){if(hs[hr].marker.explicitlyCleared){if(!hq){hq=hs.slice(0,hr)}}else{if(hq){hq.push(hs[hr])}}}return !hq?hs:hq.length?hq:null}function cr(ht,hu){var hs=hu["spans_"+ht.id];if(!hs){return null}var hq=[];for(var hr=0;hr<hu.text.length;++hr){hq.push(by(hs[hr]))}return hq}function eL(hy,hw){var hq=cr(hy,hw);var hz=eY(hy,hw);if(!hq){return hz}if(!hz){return hq}for(var ht=0;ht<hq.length;++ht){var hu=hq[ht],hv=hz[ht];if(hu&&hv){spans:for(var hs=0;hs<hv.length;++hs){var hx=hv[hs];for(var hr=0;hr<hu.length;++hr){if(hu[hr].marker==hx.marker){continue spans}}hu.push(hx)}}else{if(hv){hq[ht]=hv}}}return hq}function ca(hB,ht,hA){var hr=[];for(var hw=0;hw<hB.length;++hw){var hs=hB[hw];if(hs.ranges){hr.push(hA?g4.prototype.deepCopy.call(hs):hs);continue}var hy=hs.changes,hz=[];hr.push({changes:hz});for(var hv=0;hv<hy.length;++hv){var hx=hy[hv],hu=(void 0);hz.push({from:hx.from,to:hx.to,text:hx.text});if(ht){for(var hq in hx){if(hu=hq.match(/^spans_(\d+)$/)){if(dR(ht,Number(hu[1]))>-1){gy(hz)[hq]=hx[hq];delete hx[hq]}}}}}}return hr}function gj(hq,ht,i,hu){if(hu){var hs=hq.anchor;if(i){var hr=cF(ht,hs)<0;if(hr!=(cF(i,hs)<0)){hs=ht;ht=i}else{if(hr!=(cF(ht,i)<0)){ht=i}}}return new ex(hs,ht)}else{return new ex(i||ht,ht)}}function gX(hs,hr,i,hq,ht){if(ht==null){ht=hs.cm&&(hs.cm.display.shift||hs.extend)}cg(hs,new g4([gj(hs.sel.primary(),hr,i,ht)],0),hq)}function aF(hv,hu,hs){var hr=[];var hw=hv.cm&&(hv.cm.display.shift||hv.extend);for(var ht=0;ht<hv.sel.ranges.length;ht++){hr[ht]=gj(hv.sel.ranges[ht],hu[ht],null,hw)}var hq=cZ(hr,hv.sel.primIndex);cg(hv,hq,hs)}function e(hu,ht,hr,hs){var hq=hu.sel.ranges.slice(0);hq[ht]=hr;cg(hu,cZ(hq,hu.sel.primIndex),hs)}function J(hs,hq,hr,i){cg(hs,fE(hq,hr),i)}function b(hs,hq,i){var hr={ranges:hq.ranges,update:function(ht){var hv=this;this.ranges=[];for(var hu=0;hu<ht.length;hu++){hv.ranges[hu]=new ex(gD(hs,ht[hu].anchor),gD(hs,ht[hu].head))}},origin:i&&i.origin};aO(hs,"beforeSelectionChange",hs,hr);if(hs.cm){aO(hs.cm,"beforeSelectionChange",hs.cm,hr)}if(hr.ranges!=hq.ranges){return cZ(hr.ranges,hr.ranges.length-1)}else{return hq}}function fX(ht,hs,hq){var i=ht.history.done,hr=gy(i);if(hr&&hr.ranges){i[i.length-1]=hs;e4(ht,hs,hq)}else{cg(ht,hs,hq)}}function cg(hr,hq,i){e4(hr,hq,i);hi(hr,hr.sel,hr.cm?hr.cm.curOp.id:NaN,i)}function e4(hs,hr,hq){if(f9(hs,"beforeSelectionChange")||hs.cm&&f9(hs.cm,"beforeSelectionChange")){hr=b(hs,hr,hq)}var i=hq&&hq.bias||(cF(hr.primary().head,hs.sel.primary().head)<0?-1:1);dF(hs,p(hs,hr,i,true));if(!(hq&&hq.scroll===false)&&hs.cm){gx(hs.cm)}}function dF(hq,i){if(i.equals(hq.sel)){return}hq.sel=i;if(hq.cm){hq.cm.curOp.updateInput=hq.cm.curOp.selectionChanged=true;ab(hq.cm)}am(hq,"cursorActivity",hq)}function ff(i){dF(i,p(i,i.sel,null,false))}function p(hz,hq,hw,hx){var ht;for(var hu=0;hu<hq.ranges.length;hu++){var hv=hq.ranges[hu];var hr=hq.ranges.length==hz.sel.ranges.length&&hz.sel.ranges[hu];var hy=ch(hz,hv.anchor,hr&&hr.anchor,hw,hx);var hs=ch(hz,hv.head,hr&&hr.head,hw,hx);if(ht||hy!=hv.anchor||hs!=hv.head){if(!ht){ht=hq.ranges.slice(0,hu)}ht[hu]=new ex(hy,hs)}}return ht?cZ(ht,hq.primIndex):hq}function fu(hA,hy,ht,hs,hw){var hB=f4(hA,hy.line);if(hB.markedSpans){for(var hu=0;hu<hB.markedSpans.length;++hu){var hq=hB.markedSpans[hu],hr=hq.marker;if((hq.from==null||(hr.inclusiveLeft?hq.from<=hy.ch:hq.from<hy.ch))&&(hq.to==null||(hr.inclusiveRight?hq.to>=hy.ch:hq.to>hy.ch))){if(hw){aO(hr,"beforeCursorEnter");if(hr.explicitlyCleared){if(!hB.markedSpans){break}else{--hu;continue}}}if(!hr.atomic){continue}if(ht){var hx=hr.find(hs<0?1:-1),hz=(void 0);if(hs<0?hr.inclusiveRight:hr.inclusiveLeft){hx=hm(hA,hx,-hs,hx&&hx.line==hy.line?hB:null)}if(hx&&hx.line==hy.line&&(hz=cF(hx,ht))&&(hs<0?hz<0:hz>0)){return fu(hA,hx,hy,hs,hw)}}var hv=hr.find(hs<0?-1:1);if(hs<0?hr.inclusiveLeft:hr.inclusiveRight){hv=hm(hA,hv,hs,hv.line==hy.line?hB:null)}return hv?fu(hA,hv,hy,hs,hw):null}}}return hy}function ch(hu,hv,hs,hq,i){var hr=hq||1;var ht=fu(hu,hv,hs,hr,i)||(!i&&fu(hu,hv,hs,hr,true))||fu(hu,hv,hs,-hr,i)||(!i&&fu(hu,hv,hs,-hr,true));if(!ht){hu.cantEdit=true;return ac(hu.first,0)}return ht}function hm(hr,hs,hq,i){if(hq<0&&hs.ch==0){if(hs.line>hr.first){return gD(hr,ac(hs.line-1))}else{return null}}else{if(hq>0&&hs.ch==(i||f4(hr,hs.line)).text.length){if(hs.line<hr.first+hr.size-1){return ac(hs.line+1,0)}else{return null}}else{return new ac(hs.line,hs.ch+hq)}}}function av(i){i.setSelection(ac(i.firstLine(),0),ac(i.lastLine()),ah)}function ep(hq,hs,hr){var i={canceled:false,from:hs.from,to:hs.to,text:hs.text,origin:hs.origin,cancel:function(){return i.canceled=true}};if(hr){i.update=function(hw,hv,hu,ht){if(hw){i.from=gD(hq,hw)}if(hv){i.to=gD(hq,hv)}if(hu){i.text=hu}if(ht!==undefined){i.origin=ht}}}aO(hq,"beforeChange",hq,i);if(hq.cm){aO(hq.cm,"beforeChange",hq.cm,i)}if(i.canceled){return null}return{from:i.from,to:i.to,text:i.text,origin:i.origin}}function bt(ht,hu,hs){if(ht.cm){if(!ht.cm.curOp){return dw(ht.cm,bt)(ht,hu,hs)}if(ht.cm.state.suppressEdits){return}}if(f9(ht,"beforeChange")||ht.cm&&f9(ht.cm,"beforeChange")){hu=ep(ht,hu,true);if(!hu){return}}var hr=hk&&!hs&&dc(ht,hu.from,hu.to);if(hr){for(var hq=hr.length-1;hq>=0;--hq){P(ht,{from:hr[hq].from,to:hr[hq].to,text:hq?[""]:hu.text,origin:hu.origin})}}else{P(ht,hu)}}function P(hr,hs){if(hs.text.length==1&&hs.text[0]==""&&cF(hs.from,hs.to)==0){return}var hq=f8(hr,hs);gG(hr,hs,hq,hr.cm?hr.cm.curOp.id:NaN);eQ(hr,hs,hq,eY(hr,hs));var i=[];eJ(hr,function(hu,ht){if(!ht&&dR(i,hu.history)==-1){eb(hu.history,hs);i.push(hu.history)}eQ(hu,hs,null,eY(hu,hs))})}function cv(hD,hA,hE){var hB=hD.cm&&hD.cm.state.suppressEdits;if(hB&&!hE){return}var hz=hD.history,hr,ht=hD.sel;var hq=hA=="undo"?hz.done:hz.undone,hC=hA=="undo"?hz.undone:hz.done;var hw=0;for(;hw<hq.length;hw++){hr=hq[hw];if(hE?hr.ranges&&!hr.equals(hD.sel):!hr.ranges){break}}if(hw==hq.length){return}hz.lastOrigin=hz.lastSelOrigin=null;for(;;){hr=hq.pop();if(hr.ranges){dj(hr,hC);if(hE&&!hr.equals(hD.sel)){cg(hD,hr,{clearRedo:false});return}ht=hr}else{if(hB){hq.push(hr);return}else{break}}}var hy=[];dj(ht,hC);hC.push({changes:hy,generation:hz.generation});hz.generation=hr.generation||++hz.maxGeneration;var hs=f9(hD,"beforeChange")||hD.cm&&f9(hD.cm,"beforeChange");var hx=function(hF){var hI=hr.changes[hF];hI.origin=hA;if(hs&&!ep(hD,hI,false)){hq.length=0;return{}}hy.push(d4(hD,hI));var hH=hF?f8(hD,hI):gy(hq);eQ(hD,hI,hH,eL(hD,hI));if(!hF&&hD.cm){hD.cm.scrollIntoView({from:hI.from,to:ds(hI)})}var hG=[];eJ(hD,function(hJ,i){if(!i&&dR(hG,hJ.history)==-1){eb(hJ.history,hI);hG.push(hJ.history)}eQ(hJ,hI,null,eL(hJ,hI))})};for(var hu=hr.changes.length-1;hu>=0;--hu){var hv=hx(hu);if(hv){return hv.v}}}function gc(hq,hs){if(hs==0){return}hq.first+=hs;hq.sel=new g4(cf(hq.sel.ranges,function(ht){return new ex(ac(ht.anchor.line+hs,ht.anchor.ch),ac(ht.head.line+hs,ht.head.ch))}),hq.sel.primIndex);if(hq.cm){ap(hq.cm,hq.first,hq.first-hs,hs);for(var hr=hq.cm.display,i=hr.viewFrom;i<hr.viewTo;i++){W(hq.cm,i,"gutter")}}}function eQ(ht,hu,hs,hq){if(ht.cm&&!ht.cm.curOp){return dw(ht.cm,eQ)(ht,hu,hs,hq)}if(hu.to.line<ht.first){gc(ht,hu.text.length-1-(hu.to.line-hu.from.line));return}if(hu.from.line>ht.lastLine()){return}if(hu.from.line<ht.first){var i=hu.text.length-1-(ht.first-hu.from.line);gc(ht,i);hu={from:ac(ht.first,0),to:ac(hu.to.line+i,hu.to.ch),text:[gy(hu.text)],origin:hu.origin}}var hr=ht.lastLine();if(hu.to.line>hr){hu={from:hu.from,to:ac(hr,f4(ht,hr).text.length),text:[hu.text[0]],origin:hu.origin}}hu.removed=g8(ht,hu.from,hu.to);if(!hs){hs=f8(ht,hu)}if(ht.cm){aT(ht.cm,hu,hq)}else{go(ht,hu,hq)}e4(ht,hs,ah)}function aT(hA,hw,hu){var hz=hA.doc,hv=hA.display,hx=hw.from,hy=hw.to;var i=false,ht=hx.line;if(!hA.options.lineWrapping){ht=b8(z(f4(hz,hx.line)));hz.iter(ht,hy.line+1,function(hC){if(hC==hv.maxLine){i=true;return true}})}if(hz.sel.contains(hw.from,hw.to)>-1){ab(hA)}go(hz,hw,hu,br(hA));if(!hA.options.lineWrapping){hz.iter(ht,hx.line+hw.text.length,function(hD){var hC=e1(hD);if(hC>hv.maxLineLength){hv.maxLine=hD;hv.maxLineLength=hC;hv.maxLineChanged=true;i=false}});if(i){hA.curOp.updateMaxLine=true}}hj(hz,hx.line);eR(hA,400);var hB=hw.text.length-(hy.line-hx.line)-1;if(hw.full){ap(hA)}else{if(hx.line==hy.line&&hw.text.length==1&&!er(hA.doc,hw)){W(hA,hx.line,"text")}else{ap(hA,hx.line,hy.line+1,hB)}}var hr=f9(hA,"changes"),hs=f9(hA,"change");if(hs||hr){var hq={from:hx,to:hy,text:hw.text,removed:hw.removed,origin:hw.origin};if(hs){am(hA,"change",hA,hq)}if(hr){(hA.curOp.changeObjs||(hA.curOp.changeObjs=[])).push(hq)}}hA.display.selForContextMenu=null}function be(hs,hr,hu,ht,hq){if(!ht){ht=hu}if(cF(ht,hu)<0){var i;(i=[ht,hu],hu=i[0],ht=i[1],i)}if(typeof hr=="string"){hr=hs.splitLines(hr)}bt(hs,{from:hu,to:ht,text:hr,origin:hq})}function M(hs,hr,hq,i){if(hq<hs.line){hs.line+=i}else{if(hr<hs.line){hs.line=hr;hs.ch=0}}}function f6(hu,hw,hx,hy){for(var ht=0;ht<hu.length;++ht){var hq=hu[ht],hv=true;if(hq.ranges){if(!hq.copied){hq=hu[ht]=hq.deepCopy();hq.copied=true}for(var hs=0;hs<hq.ranges.length;hs++){M(hq.ranges[hs].anchor,hw,hx,hy);M(hq.ranges[hs].head,hw,hx,hy)}continue}for(var hr=0;hr<hq.changes.length;++hr){var hz=hq.changes[hr];if(hx<hz.from.line){hz.from=ac(hz.from.line+hy,hz.from.ch);hz.to=ac(hz.to.line+hy,hz.to.ch)}else{if(hw<=hz.to.line){hv=false;break}}}if(!hv){hu.splice(0,ht+1);ht=0}}}function eb(hq,ht){var hs=ht.from.line,hr=ht.to.line,i=ht.text.length-(hr-hs)-1;f6(hq.done,hs,hr,i);f6(hq.undone,hs,hr,i)}function fi(hs,hr,i,hu){var ht=hr,hq=hr;if(typeof hr=="number"){hq=f4(hs,dA(hs,hr))}else{ht=b8(hr)}if(ht==null){return null}if(hu(hq,ht)&&hs.cm){W(hs.cm,ht,i)}return hq}function fO(hr){var ht=this;this.lines=hr;this.parent=null;var hq=0;for(var hs=0;hs<hr.length;++hs){hr[hs].parent=ht;hq+=hr[hs].height}this.height=hq}fO.prototype={chunkSize:function X(){return this.lines.length},removeInner:function O(hq,hv){var hu=this;for(var hs=hq,ht=hq+hv;hs<ht;++hs){var hr=hu.lines[hs];hu.height-=hr.height;bV(hr);am(hr,"delete")}this.lines.splice(hq,hv)},collapse:function gk(i){i.push.apply(i,this.lines)},insertInner:function a2(hr,hs,hq){var hu=this;this.height+=hq;this.lines=this.lines.slice(0,hr).concat(hs).concat(this.lines.slice(hr));for(var ht=0;ht<hs.length;++ht){hs[ht].parent=hu}},iterN:function g6(i,ht,hs){var hr=this;for(var hq=i+ht;i<hq;++i){if(hs(hr.lines[i])){return true}}}};function gn(ht){var hv=this;this.children=ht;var hs=0,hq=0;for(var hr=0;hr<ht.length;++hr){var hu=ht[hr];hs+=hu.chunkSize();hq+=hu.height;hu.parent=hv}this.size=hs;this.height=hq;this.parent=null}gn.prototype={chunkSize:function X(){return this.size},removeInner:function O(hs,hr){var hu=this;this.size-=hr;for(var ht=0;ht<this.children.length;++ht){var hq=hu.children[ht],hw=hq.chunkSize();if(hs<hw){var hv=Math.min(hr,hw-hs),hx=hq.height;hq.removeInner(hs,hv);hu.height-=hx-hq.height;if(hw==hv){hu.children.splice(ht--,1);hq.parent=null}if((hr-=hv)==0){break}hs=0}else{hs-=hw}}if(this.size-hr<25&&(this.children.length>1||!(this.children[0] instanceof fO))){var hy=[];this.collapse(hy);this.children=[new fO(hy)];this.children[0].parent=this}},collapse:function gk(hq){var hs=this;for(var hr=0;hr<this.children.length;++hr){hs.children[hr].collapse(hq)}},insertInner:function a2(hr,hz,hy){var hu=this;this.size+=hz.length;this.height+=hy;for(var ht=0;ht<this.children.length;++ht){var hq=hu.children[ht],hw=hq.chunkSize();if(hr<=hw){hq.insertInner(hr,hz,hy);if(hq.lines&&hq.lines.length>50){var hs=hq.lines.length%25+25;for(var hx=hs;hx<hq.lines.length;){var hv=new fO(hq.lines.slice(hx,hx+=25));hq.height-=hv.height;hu.children.splice(++ht,0,hv);hv.parent=hu}hq.lines=hq.lines.slice(0,hs);hu.maybeSpill()}break}hr-=hw}},maybeSpill:function e9(){if(this.children.length<=10){return}var hs=this;do{var hq=hs.children.splice(hs.children.length-5,5);var hr=new gn(hq);if(!hs.parent){var ht=new gn(hs.children);ht.parent=hs;hs.children=[ht,hr];hs=ht}else{hs.size-=hr.size;hs.height-=hr.height;var i=dR(hs.parent.children,hs);hs.parent.children.splice(i+1,0,hr)}hr.parent=hs.parent}while(hs.children.length>10);hs.parent.maybeSpill()},iterN:function g6(hq,hx,hw){var hv=this;for(var hr=0;hr<this.children.length;++hr){var hu=hv.children[hr],ht=hu.chunkSize();if(hq<ht){var hs=Math.min(hx,ht-hq);if(hu.iterN(hq,hs,hw)){return true}if((hx-=hs)==0){break}hq=0}else{hq-=ht}}}};var d9=function(hs,hr,i){var ht=this;if(i){for(var hq in i){if(i.hasOwnProperty(hq)){ht[hq]=i[hq]}}}this.doc=hs;this.node=hr};d9.prototype.clear=function(){var hw=this;var hr=this.doc.cm,ht=this.line.widgets,hs=this.line,hv=b8(hs);if(hv==null||!ht){return}for(var hu=0;hu<ht.length;++hu){if(ht[hu]==hw){ht.splice(hu--,1)}}if(!ht.length){hs.widgets=null}var hq=dt(this);hb(hs,Math.max(0,hs.height-hq));if(hr){dh(hr,function(){ez(hr,hs,-hq);W(hr,hv,"widget")});am(hr,"lineWidgetCleared",hr,this,hv)}};d9.prototype.changed=function(){var ht=this;var hq=this.height,i=this.doc.cm,hr=this.line;this.height=null;var hs=dt(this)-hq;if(!hs){return}hb(hr,hr.height+hs);if(i){dh(i,function(){i.curOp.forceUpdate=true;ez(i,hr,hs);am(i,"lineWidgetChanged",i,ht,b8(hr))})}};bT(d9);function ez(i,hq,hr){if(b7(hq)<((i.curOp&&i.curOp.scrollTop)||i.doc.scrollTop)){db(i,hr)}}function b0(hu,ht,hr,hq){var hs=new d9(hu,hr,hq);var i=hu.cm;if(i&&hs.noHScroll){i.display.alignWidgets=true}fi(hu,ht,"widget",function(hw){var hx=hw.widgets||(hw.widgets=[]);if(hs.insertAt==null){hx.push(hs)}else{hx.splice(Math.min(hx.length-1,Math.max(0,hs.insertAt)),0,hs)}hs.line=hw;if(i&&!gl(hu,hw)){var hv=b7(hw)<hu.scrollTop;hb(hw,hw.height+dt(hs));if(hv){db(i,hs.height)}i.curOp.forceUpdate=true}return true});if(i){am(i,"lineWidgetAdded",i,hs,typeof ht=="number"?ht:b8(ht))}return hs}var bh=0;var V=function(hq,i){this.lines=[];this.type=i;this.doc=hq;this.id=++bh};V.prototype.clear=function(){var hv=this;if(this.explicitlyCleared){return}var hz=this.doc.cm,hs=hz&&!hz.curOp;if(hs){dd(hz)}if(f9(this,"clear")){var hA=this.find();if(hA){am(this,"clear",hA.from,hA.to)}}var ht=null,hx=null;for(var hu=0;hu<this.lines.length;++hu){var hB=hv.lines[hu];var hy=fZ(hB.markedSpans,hv);if(hz&&!hv.collapsed){W(hz,b8(hB),"text")}else{if(hz){if(hy.to!=null){hx=b8(hB)}if(hy.from!=null){ht=b8(hB)}}}hB.markedSpans=fs(hB.markedSpans,hy);if(hy.from==null&&hv.collapsed&&!gl(hv.doc,hB)&&hz){hb(hB,bb(hz.display))}}if(hz&&this.collapsed&&!hz.options.lineWrapping){for(var hr=0;hr<this.lines.length;++hr){var hq=z(hv.lines[hr]),hw=e1(hq);if(hw>hz.display.maxLineLength){hz.display.maxLine=hq;hz.display.maxLineLength=hw;hz.display.maxLineChanged=true}}}if(ht!=null&&hz&&this.collapsed){ap(hz,ht,hx+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(hz){ff(hz.doc)}}if(hz){am(hz,"markerCleared",hz,this,ht,hx)}if(hs){aw(hz)}if(this.parent){this.parent.clear()}};V.prototype.find=function(ht,hr){var hx=this;if(ht==null&&this.type=="bookmark"){ht=1}var hw,hv;for(var hs=0;hs<this.lines.length;++hs){var hq=hx.lines[hs];var hu=fZ(hq.markedSpans,hx);if(hu.from!=null){hw=ac(hr?hq:b8(hq),hu.from);if(ht==-1){return hw}}if(hu.to!=null){hv=ac(hr?hq:b8(hq),hu.to);if(ht==1){return hv}}}return hw&&{from:hw,to:hv}};V.prototype.changed=function(){var hs=this;var hr=this.find(-1,true),hq=this,i=this.doc.cm;if(!hr||!i){return}dh(i,function(){var hu=hr.line,hv=b8(hr.line);var ht=f1(i,hv);if(ht){aE(ht);i.curOp.selectionChanged=i.curOp.forceUpdate=true}i.curOp.updateMaxLine=true;if(!gl(hq.doc,hu)&&hq.height!=null){var hx=hq.height;hq.height=null;var hw=dt(hq)-hx;if(hw){hb(hu,hu.height+hw)}}am(i,"markerChanged",i,hs)})};V.prototype.attachLine=function(i){if(!this.lines.length&&this.doc.cm){var hq=this.doc.cm.curOp;if(!hq.maybeHiddenMarkers||dR(hq.maybeHiddenMarkers,this)==-1){(hq.maybeUnhiddenMarkers||(hq.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(i)};V.prototype.detachLine=function(i){this.lines.splice(dR(this.lines,i),1);if(!this.lines.length&&this.doc.cm){var hq=this.doc.cm.curOp;(hq.maybeHiddenMarkers||(hq.maybeHiddenMarkers=[])).push(this)}};bT(V);function fp(hy,hw,hx,hA,hu){if(hA&&hA.shared){return S(hy,hw,hx,hA,hu)}if(hy.cm&&!hy.cm.curOp){return dw(hy.cm,fp)(hy,hw,hx,hA,hu)}var ht=new V(hy,hu),hz=cF(hw,hx);if(hA){aZ(hA,ht,false)}if(hz>0||hz==0&&ht.clearWhenEmpty!==false){return ht}if(ht.replacedWith){ht.collapsed=true;ht.widgetNode=hc("span",[ht.replacedWith],"CodeMirror-widget");if(!hA.handleMouseEvents){ht.widgetNode.setAttribute("cm-ignore-events","true")}if(hA.insertLeft){ht.widgetNode.insertLeft=true}}if(ht.collapsed){if(A(hy,hw.line,hw,hx,ht)||hw.line!=hx.line&&A(hy,hx.line,hw,hx,ht)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}bQ()}if(ht.addToHistory){gG(hy,{from:hw,to:hx,origin:"markText"},hy.sel,NaN)}var hr=hw.line,hv=hy.cm,hq;hy.iter(hr,hx.line+1,function(i){if(hv&&ht.collapsed&&!hv.options.lineWrapping&&z(i)==hv.display.maxLine){hq=true}if(ht.collapsed&&hr!=hw.line){hb(i,0)}cC(i,new eW(ht,hr==hw.line?hw.ch:null,hr==hx.line?hx.ch:null));++hr});if(ht.collapsed){hy.iter(hw.line,hx.line+1,function(i){if(gl(hy,i)){hb(i,0)}})}if(ht.clearOnEnter){cj(ht,"beforeCursorEnter",function(){return ht.clear()})}if(ht.readOnly){gq();if(hy.history.done.length||hy.history.undone.length){hy.clearHistory()}}if(ht.collapsed){ht.id=++bh;ht.atomic=true}if(hv){if(hq){hv.curOp.updateMaxLine=true}if(ht.collapsed){ap(hv,hw.line,hx.line+1)}else{if(ht.className||ht.title||ht.startStyle||ht.endStyle||ht.css){for(var hs=hw.line;hs<=hx.line;hs++){W(hv,hs,"text")}}}if(ht.atomic){ff(hv.doc)}am(hv,"markerAdded",hv,ht)}return ht}var y=function(hs,hr){var ht=this;this.markers=hs;this.primary=hr;for(var hq=0;hq<hs.length;++hq){hs[hq].parent=ht}};y.prototype.clear=function(){var hr=this;if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var hq=0;hq<this.markers.length;++hq){hr.markers[hq].clear()}am(this,"clear")};y.prototype.find=function(hq,i){return this.primary.find(hq,i)};bT(y);function S(ht,hw,hv,i,hr){i=aZ(i);i.shared=false;var hu=[fp(ht,hw,hv,i,hr)],hq=hu[0];var hs=i.widgetNode;eJ(ht,function(hy){if(hs){i.widgetNode=hs.cloneNode(true)}hu.push(fp(hy,gD(hy,hw),gD(hy,hv),i,hr));for(var hx=0;hx<hy.linked.length;++hx){if(hy.linked[hx].isParent){return}}hq=gy(hu)});return new y(hu,hq)}function fB(i){return i.findMarks(ac(i.first,0),i.clipPos(ac(i.lastLine())),function(hq){return hq.parent})}function ec(hv,hw){for(var ht=0;ht<hw.length;ht++){var hr=hw[ht],hx=hr.find();var hq=hv.clipPos(hx.from),hu=hv.clipPos(hx.to);if(cF(hq,hu)){var hs=fp(hv,hq,hu,hr.primary,hr.primary.type);hr.markers.push(hs);hs.parent=hr}}}function e3(hs){var hq=function(hv){var ht=hs[hv],hx=[ht.primary.doc];eJ(ht.primary.doc,function(i){return hx.push(i)});for(var hu=0;hu<ht.markers.length;hu++){var hw=ht.markers[hu];if(dR(hx,hw.doc)==-1){hw.parent=null;ht.markers.splice(hu--,1)}}};for(var hr=0;hr<hs.length;hr++){hq(hr)}}var cU=0;var aD=function(ht,hs,i,hr,hq){if(!(this instanceof aD)){return new aD(ht,hs,i,hr,hq)}if(i==null){i=0}gn.call(this,[new fO([new ha("",null)])]);this.first=i;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.modeFrontier=this.highlightFrontier=i;var hu=ac(i,0);this.sel=fE(hu);this.history=new gR(null);this.id=++cU;this.modeOption=hs;this.lineSep=hr;this.direction=(hq=="rtl")?"rtl":"ltr";this.extend=false;if(typeof ht=="string"){ht=this.splitLines(ht)}go(this,{from:hu,to:hu,text:ht});cg(this,fE(hu),ah)};aD.prototype=cM(gn.prototype,{constructor:aD,iter:function(hr,hq,i){if(i){this.iterN(hr-this.first,hq-hr,i)}else{this.iterN(this.first,this.first+this.size,hr)}},insert:function(hr,hs){var hq=0;for(var ht=0;ht<hs.length;++ht){hq+=hs[ht].height}this.insertInner(hr-this.first,hs,hq)},remove:function(i,hq){this.removeInner(i-this.first,hq)},getValue:function(hq){var i=bf(this,this.first,this.first+this.size);if(hq===false){return i}return i.join(hq||this.lineSeparator())},setValue:c7(function(hq){var hr=ac(this.first,0),i=this.first+this.size-1;bt(this,{from:hr,to:ac(i,f4(this,i).text.length),text:this.splitLines(hq),origin:"setValue",full:true},true);if(this.cm){fy(this.cm,0,0)}cg(this,fE(hr),ah)}),replaceRange:function(hq,hs,hr,i){hs=gD(this,hs);hr=hr?gD(this,hr):hs;be(this,hq,hs,hr,i)},getRange:function(hs,hr,hq){var i=g8(this,gD(this,hs),gD(this,hr));if(hq===false){return i}return i.join(hq||this.lineSeparator())},getLine:function(hq){var i=this.getLineHandle(hq);return i&&i.text},getLineHandle:function(i){if(cw(this,i)){return f4(this,i)}},getLineNumber:function(i){return b8(i)},getLineHandleVisualStart:function(i){if(typeof i=="number"){i=f4(this,i)}return z(i)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(i){return gD(this,i)},getCursor:function(hr){var i=this.sel.primary(),hq;if(hr==null||hr=="head"){hq=i.head}else{if(hr=="anchor"){hq=i.anchor}else{if(hr=="end"||hr=="to"||hr===false){hq=i.to()}else{hq=i.from()}}}return hq},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:c7(function(i,hr,hq){J(this,gD(this,typeof i=="number"?ac(i,hr||0):i),null,hq)}),setSelection:c7(function(hq,hr,i){J(this,gD(this,hq),gD(this,hr||hq),i)}),extendSelection:c7(function(hr,i,hq){gX(this,gD(this,hr),i&&gD(this,i),hq)}),extendSelections:c7(function(hq,i){aF(this,eB(this,hq),i)}),extendSelectionsBy:c7(function(hr,i){var hq=cf(this.sel.ranges,hr);aF(this,eB(this,hq),i)}),setSelections:c7(function(hq,hu,hs){var hv=this;if(!hq.length){return}var hr=[];for(var ht=0;ht<hq.length;ht++){hr[ht]=new ex(gD(hv,hq[ht].anchor),gD(hv,hq[ht].head))}if(hu==null){hu=Math.min(hq.length-1,this.sel.primIndex)}cg(this,cZ(hr,hu),hs)}),addSelection:c7(function(hr,hs,hq){var i=this.sel.ranges.slice(0);i.push(new ex(gD(this,hr),gD(this,hs||hr)));cg(this,cZ(i,i.length-1),hq)}),getSelection:function(hu){var hv=this;var hr=this.sel.ranges,hq;for(var hs=0;hs<hr.length;hs++){var ht=g8(hv,hr[hs].from(),hr[hs].to());hq=hq?hq.concat(ht):ht}if(hu===false){return hq}else{return hq.join(hu||this.lineSeparator())}},getSelections:function(hu){var hv=this;var ht=[],hq=this.sel.ranges;for(var hr=0;hr<hq.length;hr++){var hs=g8(hv,hq[hr].from(),hq[hr].to());if(hu!==false){hs=hs.join(hu||hv.lineSeparator())}ht[hr]=hs}return ht},replaceSelection:function(hs,hu,hq){var ht=[];for(var hr=0;hr<this.sel.ranges.length;hr++){ht[hr]=hs}this.replaceSelections(ht,hu,hq||"+input")},replaceSelections:c7(function(hr,hx,hz){var hv=this;var hy=[],ht=this.sel;for(var hu=0;hu<ht.ranges.length;hu++){var hw=ht.ranges[hu];hy[hu]={from:hw.from(),to:hw.to(),text:hv.splitLines(hr[hu]),origin:hz}}var hq=hx&&hx!="end"&&an(this,hy,hx);for(var hs=hy.length-1;hs>=0;hs--){bt(hv,hy[hs])}if(hq){fX(this,hq)}else{if(this.cm){gx(this.cm)}}}),undo:c7(function(){cv(this,"undo")}),redo:c7(function(){cv(this,"redo")}),undoSelection:c7(function(){cv(this,"undo",true)}),redoSelection:c7(function(){cv(this,"redo",true)}),setExtending:function(i){this.extend=i},getExtending:function(){return this.extend},historySize:function(){var ht=this.history,hq=0,hs=0;for(var hr=0;hr<ht.done.length;hr++){if(!ht.done[hr].ranges){++hq}}for(var hu=0;hu<ht.undone.length;hu++){if(!ht.undone[hu].ranges){++hs}}return{undo:hq,redo:hs}},clearHistory:function(){this.history=new gR(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(i){if(i){this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(i){return this.history.generation==(i||this.cleanGeneration)},getHistory:function(){return{done:ca(this.history.done),undone:ca(this.history.undone)}},setHistory:function(hq){var i=this.history=new gR(this.history.maxGeneration);i.done=ca(hq.done.slice(0),null,true);i.undone=ca(hq.undone.slice(0),null,true)},setGutterMarker:c7(function(i,hq,hr){return fi(this,i,"gutter",function(hs){var ht=hs.gutterMarkers||(hs.gutterMarkers={});ht[hq]=hr;if(!hr&&fI(ht)){hs.gutterMarkers=null}return true})}),clearGutter:c7(function(i){var hq=this;this.iter(function(hr){if(hr.gutterMarkers&&hr.gutterMarkers[i]){fi(hq,hr,"gutter",function(){hr.gutterMarkers[i]=null;if(fI(hr.gutterMarkers)){hr.gutterMarkers=null}return true})}})}),lineInfo:function(i){var hq;if(typeof i=="number"){if(!cw(this,i)){return null}hq=i;i=f4(this,i);if(!i){return null}}else{hq=b8(i);if(hq==null){return null}}return{line:hq,handle:i,text:i.text,gutterMarkers:i.gutterMarkers,textClass:i.textClass,bgClass:i.bgClass,wrapClass:i.wrapClass,widgets:i.widgets}},addLineClass:c7(function(hr,hq,i){return fi(this,hr,hq=="gutter"?"gutter":"class",function(hs){var ht=hq=="text"?"textClass":hq=="background"?"bgClass":hq=="gutter"?"gutterClass":"wrapClass";if(!hs[ht]){hs[ht]=i}else{if(Y(i).test(hs[ht])){return false}else{hs[ht]+=" "+i}}return true})}),removeLineClass:c7(function(hr,hq,i){return fi(this,hr,hq=="gutter"?"gutter":"class",function(ht){var hw=hq=="text"?"textClass":hq=="background"?"bgClass":hq=="gutter"?"gutterClass":"wrapClass";var hv=ht[hw];if(!hv){return false}else{if(i==null){ht[hw]=null}else{var hu=hv.match(Y(i));if(!hu){return false}var hs=hu.index+hu[0].length;ht[hw]=hv.slice(0,hu.index)+(!hu.index||hs==hv.length?"":" ")+hv.slice(hs)||null}}return true})}),addLineWidget:c7(function(hr,hq,i){return b0(this,hr,hq,i)}),removeLineWidget:function(i){i.clear()},markText:function(hr,hq,i){return fp(this,gD(this,hr),gD(this,hq),i,i&&i.type||"range")},setBookmark:function(hr,i){var hq={replacedWith:i&&(i.nodeType==null?i.widget:i),insertLeft:i&&i.insertLeft,clearWhenEmpty:false,shared:i&&i.shared,handleMouseEvents:i&&i.handleMouseEvents};hr=gD(this,hr);return fp(this,hr,hr,hq,"bookmark")},findMarksAt:function(hu){hu=gD(this,hu);var ht=[],hr=f4(this,hu.line).markedSpans;if(hr){for(var hq=0;hq<hr.length;++hq){var hs=hr[hq];if((hs.from==null||hs.from<=hu.ch)&&(hs.to==null||hs.to>=hu.ch)){ht.push(hs.marker.parent||hs.marker)}}}return ht},findMarks:function(ht,hs,i){ht=gD(this,ht);hs=gD(this,hs);var hq=[],hr=ht.line;this.iter(ht.line,hs.line+1,function(hu){var hw=hu.markedSpans;if(hw){for(var hv=0;hv<hw.length;hv++){var hx=hw[hv];if(!(hx.to!=null&&hr==ht.line&&ht.ch>=hx.to||hx.from==null&&hr!=ht.line||hx.from!=null&&hr==hs.line&&hx.from>=hs.ch)&&(!i||i(hx.marker))){hq.push(hx.marker.parent||hx.marker)}}}++hr});return hq},getAllMarks:function(){var i=[];this.iter(function(hr){var hq=hr.markedSpans;if(hq){for(var hs=0;hs<hq.length;++hs){if(hq[hs].from!=null){i.push(hq[hs].marker)}}}});return i},posFromIndex:function(hr){var i,hs=this.first,hq=this.lineSeparator().length;this.iter(function(ht){var hu=ht.text.length+hq;if(hu>hr){i=hr;return true}hr-=hu;++hs});return gD(this,ac(hs,i))},indexFromPos:function(hr){hr=gD(this,hr);var i=hr.ch;if(hr.line<this.first||hr.ch<0){return 0}var hq=this.lineSeparator().length;this.iter(this.first,hr.line,function(hs){i+=hs.text.length+hq});return i},copy:function(i){var hq=new aD(bf(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);hq.scrollTop=this.scrollTop;hq.scrollLeft=this.scrollLeft;hq.sel=this.sel;hq.extend=false;if(i){hq.history.undoDepth=this.history.undoDepth;hq.setHistory(this.getHistory())}return hq},linkedDoc:function(i){if(!i){i={}}var hs=this.first,hr=this.first+this.size;if(i.from!=null&&i.from>hs){hs=i.from}if(i.to!=null&&i.to<hr){hr=i.to}var hq=new aD(bf(this,hs,hr),i.mode||this.modeOption,hs,this.lineSep,this.direction);if(i.sharedHist){hq.history=this.history}(this.linked||(this.linked=[])).push({doc:hq,sharedHist:i.sharedHist});hq.linked=[{doc:this,isParent:true,sharedHist:i.sharedHist}];ec(hq,fB(this));return hq},unlinkDoc:function(hr){var hu=this;if(hr instanceof K){hr=hr.doc}if(this.linked){for(var hs=0;hs<this.linked.length;++hs){var ht=hu.linked[hs];if(ht.doc!=hr){continue}hu.linked.splice(hs,1);hr.unlinkDoc(hu);e3(fB(hu));break}}if(hr.history==this.history){var hq=[hr.id];eJ(hr,function(i){return hq.push(i.id)},true);hr.history=new gR(null);hr.history.done=ca(this.history.done,hq);hr.history.undone=ca(this.history.undone,hq)}},iterLinkedDocs:function(i){eJ(this,i)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(i){if(this.lineSep){return i.split(this.lineSep)}return gO(i)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:c7(function(i){if(i!="rtl"){i="ltr"}if(i==this.direction){return}this.direction=i;this.iter(function(hq){return hq.order=null});if(this.cm){eA(this.cm)}})});aD.prototype.eachLine=aD.prototype.iter;var ao=0;function bx(hy){var hA=this;dJ(hA);if(a4(hA,hy)||bo(hA.display,hy)){return}c9(hy);if(ei){ao=+new Date}var hz=cQ(hA,hy,true),hr=hy.dataTransfer.files;if(!hz||hA.isReadOnly()){return}if(hr&&hr.length&&window.FileReader&&window.File){var hu=hr.length,hB=Array(hu),hs=0;var hw=function(hE,hD){if(hA.options.allowDropFileTypes&&dR(hA.options.allowDropFileTypes,hE.type)==-1){return}var hC=new FileReader;hC.onload=dw(hA,function(){var i=hC.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(i)){i=""}hB[hD]=i;if(++hs==hu){hz=gD(hA.doc,hz);var hF={from:hz,to:hz,text:hA.doc.splitLines(hB.join(hA.doc.lineSeparator())),origin:"paste"};bt(hA.doc,hF);fX(hA.doc,fE(hz,ds(hF)))}});hC.readAsText(hE)};for(var hx=0;hx<hu;++hx){hw(hr[hx],hx)}}else{if(hA.state.draggingText&&hA.doc.sel.contains(hz)>-1){hA.state.draggingText(hy);setTimeout(function(){return hA.display.input.focus()},20);return}try{var hq=hy.dataTransfer.getData("Text");if(hq){var hv;if(hA.state.draggingText&&!hA.state.draggingText.copy){hv=hA.listSelections()}e4(hA.doc,fE(hz,hz));if(hv){for(var ht=0;ht<hv.length;++ht){be(hA.doc,"",hv[ht].anchor,hv[ht].head,"drag")}}hA.replaceSelection(hq,"around","paste");hA.display.input.focus()}}catch(hy){}}}function U(i,hr){if(ei&&(!i.state.draggingText||+new Date-ao<100)){e6(hr);return}if(a4(i,hr)||bo(i.display,hr)){return}hr.dataTransfer.setData("Text",i.getSelection());hr.dataTransfer.effectAllowed="copyMove";if(hr.dataTransfer.setDragImage&&!aM){var hq=g5("img",null,null,"position: fixed; left: 0; top: 0;");hq.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(eE){hq.width=hq.height=1;i.display.wrapper.appendChild(hq);hq._top=hq.offsetTop}hr.dataTransfer.setDragImage(hq,0,0);if(eE){hq.parentNode.removeChild(hq)}}}function hn(i,hq){var hs=cQ(i,hq);if(!hs){return}var hr=document.createDocumentFragment();C(i,hs,hr);if(!i.display.dragCursor){i.display.dragCursor=g5("div",null,"CodeMirror-cursors CodeMirror-dragcursors");i.display.lineSpace.insertBefore(i.display.dragCursor,i.display.cursorDiv)}ce(i.display.dragCursor,hr)}function dJ(i){if(i.display.dragCursor){i.display.lineSpace.removeChild(i.display.dragCursor);i.display.dragCursor=null}}function aK(ht){if(!document.getElementsByClassName){return}var hs=document.getElementsByClassName("CodeMirror");for(var hr=0;hr<hs.length;hr++){var hq=hs[hr].CodeMirror;if(hq){ht(hq)}}}var c6=false;function bw(){if(c6){return}gw();c6=true}function gw(){var i;cj(window,"resize",function(){if(i==null){i=setTimeout(function(){i=null;aK(a6)},100)}});cj(window,"blur",function(){return aK(a8)})}function a6(i){var hq=i.display;hq.cachedCharWidth=hq.cachedTextHeight=hq.cachedPaddingH=null;hq.scrollbarsClipped=false;i.setSize()}var f5={3:"Pause",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",145:"ScrollLock",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"};for(var gm=0;gm<10;gm++){f5[gm+48]=f5[gm+96]=String(gm)}for(var gQ=65;gQ<=90;gQ++){f5[gQ]=String.fromCharCode(gQ)}for(var gP=1;gP<=12;gP++){f5[gP+111]=f5[gP+63235]="F"+gP}var f0={};f0.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"};f0.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"};f0.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","Ctrl-O":"openLine"};f0.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"]};f0["default"]=cu?f0.macDefault:f0.pcDefault;function d2(hr){var hx=hr.split(/-(?!$)/);hr=hx[hx.length-1];var hw,hv,hq,hu;for(var ht=0;ht<hx.length-1;ht++){var hs=hx[ht];if(/^(cmd|meta|m)$/i.test(hs)){hu=true}else{if(/^a(lt)?$/i.test(hs)){hw=true}else{if(/^(c|ctrl|control)$/i.test(hs)){hv=true}else{if(/^s(hift)?$/i.test(hs)){hq=true}else{throw new Error("Unrecognized modifier name: "+hs)}}}}}if(hw){hr="Alt-"+hr}if(hv){hr="Ctrl-"+hr}if(hu){hr="Cmd-"+hr}if(hq){hr="Shift-"+hr}return hr}function da(hx){var hr={};for(var hw in hx){if(hx.hasOwnProperty(hw)){var hy=hx[hw];if(/^(name|fallthrough|(de|at)tach)$/.test(hw)){continue}if(hy=="..."){delete hx[hw];continue}var hz=cf(hw.split(" "),d2);for(var hv=0;hv<hz.length;hv++){var ht=(void 0),hs=(void 0);if(hv==hz.length-1){hs=hz.join(" ");ht=hy}else{hs=hz.slice(0,hv+1).join(" ");ht="..."}var hu=hr[hs];if(!hu){hr[hs]=ht}else{if(hu!=ht){throw new Error("Inconsistent bindings for "+hs)}}}delete hx[hw]}}for(var hq in hr){hx[hq]=hr[hq]}return hx}function k(ht,hw,hv,hs){hw=gW(hw);var hu=hw.call?hw.call(ht,hs):hw[ht];if(hu===false){return"nothing"}if(hu==="..."){return"multi"}if(hu!=null&&hv(hu)){return"handled"}if(hw.fallthrough){if(Object.prototype.toString.call(hw.fallthrough)!="[object Array]"){return k(ht,hw.fallthrough,hv,hs)}for(var hr=0;hr<hw.fallthrough.length;hr++){var hq=k(ht,hw.fallthrough[hr],hv,hs);if(hq){return hq}}}}function fj(hq){var i=typeof hq=="string"?hq:f5[hq.keyCode];return i=="Ctrl"||i=="Alt"||i=="Shift"||i=="Mod"}function gZ(i,hq,hs){var hr=i;if(hq.altKey&&hr!="Alt"){i="Alt-"+i}if((cc?hq.metaKey:hq.ctrlKey)&&hr!="Ctrl"){i="Ctrl-"+i}if((cc?hq.ctrlKey:hq.metaKey)&&hr!="Cmd"){i="Cmd-"+i}if(!hs&&hq.shiftKey&&hr!="Shift"){i="Shift-"+i}return i}function gf(hq,hr){if(eE&&hq.keyCode==34&&hq["char"]){return false}var i=f5[hq.keyCode];if(i==null||hq.altGraphKey){return false}if(hq.keyCode==3&&hq.code){i=hq.code}return gZ(i,hq,hr)}function gW(i){return typeof i=="string"?f0[i]:i}function fM(hq,hw){var hr=hq.doc.sel.ranges,hu=[];for(var ht=0;ht<hr.length;ht++){var hs=hw(hr[ht]);while(hu.length&&cF(hs.from,gy(hu).to)<=0){var hv=hu.pop();if(cF(hv.from,hs.from)<0){hs.from=hv.from;break}}hu.push(hs)}dh(hq,function(){for(var hx=hu.length-1;hx>=0;hx--){be(hq.doc,"",hu[hx].from,hu[hx].to,"+delete")}gx(hq)})}function bH(i,hr,hq){var hs=eX(i.text,hr+hq,hq);return hs<0||hs>i.text.length?null:hs}function aq(i,hs,hq){var hr=bH(i,hs.ch,hq);return hr==null?null:new ac(hs.line,hr,hq<0?"after":"before")}function fh(hq,hy,hv,hu,hs){if(hq){var ht=a(hv,hy.doc.direction);if(ht){var hr=hs<0?gy(ht):ht[0];var hA=(hs<0)==(hr.level==1);var hx=hA?"after":"before";var i;if(hr.level>0||hy.doc.direction=="rtl"){var hw=bi(hy,hv);i=hs<0?hv.text.length-1:0;var hz=F(hy,hw,i).top;i=cP(function(hB){return F(hy,hw,hB).top==hz},(hs<0)==(hr.level==1)?hr.from:hr.to-1,i);if(hx=="before"){i=bH(hv,i,1)}}else{i=hs<0?hr.to:hr.from}return new ac(hu,i,hx)}}return new ac(hu,hs<0?hv.text.length:0,hs<0?"before":"after")}function v(hA,hF,ht,hw){var hC=a(hF,hA.doc.direction);if(!hC){return aq(hF,ht,hw)}if(ht.ch>=hF.text.length){ht.ch=hF.text.length;ht.sticky="before"}else{if(ht.ch<=0){ht.ch=0;ht.sticky="after"}}var hs=aS(hC,ht.ch,ht.sticky),hu=hC[hs];if(hA.doc.direction=="ltr"&&hu.level%2==0&&(hw>0?hu.to>ht.ch:hu.from<ht.ch)){return aq(hF,ht,hw)}var hD=function(hH,hG){return bH(hF,hH instanceof ac?hH.ch:hH,hG)};var hx;var hB=function(hG){if(!hA.options.lineWrapping){return{begin:0,end:hF.text.length}}hx=hx||bi(hA,hF);return bB(hA,hF,hx,hG)};var hv=hB(ht.sticky=="before"?hD(ht,-1):ht.ch);if(hA.doc.direction=="rtl"||hu.level==1){var hE=(hu.level==1)==(hw<0);var hq=hD(ht,hE?1:-1);if(hq!=null&&(!hE?hq>=hu.from&&hq>=hv.begin:hq<=hu.to&&hq<=hv.end)){var hz=hE?"before":"after";return new ac(ht.line,hq,hz)}}var hr=function(hG,hJ,hM){var hI=function(hO,hN){return hN?new ac(ht.line,hD(hO,1),"before"):new ac(ht.line,hO,"after")};for(;hG>=0&&hG<hC.length;hG+=hJ){var hH=hC[hG];var hK=(hJ>0)==(hH.level!=1);var hL=hK?hM.begin:hD(hM.end,-1);if(hH.from<=hL&&hL<hH.to){return hI(hL,hK)}hL=hK?hH.from:hD(hH.to,-1);if(hM.begin<=hL&&hL<hM.end){return hI(hL,hK)}}};var hy=hr(hs+hw,hw,hv);if(hy){return hy}var i=hw>0?hv.end:hD(hv.begin,-1);if(i!=null&&!(hw>0&&i==hF.text.length)){hy=hr(hw>0?0:hC.length-1,hw,hB(i));if(hy){return hy}}return null}var fm={selectAll:av,singleSelection:function(i){return i.setSelection(i.getCursor("anchor"),i.getCursor("head"),ah)},killLine:function(i){return fM(i,function(hr){if(hr.empty()){var hq=f4(i.doc,hr.head.line).text.length;if(hr.head.ch==hq&&hr.head.line<i.lastLine()){return{from:hr.head,to:ac(hr.head.line+1,0)}}else{return{from:hr.head,to:ac(hr.head.line,hq)}}}else{return{from:hr.from(),to:hr.to()}}})},deleteLine:function(i){return fM(i,function(hq){return({from:ac(hq.from().line,0),to:gD(i.doc,ac(hq.to().line+1,0))})})},delLineLeft:function(i){return fM(i,function(hq){return({from:ac(hq.from().line,0),to:hq.from()})})},delWrappedLineLeft:function(i){return fM(i,function(hq){var hs=i.charCoords(hq.head,"div").top+5;var hr=i.coordsChar({left:0,top:hs},"div");return{from:hr,to:hq.from()}})},delWrappedLineRight:function(i){return fM(i,function(hq){var hs=i.charCoords(hq.head,"div").top+5;var hr=i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:hs},"div");return{from:hq.from(),to:hr}})},undo:function(i){return i.undo()},redo:function(i){return i.redo()},undoSelection:function(i){return i.undoSelection()},redoSelection:function(i){return i.redoSelection()},goDocStart:function(i){return i.extendSelection(ac(i.firstLine(),0))},goDocEnd:function(i){return i.extendSelection(ac(i.lastLine()))},goLineStart:function(i){return i.extendSelectionsBy(function(hq){return bM(i,hq.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(i){return i.extendSelectionsBy(function(hq){return ef(i,hq.head)},{origin:"+move",bias:1})},goLineEnd:function(i){return i.extendSelectionsBy(function(hq){return eo(i,hq.head.line)},{origin:"+move",bias:-1})},goLineRight:function(i){return i.extendSelectionsBy(function(hq){var hr=i.cursorCoords(hq.head,"div").top+5;return i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:hr},"div")},dr)},goLineLeft:function(i){return i.extendSelectionsBy(function(hq){var hr=i.cursorCoords(hq.head,"div").top+5;return i.coordsChar({left:0,top:hr},"div")},dr)},goLineLeftSmart:function(i){return i.extendSelectionsBy(function(hq){var hr=i.cursorCoords(hq.head,"div").top+5;var hs=i.coordsChar({left:0,top:hr},"div");if(hs.ch<i.getLine(hs.line).search(/\S/)){return ef(i,hq.head)}return hs},dr)},goLineUp:function(i){return i.moveV(-1,"line")},goLineDown:function(i){return i.moveV(1,"line")},goPageUp:function(i){return i.moveV(-1,"page")},goPageDown:function(i){return i.moveV(1,"page")},goCharLeft:function(i){return i.moveH(-1,"char")},goCharRight:function(i){return i.moveH(1,"char")},goColumnLeft:function(i){return i.moveH(-1,"column")},goColumnRight:function(i){return i.moveH(1,"column")},goWordLeft:function(i){return i.moveH(-1,"word")},goGroupRight:function(i){return i.moveH(1,"group")},goGroupLeft:function(i){return i.moveH(-1,"group")},goWordRight:function(i){return i.moveH(1,"word")},delCharBefore:function(i){return i.deleteH(-1,"char")},delCharAfter:function(i){return i.deleteH(1,"char")},delWordBefore:function(i){return i.deleteH(-1,"word")},delWordAfter:function(i){return i.deleteH(1,"word")},delGroupBefore:function(i){return i.deleteH(-1,"group")},delGroupAfter:function(i){return i.deleteH(1,"group")},indentAuto:function(i){return i.indentSelection("smart")},indentMore:function(i){return i.indentSelection("add")},indentLess:function(i){return i.indentSelection("subtract")},insertTab:function(i){return i.replaceSelection("\t")},insertSoftTab:function(hq){var hs=[],hr=hq.listSelections(),hv=hq.options.tabSize;for(var hu=0;hu<hr.length;hu++){var hw=hr[hu].from();var ht=cd(hq.getLine(hw.line),hw.ch,hv);hs.push(cS(hv-ht%hv))}hq.replaceSelections(hs)},defaultTab:function(i){if(i.somethingSelected()){i.indentSelection("add")}else{i.execCommand("insertTab")}},transposeChars:function(i){return dh(i,function(){var hs=i.listSelections(),hr=[];for(var ht=0;ht<hs.length;ht++){if(!hs[ht].empty()){continue}var hv=hs[ht].head,hq=f4(i.doc,hv.line).text;if(hq){if(hv.ch==hq.length){hv=new ac(hv.line,hv.ch-1)}if(hv.ch>0){hv=new ac(hv.line,hv.ch+1);i.replaceRange(hq.charAt(hv.ch-1)+hq.charAt(hv.ch-2),ac(hv.line,hv.ch-2),hv,"+transpose")}else{if(hv.line>i.doc.first){var hu=f4(i.doc,hv.line-1).text;if(hu){hv=new ac(hv.line,1);i.replaceRange(hq.charAt(0)+i.doc.lineSeparator()+hu.charAt(hu.length-1),ac(hv.line-1,hu.length-1),hv,"+transpose")}}}}hr.push(new ex(hv,hv))}i.setSelections(hr)})},newlineAndIndent:function(i){return dh(i,function(){var hq=i.listSelections();for(var hr=hq.length-1;hr>=0;hr--){i.replaceRange(i.doc.lineSeparator(),hq[hr].anchor,hq[hr].head,"+input")}hq=i.listSelections();for(var hs=0;hs<hq.length;hs++){i.indentLine(hq[hs].from().line,null,true)}gx(i)})},openLine:function(i){return i.replaceSelection("\n","start")},toggleOverwrite:function(i){return i.toggleOverwrite()}};function bM(i,hr){var hq=f4(i.doc,hr);var hs=z(hq);if(hs!=hq){hr=b8(hs)}return fh(true,i,hs,hr,1)}function eo(i,hr){var hq=f4(i.doc,hr);var hs=cL(hq);if(hs!=hq){hr=b8(hs)}return fh(true,i,hq,hr,-1)}function ef(hq,hv){var hu=bM(hq,hv.line);var hr=f4(hq.doc,hu.line);var i=a(hr,hq.doc.direction);if(!i||i[0].level==0){var ht=Math.max(0,hr.text.search(/\S/));var hs=hv.line==hu.line&&hv.ch<=ht&&hv.ch;return ac(hu.line,hs?0:ht,hu.sticky)}return hu}function gN(hq,ht,i){if(typeof ht=="string"){ht=fm[ht];if(!ht){return false}}hq.display.input.ensurePolled();var hs=hq.display.shift,hr=false;try{if(hq.isReadOnly()){hq.state.suppressEdits=true}if(i){hq.display.shift=false}hr=ht(hq)!=cz}finally{hq.display.shift=hs;hq.state.suppressEdits=false}return hr}function eK(hr,hs,hu){for(var ht=0;ht<hr.state.keyMaps.length;ht++){var hq=k(hs,hr.state.keyMaps[ht],hu,hr);if(hq){return hq}}return(hr.options.extraKeys&&k(hs,hr.options.extraKeys,hu,hr))||k(hs,hr.options.keyMap,hu,hr)}var ek=new hp;function bq(i,hr,ht,hs){var hq=i.state.keySeq;if(hq){if(fj(hr)){return"handled"}if(/\'$/.test(hr)){i.state.keySeq=null}else{ek.set(50,function(){if(i.state.keySeq==hq){i.state.keySeq=null;i.display.input.reset()}})}if(cJ(i,hq+" "+hr,ht,hs)){return true}}return cJ(i,hr,ht,hs)}function cJ(hq,hr,ht,hs){var i=eK(hq,hr,hs);if(i=="multi"){hq.state.keySeq=hr}if(i=="handled"){am(hq,"keyHandled",hq,hr,ht)}if(i=="handled"||i=="multi"){c9(ht);q(hq)}return !!i}function f7(i,hr){var hq=gf(hr,true);if(!hq){return false}if(hr.shiftKey&&!i.state.keySeq){return bq(i,"Shift-"+hq,hr,function(hs){return gN(i,hs,true)})||bq(i,hq,hr,function(hs){if(typeof hs=="string"?/^go[A-Z]/.test(hs):hs.motion){return gN(i,hs)}})}else{return bq(i,hq,hr,function(hs){return gN(i,hs)})}}function eV(i,hr,hq){return bq(i,"'"+hq+"'",hr,function(hs){return gN(i,hs,true)})}var dX=null;function r(hs){var i=this;i.curOp.focus=em();if(a4(i,hs)){return}if(ei&&m<11&&hs.keyCode==27){hs.returnValue=false}var hq=hs.keyCode;i.display.shift=hq==16||hs.shiftKey;var hr=f7(i,hs);if(eE){dX=hr?hq:null;if(!hr&&hq==88&&!dI&&(cu?hs.metaKey:hs.ctrlKey)){i.replaceSelection("",null,"cut")}}if(hq==18&&!/\bCodeMirror-crosshair\b/.test(i.display.lineDiv.className)){aC(i)}}function aC(hq){var hr=hq.display.lineDiv;gs(hr,"CodeMirror-crosshair");function i(hs){if(hs.keyCode==18||!hs.altKey){h(hr,"CodeMirror-crosshair");eS(document,"keyup",i);eS(document,"mouseover",i)}}cj(document,"keyup",i);cj(document,"mouseover",i)}function bu(i){if(i.keyCode==16){this.doc.sel.shift=false}a4(this,i)}function c0(ht){var i=this;if(bo(i.display,ht)||a4(i,ht)||ht.ctrlKey&&!ht.altKey||cu&&ht.metaKey){return}var hs=ht.keyCode,hq=ht.charCode;if(eE&&hs==dX){dX=null;c9(ht);return}if((eE&&(!ht.which||ht.which<10))&&f7(i,ht)){return}var hr=String.fromCharCode(hq==null?hs:hq);if(hr=="\x08"){return}if(eV(i,ht,hr)){return}i.display.input.onKeyPress(ht)}var dB=400;var dV=function(hq,hr,i){this.time=hq;this.pos=hr;this.button=i};dV.prototype.compare=function(hq,hr,i){return this.time+dB>hq&&cF(hr,this.pos)==0&&i==this.button};var dW;var dM;function I(hr,hq){var i=+new Date;if(dM&&dM.compare(i,hr,hq)){dW=dM=null;return"triple"}else{if(dW&&dW.compare(i,hr,hq)){dM=new dV(i,hr,hq);dW=null;return"double"}else{dW=new dV(i,hr,hq);dM=null;return"single"}}}function fb(ht){var i=this,hs=i.display;if(a4(i,ht)||hs.activeTouch&&hs.input.supportsTouch()){return}hs.input.ensurePolled();hs.shift=ht.shiftKey;if(bo(hs,ht)){if(!dv){hs.scroller.draggable=false;setTimeout(function(){return hs.scroller.draggable=true},100)}return}if(n(i,ht)){return}var hu=cQ(i,ht),hq=gJ(ht),hr=hu?I(hu,hq):"single";window.focus();if(hq==1&&i.state.selectingText){i.state.selectingText(ht)}if(hu&&df(i,hq,hu,hr,ht)){return}if(hq==1){if(hu){aG(i,hu,hr,ht)}else{if(Q(ht)==hs.scroller){c9(ht)}}}else{if(hq==2){if(hu){gX(i.doc,hu)}setTimeout(function(){return hs.input.focus()},20)}else{if(hq==3){if(hf){aH(i,ht)}else{at(i)}}}}}function df(i,hr,hu,ht,hs){var hq="Click";if(ht=="double"){hq="Double"+hq}else{if(ht=="triple"){hq="Triple"+hq}}hq=(hr==1?"Left":hr==2?"Middle":"Right")+hq;return bq(i,gZ(hq,hs),hs,function(hw){if(typeof hw=="string"){hw=fm[hw]}if(!hw){return false}var hv=false;try{if(i.isReadOnly()){i.state.suppressEdits=true}hv=hw(i,hu)!=cz}finally{i.state.suppressEdits=false}return hv})}function b3(i,hu,hs){var hq=i.getOption("configureMouse");var ht=hq?hq(i,hu,hs):{};if(ht.unit==null){var hr=gC?hs.shiftKey&&hs.metaKey:hs.altKey;ht.unit=hr?"rectangle":hu=="single"?"char":hu=="double"?"word":"line"}if(ht.extend==null||i.doc.extend){ht.extend=i.doc.extend||hs.shiftKey}if(ht.addNew==null){ht.addNew=cu?hs.metaKey:hs.ctrlKey}if(ht.moveOnDrag==null){ht.moveOnDrag=!(cu?hs.altKey:hs.ctrlKey)}return ht}function aG(i,hv,hu,hs){if(ei){setTimeout(cY(t,i),0)}else{i.curOp.focus=em()}var hr=b3(i,hu,hs);var ht=i.doc.sel,hq;if(i.options.dragDrop&&fx&&!i.isReadOnly()&&hu=="single"&&(hq=ht.contains(hv))>-1&&(cF((hq=ht.ranges[hq]).from(),hv)<0||hv.xRel>0)&&(cF(hq.to(),hv)>0||hv.xRel<0)){bg(i,hs,hv,hr)}else{o(i,hs,hv,hr)}}function bg(hw,i,ht,hq){var hs=hw.display,hu=false;var hr=dw(hw,function(hy){if(dv){hs.scroller.draggable=false}hw.state.draggingText=false;eS(hs.wrapper.ownerDocument,"mouseup",hr);eS(hs.wrapper.ownerDocument,"mousemove",hx);eS(hs.scroller,"dragstart",hv);eS(hs.scroller,"drop",hr);if(!hu){c9(hy);if(!hq.addNew){gX(hw.doc,ht,null,null,hq.extend)}if(dv||ei&&m==9){setTimeout(function(){hs.wrapper.ownerDocument.body.focus();hs.input.focus()},20)}else{hs.input.focus()}}});var hx=function(hy){hu=hu||Math.abs(i.clientX-hy.clientX)+Math.abs(i.clientY-hy.clientY)>=10};var hv=function(){return hu=true};if(dv){hs.scroller.draggable=true}hw.state.draggingText=hr;hr.copy=!hq.moveOnDrag;if(hs.scroller.dragDrop){hs.scroller.dragDrop()}cj(hs.wrapper.ownerDocument,"mouseup",hr);cj(hs.wrapper.ownerDocument,"mousemove",hx);cj(hs.scroller,"dragstart",hv);cj(hs.scroller,"drop",hr);at(hw);setTimeout(function(){return hs.input.focus()},20)}function es(hq,hs,hr){if(hr=="char"){return new ex(hs,hs)}if(hr=="word"){return hq.findWordAt(hs)}if(hr=="line"){return new ex(ac(hs.line,0),gD(hq.doc,ac(hs.line+1,0)))}var i=hr(hq,hs);return new ex(i.from,i.to)}function o(hs,hE,hr,hw){var hD=hs.display,hH=hs.doc;c9(hE);var hq,hG,ht=hH.sel,i=ht.ranges;if(hw.addNew&&!hw.extend){hG=hH.sel.contains(hr);if(hG>-1){hq=i[hG]}else{hq=new ex(hr,hr)}}else{hq=hH.sel.primary();hG=hH.sel.primIndex}if(hw.unit=="rectangle"){if(!hw.addNew){hq=new ex(hr,hr)}hr=cQ(hs,hE,true,true);hG=-1}else{var hx=es(hs,hr,hw.unit);if(hw.extend){hq=gj(hq,hx.anchor,hx.head,hw.extend)}else{hq=hx}}if(!hw.addNew){hG=0;cg(hH,new g4([hq],0),R);ht=hH.sel}else{if(hG==-1){hG=i.length;cg(hH,cZ(i.concat([hq]),hG),{scroll:false,origin:"*mouse"})}else{if(i.length>1&&i[hG].empty()&&hw.unit=="char"&&!hw.extend){cg(hH,cZ(i.slice(0,hG).concat(i.slice(hG+1)),0),{scroll:false,origin:"*mouse"});ht=hH.sel}else{e(hH,hG,hq,R)}}}var hC=hr;function hB(hT){if(cF(hC,hT)==0){return}hC=hT;if(hw.unit=="rectangle"){var hK=[],hQ=hs.options.tabSize;var hJ=cd(f4(hH,hr.line).text,hr.ch,hQ);var hW=cd(f4(hH,hT.line).text,hT.ch,hQ);var hL=Math.min(hJ,hW),hU=Math.max(hJ,hW);for(var hX=Math.min(hr.line,hT.line),hN=Math.min(hs.lastLine(),Math.max(hr.line,hT.line));hX<=hN;hX++){var hV=f4(hH,hX).text,hM=e5(hV,hL,hQ);if(hL==hU){hK.push(new ex(ac(hX,hM),ac(hX,hM)))}else{if(hV.length>hM){hK.push(new ex(ac(hX,hM),ac(hX,e5(hV,hU,hQ))))}}}if(!hK.length){hK.push(new ex(hr,hr))}cg(hH,cZ(ht.ranges.slice(0,hG).concat(hK),hG),{origin:"*mouse",scroll:false});hs.scrollIntoView(hT)}else{var hR=hq;var hP=es(hs,hT,hw.unit);var hO=hR.anchor,hS;if(cF(hP.anchor,hO)>0){hS=hP.head;hO=aB(hR.from(),hP.anchor)}else{hS=hP.anchor;hO=bR(hR.to(),hP.head)}var hI=ht.ranges.slice(0);hI[hG]=au(hs,new ex(gD(hH,hO),hS));cg(hH,cZ(hI,hG),R)}}var hz=hD.wrapper.getBoundingClientRect();var hu=0;function hF(hK){var hI=++hu;var hM=cQ(hs,hK,true,hw.unit=="rectangle");if(!hM){return}if(cF(hM,hC)!=0){hs.curOp.focus=em();hB(hM);var hL=ct(hD,hH);if(hM.line>=hL.to||hM.line<hL.from){setTimeout(dw(hs,function(){if(hu==hI){hF(hK)}}),150)}}else{var hJ=hK.clientY<hz.top?-20:hK.clientY>hz.bottom?20:0;if(hJ){setTimeout(dw(hs,function(){if(hu!=hI){return}hD.scroller.scrollTop+=hJ;hF(hK)}),50)}}}function hy(hI){hs.state.selectingText=false;hu=Infinity;c9(hI);hD.input.focus();eS(hD.wrapper.ownerDocument,"mousemove",hA);eS(hD.wrapper.ownerDocument,"mouseup",hv);hH.history.lastSelOrigin=null}var hA=dw(hs,function(hI){if(hI.buttons===0||!gJ(hI)){hy(hI)}else{hF(hI)}});var hv=dw(hs,hy);hs.state.selectingText=hv;cj(hD.wrapper.ownerDocument,"mousemove",hA);cj(hD.wrapper.ownerDocument,"mouseup",hv)}function au(hE,hx){var hw=hx.anchor;var hB=hx.head;var hA=f4(hE.doc,hw.line);if(cF(hw,hB)==0&&hw.sticky==hB.sticky){return hx}var ht=a(hA);if(!ht){return hx}var hz=aS(ht,hw.ch,hw.sticky),hr=ht[hz];if(hr.from!=hw.ch&&hr.to!=hw.ch){return hx}var hq=hz+((hr.from==hw.ch)==(hr.level!=1)?0:1);if(hq==0||hq==ht.length){return hx}var hy;if(hB.line!=hw.line){hy=(hB.line-hw.line)*(hE.doc.direction=="ltr"?1:-1)>0}else{var hv=aS(ht,hB.ch,hB.sticky);var hs=hv-hz||(hB.ch-hw.ch)*(hr.level==1?-1:1);if(hv==hq-1||hv==hq){hy=hs<0}else{hy=hs>0}}var hu=ht[hq+(hy?-1:0)];var hD=hy==(hu.level==1);var i=hD?hu.from:hu.to,hC=hD?"after":"before";return hw.ch==i&&hw.sticky==hC?hx:new ex(new ac(hw.line,i,hC),hB)}function ho(hA,hw,hy,hz){var hr,hq;if(hw.touches){hr=hw.touches[0].clientX;hq=hw.touches[0].clientY}else{try{hr=hw.clientX;hq=hw.clientY}catch(hw){return false}}if(hr>=Math.floor(hA.display.gutters.getBoundingClientRect().right)){return false}if(hz){c9(hw)}var hx=hA.display;var hv=hx.lineDiv.getBoundingClientRect();if(hq>hv.bottom||!f9(hA,hy)){return b6(hw)}hq-=hv.top-hx.viewOffset;for(var ht=0;ht<hA.options.gutters.length;++ht){var hu=hx.gutters.childNodes[ht];if(hu&&hu.getBoundingClientRect().right>=hr){var hB=b1(hA.doc,hq);var hs=hA.options.gutters[ht];aO(hA,hy,hA,hB,hs,hw);return b6(hw)}}}function n(i,hq){return ho(i,hq,"gutterClick",true)}function aH(i,hq){if(bo(i.display,hq)||dP(i,hq)){return}if(a4(i,hq,"contextmenu")){return}i.display.input.onContextMenu(hq)}function dP(i,hq){if(!f9(i,"gutterContextMenu")){return false}return ho(i,hq,"gutterContextMenu",false)}function di(i){i.display.wrapper.className=i.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+i.options.theme.replace(/(^|\s)\s*/g," cm-s-");ar(i)}var cA={toString:function(){return"CodeMirror.Init"}};var fR={};var bs={};function fr(i){var hr=i.optionHandlers;function hq(hs,hv,hu,ht){i.defaults[hs]=hv;if(hu){hr[hs]=ht?function(hw,hy,hx){if(hx!=cA){hu(hw,hy,hx)}}:hu}}i.defineOption=hq;i.Init=cA;hq("value","",function(hs,ht){return hs.setValue(ht)},true);hq("mode",null,function(hs,ht){hs.doc.modeOption=ht;bK(hs)},true);hq("indentUnit",2,bK,true);hq("indentWithTabs",false);hq("smartIndent",true);hq("tabSize",4,function(hs){e0(hs);ar(hs);ap(hs)},true);hq("lineSeparator",null,function(hs,hv){hs.doc.lineSep=hv;if(!hv){return}var hu=[],hw=hs.doc.first;hs.doc.iter(function(hx){for(var hz=0;;){var hy=hx.text.indexOf(hv,hz);if(hy==-1){break}hz=hy+hv.length;hu.push(ac(hw,hy))}hw++});for(var ht=hu.length-1;ht>=0;ht--){be(hs.doc,hv,hu[ht],ac(hu[ht].line,hu[ht].ch+hv.length))}});hq("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(hs,hu,ht){hs.state.specialChars=new RegExp(hu.source+(hu.test("\t")?"":"|\t"),"g");if(ht!=cA){hs.refresh()}});hq("specialCharPlaceholder",f3,function(hs){return hs.refresh()},true);hq("electricChars",true);hq("inputStyle",eT?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},true);hq("spellcheck",false,function(hs,ht){return hs.getInputField().spellcheck=ht},true);hq("rtlMoveVisually",!a1);hq("wholeLineUpdateBefore",true);hq("theme","default",function(hs){di(hs);d5(hs)},true);hq("keyMap","default",function(hs,hw,ht){var hu=gW(hw);var hv=ht!=cA&&gW(ht);if(hv&&hv.detach){hv.detach(hs,hu)}if(hu.attach){hu.attach(hs,hv||null)}});hq("extraKeys",null);hq("configureMouse",null);hq("lineWrapping",false,fq,true);hq("gutters",[],function(hs){cD(hs.options);d5(hs)},true);hq("fixedGutter",true,function(hs,ht){hs.display.gutters.style.left=ht?ey(hs.display)+"px":"0";hs.refresh()},true);hq("coverGutterNextToScrollbar",false,function(hs){return fN(hs)},true);hq("scrollbarStyle","native",function(hs){aN(hs);fN(hs);hs.display.scrollbars.setScrollTop(hs.doc.scrollTop);hs.display.scrollbars.setScrollLeft(hs.doc.scrollLeft)},true);hq("lineNumbers",false,function(hs){cD(hs.options);d5(hs)},true);hq("firstLineNumber",1,d5,true);hq("lineNumberFormatter",function(hs){return hs},d5,true);hq("showCursorWhenSelecting",false,bW,true);hq("resetSelectionOnContextMenu",true);hq("lineWiseCopyCut",true);hq("pasteLinesPerSelection",true);hq("readOnly",false,function(hs,ht){if(ht=="nocursor"){a8(hs);hs.display.input.blur()}hs.display.input.readOnlyChanged(ht)});hq("disableInput",false,function(hs,ht){if(!ht){hs.display.input.reset()}},true);hq("dragDrop",true,g2);hq("allowDropFileTypes",null);hq("cursorBlinkRate",530);hq("cursorScrollMargin",0);hq("cursorHeight",1,bW,true);hq("singleCursorHeightPerLine",true,bW,true);hq("workTime",100);hq("workDelay",100);hq("flattenSpans",true,e0,true);hq("addModeClass",false,e0,true);hq("pollInterval",100);hq("undoDepth",200,function(hs,ht){return hs.doc.history.undoDepth=ht});hq("historyEventDelay",1250);hq("viewportMargin",10,function(hs){return hs.refresh()},true);hq("maxHighlightLength",10000,e0,true);hq("moveInputWithCursor",true,function(hs,ht){if(!ht){hs.display.input.resetPosition()}});hq("tabindex",null,function(hs,ht){return hs.display.input.getField().tabIndex=ht||""});hq("autofocus",null);hq("direction","ltr",function(hs,ht){return hs.doc.setDirection(ht)},true)}function d5(i){eP(i);ap(i);fo(i)}function g2(hq,ht,hr){var hu=hr&&hr!=cA;if(!ht!=!hu){var hs=hq.display.dragFunctions;var i=ht?cj:eS;i(hq.display.scroller,"dragstart",hs.start);i(hq.display.scroller,"dragenter",hs.enter);i(hq.display.scroller,"dragover",hs.over);i(hq.display.scroller,"dragleave",hs.leave);i(hq.display.scroller,"drop",hs.drop)}}function fq(i){if(i.options.lineWrapping){gs(i.display.wrapper,"CodeMirror-wrap");i.display.sizer.style.minWidth="";i.display.sizerWidth=null}else{h(i.display.wrapper,"CodeMirror-wrap");f(i)}af(i);ap(i);ar(i);setTimeout(function(){return fN(i)},100)}function K(hq,hs){var hx=this;if(!(this instanceof K)){return new K(hq,hs)}this.options=hs=hs?aZ(hs):{};aZ(fR,hs,false);cD(hs);var hw=hs.value;if(typeof hw=="string"){hw=new aD(hw,hs.mode,null,hs.lineSeparator,hs.direction)}this.doc=hw;var hr=new K.inputStyles[hs.inputStyle](this);var hv=this.display=new ft(hq,hw,hr);hv.wrapper.CodeMirror=this;eP(this);di(this);if(hs.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}aN(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,delayingBlurEvent:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,selectingText:false,draggingText:false,highlight:new hp(),keySeq:null,specialChars:null};if(hs.autofocus&&!eT){hv.input.focus()}if(ei&&m<11){setTimeout(function(){return hx.display.input.reset(true)},20)}gM(this);bw();dd(this);this.curOp.forceUpdate=true;eO(this,hw);if((hs.autofocus&&!eT)||this.hasFocus()){setTimeout(cY(c4,this),20)}else{a8(this)}for(var hu in bs){if(bs.hasOwnProperty(hu)){bs[hu](hx,hs[hu],cA)}}eH(this);if(hs.finishInit){hs.finishInit(this)}for(var ht=0;ht<bl.length;++ht){bl[ht](hx)}aw(this);if(dv&&hs.lineWrapping&&getComputedStyle(hv.lineDiv).textRendering=="optimizelegibility"){hv.lineDiv.style.textRendering="auto"}}K.defaults=fR;K.optionHandlers=bs;function gM(hq){var hu=hq.display;cj(hu.scroller,"mousedown",dw(hq,fb));if(ei&&m<11){cj(hu.scroller,"dblclick",dw(hq,function(hy){if(a4(hq,hy)){return}var hz=cQ(hq,hy);if(!hz||n(hq,hy)||bo(hq.display,hy)){return}c9(hy);var hx=hq.findWordAt(hz);gX(hq.doc,hx.anchor,hx.head)}))}else{cj(hu.scroller,"dblclick",function(hx){return a4(hq,hx)||c9(hx)})}if(!hf){cj(hu.scroller,"contextmenu",function(hx){return aH(hq,hx)})}var hw,i={end:0};function hv(){if(hu.activeTouch){hw=setTimeout(function(){return hu.activeTouch=null},1000);i=hu.activeTouch;i.end=+new Date}}function hs(hx){if(hx.touches.length!=1){return false}var hy=hx.touches[0];return hy.radiusX<=1&&hy.radiusY<=1}function hr(hA,hx){if(hx.left==null){return true}var hz=hx.left-hA.left,hy=hx.top-hA.top;return hz*hz+hy*hy>20*20}cj(hu.scroller,"touchstart",function(hy){if(!a4(hq,hy)&&!hs(hy)&&!n(hq,hy)){hu.input.ensurePolled();clearTimeout(hw);var hx=+new Date;hu.activeTouch={start:hx,moved:false,prev:hx-i.end<=300?i:null};if(hy.touches.length==1){hu.activeTouch.left=hy.touches[0].pageX;hu.activeTouch.top=hy.touches[0].pageY}}});cj(hu.scroller,"touchmove",function(){if(hu.activeTouch){hu.activeTouch.moved=true}});cj(hu.scroller,"touchend",function(hy){var hA=hu.activeTouch;if(hA&&!bo(hu,hy)&&hA.left!=null&&!hA.moved&&new Date-hA.start<300){var hz=hq.coordsChar(hu.activeTouch,"page"),hx;if(!hA.prev||hr(hA,hA.prev)){hx=new ex(hz,hz)}else{if(!hA.prev.prev||hr(hA,hA.prev.prev)){hx=hq.findWordAt(hz)}else{hx=new ex(ac(hz.line,0),gD(hq.doc,ac(hz.line+1,0)))}}hq.setSelection(hx.anchor,hx.head);hq.focus();c9(hy)}hv()});cj(hu.scroller,"touchcancel",hv);cj(hu.scroller,"scroll",function(){if(hu.scroller.clientHeight){B(hq,hu.scroller.scrollTop);bY(hq,hu.scroller.scrollLeft,true);aO(hq,"scroll",hq)}});cj(hu.scroller,"mousewheel",function(hx){return c(hq,hx)});cj(hu.scroller,"DOMMouseScroll",function(hx){return c(hq,hx)});cj(hu.wrapper,"scroll",function(){return hu.wrapper.scrollTop=hu.wrapper.scrollLeft=0});hu.dragFunctions={enter:function(hx){if(!a4(hq,hx)){e6(hx)}},over:function(hx){if(!a4(hq,hx)){hn(hq,hx);e6(hx)}},start:function(hx){return U(hq,hx)},drop:dw(hq,bx),leave:function(hx){if(!a4(hq,hx)){dJ(hq)}}};var ht=hu.input.getField();cj(ht,"keyup",function(hx){return bu.call(hq,hx)});cj(ht,"keydown",dw(hq,r));cj(ht,"keypress",dw(hq,c0));cj(ht,"focus",function(hx){return c4(hq,hx)});cj(ht,"blur",function(hx){return a8(hq,hx)})}var bl=[];K.defineInitHook=function(i){return bl.push(i)};function ak(hF,hu,hE,hs){var hD=hF.doc,hr;if(hE==null){hE="add"}if(hE=="smart"){if(!hD.mode.indent){hE="prev"}else{hr=fL(hF,hu).state}}var hy=hF.options.tabSize;var hG=f4(hD,hu),hx=cd(hG.text,null,hy);if(hG.stateAfter){hG.stateAfter=null}var hq=hG.text.match(/^\s*/)[0],hB;if(!hs&&!/\S/.test(hG.text)){hB=0;hE="not"}else{if(hE=="smart"){hB=hD.mode.indent(hr,hG.text.slice(hq.length),hG.text);if(hB==cz||hB>150){if(!hs){return}hE="prev"}}}if(hE=="prev"){if(hu>hD.first){hB=cd(f4(hD,hu-1).text,null,hy)}else{hB=0}}else{if(hE=="add"){hB=hx+hF.options.indentUnit}else{if(hE=="subtract"){hB=hx-hF.options.indentUnit}else{if(typeof hE=="number"){hB=hx+hE}}}}hB=Math.max(0,hB);var hC="",hA=0;if(hF.options.indentWithTabs){for(var hv=Math.floor(hB/hy);hv;--hv){hA+=hy;hC+="\t"}}if(hA<hB){hC+=cS(hB-hA)}if(hC!=hq){be(hD,hC,ac(hu,0),ac(hu,hq.length),"+input");hG.stateAfter=null;return true}else{for(var ht=0;ht<hD.sel.ranges.length;ht++){var hw=hD.sel.ranges[ht];if(hw.head.line==hu&&hw.head.ch<hq.length){var hz=ac(hu,hq.length);e(hD,ht,new ex(hz,hz));break}}}}var bz=null;function dC(i){bz=i}function gY(hF,hv,ht,hs,hE){var hD=hF.doc;hF.display.shift=false;if(!hs){hs=hD.sel}var hu=hF.state.pasteIncoming||hE=="paste";var hy=gO(hv),hq=null;if(hu&&hs.ranges.length>1){if(bz&&bz.text.join("\n")==hv){if(hs.ranges.length%bz.text.length==0){hq=[];for(var hw=0;hw<bz.text.length;hw++){hq.push(hD.splitLines(bz.text[hw]))}}}else{if(hy.length==hs.ranges.length&&hF.options.pasteLinesPerSelection){hq=cf(hy,function(i){return[i]})}}}var hz;for(var hr=hs.ranges.length-1;hr>=0;hr--){var hx=hs.ranges[hr];var hC=hx.from(),hB=hx.to();if(hx.empty()){if(ht&&ht>0){hC=ac(hC.line,hC.ch-ht)}else{if(hF.state.overwrite&&!hu){hB=ac(hB.line,Math.min(f4(hD,hB.line).text.length,hB.ch+gy(hy).length))}else{if(bz&&bz.lineWise&&bz.text.join("\n")==hv){hC=hB=ac(hC.line,0)}}}}hz=hF.curOp.updateInput;var hA={from:hC,to:hB,text:hq?hq[hr%hq.length]:hy,origin:hE||(hu?"paste":hF.state.cutIncoming?"cut":"+input")};bt(hF.doc,hA);am(hF,"inputRead",hF,hA)}if(hv&&!hu){gU(hF,hv)}gx(hF);hF.curOp.updateInput=hz;hF.curOp.typing=true;hF.state.pasteIncoming=hF.state.cutIncoming=false}function bn(hr,i){var hq=hr.clipboardData&&hr.clipboardData.getData("Text");if(hq){hr.preventDefault();if(!i.isReadOnly()&&!i.options.disableInput){dh(i,function(){return gY(i,hq,0,null,"paste")})}return true}}function gU(hq,hu){if(!hq.options.electricChars||!hq.options.smartIndent){return}var hv=hq.doc.sel;for(var ht=hv.ranges.length-1;ht>=0;ht--){var hr=hv.ranges[ht];if(hr.head.ch>100||(ht&&hv.ranges[ht-1].head.line==hr.head.line)){continue}var hw=hq.getModeAt(hr.head);var hx=false;if(hw.electricChars){for(var hs=0;hs<hw.electricChars.length;hs++){if(hu.indexOf(hw.electricChars.charAt(hs))>-1){hx=ak(hq,hr.head.line,"smart");break}}}else{if(hw.electricInput){if(hw.electricInput.test(f4(hq.doc,hr.head.line).text.slice(0,hr.head.ch))){hx=ak(hq,hr.head.line,"smart")}}}if(hx){am(hq,"electricInput",hq,hr.head.line)}}}function dQ(hq){var hv=[],hs=[];for(var ht=0;ht<hq.doc.sel.ranges.length;ht++){var hr=hq.doc.sel.ranges[ht].head.line;var hu={anchor:ac(hr,0),head:ac(hr+1,0)};hs.push(hu);hv.push(hq.getRange(hu.anchor,hu.head))}return{text:hv,ranges:hs}}function gK(hq,i){hq.setAttribute("autocorrect","off");hq.setAttribute("autocapitalize","off");hq.setAttribute("spellcheck",!!i)}function ba(){var i=g5("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");var hq=g5("div",[i],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");if(dv){i.style.width="1000px"}else{i.setAttribute("wrap","off")}if(fQ){i.style.border="1px solid black"}gK(i);return hq}function en(i){var hq=i.optionHandlers;var hr=i.helpers={};i.prototype={constructor:i,focus:function(){window.focus();this.display.input.focus()},setOption:function(hu,hv){var ht=this.options,hs=ht[hu];if(ht[hu]==hv&&hu!="mode"){return}ht[hu]=hv;if(hq.hasOwnProperty(hu)){dw(this,hq[hu])(this,hv,hs)}aO(this,"optionChange",this,hu)},getOption:function(hs){return this.options[hs]},getDoc:function(){return this.doc},addKeyMap:function(ht,hs){this.state.keyMaps[hs?"push":"unshift"](gW(ht))},removeKeyMap:function(ht){var hu=this.state.keyMaps;for(var hs=0;hs<hu.length;++hs){if(hu[hs]==ht||hu[hs].name==ht){hu.splice(hs,1);return true}}},addOverlay:dG(function(hs,ht){var hu=hs.token?hs:i.getMode(this.options,hs);if(hu.startState){throw new Error("Overlays may not be stateful.")}cx(this.state.overlays,{mode:hu,modeSpec:hs,opaque:ht&&ht.opaque,priority:(ht&&ht.priority)||0},function(hv){return hv.priority});this.state.modeGen++;ap(this)}),removeOverlay:dG(function(hs){var hw=this;var hu=this.state.overlays;for(var ht=0;ht<hu.length;++ht){var hv=hu[ht].modeSpec;if(hv==hs||typeof hs=="string"&&hv.name==hs){hu.splice(ht,1);hw.state.modeGen++;ap(hw);return}}}),indentLine:dG(function(hu,hs,ht){if(typeof hs!="string"&&typeof hs!="number"){if(hs==null){hs=this.options.smartIndent?"smart":"prev"}else{hs=hs?"add":"subtract"}}if(cw(this.doc,hu)){ak(this,hu,hs,ht)}}),indentSelection:dG(function(hC){var hy=this;var hs=this.doc.sel.ranges,hv=-1;for(var hx=0;hx<hs.length;hx++){var hz=hs[hx];if(!hz.empty()){var hA=hz.from(),hB=hz.to();var ht=Math.max(hv,hA.line);hv=Math.min(hy.lastLine(),hB.line-(hB.ch?0:1))+1;for(var hw=ht;hw<hv;++hw){ak(hy,hw,hC)}var hu=hy.doc.sel.ranges;if(hA.ch==0&&hs.length==hu.length&&hu[hx].from().ch>0){e(hy.doc,hx,new ex(hA,hu[hx].to()),ah)}}else{if(hz.head.line>hv){ak(hy,hz.head.line,hC,true);hv=hz.head.line;if(hx==hy.doc.sel.primIndex){gx(hy)}}}}}),getTokenAt:function(ht,hs){return cT(this,ht,hs)},getLineTokens:function(ht,hs){return cT(this,ac(ht),hs,true)},getTokenTypeAt:function(hz){hz=gD(this.doc,hz);var hv=dE(this,f4(this.doc,hz.line));var hx=0,hy=(hv.length-1)/2,hu=hz.ch;var ht;if(hu==0){ht=hv[2]}else{for(;;){var hs=(hx+hy)>>1;if((hs?hv[hs*2-1]:0)>=hu){hy=hs}else{if(hv[hs*2+1]<hu){hx=hs+1}else{ht=hv[hs*2+2];break}}}}var hw=ht?ht.indexOf("overlay "):-1;return hw<0?ht:hw==0?null:ht.slice(0,hw-1)},getModeAt:function(ht){var hs=this.doc.mode;if(!hs.innerMode){return hs}return i.innerMode(hs,this.getTokenAt(ht).state).mode},getHelper:function(ht,hs){return this.getHelpers(ht,hs)[0]},getHelpers:function(hz,hy){var hw=this;var hB=[];if(!hr.hasOwnProperty(hy)){return hB}var hu=hr[hy],hx=this.getModeAt(hz);if(typeof hx[hy]=="string"){if(hu[hx[hy]]){hB.push(hu[hx[hy]])}}else{if(hx[hy]){for(var hv=0;hv<hx[hy].length;hv++){var ht=hu[hx[hy][hv]];if(ht){hB.push(ht)}}}else{if(hx.helperType&&hu[hx.helperType]){hB.push(hu[hx.helperType])}else{if(hu[hx.name]){hB.push(hu[hx.name])}}}}for(var hs=0;hs<hu._global.length;hs++){var hA=hu._global[hs];if(hA.pred(hx,hw)&&dR(hB,hA.val)==-1){hB.push(hA.val)}}return hB},getStateAfter:function(ht,hs){var hu=this.doc;ht=dA(hu,ht==null?hu.first+hu.size-1:ht);return fL(this,ht+1,hs).state},cursorCoords:function(hv,ht){var hu,hs=this.doc.sel.primary();if(hv==null){hu=hs.head}else{if(typeof hv=="object"){hu=gD(this.doc,hv)}else{hu=hv?hs.from():hs.to()}}return eu(this,hu,ht||"page")},charCoords:function(ht,hs){return de(this,gD(this.doc,ht),hs||"page")},coordsChar:function(hs,ht){hs=hl(this,hs,ht||"page");return gL(this,hs.left,hs.top)},lineAtHeight:function(hs,ht){hs=hl(this,{top:hs,left:0},ht||"page").top;return b1(this.doc,hs+this.display.viewOffset)},heightAtLine:function(ht,hx,hw){var hs=false,hu;if(typeof ht=="number"){var hv=this.doc.first+this.doc.size-1;if(ht<this.doc.first){ht=this.doc.first}else{if(ht>hv){ht=hv;hs=true}}hu=f4(this.doc,ht)}else{hu=ht}return fD(this,hu,{top:0,left:0},hx||"page",hw||hs).top+(hs?this.doc.height-b7(hu):0)},defaultTextHeight:function(){return bb(this.display)},defaultCharWidth:function(){return ea(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(hx,hu,hz,hv,hB){var hw=this.display;hx=eu(this,gD(this.doc,hx));var hy=hx.bottom,ht=hx.left;hu.style.position="absolute";hu.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(hu);hw.sizer.appendChild(hu);if(hv=="over"){hy=hx.top}else{if(hv=="above"||hv=="near"){var hs=Math.max(hw.wrapper.clientHeight,this.doc.height),hA=Math.max(hw.sizer.clientWidth,hw.lineSpace.clientWidth);if((hv=="above"||hx.bottom+hu.offsetHeight>hs)&&hx.top>hu.offsetHeight){hy=hx.top-hu.offsetHeight}else{if(hx.bottom+hu.offsetHeight<=hs){hy=hx.bottom}}if(ht+hu.offsetWidth>hA){ht=hA-hu.offsetWidth}}}hu.style.top=hy+"px";hu.style.left=hu.style.right="";if(hB=="right"){ht=hw.sizer.clientWidth-hu.offsetWidth;hu.style.right="0px"}else{if(hB=="left"){ht=0}else{if(hB=="middle"){ht=(hw.sizer.clientWidth-hu.offsetWidth)/2}}hu.style.left=ht+"px"}if(hz){H(this,{left:ht,top:hy,right:ht+hu.offsetWidth,bottom:hy+hu.offsetHeight})}},triggerOnKeyDown:dG(r),triggerOnKeyPress:dG(c0),triggerOnKeyUp:bu,triggerOnMouseDown:dG(fb),execCommand:function(hs){if(fm.hasOwnProperty(hs)){return fm[hs].call(null,this)}},triggerElectric:dG(function(hs){gU(this,hs)}),findPosH:function(hz,hv,hw,ht){var hy=this;var hs=1;if(hv<0){hs=-1;hv=-hv}var hx=gD(this.doc,hz);for(var hu=0;hu<hv;++hu){hx=bP(hy.doc,hx,hs,hw,ht);if(hx.hitSide){break}}return hx},moveH:dG(function(hs,ht){var hu=this;this.extendSelectionsBy(function(hv){if(hu.display.shift||hu.doc.extend||hv.empty()){return bP(hu.doc,hv.head,hs,ht,hu.options.rtlMoveVisually)}else{return hs<0?hv.from():hv.to()}},dr)}),deleteH:dG(function(hs,ht){var hu=this.doc.sel,hv=this.doc;if(hu.somethingSelected()){hv.replaceSelection("",null,"+delete")}else{fM(this,function(hx){var hw=bP(hv,hx.head,hs,ht,false);return hs<0?{from:hw,to:hx.head}:{from:hx.head,to:hw}})}}),findPosV:function(hy,hv,hz,hB){var hu=this;var hs=1,hx=hB;if(hv<0){hs=-1;hv=-hv}var hA=gD(this.doc,hy);for(var ht=0;ht<hv;++ht){var hw=eu(hu,hA,"div");if(hx==null){hx=hw.left}else{hw.left=hx}hA=bJ(hu,hw,hs,hz);if(hA.hitSide){break}}return hA},moveV:dG(function(hs,hu){var hy=this;var hw=this.doc,hv=[];var hx=!this.display.shift&&!hw.extend&&hw.sel.somethingSelected();hw.extendSelectionsBy(function(hz){if(hx){return hs<0?hz.from():hz.to()}var hB=eu(hy,hz.head,"div");if(hz.goalColumn!=null){hB.left=hz.goalColumn}hv.push(hB.left);var hA=bJ(hy,hB,hs,hu);if(hu=="page"&&hz==hw.sel.primary()){db(hy,de(hy,hA,"div").top-hB.top)}return hA},dr);if(hv.length){for(var ht=0;ht<hw.sel.ranges.length;ht++){hw.sel.ranges[ht].goalColumn=hv[ht]}}}),findWordAt:function(hz){var hx=this.doc,hv=f4(hx,hz.line).text;var hy=hz.ch,hu=hz.ch;if(hv){var hw=this.getHelper(hz,"wordChars");if((hz.sticky=="before"||hu==hv.length)&&hy){--hy}else{++hu}var ht=hv.charAt(hy);var hs=c3(ht,hw)?function(hA){return c3(hA,hw)}:/\s/.test(ht)?function(hA){return/\s/.test(hA)}:function(hA){return(!/\s/.test(hA)&&!c3(hA))};while(hy>0&&hs(hv.charAt(hy-1))){--hy}while(hu<hv.length&&hs(hv.charAt(hu))){++hu}}return new ex(ac(hz.line,hy),ac(hz.line,hu))},toggleOverwrite:function(hs){if(hs!=null&&hs==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){gs(this.display.cursorDiv,"CodeMirror-overwrite")}else{h(this.display.cursorDiv,"CodeMirror-overwrite")}aO(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==em()},isReadOnly:function(){return !!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dG(function(hs,ht){fy(this,hs,ht)}),getScrollInfo:function(){var hs=this.display.scroller;return{left:hs.scrollLeft,top:hs.scrollTop,height:hs.scrollHeight-dn(this)-this.display.barHeight,width:hs.scrollWidth-dn(this)-this.display.barWidth,clientHeight:dq(this),clientWidth:dU(this)}},scrollIntoView:dG(function(hs,ht){if(hs==null){hs={from:this.doc.sel.primary().head,to:null};if(ht==null){ht=this.options.cursorScrollMargin}}else{if(typeof hs=="number"){hs={from:ac(hs,0),to:null}}else{if(hs.from==null){hs={from:hs,to:null}}}}if(!hs.to){hs.to=hs.from}hs.margin=ht||0;if(hs.from.line!=null){cB(this,hs)}else{cb(this,hs.from,hs.to,hs.margin)}}),setSize:dG(function(hu,hs){var hw=this;var ht=function(hx){return typeof hx=="number"||/^\d+$/.test(String(hx))?hx+"px":hx};if(hu!=null){this.display.wrapper.style.width=ht(hu)}if(hs!=null){this.display.wrapper.style.height=ht(hs)}if(this.options.lineWrapping){a0(this)}var hv=this.display.viewFrom;this.doc.iter(hv,this.display.viewTo,function(hx){if(hx.widgets){for(var hy=0;hy<hx.widgets.length;hy++){if(hx.widgets[hy].noHScroll){W(hw,hv,"widget");break}}}++hv});this.curOp.forceUpdate=true;aO(this,"refresh",this)}),operation:function(hs){return dh(this,hs)},startOperation:function(){return dd(this)},endOperation:function(){return aw(this)},refresh:dG(function(){var hs=this.display.cachedTextHeight;ap(this);this.curOp.forceUpdate=true;ar(this);fy(this,this.doc.scrollLeft,this.doc.scrollTop);dz(this);if(hs==null||Math.abs(hs-bb(this.display))>0.5){af(this)}aO(this,"refresh",this)}),swapDoc:dG(function(ht){var hs=this.doc;hs.cm=null;eO(this,ht);ar(this);this.display.input.reset();fy(this,ht.scrollLeft,ht.scrollTop);this.curOp.forceScroll=true;am(this,"swapDoc",this,hs);return hs}),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}};bT(i);i.registerHelper=function(ht,hs,hu){if(!hr.hasOwnProperty(ht)){hr[ht]=i[ht]={_global:[]}}hr[ht][hs]=hu};i.registerGlobalHelper=function(hu,ht,hs,hv){i.registerHelper(hu,ht,hv);hr[hu]._global.push({pred:hs,val:hv})}}function bP(hB,hA,hs,hC,hq){var ht=hA;var hx=hs;var hw=f4(hB,hA.line);function i(){var hG=hA.line+hs;if(hG<hB.first||hG>=hB.first+hB.size){return false}hA=new ac(hG,hA.ch,hA.sticky);return hw=f4(hB,hG)}function hu(hH){var hG;if(hq){hG=v(hB.cm,hw,hA,hs)}else{hG=aq(hw,hA,hs)}if(hG==null){if(!hH&&i()){hA=fh(hq,hB.cm,hw,hA.line,hs)}else{return false}}else{hA=hG}return true}if(hC=="char"){hu()}else{if(hC=="column"){hu(true)}else{if(hC=="word"||hC=="group"){var hz=null,hE=hC=="group";var hr=hB.cm&&hB.cm.getHelper(hA,"wordChars");for(var hv=true;;hv=false){if(hs<0&&!hu(!hv)){break}var hD=hw.text.charAt(hA.ch)||"\n";var hy=c3(hD,hr)?"w":hE&&hD=="\n"?"n":!hE||/\s/.test(hD)?null:"p";if(hE&&!hv&&!hy){hy="s"}if(hz&&hz!=hy){if(hs<0){hs=1;hu();hA.sticky="after"}break}if(hy){hz=hy}if(hs>0&&!hu(!hv)){break}}}}}var hF=ch(hB,hA,ht,hx,true);if(ad(ht,hF)){hF.hitSide=true}return hF}function bJ(hy,ht,hq,hx){var hw=hy.doc,hv=ht.left,hu;if(hx=="page"){var hs=Math.min(hy.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);var i=Math.max(hs-0.5*bb(hy.display),3);hu=(hq>0?ht.bottom:ht.top)+hq*i}else{if(hx=="line"){hu=hq>0?ht.bottom+3:ht.top-3}}var hr;for(;;){hr=gL(hy,hv,hu);if(!hr.outside){break}if(hq<0?hu<=0:hu>=hw.height){hr.hitSide=true;break}hu+=hq*5}return hr}var d3=function(i){this.cm=i;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new hp();this.composing=null;this.gracePeriod=false;this.readDOMTimeout=null};d3.prototype.init=function(hs){var hu=this;var hr=this,i=hr.cm;var ht=hr.div=hs.lineDiv;gK(ht,i.options.spellcheck);cj(ht,"paste",function(hv){if(a4(i,hv)||bn(hv,i)){return}if(m<=11){setTimeout(dw(i,function(){return hu.updateFromDOM()}),20)}});cj(ht,"compositionstart",function(hv){hu.composing={data:hv.data,done:false}});cj(ht,"compositionupdate",function(hv){if(!hu.composing){hu.composing={data:hv.data,done:false}}});cj(ht,"compositionend",function(hv){if(hu.composing){if(hv.data!=hu.composing.data){hu.readFromDOMSoon()}hu.composing.done=true}});cj(ht,"touchstart",function(){return hr.forceCompositionEnd()});cj(ht,"input",function(){if(!hu.composing){hu.readFromDOMSoon()}});function hq(hz){if(a4(i,hz)){return}if(i.somethingSelected()){dC({lineWise:false,text:i.getSelections()});if(hz.type=="cut"){i.replaceSelection("",null,"cut")}}else{if(!i.options.lineWiseCopyCut){return}else{var hw=dQ(i);dC({lineWise:true,text:hw.text});if(hz.type=="cut"){i.operation(function(){i.setSelections(hw.ranges,0,ah);i.replaceSelection("",null,"cut")})}}}if(hz.clipboardData){hz.clipboardData.clearData();var hy=bz.text.join("\n");hz.clipboardData.setData("Text",hy);if(hz.clipboardData.getData("Text")==hy){hz.preventDefault();return}}var hx=ba(),hA=hx.firstChild;i.display.lineSpace.insertBefore(hx,i.display.lineSpace.firstChild);hA.value=bz.text.join("\n");var hv=document.activeElement;ej(hA);setTimeout(function(){i.display.lineSpace.removeChild(hx);hv.focus();if(hv==ht){hr.showPrimarySelection()}},50)}cj(ht,"copy",hq);cj(ht,"cut",hq)};d3.prototype.prepareSelection=function(){var i=gB(this.cm,false);i.focus=this.cm.state.focused;return i};d3.prototype.showSelection=function(hq,i){if(!hq||!this.cm.display.view.length){return}if(hq.focus||i){this.showPrimarySelection()}this.showMultipleSelections(hq)};d3.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()};d3.prototype.showPrimarySelection=function(){var ht=this.getSelection(),hD=this.cm,hw=hD.doc.sel.primary();var hB=hw.from(),hC=hw.to();if(hD.display.viewTo==hD.display.viewFrom||hB.line>=hD.display.viewTo||hC.line<hD.display.viewFrom){ht.removeAllRanges();return}var hu=aI(hD,ht.anchorNode,ht.anchorOffset);var hy=aI(hD,ht.focusNode,ht.focusOffset);if(hu&&!hu.bad&&hy&&!hy.bad&&cF(aB(hu,hy),hB)==0&&cF(bR(hu,hy),hC)==0){return}var hA=hD.display.view;var hs=(hB.line>=hD.display.viewFrom&&c2(hD,hB))||{node:hA[0].measure.map[2],offset:0};var hx=hC.line<hD.display.viewTo&&c2(hD,hC);if(!hx){var hr=hA[hA.length-1].measure;var hq=hr.maps?hr.maps[hr.maps.length-1]:hr.map;hx={node:hq[hq.length-1],offset:hq[hq.length-2]-hq[hq.length-3]}}if(!hs||!hx){ht.removeAllRanges();return}var hv=ht.rangeCount&&ht.getRangeAt(0),i;try{i=cO(hs.node,hs.offset,hx.offset,hx.node)}catch(hz){}if(i){if(!cR&&hD.state.focused){ht.collapse(hs.node,hs.offset);if(!i.collapsed){ht.removeAllRanges();ht.addRange(i)}}else{ht.removeAllRanges();ht.addRange(i)}if(hv&&ht.anchorNode==null){ht.addRange(hv)}else{if(cR){this.startGracePeriod()}}}this.rememberSelection()};d3.prototype.startGracePeriod=function(){var i=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){i.gracePeriod=false;if(i.selectionChanged()){i.cm.operation(function(){return i.cm.curOp.selectionChanged=true})}},20)};d3.prototype.showMultipleSelections=function(i){ce(this.cm.display.cursorDiv,i.cursors);ce(this.cm.display.selectionDiv,i.selection)};d3.prototype.rememberSelection=function(){var i=this.getSelection();this.lastAnchorNode=i.anchorNode;this.lastAnchorOffset=i.anchorOffset;this.lastFocusNode=i.focusNode;this.lastFocusOffset=i.focusOffset};d3.prototype.selectionInEditor=function(){var hq=this.getSelection();if(!hq.rangeCount){return false}var i=hq.getRangeAt(0).commonAncestorContainer;return hg(this.div,i)};d3.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"){if(!this.selectionInEditor()){this.showSelection(this.prepareSelection(),true)}this.div.focus()}};d3.prototype.blur=function(){this.div.blur()};d3.prototype.getField=function(){return this.div};d3.prototype.supportsTouch=function(){return true};d3.prototype.receivedFocus=function(){var i=this;if(this.selectionInEditor()){this.pollSelection()}else{dh(this.cm,function(){return i.cm.curOp.selectionChanged=true})}function hq(){if(i.cm.state.focused){i.pollSelection();i.polling.set(i.cm.options.pollInterval,hq)}}this.polling.set(this.cm.options.pollInterval,hq)};d3.prototype.selectionChanged=function(){var i=this.getSelection();return i.anchorNode!=this.lastAnchorNode||i.anchorOffset!=this.lastAnchorOffset||i.focusNode!=this.lastFocusNode||i.focusOffset!=this.lastFocusOffset};d3.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged()){return}var hs=this.getSelection(),i=this.cm;if(aY&&dL&&this.cm.options.gutters.length&&g7(hs.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs});this.blur();this.focus();return}if(this.composing){return}this.rememberSelection();var hq=aI(i,hs.anchorNode,hs.anchorOffset);var hr=aI(i,hs.focusNode,hs.focusOffset);if(hq&&hr){dh(i,function(){cg(i.doc,fE(hq,hr),ah);if(hq.bad||hr.bad){i.curOp.selectionChanged=true}})}};d3.prototype.pollContent=function(){if(this.readDOMTimeout!=null){clearTimeout(this.readDOMTimeout);this.readDOMTimeout=null}var hz=this.cm,hJ=hz.display,hH=hz.doc.sel.primary();var hI=hH.from(),ht=hH.to();if(hI.ch==0&&hI.line>hz.firstLine()){hI=ac(hI.line-1,f4(hz.doc,hI.line-1).length)}if(ht.ch==f4(hz.doc,ht.line).text.length&&ht.line<hz.lastLine()){ht=ac(ht.line+1,0)}if(hI.line<hJ.viewFrom||ht.line>hJ.viewTo-1){return false}var hw,hu,hy;if(hI.line==hJ.viewFrom||(hw=d0(hz,hI.line))==0){hu=b8(hJ.view[0].line);hy=hJ.view[0].node}else{hu=b8(hJ.view[hw].line);hy=hJ.view[hw-1].node.nextSibling}var hG=d0(hz,ht.line);var hB,hE;if(hG==hJ.view.length-1){hB=hJ.viewTo-1;hE=hJ.lineDiv.lastChild}else{hB=b8(hJ.view[hG+1].line)-1;hE=hJ.view[hG+1].node.previousSibling}if(!hy){return false}var hK=hz.doc.splitLines(g1(hz,hy,hE,hu,hB));var hD=g8(hz.doc,ac(hu,0),ac(hB,f4(hz.doc,hB).text.length));while(hK.length>1&&hD.length>1){if(gy(hK)==gy(hD)){hK.pop();hD.pop();hB--}else{if(hK[0]==hD[0]){hK.shift();hD.shift();hu++}else{break}}}var hF=0,hr=0;var hA=hK[0],hq=hD[0],i=Math.min(hA.length,hq.length);while(hF<i&&hA.charCodeAt(hF)==hq.charCodeAt(hF)){++hF}var hx=gy(hK),hL=gy(hD);var hs=Math.min(hx.length-(hK.length==1?hF:0),hL.length-(hD.length==1?hF:0));while(hr<hs&&hx.charCodeAt(hx.length-hr-1)==hL.charCodeAt(hL.length-hr-1)){++hr}if(hK.length==1&&hD.length==1&&hu==hI.line){while(hF&&hF>hI.ch&&hx.charCodeAt(hx.length-hr-1)==hL.charCodeAt(hL.length-hr-1)){hF--;hr++}}hK[hK.length-1]=hx.slice(0,hx.length-hr).replace(/^\u200b+/,"");hK[0]=hK[0].slice(hF).replace(/\u200b+$/,"");var hv=ac(hu,hF);var hC=ac(hB,hD.length?gy(hD).length-hr:0);if(hK.length>1||hK[0]||cF(hv,hC)){be(hz.doc,hK,hv,hC,"+input");return true}};d3.prototype.ensurePolled=function(){this.forceCompositionEnd()};d3.prototype.reset=function(){this.forceCompositionEnd()};d3.prototype.forceCompositionEnd=function(){if(!this.composing){return}clearTimeout(this.readDOMTimeout);this.composing=null;this.updateFromDOM();this.div.blur();this.div.focus()};d3.prototype.readFromDOMSoon=function(){var i=this;if(this.readDOMTimeout!=null){return}this.readDOMTimeout=setTimeout(function(){i.readDOMTimeout=null;if(i.composing){if(i.composing.done){i.composing=null}else{return}}i.updateFromDOM()},80)};d3.prototype.updateFromDOM=function(){var i=this;if(this.cm.isReadOnly()||!this.pollContent()){dh(this.cm,function(){return ap(i.cm)})}};d3.prototype.setUneditable=function(i){i.contentEditable="false"};d3.prototype.onKeyPress=function(i){if(i.charCode==0||this.composing){return}i.preventDefault();if(!this.cm.isReadOnly()){dw(this.cm,gY)(this.cm,String.fromCharCode(i.charCode==null?i.keyCode:i.charCode),0)}};d3.prototype.readOnlyChanged=function(i){this.div.contentEditable=String(i!="nocursor")};d3.prototype.onContextMenu=function(){};d3.prototype.resetPosition=function(){};d3.prototype.needsContentAttribute=true;function c2(hv,ht){var hu=f1(hv,ht.line);if(!hu||hu.hidden){return null}var hx=f4(hv.doc,ht.line);var hq=cW(hu,hx,ht.line);var hr=a(hx,hv.doc.direction),hs="left";if(hr){var i=aS(hr,ht.ch);hs=i%2?"right":"left"}var hw=aV(hq.map,ht.ch,hs);hw.offset=hw.collapse=="right"?hw.end:hw.start;return hw}function g7(hq){for(var i=hq;i;i=i.parentNode){if(/CodeMirror-gutter-wrapper/.test(i.className)){return true}}return false}function e7(hq,i){if(i){hq.bad=true}return hq}function g1(hy,hw,hx,hs,hq){var hA="",hr=false,i=hy.doc.lineSeparator(),ht=false;function hu(hC){return function(hD){return hD.id==hC}}function hB(){if(hr){hA+=i;if(ht){hA+=i}hr=ht=false}}function hz(hC){if(hC){hB();hA+=hC}}function hv(hH){if(hH.nodeType==1){var hE=hH.getAttribute("cm-text");if(hE){hz(hE);return}var hG=hH.getAttribute("cm-marker"),hD;if(hG){var hI=hy.findMarks(ac(hs,0),ac(hq+1,0),hu(+hG));if(hI.length&&(hD=hI[0].find(0))){hz(g8(hy.doc,hD.from,hD.to).join(i))}return}if(hH.getAttribute("contenteditable")=="false"){return}var hC=/^(pre|div|p|li|table|br)$/i.test(hH.nodeName);if(!/^br$/i.test(hH.nodeName)&&hH.textContent.length==0){return}if(hC){hB()}for(var hF=0;hF<hH.childNodes.length;hF++){hv(hH.childNodes[hF])}if(/^(pre|p)$/i.test(hH.nodeName)){ht=true}if(hC){hr=true}}else{if(hH.nodeType==3){hz(hH.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}}}for(;;){hv(hw);if(hw==hx){break}hw=hw.nextSibling;ht=false}return hA}function aI(hq,ht,hv){var hu;if(ht==hq.display.lineDiv){hu=hq.display.lineDiv.childNodes[hv];if(!hu){return e7(hq.clipPos(ac(hq.display.viewTo-1)),true)}ht=null;hv=0}else{for(hu=ht;;hu=hu.parentNode){if(!hu||hu==hq.display.lineDiv){return null}if(hu.parentNode&&hu.parentNode==hq.display.lineDiv){break}}}for(var hs=0;hs<hq.display.view.length;hs++){var hr=hq.display.view[hs];if(hr.node==hu){return ai(hr,ht,hv)}}}function ai(hy,hu,hw){var hr=hy.text.firstChild,ht=false;if(!hu||!hg(hr,hu)){return e7(ac(b8(hy.line),0),true)}if(hu==hr){ht=true;hu=hr.childNodes[hw];hw=0;if(!hu){var hE=hy.rest?gy(hy.rest):hy.line;return e7(ac(b8(hE),hE.text.length),ht)}}var hv=hu.nodeType==3?hu:null,hC=hu;if(!hv&&hu.childNodes.length==1&&hu.firstChild.nodeType==3){hv=hu.firstChild;if(hw){hw=hv.nodeValue.length}}while(hC.parentNode!=hr){hC=hC.parentNode}var hq=hy.measure,hA=hq.maps;function hx(hH,hM,hJ){for(var hL=-1;hL<(hA?hA.length:0);hL++){var hG=hL<0?hq.map:hA[hL];for(var hK=0;hK<hG.length;hK+=3){var hI=hG[hK+2];if(hI==hH||hI==hM){var hN=b8(hL<0?hy.line:hy.rest[hL]);var hF=hG[hK]+hJ;if(hJ<0||hI!=hH){hF=hG[hK+(hJ?1:0)]}return ac(hN,hF)}}}}var hD=hx(hv,hC,hw);if(hD){return e7(hD,ht)}for(var i=hC.nextSibling,hz=hv?hv.nodeValue.length-hw:0;i;i=i.nextSibling){hD=hx(i,i.firstChild,0);if(hD){return e7(ac(hD.line,hD.ch-hz),ht)}else{hz+=i.textContent.length}}for(var hB=hC.previousSibling,hs=hw;hB;hB=hB.previousSibling){hD=hx(hB,hB.firstChild,-1);if(hD){return e7(ac(hD.line,hD.ch+hs),ht)}else{hs+=hB.textContent.length}}}var ae=function(i){this.cm=i;this.prevInput="";this.pollingFast=false;this.polling=new hp();this.hasSelection=false;this.composing=null};ae.prototype.init=function(hr){var hu=this;var hq=this,i=this.cm;this.createField(hr);var hs=this.textarea;hr.wrapper.insertBefore(this.wrapper,hr.wrapper.firstChild);if(fQ){hs.style.width="0px"}cj(hs,"input",function(){if(ei&&m>=9&&hu.hasSelection){hu.hasSelection=null}hq.poll()});cj(hs,"paste",function(hv){if(a4(i,hv)||bn(hv,i)){return}i.state.pasteIncoming=true;hq.fastPoll()});function ht(hw){if(a4(i,hw)){return}if(i.somethingSelected()){dC({lineWise:false,text:i.getSelections()})}else{if(!i.options.lineWiseCopyCut){return}else{var hv=dQ(i);dC({lineWise:true,text:hv.text});if(hw.type=="cut"){i.setSelections(hv.ranges,null,ah)}else{hq.prevInput="";hs.value=hv.text.join("\n");ej(hs)}}}if(hw.type=="cut"){i.state.cutIncoming=true}}cj(hs,"cut",ht);cj(hs,"copy",ht);cj(hr.scroller,"paste",function(hv){if(bo(hr,hv)||a4(i,hv)){return}i.state.pasteIncoming=true;hq.focus()});cj(hr.lineSpace,"selectstart",function(hv){if(!bo(hr,hv)){c9(hv)}});cj(hs,"compositionstart",function(){var hv=i.getCursor("from");if(hq.composing){hq.composing.range.clear()}hq.composing={start:hv,range:i.markText(hv,i.getCursor("to"),{className:"CodeMirror-composing"})}});cj(hs,"compositionend",function(){if(hq.composing){hq.poll();hq.composing.range.clear();hq.composing=null}})};ae.prototype.createField=function(i){this.wrapper=ba();this.textarea=this.wrapper.firstChild};ae.prototype.prepareSelection=function(){var hq=this.cm,hu=hq.display,ht=hq.doc;var i=gB(hq);if(hq.options.moveInputWithCursor){var hv=eu(hq,ht.sel.primary().head,"div");var hr=hu.wrapper.getBoundingClientRect(),hs=hu.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(hu.wrapper.clientHeight-10,hv.top+hs.top-hr.top));i.teLeft=Math.max(0,Math.min(hu.wrapper.clientWidth-10,hv.left+hs.left-hr.left))}return i};ae.prototype.showSelection=function(hr){var i=this.cm,hq=i.display;ce(hq.cursorDiv,hr.cursors);ce(hq.selectionDiv,hr.selection);if(hr.teTop!=null){this.wrapper.style.top=hr.teTop+"px";this.wrapper.style.left=hr.teLeft+"px"}};ae.prototype.reset=function(hq){if(this.contextMenuPending||this.composing){return}var i=this.cm;if(i.somethingSelected()){this.prevInput="";var hr=i.getSelection();this.textarea.value=hr;if(i.state.focused){ej(this.textarea)}if(ei&&m>=9){this.hasSelection=hr}}else{if(!hq){this.prevInput=this.textarea.value="";if(ei&&m>=9){this.hasSelection=null}}}};ae.prototype.getField=function(){return this.textarea};ae.prototype.supportsTouch=function(){return false};ae.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!eT||em()!=this.textarea)){try{this.textarea.focus()}catch(i){}}};ae.prototype.blur=function(){this.textarea.blur()};ae.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0};ae.prototype.receivedFocus=function(){this.slowPoll()};ae.prototype.slowPoll=function(){var i=this;if(this.pollingFast){return}this.polling.set(this.cm.options.pollInterval,function(){i.poll();if(i.cm.state.focused){i.slowPoll()}})};ae.prototype.fastPoll=function(){var hq=false,i=this;i.pollingFast=true;function hr(){var hs=i.poll();if(!hs&&!hq){hq=true;i.polling.set(60,hr)}else{i.pollingFast=false;i.slowPoll()}}i.polling.set(20,hr)};ae.prototype.poll=function(){var hw=this;var i=this.cm,hr=this.textarea,hs=this.prevInput;if(this.contextMenuPending||!i.state.focused||(bL(hr)&&!hs&&!this.composing)||i.isReadOnly()||i.options.disableInput||i.state.keySeq){return false}var hu=hr.value;if(hu==hs&&!i.somethingSelected()){return false}if(ei&&m>=9&&this.hasSelection===hu||cu&&/[\uf700-\uf7ff]/.test(hu)){i.display.input.reset();return false}if(i.doc.sel==i.display.selForContextMenu){var ht=hu.charCodeAt(0);if(ht==8203&&!hs){hs="\u200b"}if(ht==8666){this.reset();return this.cm.execCommand("undo")}}var hv=0,hq=Math.min(hs.length,hu.length);while(hv<hq&&hs.charCodeAt(hv)==hu.charCodeAt(hv)){++hv}dh(i,function(){gY(i,hu.slice(hv),hs.length-hv,null,hw.composing?"*compose":null);if(hu.length>1000||hu.indexOf("\n")>-1){hr.value=hw.prevInput=""}else{hw.prevInput=hu}if(hw.composing){hw.composing.range.clear();hw.composing.range=i.markText(hw.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"})}});return true};ae.prototype.ensurePolled=function(){if(this.pollingFast&&this.poll()){this.pollingFast=false}};ae.prototype.onKeyPress=function(){if(ei&&m>=9){this.hasSelection=null}this.fastPoll()};ae.prototype.onContextMenu=function(hu){var hz=this,hA=hz.cm,hw=hA.display,hq=hz.textarea;var hy=cQ(hA,hu),i=hw.scroller.scrollTop;if(!hy||eE){return}var ht=hA.options.resetSelectionOnContextMenu;if(ht&&hA.doc.sel.contains(hy)==-1){dw(hA,cg)(hA.doc,fE(hy),ah)}var hv=hq.style.cssText,hD=hz.wrapper.style.cssText;hz.wrapper.style.cssText="position: absolute";var hC=hz.wrapper.getBoundingClientRect();hq.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(hu.clientY-hC.top-5)+"px; left: "+(hu.clientX-hC.left-5)+"px;\n z-index: 1000; background: "+(ei?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var hB;if(dv){hB=window.scrollY}hw.input.focus();if(dv){window.scrollTo(null,hB)}hw.input.reset();if(!hA.somethingSelected()){hq.value=hz.prevInput=" "}hz.contextMenuPending=true;hw.selForContextMenu=hA.doc.sel;clearTimeout(hw.detectingSelectAll);function hs(){if(hq.selectionStart!=null){var hE=hA.somethingSelected();var hF="\u200b"+(hE?hq.value:"");hq.value="\u21da";hq.value=hF;hz.prevInput=hE?"":"\u200b";hq.selectionStart=1;hq.selectionEnd=hF.length;hw.selForContextMenu=hA.doc.sel}}function hx(){hz.contextMenuPending=false;hz.wrapper.style.cssText=hD;hq.style.cssText=hv;if(ei&&m<9){hw.scrollbars.setScrollTop(hw.scroller.scrollTop=i)}if(hq.selectionStart!=null){if(!ei||(ei&&m<9)){hs()}var hE=0,hF=function(){if(hw.selForContextMenu==hA.doc.sel&&hq.selectionStart==0&&hq.selectionEnd>0&&hz.prevInput=="\u200b"){dw(hA,av)(hA)}else{if(hE++<10){hw.detectingSelectAll=setTimeout(hF,500)}else{hw.selForContextMenu=null;hw.input.reset()}}};hw.detectingSelectAll=setTimeout(hF,200)}}if(ei&&m>=9){hs()}if(hf){e6(hu);var hr=function(){eS(window,"mouseup",hr);setTimeout(hx,20)};cj(window,"mouseup",hr)}else{setTimeout(hx,50)}};ae.prototype.readOnlyChanged=function(i){if(!i){this.reset()}this.textarea.disabled=i=="nocursor"};ae.prototype.setUneditable=function(){};ae.prototype.needsContentAttribute=false;function gz(hw,hx){hx=hx?aZ(hx):{};hx.value=hw.value;if(!hx.tabindex&&hw.tabIndex){hx.tabindex=hw.tabIndex}if(!hx.placeholder&&hw.placeholder){hx.placeholder=hw.placeholder}if(hx.autofocus==null){var i=em();hx.autofocus=i==hw||hw.getAttribute("autofocus")!=null&&i==document.body}function ht(){hw.value=hv.getValue()}var hu;if(hw.form){cj(hw.form,"submit",ht);if(!hx.leaveSubmitMethodAlone){var hq=hw.form;hu=hq.submit;try{var hs=hq.submit=function(){ht();hq.submit=hu;hq.submit();hq.submit=hs}}catch(hr){}}}hx.finishInit=function(hy){hy.save=ht;hy.getTextArea=function(){return hw};hy.toTextArea=function(){hy.toTextArea=isNaN;ht();hw.parentNode.removeChild(hy.getWrapperElement());hw.style.display="";if(hw.form){eS(hw.form,"submit",ht);if(typeof hw.form.submit=="function"){hw.form.submit=hu}}}};hw.style.display="none";var hv=K(function(hy){return hw.parentNode.insertBefore(hy,hw.nextSibling)},hx);return hv}function gE(i){i.off=eS;i.on=cj;i.wheelEventPixels=aJ;i.Doc=aD;i.splitLines=gO;i.countColumn=cd;i.findColumn=e5;i.isWordChar=gv;i.Pass=cz;i.signal=aO;i.Line=ha;i.changeEnd=ds;i.scrollbarModel=bA;i.Pos=ac;i.cmpPos=cF;i.modes=d1;i.mimeModes=a5;i.resolveMode=hh;i.getMode=gr;i.modeExtensions=dY;i.extendMode=fn;i.copyState=cq;i.startState=cn;i.innerMode=hd;i.commands=fm;i.keyMap=f0;i.keyName=gf;i.isModifierKey=fj;i.lookupKey=k;i.normalizeKeyMap=da;i.StringStream=fH;i.SharedTextMarker=y;i.TextMarker=V;i.LineWidget=d9;i.e_preventDefault=c9;i.e_stopPropagation=dZ;i.e_stop=e6;i.addClass=gs;i.contains=hg;i.rmClass=h;i.keyNames=f5}fr(K);en(K);var d="iter insert remove copy getEditor constructor".split(" ");for(var b5 in aD.prototype){if(aD.prototype.hasOwnProperty(b5)&&dR(d,b5)<0){K.prototype[b5]=(function(i){return function(){return i.apply(this.doc,arguments)}})(aD.prototype[b5])}}bT(aD);K.inputStyles={textarea:ae,contenteditable:d3};K.defineMode=function(i){if(!K.defaults.mode&&i!="null"){K.defaults.mode=i}fa.apply(this,arguments)};K.defineMIME=bE;K.defineMode("null",function(){return({token:function(i){return i.skipToEnd()}})});K.defineMIME("text/plain","null");K.defineExtension=function(i,hq){K.prototype[i]=hq};K.defineDocExtension=function(i,hq){aD.prototype[i]=hq};K.fromTextArea=gz;gE(K);K.version="5.39.0";return K})));(function(a){"function"==typeof a.define&&a.define("core",["codemirror.js"],function(b){a.CodeMirror=b})})(this);
@@ -1 +1 @@
1
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,allowMissingTagName:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{if(z.allowMissingTagName&&C=="endTag"){h="tag bracket";return e(C,E,D)}else{h="error";return d}}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{if(z.allowMissingTagName&&D=="endTag"){h="tag bracket";return u(D,F,E)}else{h="error";return B}}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(ak,aw){var o=ak.indentUnit;var E=aw.statementIndent;var aM=aw.jsonld;var D=aw.json||aM;var g=aw.typescript;var aH=aw.wordCharacters||/[\w$\xa1-\uffff]/;var aF=function(){function aZ(a3){return{type:a3,style:"keyword"}}var aW=aZ("keyword a"),a2=aZ("keyword b"),a1=aZ("keyword c"),a0=aZ("keyword d");var aX=aZ("operator"),aY={type:"atom",style:"atom"};return{"if":aZ("if"),"while":aW,"with":aW,"else":a2,"do":a2,"try":a2,"finally":a2,"return":a0,"break":a0,"continue":a0,"new":aZ("new"),"delete":a1,"void":a1,"throw":a1,"debugger":aZ("debugger"),"var":aZ("var"),"const":aZ("var"),let:aZ("var"),"function":aZ("function"),"catch":aZ("catch"),"for":aZ("for"),"switch":aZ("switch"),"case":aZ("case"),"default":aZ("default"),"in":aX,"typeof":aX,"instanceof":aX,"true":aY,"false":aY,"null":aY,"undefined":aY,"NaN":aY,"Infinity":aY,"this":aZ("this"),"class":aZ("class"),"super":aZ("atom"),yield:a1,"export":aZ("export"),"import":aZ("import"),"extends":a1,await:a1}}();var W=/[+\-*&%=<>!?|~^@]/;var aE=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function J(aZ){var aX=false,aW,aY=false;while((aW=aZ.next())!=null){if(!aX){if(aW=="/"&&!aY){return}if(aW=="["){aY=true}else{if(aY&&aW=="]"){aY=false}}}aX=!aX&&aW=="\\"}}var ab,K;function R(aY,aX,aW){ab=aY;K=aW;return aX}function ad(a0,aY){var aW=a0.next();if(aW=='"'||aW=="'"){aY.tokenize=aa(aW);return aY.tokenize(a0,aY)}else{if(aW=="."&&a0.match(/^\d+(?:[eE][+\-]?\d+)?/)){return R("number","number")}else{if(aW=="."&&a0.match("..")){return R("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aW)){return R(aW)}else{if(aW=="="&&a0.eat(">")){return R("=>","operator")}else{if(aW=="0"&&a0.eat(/x/i)){a0.eatWhile(/[\da-f]/i);return R("number","number")}else{if(aW=="0"&&a0.eat(/o/i)){a0.eatWhile(/[0-7]/i);return R("number","number")}else{if(aW=="0"&&a0.eat(/b/i)){a0.eatWhile(/[01]/i);return R("number","number")}else{if(/\d/.test(aW)){a0.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return R("number","number")}else{if(aW=="/"){if(a0.eat("*")){aY.tokenize=aL;return aL(a0,aY)}else{if(a0.eat("/")){a0.skipToEnd();return R("comment","comment")}else{if(aT(a0,aY,1)){J(a0);a0.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return R("regexp","string-2")}else{a0.eat("=");return R("operator","operator",a0.current())}}}}else{if(aW=="`"){aY.tokenize=aO;return aO(a0,aY)}else{if(aW=="#"){a0.skipToEnd();return R("error","error")}else{if(W.test(aW)){if(aW!=">"||!aY.lexical||aY.lexical.type!=">"){if(a0.eat("=")){if(aW=="!"||aW=="="){a0.eat("=")}}else{if(/[<>*+\-]/.test(aW)){a0.eat(aW);if(aW==">"){a0.eat(aW)}}}}return R("operator","operator",a0.current())}else{if(aH.test(aW)){a0.eatWhile(aH);var aZ=a0.current();if(aY.lastType!="."){if(aF.propertyIsEnumerable(aZ)){var aX=aF[aZ];return R(aX.type,aX.style,aZ)}if(aZ=="async"&&a0.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,false)){return R("async","keyword",aZ)}}return R("variable","variable",aZ)}}}}}}}}}}}}}}}function aa(aW){return function(a0,aY){var aZ=false,aX;if(aM&&a0.peek()=="@"&&a0.match(aE)){aY.tokenize=ad;return R("jsonld-keyword","meta")}while((aX=a0.next())!=null){if(aX==aW&&!aZ){break}aZ=!aZ&&aX=="\\"}if(!aZ){aY.tokenize=ad}return R("string","string")}}function aL(aZ,aY){var aW=false,aX;while(aX=aZ.next()){if(aX=="/"&&aW){aY.tokenize=ad;break}aW=(aX=="*")}return R("comment","comment")}function aO(aZ,aX){var aY=false,aW;while((aW=aZ.next())!=null){if(!aY&&(aW=="`"||aW=="$"&&aZ.eat("{"))){aX.tokenize=ad;break}aY=!aY&&aW=="\\"}return R("quasi","string-2",aZ.current())}var p="([{}])";function aJ(a4,aY){if(aY.fatArrowAt){aY.fatArrowAt=null}var a3=a4.string.indexOf("=>",a4.start);if(a3<0){return}if(g){var a0=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(a4.string.slice(a4.start,a3));if(a0){a3=a0.index}}var a1=0,aZ=false;for(var a2=a3-1;a2>=0;--a2){var aW=a4.string.charAt(a2);var aX=p.indexOf(aW);if(aX>=0&&aX<3){if(!a1){++a2;break}if(--a1==0){if(aW=="("){aZ=true}break}}else{if(aX>=3&&aX<6){++a1}else{if(aH.test(aW)){aZ=true}else{if(/["'\/]/.test(aW)){return}else{if(aZ&&!a1){++a2;break}}}}}}if(aZ&&!a1){aY.fatArrowAt=a2}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function P(a1,aX,aW,a0,aY,aZ){this.indented=a1;this.column=aX;this.type=aW;this.prev=aY;this.info=aZ;if(a0!=null){this.align=a0}}function w(aZ,aY){for(var aX=aZ.localVars;aX;aX=aX.next){if(aX.name==aY){return true}}for(var aW=aZ.context;aW;aW=aW.prev){for(var aX=aW.vars;aX;aX=aX.next){if(aX.name==aY){return true}}}}function f(a0,aX,aW,aZ,a1){var a2=a0.cc;I.state=a0;I.stream=a1;I.marked=null,I.cc=a2;I.style=aX;if(!a0.lexical.hasOwnProperty("align")){a0.lexical.align=true}while(true){var aY=a2.length?a2.pop():D?aA:aS;if(aY(aW,aZ)){while(a2.length&&a2[a2.length-1].lex){a2.pop()()}if(I.marked){return I.marked}if(aW=="variable"&&w(a0,aZ)){return"variable-2"}return aX}}}var I={state:null,column:null,marked:null,cc:null};function al(){for(var aW=arguments.length-1;aW>=0;aW--){I.cc.push(arguments[aW])}}function aq(){al.apply(null,arguments);return true}function aI(aX){function aW(a0){for(var aZ=a0;aZ;aZ=aZ.next){if(aZ.name==aX){return true}}return false}var aY=I.state;I.marked="def";if(aY.context){if(aW(aY.localVars)){return}aY.localVars={name:aX,next:aY.localVars}}else{if(aW(aY.globalVars)){return}if(aw.globalVars){aY.globalVars={name:aX,next:aY.globalVars}}}}function ax(aW){return aW=="public"||aW=="private"||aW=="protected"||aW=="abstract"||aW=="readonly"}var u={name:"this",next:{name:"arguments"}};function A(){I.state.context={prev:I.state.context,vars:I.state.localVars};I.state.localVars=u}function B(){I.state.localVars=I.state.context.vars;I.state.context=I.state.context.prev}function aQ(aX,aY){var aW=function(){var a1=I.state,aZ=a1.indented;if(a1.lexical.type=="stat"){aZ=a1.lexical.indented}else{for(var a0=a1.lexical;a0&&a0.type==")"&&a0.align;a0=a0.prev){aZ=a0.indented}}a1.lexical=new P(aZ,I.stream.column(),aX,null,a1.lexical,aY)};aW.lex=true;return aW}function h(){var aW=I.state;if(aW.lexical.prev){if(aW.lexical.type==")"){aW.indented=aW.lexical.indented}aW.lexical=aW.lexical.prev}}h.lex=true;function v(aW){function aX(aY){if(aY==aW){return aq()}else{if(aW==";"){return al()}else{return aq(aX)}}}return aX}function aS(aW,aX){if(aW=="var"){return aq(aQ("vardef",aX.length),c,v(";"),h)}if(aW=="keyword a"){return aq(aQ("form"),aB,aS,h)}if(aW=="keyword b"){return aq(aQ("form"),aS,h)}if(aW=="keyword d"){return I.stream.match(/^\s*$/,false)?aq():aq(aQ("stat"),av,v(";"),h)}if(aW=="debugger"){return aq(v(";"))}if(aW=="{"){return aq(aQ("}"),C,h)}if(aW==";"){return aq()}if(aW=="if"){if(I.state.lexical.info=="else"&&I.state.cc[I.state.cc.length-1]==h){I.state.cc.pop()()}return aq(aQ("form"),aB,aS,h,d)}if(aW=="function"){return aq(S)}if(aW=="for"){return aq(aQ("form"),y,aS,h)}if(aW=="class"||(g&&aX=="interface")){I.marked="keyword";return aq(aQ("form"),ag,h)}if(aW=="variable"){if(g&&aX=="type"){I.marked="keyword";return aq(j,v("operator"),j,v(";"))}else{if(g&&aX=="declare"){I.marked="keyword";return aq(aS)}else{if(g&&(aX=="module"||aX=="enum")&&I.stream.match(/^\s*\w/,false)){I.marked="keyword";return aq(aQ("form"),i,v("{"),aQ("}"),C,h,h)}else{if(g&&aX=="namespace"){I.marked="keyword";return aq(aQ("form"),aA,C,h)}else{return aq(aQ("stat"),aU)}}}}}if(aW=="switch"){return aq(aQ("form"),aB,v("{"),aQ("}","switch"),C,h,h)}if(aW=="case"){return aq(aA,v(":"))}if(aW=="default"){return aq(v(":"))}if(aW=="catch"){return aq(aQ("form"),A,v("("),ap,v(")"),aS,h,B)}if(aW=="export"){return aq(aQ("stat"),aR,h)}if(aW=="import"){return aq(aQ("stat"),ar,h)}if(aW=="async"){return aq(aS)}if(aX=="@"){return aq(aA,aS)}return al(aQ("stat"),aA,v(";"),h)}function aA(aW,aX){return aj(aW,aX,false)}function aP(aW,aX){return aj(aW,aX,true)}function aB(aW){if(aW!="("){return al()}return aq(aQ(")"),aA,v(")"),h)}function aj(aX,aY,a0){if(I.state.fatArrowAt==I.stream.start){var aW=a0?T:ah;if(aX=="("){return aq(A,aQ(")"),aG(ap,")"),h,v("=>"),aW,B)}else{if(aX=="variable"){return al(A,i,v("=>"),aW,B)}}}var aZ=a0?k:am;if(b.hasOwnProperty(aX)){return aq(aZ)}if(aX=="function"){return aq(S,aZ)}if(aX=="class"||(g&&aY=="interface")){I.marked="keyword";return aq(aQ("form"),N,h)}if(aX=="keyword c"||aX=="async"){return aq(a0?aP:aA)}if(aX=="("){return aq(aQ(")"),av,v(")"),h,aZ)}if(aX=="operator"||aX=="spread"){return aq(a0?aP:aA)}if(aX=="["){return aq(aQ("]"),q,h,aZ)}if(aX=="{"){return aK(x,"}",null,aZ)}if(aX=="quasi"){return al(X,aZ)}if(aX=="new"){return aq(M(a0))}return aq()}function av(aW){if(aW.match(/[;\}\)\],]/)){return al()}return al(aA)}function am(aW,aX){if(aW==","){return aq(aA)}return k(aW,aX,false)}function k(aW,aY,a0){var aX=a0==false?am:k;var aZ=a0==false?aA:aP;if(aW=="=>"){return aq(A,a0?T:ah,B)}if(aW=="operator"){if(/\+\+|--/.test(aY)||g&&aY=="!"){return aq(aX)}if(g&&aY=="<"&&I.stream.match(/^([^>]|<.*?>)*>\s*\(/,false)){return aq(aQ(">"),aG(j,">"),h,aX)}if(aY=="?"){return aq(aA,v(":"),aZ)}return aq(aZ)}if(aW=="quasi"){return al(X,aX)}if(aW==";"){return}if(aW=="("){return aK(aP,")","call",aX)}if(aW=="."){return aq(ay,aX)}if(aW=="["){return aq(aQ("]"),av,v("]"),h,aX)}if(g&&aY=="as"){I.marked="keyword";return aq(j,aX)}if(aW=="regexp"){I.state.lastType=I.marked="operator";I.stream.backUp(I.stream.pos-I.stream.start-1);return aq(aZ)}}function X(aW,aX){if(aW!="quasi"){return al()}if(aX.slice(aX.length-2)!="${"){return aq(X)}return aq(aA,t)}function t(aW){if(aW=="}"){I.marked="string-2";I.state.tokenize=aO;return aq(X)}}function ah(aW){aJ(I.stream,I.state);return al(aW=="{"?aS:aA)}function T(aW){aJ(I.stream,I.state);return al(aW=="{"?aS:aP)}function M(aW){return function(aX){if(aX=="."){return aq(aW?r:af)}else{if(aX=="variable"&&g){return aq(e,aW?k:am)}else{return al(aW?aP:aA)}}}}function af(aW,aX){if(aX=="target"){I.marked="keyword";return aq(am)}}function r(aW,aX){if(aX=="target"){I.marked="keyword";return aq(k)}}function aU(aW){if(aW==":"){return aq(h,aS)}return al(am,v(";"),h)}function ay(aW){if(aW=="variable"){I.marked="property";return aq()}}function x(aX,aY){if(aX=="async"){I.marked="property";return aq(x)}else{if(aX=="variable"||I.style=="keyword"){I.marked="property";if(aY=="get"||aY=="set"){return aq(O)}var aW;if(g&&I.state.fatArrowAt==I.stream.start&&(aW=I.stream.match(/^\s*:\s*/,false))){I.state.fatArrowAt=I.stream.pos+aW[0].length}return aq(Q)}else{if(aX=="number"||aX=="string"){I.marked=aM?"property":(I.style+" property");return aq(Q)}else{if(aX=="jsonld-keyword"){return aq(Q)}else{if(g&&ax(aY)){I.marked="keyword";return aq(x)}else{if(aX=="["){return aq(aA,ac,v("]"),Q)}else{if(aX=="spread"){return aq(aP,Q)}else{if(aY=="*"){I.marked="keyword";return aq(x)}else{if(aX==":"){return al(Q)}}}}}}}}}}function O(aW){if(aW!="variable"){return al(Q)}I.marked="property";return aq(S)}function Q(aW){if(aW==":"){return aq(aP)}if(aW=="("){return al(S)}}function aG(aZ,aW,aX){function aY(a1,a2){if(aX?aX.indexOf(a1)>-1:a1==","){var a0=I.state.lexical;if(a0.info=="call"){a0.pos=(a0.pos||0)+1}return aq(function(a3,a4){if(a3==aW||a4==aW){return al()}return al(aZ)},aY)}if(a1==aW||a2==aW){return aq()}return aq(v(aW))}return function(a0,a1){if(a0==aW||a1==aW){return aq()}return al(aZ,aY)}}function aK(aZ,aW,aY){for(var aX=3;aX<arguments.length;aX++){I.cc.push(arguments[aX])}return aq(aQ(aW,aY),aG(aZ,aW),h)}function C(aW){if(aW=="}"){return aq()}return al(aS,C)}function ac(aW,aX){if(g){if(aW==":"){return aq(j)}if(aX=="?"){return aq(ac)}}}function U(aW){if(g&&aW==":"){if(I.stream.match(/^\s*\w+\s+is\b/,false)){return aq(aA,Y,j)}else{return aq(j)}}}function Y(aW,aX){if(aX=="is"){I.marked="keyword";return aq()}}function j(aW,aX){if(aW=="variable"||aX=="void"){if(aX=="keyof"){I.marked="keyword";return aq(j)}else{I.marked="type";return aq(L)}}if(aW=="string"||aW=="number"||aW=="atom"){return aq(L)}if(aW=="["){return aq(aQ("]"),aG(j,"]",","),h,L)}if(aW=="{"){return aq(aQ("}"),aG(az,"}",",;"),h,L)}if(aW=="("){return aq(aG(an,")"),Z)}}function Z(aW){if(aW=="=>"){return aq(j)}}function az(aW,aX){if(aW=="variable"||I.style=="keyword"){I.marked="property";return aq(az)}else{if(aX=="?"){return aq(az)}else{if(aW==":"){return aq(j)}else{if(aW=="["){return aq(aA,ac,v("]"),az)}}}}}function an(aW){if(aW=="variable"){return aq(an)}else{if(aW==":"){return aq(j)}}}function L(aW,aX){if(aX=="<"){return aq(aQ(">"),aG(j,">"),h,L)}if(aX=="|"||aW=="."){return aq(j)}if(aW=="["){return aq(v("]"),L)}if(aX=="extends"||aX=="implements"){I.marked="keyword";return aq(j)}}function e(aW,aX){if(aX=="<"){return aq(aQ(">"),aG(j,">"),h,L)}}function n(){return al(j,ae)}function ae(aW,aX){if(aX=="="){return aq(j)}}function c(){return al(i,ac,ao,ai)}function i(aW,aX){if(g&&ax(aX)){I.marked="keyword";return aq(i)}if(aW=="variable"){aI(aX);return aq()}if(aW=="spread"){return aq(i)}if(aW=="["){return aK(i,"]")}if(aW=="{"){return aK(aN,"}")}}function aN(aW,aX){if(aW=="variable"&&!I.stream.match(/^\s*:/,false)){aI(aX);return aq(ao)}if(aW=="variable"){I.marked="property"}if(aW=="spread"){return aq(i)}if(aW=="}"){return al()}return aq(v(":"),i,ao)}function ao(aW,aX){if(aX=="="){return aq(aP)}}function ai(aW){if(aW==","){return aq(c)}}function d(aW,aX){if(aW=="keyword b"&&aX=="else"){return aq(aQ("form","else"),aS,h)}}function y(aW){if(aW=="("){return aq(aQ(")"),H,v(")"),h)}}function H(aW){if(aW=="var"){return aq(c,v(";"),G)}if(aW==";"){return aq(G)}if(aW=="variable"){return aq(z)}return al(aA,v(";"),G)}function z(aW,aX){if(aX=="in"||aX=="of"){I.marked="keyword";return aq(aA)}return aq(am,G)}function G(aW,aX){if(aW==";"){return aq(F)}if(aX=="in"||aX=="of"){I.marked="keyword";return aq(aA)}return al(aA,v(";"),F)}function F(aW){if(aW!=")"){aq(aA)}}function S(aW,aX){if(aX=="*"){I.marked="keyword";return aq(S)}if(aW=="variable"){aI(aX);return aq(S)}if(aW=="("){return aq(A,aQ(")"),aG(ap,")"),h,U,aS,B)}if(g&&aX=="<"){return aq(aQ(">"),aG(n,">"),h,S)}}function ap(aW,aX){if(aX=="@"){aq(aA,ap)}if(aW=="spread"){return aq(ap)}if(g&&ax(aX)){I.marked="keyword";return aq(ap)}return al(i,ac,ao)}function N(aW,aX){if(aW=="variable"){return ag(aW,aX)}return V(aW,aX)}function ag(aW,aX){if(aW=="variable"){aI(aX);return aq(V)}}function V(aW,aX){if(aX=="<"){return aq(aQ(">"),aG(n,">"),h,V)}if(aX=="extends"||aX=="implements"||(g&&aW==",")){return aq(g?j:aA,V)}if(aW=="{"){return aq(aQ("}"),s,h)}}function s(aW,aX){if(aW=="async"||(aW=="variable"&&(aX=="static"||aX=="get"||aX=="set"||(g&&ax(aX)))&&I.stream.match(/^\s+[\w$\xa1-\uffff]/,false))){I.marked="keyword";return aq(s)}if(aW=="variable"||I.style=="keyword"){I.marked="property";return aq(g?aV:S,s)}if(aW=="["){return aq(aA,ac,v("]"),g?aV:S,s)}if(aX=="*"){I.marked="keyword";return aq(s)}if(aW==";"){return aq(s)}if(aW=="}"){return aq()}if(aX=="@"){return aq(aA,s)}}function aV(aW,aX){if(aX=="?"){return aq(aV)}if(aW==":"){return aq(j,ao)}if(aX=="="){return aq(aP)}return al(S)}function aR(aW,aX){if(aX=="*"){I.marked="keyword";return aq(au,v(";"))}if(aX=="default"){I.marked="keyword";return aq(aA,v(";"))}if(aW=="{"){return aq(aG(at,"}"),au,v(";"))}return al(aS)}function at(aW,aX){if(aX=="as"){I.marked="keyword";return aq(v("variable"))}if(aW=="variable"){return al(aP,at)}}function ar(aW){if(aW=="string"){return aq()}return al(aD,m,au)}function aD(aW,aX){if(aW=="{"){return aK(aD,"}")}if(aW=="variable"){aI(aX)}if(aX=="*"){I.marked="keyword"}return aq(l)}function m(aW){if(aW==","){return aq(aD,m)}}function l(aW,aX){if(aX=="as"){I.marked="keyword";return aq(aD)}}function au(aW,aX){if(aX=="from"){I.marked="keyword";return aq(aA)}}function q(aW){if(aW=="]"){return aq()}return al(aG(aP,"]"))}function aC(aX,aW){return aX.lastType=="operator"||aX.lastType==","||W.test(aW.charAt(0))||/[,.]/.test(aW.charAt(0))}function aT(aY,aX,aW){return aX.tokenize==ad&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(aX.lastType)||(aX.lastType=="quasi"&&/\{\s*$/.test(aY.string.slice(0,aY.pos-(aW||0))))}return{startState:function(aX){var aW={tokenize:ad,lastType:"sof",cc:[],lexical:new P((aX||0)-o,0,"block",false),localVars:aw.localVars,context:aw.localVars&&{vars:aw.localVars},indented:aX||0};if(aw.globalVars&&typeof aw.globalVars=="object"){aW.globalVars=aw.globalVars}return aW},token:function(aY,aX){if(aY.sol()){if(!aX.lexical.hasOwnProperty("align")){aX.lexical.align=false}aX.indented=aY.indentation();aJ(aY,aX)}if(aX.tokenize!=aL&&aY.eatSpace()){return null}var aW=aX.tokenize(aY,aX);if(ab=="comment"){return aW}aX.lastType=ab=="operator"&&(K=="++"||K=="--")?"incdec":ab;return f(aX,aW,ab,K,aY)},indent:function(aW,aZ){if(aW.tokenize==aL){return a.Pass}if(aW.tokenize!=ad){return 0}var a3=aZ&&aZ.charAt(0),a4=aW.lexical,a2;if(!/^\s*else\b/.test(aZ)){for(var aY=aW.cc.length-1;aY>=0;--aY){var a0=aW.cc[aY];if(a0==h){a4=a4.prev}else{if(a0!=d){break}}}}while((a4.type=="stat"||a4.type=="form")&&(a3=="}"||((a2=aW.cc[aW.cc.length-1])&&(a2==am||a2==k)&&!/^[,\.=+\-*:?[\(]/.test(aZ)))){a4=a4.prev}if(E&&a4.type==")"&&a4.prev.type=="stat"){a4=a4.prev}var a1=a4.type,aX=a3==a1;if(a1=="vardef"){return a4.indented+(aW.lastType=="operator"||aW.lastType==","?a4.info+1:0)}else{if(a1=="form"&&a3=="{"){return a4.indented}else{if(a1=="form"){return a4.indented+o}else{if(a1=="stat"){return a4.indented+(aC(aW,aZ)?E||o:0)}else{if(a4.info=="switch"&&!aX&&aw.doubleIndentSwitch!=false){return a4.indented+(/^(?:case|default)\b/.test(aZ)?o:2*o)}else{if(a4.align){return a4.column+(aX?0:1)}else{return a4.indented+(aX?0:o)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:D?null:"/*",blockCommentEnd:D?null:"*/",blockCommentContinue:D?null:" * ",lineComment:D?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:D?"json":"javascript",jsonldMode:aM,jsonMode:D,expressionAllowed:aT,skipExpression:function(aW){var aX=aW.cc[aW.cc.length-1];if(aX==aA||aX==aP){aW.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Z,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Z.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},Y=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},X=J.counterDescriptors||{},O=J.colorKeywords||{},T=J.valueKeywords||{},M=J.allowNested,S=J.lineComment,V=J.supportsAtComponent===true;var C,N;function aa(ad,ae){C=ae;return ad}function ac(ag,af){var ae=ag.next();if(A[ae]){var ad=A[ae](ag,af);if(ad!==false){return ad}}if(ae=="@"){ag.eatWhile(/[\w\\\-]/);return aa("def",ag.current())}else{if(ae=="="||(ae=="~"||ae=="|")&&ag.eat("=")){return aa(null,"compare")}else{if(ae=='"'||ae=="'"){af.tokenize=K(ae);return af.tokenize(ag,af)}else{if(ae=="#"){ag.eatWhile(/[\w\\\-]/);return aa("atom","hash")}else{if(ae=="!"){ag.match(/^\s*\w*/);return aa("keyword","important")}else{if(/\d/.test(ae)||ae=="."&&ag.eat(/\d/)){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ae==="-"){if(/[\d.]/.test(ag.peek())){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ag.match(/^-[\w\\\-]+/)){ag.eatWhile(/[\w\\\-]/);if(ag.match(/^\s*:/,false)){return aa("variable-2","variable-definition")}return aa("variable-2","variable")}else{if(ag.match(/^\w+-/)){return aa("meta","meta")}}}}else{if(/[,+>*\/]/.test(ae)){return aa(null,"select-op")}else{if(ae=="."&&ag.match(/^-?[_a-z][_a-z0-9-]*/i)){return aa("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ae)){return aa(null,ae)}else{if(((ae=="u"||ae=="U")&&ag.match(/rl(-prefix)?\(/i))||((ae=="d"||ae=="D")&&ag.match("omain(",true,true))||((ae=="r"||ae=="R")&&ag.match("egexp(",true,true))){ag.backUp(1);af.tokenize=ab;return aa("property","word")}else{if(/[\w\\\-]/.test(ae)){ag.eatWhile(/[\w\\\-]/);return aa("property","word")}else{return aa(null,null)}}}}}}}}}}}}}function K(ad){return function(ah,af){var ag=false,ae;while((ae=ah.next())!=null){if(ae==ad&&!ag){if(ad==")"){ah.backUp(1)}break}ag=!ag&&ae=="\\"}if(ae==ad||!ag&&ad!=")"){af.tokenize=null}return aa("string","string")}}function ab(ae,ad){ae.next();if(!ae.match(/\s*[\"\')]/,false)){ad.tokenize=K(")")}else{ad.tokenize=null}return aa(null,"(")}function R(ae,ad,af){this.type=ae;this.indent=ad;this.prev=af}function G(af,ag,ae,ad){af.context=new R(ae,ag.indentation()+(ad===false?0:Q),af.context);return ae}function U(ad){if(ad.context.prev){ad.context=ad.context.prev}return ad.context.type}function z(ad,af,ae){return F[ae.context.type](ad,af,ae)}function W(ae,ag,af,ah){for(var ad=ah||1;ad>0;ad--){af.context=af.context.prev}return z(ae,ag,af)}function H(ae){var ad=ae.current().toLowerCase();if(T.hasOwnProperty(ad)){N="atom"}else{if(O.hasOwnProperty(ad)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ad,af,ae){if(ad=="{"){return G(ae,af,"block")}else{if(ad=="}"&&ae.context.prev){return U(ae)}else{if(V&&/@component/i.test(ad)){return G(ae,af,"atComponentBlock")}else{if(/^@(-moz-)?document$/i.test(ad)){return G(ae,af,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/i.test(ad)){return G(ae,af,"atBlock")}else{if(/^@(font-face|counter-style)/i.test(ad)){ae.stateArg=ad;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(ad)){return"keyframes"}else{if(ad&&ad.charAt(0)=="@"){return G(ae,af,"at")}else{if(ad=="hash"){N="builtin"}else{if(ad=="word"){N="tag"}else{if(ad=="variable-definition"){return"maybeprop"}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}else{if(ad==":"){return"pseudo"}else{if(M&&ad=="("){return G(ae,af,"parens")}}}}}}}}}}}}}}return ae.context.type};F.block=function(ad,ag,ae){if(ad=="word"){var af=ag.current().toLowerCase();if(I.hasOwnProperty(af)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(af)){N="string-2";return"maybeprop"}else{if(M){N=ag.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ad=="meta"){return"block"}else{if(!M&&(ad=="hash"||ad=="qualifier")){N="error";return"block"}else{return F.top(ad,ag,ae)}}}};F.maybeprop=function(ad,af,ae){if(ad==":"){return G(ae,af,"prop")}return z(ad,af,ae)};F.prop=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"&&M){return G(ae,af,"propBlock")}if(ad=="}"||ad=="{"){return W(ad,af,ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(af.current())){N+=" error"}else{if(ad=="word"){H(af)}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}}}return"prop"};F.propBlock=function(ae,ad,af){if(ae=="}"){return U(af)}if(ae=="word"){N="property";return"maybeprop"}return af.context.type};F.parens=function(ad,af,ae){if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad==")"){return U(ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="interpolation"){return G(ae,af,"interpolation")}if(ad=="word"){H(af)}return"parens"};F.pseudo=function(ad,af,ae){if(ad=="meta"){return"pseudo"}if(ad=="word"){N="variable-3";return ae.context.type}return z(ad,af,ae)};F.documentTypes=function(ad,af,ae){if(ad=="word"&&y.hasOwnProperty(af.current())){N="tag";return ae.context.type}else{return F.atBlock(ad,af,ae)}};F.atBlock=function(ad,ag,ae){if(ad=="("){return G(ae,ag,"atBlock_parens")}if(ad=="}"||ad==";"){return W(ad,ag,ae)}if(ad=="{"){return U(ae)&&G(ae,ag,M?"block":"top")}if(ad=="interpolation"){return G(ae,ag,"interpolation")}if(ad=="word"){var af=ag.current().toLowerCase();if(af=="only"||af=="not"||af=="and"||af=="or"){N="keyword"}else{if(Y.hasOwnProperty(af)){N="attribute"}else{if(L.hasOwnProperty(af)){N="property"}else{if(P.hasOwnProperty(af)){N="keyword"}else{if(I.hasOwnProperty(af)){N="property"}else{if(B.hasOwnProperty(af)){N="string-2"}else{if(T.hasOwnProperty(af)){N="atom"}else{if(O.hasOwnProperty(af)){N="keyword"}else{N="error"}}}}}}}}}return ae.context.type};F.atComponentBlock=function(ad,af,ae){if(ad=="}"){return W(ad,af,ae)}if(ad=="{"){return U(ae)&&G(ae,af,M?"block":"top",false)}if(ad=="word"){N="error"}return ae.context.type};F.atBlock_parens=function(ad,af,ae){if(ad==")"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae,2)}return F.atBlock(ad,af,ae)};F.restricted_atBlock_before=function(ad,af,ae){if(ad=="{"){return G(ae,af,"restricted_atBlock")}if(ad=="word"&&ae.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ad,af,ae)};F.restricted_atBlock=function(ad,af,ae){if(ad=="}"){ae.stateArg=null;return U(ae)}if(ad=="word"){if((ae.stateArg=="@font-face"&&!E.hasOwnProperty(af.current().toLowerCase()))||(ae.stateArg=="@counter-style"&&!X.hasOwnProperty(af.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ad,af,ae){if(ad=="word"){N="variable";return"keyframes"}if(ad=="{"){return G(ae,af,"top")}return z(ad,af,ae)};F.at=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad=="word"){N="tag"}else{if(ad=="hash"){N="builtin"}}return"at"};F.interpolation=function(ad,af,ae){if(ad=="}"){return U(ae)}if(ad=="{"||ad==";"){return W(ad,af,ae)}if(ad=="word"){N="variable"}else{if(ad!="variable"&&ad!="("&&ad!=")"){N="error"}}return"interpolation"};return{startState:function(ad){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ad||0,null)}},token:function(af,ae){if(!ae.tokenize&&af.eatSpace()){return null}var ad=(ae.tokenize||ac)(af,ae);if(ad&&typeof ad=="object"){C=ad[1];ad=ad[0]}N=ad;if(C!="comment"){ae.state=F[ae.state](C,af,ae)}return N},indent:function(ah,af){var ae=ah.context,ag=af&&af.charAt(0);var ad=ae.indent;if(ae.type=="prop"&&(ag=="}"||ag==")")){ae=ae.prev}if(ae.prev){if(ag=="}"&&(ae.type=="block"||ae.type=="top"||ae.type=="interpolation"||ae.type=="restricted_atBlock")){ae=ae.prev;ad=ae.indent}else{if(ag==")"&&(ae.type=="parens"||ae.type=="atBlock_parens")||ag=="{"&&(ae.type=="at"||ae.type=="atBlock")){ad=Math.max(0,ae.indent-Q)}}}return ad},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:S,fold:"brace"}});function g(A){var z={};for(var y=0;y<A.length;++y){z[A[y].toLowerCase()]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["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"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var d=["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-blend-mode","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","caret-color","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-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","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","justify-items","justify-self","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","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","place-content","place-items","place-self","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","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"],h=g(d);var n=["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"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var c=["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"],m=g(c);var j=["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","auto-flow","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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","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","lighten","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","luminosity","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","multiply","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","opacity","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","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","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","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","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"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,lineComment:"//",tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/,false)){return[null,null]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,lineComment:"//",tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/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"]]};function f(n,j,k){var m=n.current(),l=m.search(j);if(l>-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?/^\s*(.*?)\s*$/.exec(k[2])[1]:""}function i(k,j){return new RegExp((j?"^":"")+"</s*"+k+"s*>","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=d.startState(q);return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(t,s,r){if(!t.localMode||/^\s*<\//.test(s)){return q.indent(t.htmlState,s)}else{if(t.localMode.indent){return t.localMode.indent(t.localState,s,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});CodeMirror.defineMode("bbcodemixed",function(c){var f,e,g,d,h=CodeMirror.getMode(c,"htmlmixed"),b=CodeMirror.getMode(c,"bbcode"),f={bbCodeLiteral:"literal"};if(c.hasOwnProperty("bbCodeLiteral")){f.bbCodeLiteral=c.bbCodeLiteral}function a(i){return i.replace(/([\[\]\.\-\+\<\>\?\:\(\)\{\}])/g,"\\$1")}e={hasLeftDelimeter:/.*\[/,htmlHasLeftDelimeter:/[^\<\>]*\[/,literalOpen:new RegExp(a("["+f.bbCodeLiteral+"]")),literalClose:new RegExp(a("[/"+f.bbCodeLiteral+"]"))};g={chain:function(j,i,k){i.tokenize=k;return k(j,i)},cleanChain:function(j,i,k){i.tokenize=null;i.localState=null;i.localMode=null;return(typeof k=="string")?(k?k:null):k(j,i)},maybeBackup:function(o,j,k){j=a(j);var n=o.current();var l=n.search(j),i;if(l>-1){o.backUp(n.length-l)}else{if(i=n.match(/<\/?$/)){o.backUp(n.length);if(!o.match(j,false)){o.match(n[0])}}}return k}};d={html:function(j,i){if(!i.inLiteral&&j.match(e.htmlHasLeftDelimeter,false)&&i.htmlMixedState.htmlState.tagName===null){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}else{if(!i.inLiteral&&j.match("[",false)){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}}return h.token(j,i.htmlMixedState)},bbcode:function(j,i){if(j.match("]",false)){j.eat("]");i.tokenize=d.html;i.localMode=h;i.localState=i.htmlMixedState;return"tag"}return g.maybeBackup(j,"]",b.token(j,i.localState))},inBlock:function(j,i){return function(l,k){while(!l.eol()){if(l.match(i)){g.cleanChain(l,k,"");break}l.next()}return j}}};return{startState:function(){var i=h.startState();return{token:d.html,localMode:null,localState:null,htmlMixedState:i,tokenize:null,inLiteral:false}},copyState:function(k){var j=null,i=(k.tokenize||k.token);if(k.localState){j=CodeMirror.copyState((i!=d.html?b:h),k.localState)}return{token:k.token,tokenize:k.tokenize,localMode:k.localMode,localState:j,htmlMixedState:CodeMirror.copyState(h,k.htmlMixedState),inLiteral:k.inLiteral}},token:function(k,j){if(k.match("[",false)){if(!j.inLiteral&&k.match(e.literalOpen,true)){j.inLiteral=true;return"keyword"}else{if(j.inLiteral&&k.match(e.literalClose,true)){j.inLiteral=false;return"keyword"}}}if(j.inLiteral&&j.localState!=j.htmlMixedState){j.tokenize=d.html;j.localMode=h;j.localState=j.htmlMixedState}var i=(j.tokenize||j.token)(k,j);return i},indent:function(j,i){if(j.localMode==b||(j.inLiteral&&!j.localMode)||e.hasLeftDelimeter.test(i)){return CodeMirror.Pass}return h.indent(j.htmlMixedState,i)},innerMode:function(i){return{state:i.localState||i.htmlMixedState,mode:i.localMode||h}}}},"xml","javascript","css");CodeMirror.defineMIME("text/x-bbcode","bbcodemixed");
1
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,allowMissingTagName:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{if(z.allowMissingTagName&&C=="endTag"){h="tag bracket";return e(C,E,D)}else{h="error";return d}}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{if(z.allowMissingTagName&&D=="endTag"){h="tag bracket";return u(D,F,E)}else{h="error";return B}}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(ao,aA){var p=ao.indentUnit;var F=aA.statementIndent;var aT=aA.jsonld;var E=aA.json||aT;var h=aA.typescript;var aL=aA.wordCharacters||/[\w$\xa1-\uffff]/;var aJ=function(){function a7(bb){return{type:bb,style:"keyword"}}var a4=a7("keyword a"),ba=a7("keyword b"),a9=a7("keyword c"),a8=a7("keyword d");var a5=a7("operator"),a6={type:"atom",style:"atom"};return{"if":a7("if"),"while":a4,"with":a4,"else":ba,"do":ba,"try":ba,"finally":ba,"return":a8,"break":a8,"continue":a8,"new":a7("new"),"delete":a9,"void":a9,"throw":a9,"debugger":a7("debugger"),"var":a7("var"),"const":a7("var"),let:a7("var"),"function":a7("function"),"catch":a7("catch"),"for":a7("for"),"switch":a7("switch"),"case":a7("case"),"default":a7("default"),"in":a5,"typeof":a5,"instanceof":a5,"true":a6,"false":a6,"null":a6,"undefined":a6,"NaN":a6,"Infinity":a6,"this":a7("this"),"class":a7("class"),"super":a7("atom"),yield:a9,"export":a7("export"),"import":a7("import"),"extends":a9,await:a9}}();var Z=/[+\-*&%=<>!?|~^@]/;var aI=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function K(a7){var a5=false,a4,a6=false;while((a4=a7.next())!=null){if(!a5){if(a4=="/"&&!a6){return}if(a4=="["){a6=true}else{if(a6&&a4=="]"){a6=false}}}a5=!a5&&a4=="\\"}}var ae,L;function T(a6,a5,a4){ae=a6;L=a4;return a5}function ag(a8,a6){var a4=a8.next();if(a4=='"'||a4=="'"){a6.tokenize=ad(a4);return a6.tokenize(a8,a6)}else{if(a4=="."&&a8.match(/^\d+(?:[eE][+\-]?\d+)?/)){return T("number","number")}else{if(a4=="."&&a8.match("..")){return T("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(a4)){return T(a4)}else{if(a4=="="&&a8.eat(">")){return T("=>","operator")}else{if(a4=="0"&&a8.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)){return T("number","number")}else{if(/\d/.test(a4)){a8.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);return T("number","number")}else{if(a4=="/"){if(a8.eat("*")){a6.tokenize=aS;return aS(a8,a6)}else{if(a8.eat("/")){a8.skipToEnd();return T("comment","comment")}else{if(a1(a8,a6,1)){K(a8);a8.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);return T("regexp","string-2")}else{a8.eat("=");return T("operator","operator",a8.current())}}}}else{if(a4=="`"){a6.tokenize=aV;return aV(a8,a6)}else{if(a4=="#"){a8.skipToEnd();return T("error","error")}else{if(Z.test(a4)){if(a4!=">"||!a6.lexical||a6.lexical.type!=">"){if(a8.eat("=")){if(a4=="!"||a4=="="){a8.eat("=")}}else{if(/[<>*+\-]/.test(a4)){a8.eat(a4);if(a4==">"){a8.eat(a4)}}}}return T("operator","operator",a8.current())}else{if(aL.test(a4)){a8.eatWhile(aL);var a7=a8.current();if(a6.lastType!="."){if(aJ.propertyIsEnumerable(a7)){var a5=aJ[a7];return T(a5.type,a5.style,a7)}if(a7=="async"&&a8.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,false)){return T("async","keyword",a7)}}return T("variable","variable",a7)}}}}}}}}}}}}}function ad(a4){return function(a8,a6){var a7=false,a5;if(aT&&a8.peek()=="@"&&a8.match(aI)){a6.tokenize=ag;return T("jsonld-keyword","meta")}while((a5=a8.next())!=null){if(a5==a4&&!a7){break}a7=!a7&&a5=="\\"}if(!a7){a6.tokenize=ag}return T("string","string")}}function aS(a7,a6){var a4=false,a5;while(a5=a7.next()){if(a5=="/"&&a4){a6.tokenize=ag;break}a4=(a5=="*")}return T("comment","comment")}function aV(a7,a5){var a6=false,a4;while((a4=a7.next())!=null){if(!a6&&(a4=="`"||a4=="$"&&a7.eat("{"))){a5.tokenize=ag;break}a6=!a6&&a4=="\\"}return T("quasi","string-2",a7.current())}var q="([{}])";function aP(bc,a6){if(a6.fatArrowAt){a6.fatArrowAt=null}var bb=bc.string.indexOf("=>",bc.start);if(bb<0){return}if(h){var a8=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(bc.string.slice(bc.start,bb));if(a8){bb=a8.index}}var a9=0,a7=false;for(var ba=bb-1;ba>=0;--ba){var a4=bc.string.charAt(ba);var a5=q.indexOf(a4);if(a5>=0&&a5<3){if(!a9){++ba;break}if(--a9==0){if(a4=="("){a7=true}break}}else{if(a5>=3&&a5<6){++a9}else{if(aL.test(a4)){a7=true}else{if(/["'\/]/.test(a4)){return}else{if(a7&&!a9){++ba;break}}}}}}if(a7&&!a9){a6.fatArrowAt=ba}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function R(a9,a5,a4,a8,a6,a7){this.indented=a9;this.column=a5;this.type=a4;this.prev=a6;this.info=a7;if(a8!=null){this.align=a8}}function x(a7,a6){for(var a5=a7.localVars;a5;a5=a5.next){if(a5.name==a6){return true}}for(var a4=a7.context;a4;a4=a4.prev){for(var a5=a4.vars;a5;a5=a5.next){if(a5.name==a6){return true}}}}function g(a8,a5,a4,a7,a9){var ba=a8.cc;J.state=a8;J.stream=a9;J.marked=null,J.cc=ba;J.style=a5;if(!a8.lexical.hasOwnProperty("align")){a8.lexical.align=true}while(true){var a6=ba.length?ba.pop():E?aE:aZ;if(a6(a4,a7)){while(ba.length&&ba[ba.length-1].lex){ba.pop()()}if(J.marked){return J.marked}if(a4=="variable"&&x(a8,a7)){return"variable-2"}return a5}}}var J={state:null,column:null,marked:null,cc:null};function ap(){for(var a4=arguments.length-1;a4>=0;a4--){J.cc.push(arguments[a4])}}function av(){ap.apply(null,arguments);return true}function f(a5,a6){for(var a4=a6;a4;a4=a4.next){if(a4.name==a5){return true}}return false}function aO(a4){var a5=J.state;J.marked="def";if(a5.context){if(a5.lexical.info=="var"&&a5.context&&a5.context.block){var a6=aN(a4,a5.context);if(a6!=null){a5.context=a6;return}}else{if(!f(a4,a5.localVars)){a5.localVars=new a0(a4,a5.localVars);return}}}if(aA.globalVars&&!f(a4,a5.globalVars)){a5.globalVars=new a0(a4,a5.globalVars)}}function aN(a5,a6){if(!a6){return null}else{if(a6.block){var a4=aN(a5,a6.prev);if(!a4){return null}if(a4==a6.prev){return a6}return new Q(a4,a6.vars,true)}else{if(f(a5,a6.vars)){return a6}else{return new Q(a6.prev,new a0(a5,a6.vars),false)}}}}function aB(a4){return a4=="public"||a4=="private"||a4=="protected"||a4=="abstract"||a4=="readonly"}function Q(a4,a5,a6){this.prev=a4;this.vars=a5;this.block=a6}function a0(a4,a5){this.name=a4;this.next=a5}var v=new a0("this",new a0("arguments",null));function B(){J.state.context=new Q(J.state.context,J.state.localVars,false);J.state.localVars=v}function am(){J.state.context=new Q(J.state.context,J.state.localVars,true);J.state.localVars=null}function C(){J.state.localVars=J.state.context.vars;J.state.context=J.state.context.prev}C.lex=true;function aX(a5,a6){var a4=function(){var a9=J.state,a7=a9.indented;if(a9.lexical.type=="stat"){a7=a9.lexical.indented}else{for(var a8=a9.lexical;a8&&a8.type==")"&&a8.align;a8=a8.prev){a7=a8.indented}}a9.lexical=new R(a7,J.stream.column(),a5,null,a9.lexical,a6)};a4.lex=true;return a4}function i(){var a4=J.state;if(a4.lexical.prev){if(a4.lexical.type==")"){a4.indented=a4.lexical.indented}a4.lexical=a4.lexical.prev}}i.lex=true;function w(a4){function a5(a6){if(a6==a4){return av()}else{if(a4==";"||a6=="}"||a6==")"||a6=="]"){return ap()}else{return av(a5)}}}return a5}function aZ(a4,a5){if(a4=="var"){return av(aX("vardef",a5),c,w(";"),i)}if(a4=="keyword a"){return av(aX("form"),aF,aZ,i)}if(a4=="keyword b"){return av(aX("form"),aZ,i)}if(a4=="keyword d"){return J.stream.match(/^\s*$/,false)?av():av(aX("stat"),az,w(";"),i)}if(a4=="debugger"){return av(w(";"))}if(a4=="{"){return av(aX("}"),am,D,i,C)}if(a4==";"){return av()}if(a4=="if"){if(J.state.lexical.info=="else"&&J.state.cc[J.state.cc.length-1]==i){J.state.cc.pop()()}return av(aX("form"),aF,aZ,i,d)}if(a4=="function"){return av(U)}if(a4=="for"){return av(aX("form"),z,aZ,i)}if(a4=="class"||(h&&a5=="interface")){J.marked="keyword";return av(aX("form"),aj,i)}if(a4=="variable"){if(h&&a5=="declare"){J.marked="keyword";return av(aZ)}else{if(h&&(a5=="module"||a5=="enum"||a5=="type")&&J.stream.match(/^\s*\w/,false)){J.marked="keyword";if(a5=="enum"){return av(aM)}else{if(a5=="type"){return av(k,w("operator"),k,w(";"))}else{return av(aX("form"),j,w("{"),aX("}"),D,i,i)}}}else{if(h&&a5=="namespace"){J.marked="keyword";return av(aX("form"),aE,D,i)}else{if(h&&a5=="abstract"){J.marked="keyword";return av(aZ)}else{return av(aX("stat"),a2)}}}}}if(a4=="switch"){return av(aX("form"),aF,w("{"),aX("}","switch"),am,D,i,i,C)}if(a4=="case"){return av(aE,w(":"))}if(a4=="default"){return av(w(":"))}if(a4=="catch"){return av(aX("form"),B,X,aZ,i,C)}if(a4=="export"){return av(aX("stat"),aY,i)}if(a4=="import"){return av(aX("stat"),aw,i)}if(a4=="async"){return av(aZ)}if(a5=="@"){return av(aE,aZ)}return ap(aX("stat"),aE,w(";"),i)}function X(a4){if(a4=="("){return av(au,w(")"))}}function aE(a4,a5){return an(a4,a5,false)}function aW(a4,a5){return an(a4,a5,true)}function aF(a4){if(a4!="("){return ap()}return av(aX(")"),aE,w(")"),i)}function an(a5,a6,a8){if(J.state.fatArrowAt==J.stream.start){var a4=a8?V:ak;if(a5=="("){return av(B,aX(")"),aK(au,")"),i,w("=>"),a4,C)}else{if(a5=="variable"){return ap(B,j,w("=>"),a4,C)}}}var a7=a8?l:ar;if(b.hasOwnProperty(a5)){return av(a7)}if(a5=="function"){return av(U,a7)}if(a5=="class"||(h&&a6=="interface")){J.marked="keyword";return av(aX("form"),O,i)}if(a5=="keyword c"||a5=="async"){return av(a8?aW:aE)}if(a5=="("){return av(aX(")"),az,w(")"),i,a7)}if(a5=="operator"||a5=="spread"){return av(a8?aW:aE)}if(a5=="["){return av(aX("]"),r,i,a7)}if(a5=="{"){return aQ(y,"}",null,a7)}if(a5=="quasi"){return ap(aa,a7)}if(a5=="new"){return av(N(a8))}if(a5=="import"){return av(aE)}return av()}function az(a4){if(a4.match(/[;\}\)\],]/)){return ap()}return ap(aE)}function ar(a4,a5){if(a4==","){return av(aE)}return l(a4,a5,false)}function l(a4,a6,a8){var a5=a8==false?ar:l;var a7=a8==false?aE:aW;if(a4=="=>"){return av(B,a8?V:ak,C)}if(a4=="operator"){if(/\+\+|--/.test(a6)||h&&a6=="!"){return av(a5)}if(h&&a6=="<"&&J.stream.match(/^([^>]|<.*?>)*>\s*\(/,false)){return av(aX(">"),aK(k,">"),i,a5)}if(a6=="?"){return av(aE,w(":"),a7)}return av(a7)}if(a4=="quasi"){return ap(aa,a5)}if(a4==";"){return}if(a4=="("){return aQ(aW,")","call",a5)}if(a4=="."){return av(aC,a5)}if(a4=="["){return av(aX("]"),az,w("]"),i,a5)}if(h&&a6=="as"){J.marked="keyword";return av(k,a5)}if(a4=="regexp"){J.state.lastType=J.marked="operator";J.stream.backUp(J.stream.pos-J.stream.start-1);return av(a7)}}function aa(a4,a5){if(a4!="quasi"){return ap()}if(a5.slice(a5.length-2)!="${"){return av(aa)}return av(aE,u)}function u(a4){if(a4=="}"){J.marked="string-2";J.state.tokenize=aV;return av(aa)}}function ak(a4){aP(J.stream,J.state);return ap(a4=="{"?aZ:aE)}function V(a4){aP(J.stream,J.state);return ap(a4=="{"?aZ:aW)}function N(a4){return function(a5){if(a5=="."){return av(a4?s:ai)}else{if(a5=="variable"&&h){return av(e,a4?l:ar)}else{return ap(a4?aW:aE)}}}}function ai(a4,a5){if(a5=="target"){J.marked="keyword";return av(ar)}}function s(a4,a5){if(a5=="target"){J.marked="keyword";return av(l)}}function a2(a4){if(a4==":"){return av(i,aZ)}return ap(ar,w(";"),i)}function aC(a4){if(a4=="variable"){J.marked="property";return av()}}function y(a5,a6){if(a5=="async"){J.marked="property";return av(y)}else{if(a5=="variable"||J.style=="keyword"){J.marked="property";if(a6=="get"||a6=="set"){return av(P)}var a4;if(h&&J.state.fatArrowAt==J.stream.start&&(a4=J.stream.match(/^\s*:\s*/,false))){J.state.fatArrowAt=J.stream.pos+a4[0].length}return av(S)}else{if(a5=="number"||a5=="string"){J.marked=aT?"property":(J.style+" property");return av(S)}else{if(a5=="jsonld-keyword"){return av(S)}else{if(h&&aB(a6)){J.marked="keyword";return av(y)}else{if(a5=="["){return av(aE,af,w("]"),S)}else{if(a5=="spread"){return av(aW,S)}else{if(a6=="*"){J.marked="keyword";return av(y)}else{if(a5==":"){return ap(S)}}}}}}}}}}function P(a4){if(a4!="variable"){return ap(S)}J.marked="property";return av(U)}function S(a4){if(a4==":"){return av(aW)}if(a4=="("){return ap(U)}}function aK(a7,a4,a5){function a6(a9,ba){if(a5?a5.indexOf(a9)>-1:a9==","){var a8=J.state.lexical;if(a8.info=="call"){a8.pos=(a8.pos||0)+1}return av(function(bb,bc){if(bb==a4||bc==a4){return ap()}return ap(a7)},a6)}if(a9==a4||ba==a4){return av()}return av(w(a4))}return function(a8,a9){if(a8==a4||a9==a4){return av()}return ap(a7,a6)}}function aQ(a7,a4,a6){for(var a5=3;a5<arguments.length;a5++){J.cc.push(arguments[a5])}return av(aX(a4,a6),aK(a7,a4),i)}function D(a4){if(a4=="}"){return av()}return ap(aZ,D)}function af(a4,a5){if(h){if(a4==":"){return av(k)}if(a5=="?"){return av(af)}}}function W(a4){if(h&&a4==":"){if(J.stream.match(/^\s*\w+\s+is\b/,false)){return av(aE,ab,k)}else{return av(k)}}}function ab(a4,a5){if(a5=="is"){J.marked="keyword";return av()}}function k(a4,a5){if(a5=="keyof"||a5=="typeof"){J.marked="keyword";return av(a5=="keyof"?k:aW)}if(a4=="variable"||a5=="void"){J.marked="type";return av(M)}if(a4=="string"||a4=="number"||a4=="atom"){return av(M)}if(a4=="["){return av(aX("]"),aK(k,"]",","),i,M)}if(a4=="{"){return av(aX("}"),aK(aD,"}",",;"),i,M)}if(a4=="("){return av(aK(aq,")"),ac)}if(a4=="<"){return av(aK(k,">"),k)}}function ac(a4){if(a4=="=>"){return av(k)}}function aD(a4,a5){if(a4=="variable"||J.style=="keyword"){J.marked="property";return av(aD)}else{if(a5=="?"){return av(aD)}else{if(a4==":"){return av(k)}else{if(a4=="["){return av(aE,af,w("]"),aD)}}}}}function aq(a4,a5){if(a4=="variable"&&J.stream.match(/^\s*[?:]/,false)||a5=="?"){return av(aq)}if(a4==":"){return av(k)}return ap(k)}function M(a4,a5){if(a5=="<"){return av(aX(">"),aK(k,">"),i,M)}if(a5=="|"||a4=="."||a5=="&"){return av(k)}if(a4=="["){return av(w("]"),M)}if(a5=="extends"||a5=="implements"){J.marked="keyword";return av(k)}}function e(a4,a5){if(a5=="<"){return av(aX(">"),aK(k,">"),i,M)}}function o(){return ap(k,ah)}function ah(a4,a5){if(a5=="="){return av(k)}}function c(a4,a5){if(a5=="enum"){J.marked="keyword";return av(aM)}return ap(j,af,at,al)}function j(a4,a5){if(h&&aB(a5)){J.marked="keyword";return av(j)}if(a4=="variable"){aO(a5);return av()}if(a4=="spread"){return av(j)}if(a4=="["){return aQ(j,"]")}if(a4=="{"){return aQ(aU,"}")}}function aU(a4,a5){if(a4=="variable"&&!J.stream.match(/^\s*:/,false)){aO(a5);return av(at)}if(a4=="variable"){J.marked="property"}if(a4=="spread"){return av(j)}if(a4=="}"){return ap()}return av(w(":"),j,at)}function at(a4,a5){if(a5=="="){return av(aW)}}function al(a4){if(a4==","){return av(c)}}function d(a4,a5){if(a4=="keyword b"&&a5=="else"){return av(aX("form","else"),aZ,i)}}function z(a4,a5){if(a5=="await"){return av(z)}if(a4=="("){return av(aX(")"),I,w(")"),i)}}function I(a4){if(a4=="var"){return av(c,w(";"),H)}if(a4==";"){return av(H)}if(a4=="variable"){return av(A)}return ap(aE,w(";"),H)}function A(a4,a5){if(a5=="in"||a5=="of"){J.marked="keyword";return av(aE)}return av(ar,H)}function H(a4,a5){if(a4==";"){return av(G)}if(a5=="in"||a5=="of"){J.marked="keyword";return av(aE)}return ap(aE,w(";"),G)}function G(a4){if(a4!=")"){av(aE)}}function U(a4,a5){if(a5=="*"){J.marked="keyword";return av(U)}if(a4=="variable"){aO(a5);return av(U)}if(a4=="("){return av(B,aX(")"),aK(au,")"),i,W,aZ,C)}if(h&&a5=="<"){return av(aX(">"),aK(o,">"),i,U)}}function au(a4,a5){if(a5=="@"){av(aE,au)}if(a4=="spread"){return av(au)}if(h&&aB(a5)){J.marked="keyword";return av(au)}return ap(j,af,at)}function O(a4,a5){if(a4=="variable"){return aj(a4,a5)}return Y(a4,a5)}function aj(a4,a5){if(a4=="variable"){aO(a5);return av(Y)}}function Y(a4,a5){if(a5=="<"){return av(aX(">"),aK(o,">"),i,Y)}if(a5=="extends"||a5=="implements"||(h&&a4==",")){if(a5=="implements"){J.marked="keyword"}return av(h?k:aE,Y)}if(a4=="{"){return av(aX("}"),t,i)}}function t(a4,a5){if(a4=="async"||(a4=="variable"&&(a5=="static"||a5=="get"||a5=="set"||(h&&aB(a5)))&&J.stream.match(/^\s+[\w$\xa1-\uffff]/,false))){J.marked="keyword";return av(t)}if(a4=="variable"||J.style=="keyword"){J.marked="property";return av(h?a3:U,t)}if(a4=="["){return av(aE,af,w("]"),h?a3:U,t)}if(a5=="*"){J.marked="keyword";return av(t)}if(a4==";"){return av(t)}if(a4=="}"){return av()}if(a5=="@"){return av(aE,t)}}function a3(a4,a5){if(a5=="?"){return av(a3)}if(a4==":"){return av(k,at)}if(a5=="="){return av(aW)}return ap(U)}function aY(a4,a5){if(a5=="*"){J.marked="keyword";return av(ay,w(";"))}if(a5=="default"){J.marked="keyword";return av(aE,w(";"))}if(a4=="{"){return av(aK(ax,"}"),ay,w(";"))}return ap(aZ)}function ax(a4,a5){if(a5=="as"){J.marked="keyword";return av(w("variable"))}if(a4=="variable"){return ap(aW,ax)}}function aw(a4){if(a4=="string"){return av()}if(a4=="("){return ap(aE)}return ap(aH,n,ay)}function aH(a4,a5){if(a4=="{"){return aQ(aH,"}")}if(a4=="variable"){aO(a5)}if(a5=="*"){J.marked="keyword"}return av(m)}function n(a4){if(a4==","){return av(aH,n)}}function m(a4,a5){if(a5=="as"){J.marked="keyword";return av(aH)}}function ay(a4,a5){if(a5=="from"){J.marked="keyword";return av(aE)}}function r(a4){if(a4=="]"){return av()}return ap(aK(aW,"]"))}function aM(){return ap(aX("form"),j,w("{"),aX("}"),aK(aR,"}"),i,i)}function aR(){return ap(j,at)}function aG(a5,a4){return a5.lastType=="operator"||a5.lastType==","||Z.test(a4.charAt(0))||/[,.]/.test(a4.charAt(0))}function a1(a6,a5,a4){return a5.tokenize==ag&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(a5.lastType)||(a5.lastType=="quasi"&&/\{\s*$/.test(a6.string.slice(0,a6.pos-(a4||0))))}return{startState:function(a5){var a4={tokenize:ag,lastType:"sof",cc:[],lexical:new R((a5||0)-p,0,"block",false),localVars:aA.localVars,context:aA.localVars&&new Q(null,null,false),indented:a5||0};if(aA.globalVars&&typeof aA.globalVars=="object"){a4.globalVars=aA.globalVars}return a4},token:function(a6,a5){if(a6.sol()){if(!a5.lexical.hasOwnProperty("align")){a5.lexical.align=false}a5.indented=a6.indentation();aP(a6,a5)}if(a5.tokenize!=aS&&a6.eatSpace()){return null}var a4=a5.tokenize(a6,a5);if(ae=="comment"){return a4}a5.lastType=ae=="operator"&&(L=="++"||L=="--")?"incdec":ae;return g(a5,a4,ae,L,a6)},indent:function(a4,a7){if(a4.tokenize==aS){return a.Pass}if(a4.tokenize!=ag){return 0}var bb=a7&&a7.charAt(0),bc=a4.lexical,ba;if(!/^\s*else\b/.test(a7)){for(var a6=a4.cc.length-1;a6>=0;--a6){var a8=a4.cc[a6];if(a8==i){bc=bc.prev}else{if(a8!=d){break}}}}while((bc.type=="stat"||bc.type=="form")&&(bb=="}"||((ba=a4.cc[a4.cc.length-1])&&(ba==ar||ba==l)&&!/^[,\.=+\-*:?[\(]/.test(a7)))){bc=bc.prev}if(F&&bc.type==")"&&bc.prev.type=="stat"){bc=bc.prev}var a9=bc.type,a5=bb==a9;if(a9=="vardef"){return bc.indented+(a4.lastType=="operator"||a4.lastType==","?bc.info.length+1:0)}else{if(a9=="form"&&bb=="{"){return bc.indented}else{if(a9=="form"){return bc.indented+p}else{if(a9=="stat"){return bc.indented+(aG(a4,a7)?F||p:0)}else{if(bc.info=="switch"&&!a5&&aA.doubleIndentSwitch!=false){return bc.indented+(/^(?:case|default)\b/.test(a7)?p:2*p)}else{if(bc.align){return bc.column+(a5?0:1)}else{return bc.indented+(a5?0:p)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:E?null:"/*",blockCommentEnd:E?null:"*/",blockCommentContinue:E?null:" * ",lineComment:E?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:E?"json":"javascript",jsonldMode:aT,jsonMode:E,expressionAllowed:a1,skipExpression:function(a4){var a5=a4.cc[a4.cc.length-1];if(a5==aE||a5==aW){a4.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Z,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Z.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},Y=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},X=J.counterDescriptors||{},O=J.colorKeywords||{},T=J.valueKeywords||{},M=J.allowNested,S=J.lineComment,V=J.supportsAtComponent===true;var C,N;function aa(ad,ae){C=ae;return ad}function ac(ag,af){var ae=ag.next();if(A[ae]){var ad=A[ae](ag,af);if(ad!==false){return ad}}if(ae=="@"){ag.eatWhile(/[\w\\\-]/);return aa("def",ag.current())}else{if(ae=="="||(ae=="~"||ae=="|")&&ag.eat("=")){return aa(null,"compare")}else{if(ae=='"'||ae=="'"){af.tokenize=K(ae);return af.tokenize(ag,af)}else{if(ae=="#"){ag.eatWhile(/[\w\\\-]/);return aa("atom","hash")}else{if(ae=="!"){ag.match(/^\s*\w*/);return aa("keyword","important")}else{if(/\d/.test(ae)||ae=="."&&ag.eat(/\d/)){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ae==="-"){if(/[\d.]/.test(ag.peek())){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ag.match(/^-[\w\\\-]+/)){ag.eatWhile(/[\w\\\-]/);if(ag.match(/^\s*:/,false)){return aa("variable-2","variable-definition")}return aa("variable-2","variable")}else{if(ag.match(/^\w+-/)){return aa("meta","meta")}}}}else{if(/[,+>*\/]/.test(ae)){return aa(null,"select-op")}else{if(ae=="."&&ag.match(/^-?[_a-z][_a-z0-9-]*/i)){return aa("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ae)){return aa(null,ae)}else{if(((ae=="u"||ae=="U")&&ag.match(/rl(-prefix)?\(/i))||((ae=="d"||ae=="D")&&ag.match("omain(",true,true))||((ae=="r"||ae=="R")&&ag.match("egexp(",true,true))){ag.backUp(1);af.tokenize=ab;return aa("property","word")}else{if(/[\w\\\-]/.test(ae)){ag.eatWhile(/[\w\\\-]/);return aa("property","word")}else{return aa(null,null)}}}}}}}}}}}}}function K(ad){return function(ah,af){var ag=false,ae;while((ae=ah.next())!=null){if(ae==ad&&!ag){if(ad==")"){ah.backUp(1)}break}ag=!ag&&ae=="\\"}if(ae==ad||!ag&&ad!=")"){af.tokenize=null}return aa("string","string")}}function ab(ae,ad){ae.next();if(!ae.match(/\s*[\"\')]/,false)){ad.tokenize=K(")")}else{ad.tokenize=null}return aa(null,"(")}function R(ae,ad,af){this.type=ae;this.indent=ad;this.prev=af}function G(af,ag,ae,ad){af.context=new R(ae,ag.indentation()+(ad===false?0:Q),af.context);return ae}function U(ad){if(ad.context.prev){ad.context=ad.context.prev}return ad.context.type}function z(ad,af,ae){return F[ae.context.type](ad,af,ae)}function W(ae,ag,af,ah){for(var ad=ah||1;ad>0;ad--){af.context=af.context.prev}return z(ae,ag,af)}function H(ae){var ad=ae.current().toLowerCase();if(T.hasOwnProperty(ad)){N="atom"}else{if(O.hasOwnProperty(ad)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ad,af,ae){if(ad=="{"){return G(ae,af,"block")}else{if(ad=="}"&&ae.context.prev){return U(ae)}else{if(V&&/@component/i.test(ad)){return G(ae,af,"atComponentBlock")}else{if(/^@(-moz-)?document$/i.test(ad)){return G(ae,af,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/i.test(ad)){return G(ae,af,"atBlock")}else{if(/^@(font-face|counter-style)/i.test(ad)){ae.stateArg=ad;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(ad)){return"keyframes"}else{if(ad&&ad.charAt(0)=="@"){return G(ae,af,"at")}else{if(ad=="hash"){N="builtin"}else{if(ad=="word"){N="tag"}else{if(ad=="variable-definition"){return"maybeprop"}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}else{if(ad==":"){return"pseudo"}else{if(M&&ad=="("){return G(ae,af,"parens")}}}}}}}}}}}}}}return ae.context.type};F.block=function(ad,ag,ae){if(ad=="word"){var af=ag.current().toLowerCase();if(I.hasOwnProperty(af)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(af)){N="string-2";return"maybeprop"}else{if(M){N=ag.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ad=="meta"){return"block"}else{if(!M&&(ad=="hash"||ad=="qualifier")){N="error";return"block"}else{return F.top(ad,ag,ae)}}}};F.maybeprop=function(ad,af,ae){if(ad==":"){return G(ae,af,"prop")}return z(ad,af,ae)};F.prop=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"&&M){return G(ae,af,"propBlock")}if(ad=="}"||ad=="{"){return W(ad,af,ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(af.current())){N+=" error"}else{if(ad=="word"){H(af)}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}}}return"prop"};F.propBlock=function(ae,ad,af){if(ae=="}"){return U(af)}if(ae=="word"){N="property";return"maybeprop"}return af.context.type};F.parens=function(ad,af,ae){if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad==")"){return U(ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="interpolation"){return G(ae,af,"interpolation")}if(ad=="word"){H(af)}return"parens"};F.pseudo=function(ad,af,ae){if(ad=="meta"){return"pseudo"}if(ad=="word"){N="variable-3";return ae.context.type}return z(ad,af,ae)};F.documentTypes=function(ad,af,ae){if(ad=="word"&&y.hasOwnProperty(af.current())){N="tag";return ae.context.type}else{return F.atBlock(ad,af,ae)}};F.atBlock=function(ad,ag,ae){if(ad=="("){return G(ae,ag,"atBlock_parens")}if(ad=="}"||ad==";"){return W(ad,ag,ae)}if(ad=="{"){return U(ae)&&G(ae,ag,M?"block":"top")}if(ad=="interpolation"){return G(ae,ag,"interpolation")}if(ad=="word"){var af=ag.current().toLowerCase();if(af=="only"||af=="not"||af=="and"||af=="or"){N="keyword"}else{if(Y.hasOwnProperty(af)){N="attribute"}else{if(L.hasOwnProperty(af)){N="property"}else{if(P.hasOwnProperty(af)){N="keyword"}else{if(I.hasOwnProperty(af)){N="property"}else{if(B.hasOwnProperty(af)){N="string-2"}else{if(T.hasOwnProperty(af)){N="atom"}else{if(O.hasOwnProperty(af)){N="keyword"}else{N="error"}}}}}}}}}return ae.context.type};F.atComponentBlock=function(ad,af,ae){if(ad=="}"){return W(ad,af,ae)}if(ad=="{"){return U(ae)&&G(ae,af,M?"block":"top",false)}if(ad=="word"){N="error"}return ae.context.type};F.atBlock_parens=function(ad,af,ae){if(ad==")"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae,2)}return F.atBlock(ad,af,ae)};F.restricted_atBlock_before=function(ad,af,ae){if(ad=="{"){return G(ae,af,"restricted_atBlock")}if(ad=="word"&&ae.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ad,af,ae)};F.restricted_atBlock=function(ad,af,ae){if(ad=="}"){ae.stateArg=null;return U(ae)}if(ad=="word"){if((ae.stateArg=="@font-face"&&!E.hasOwnProperty(af.current().toLowerCase()))||(ae.stateArg=="@counter-style"&&!X.hasOwnProperty(af.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ad,af,ae){if(ad=="word"){N="variable";return"keyframes"}if(ad=="{"){return G(ae,af,"top")}return z(ad,af,ae)};F.at=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad=="word"){N="tag"}else{if(ad=="hash"){N="builtin"}}return"at"};F.interpolation=function(ad,af,ae){if(ad=="}"){return U(ae)}if(ad=="{"||ad==";"){return W(ad,af,ae)}if(ad=="word"){N="variable"}else{if(ad!="variable"&&ad!="("&&ad!=")"){N="error"}}return"interpolation"};return{startState:function(ad){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ad||0,null)}},token:function(af,ae){if(!ae.tokenize&&af.eatSpace()){return null}var ad=(ae.tokenize||ac)(af,ae);if(ad&&typeof ad=="object"){C=ad[1];ad=ad[0]}N=ad;if(C!="comment"){ae.state=F[ae.state](C,af,ae)}return N},indent:function(ah,af){var ae=ah.context,ag=af&&af.charAt(0);var ad=ae.indent;if(ae.type=="prop"&&(ag=="}"||ag==")")){ae=ae.prev}if(ae.prev){if(ag=="}"&&(ae.type=="block"||ae.type=="top"||ae.type=="interpolation"||ae.type=="restricted_atBlock")){ae=ae.prev;ad=ae.indent}else{if(ag==")"&&(ae.type=="parens"||ae.type=="atBlock_parens")||ag=="{"&&(ae.type=="at"||ae.type=="atBlock")){ad=Math.max(0,ae.indent-Q)}}}return ad},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:S,fold:"brace"}});function g(A){var z={};for(var y=0;y<A.length;++y){z[A[y].toLowerCase()]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["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"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var d=["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-blend-mode","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","caret-color","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-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","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","justify-items","justify-self","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","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","place-content","place-items","place-self","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","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"],h=g(d);var n=["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"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var c=["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"],m=g(c);var j=["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","auto-flow","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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","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","lighten","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","luminosity","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","multiply","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","opacity","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","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","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","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","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"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,lineComment:"//",tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/,false)){return[null,null]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,lineComment:"//",tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/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"]]};function f(n,j,k){var m=n.current(),l=m.search(j);if(l>-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?/^\s*(.*?)\s*$/.exec(k[2])[1]:""}function i(k,j){return new RegExp((j?"^":"")+"</s*"+k+"s*>","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=d.startState(q);return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(t,s,r){if(!t.localMode||/^\s*<\//.test(s)){return q.indent(t.htmlState,s)}else{if(t.localMode.indent){return t.localMode.indent(t.localState,s,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});CodeMirror.defineMode("bbcodemixed",function(c){var f,e,g,d,h=CodeMirror.getMode(c,"htmlmixed"),b=CodeMirror.getMode(c,"bbcode"),f={bbCodeLiteral:"literal"};if(c.hasOwnProperty("bbCodeLiteral")){f.bbCodeLiteral=c.bbCodeLiteral}function a(i){return i.replace(/([\[\]\.\-\+\<\>\?\:\(\)\{\}])/g,"\\$1")}e={hasLeftDelimeter:/.*\[/,htmlHasLeftDelimeter:/[^\<\>]*\[/,literalOpen:new RegExp(a("["+f.bbCodeLiteral+"]")),literalClose:new RegExp(a("[/"+f.bbCodeLiteral+"]"))};g={chain:function(j,i,k){i.tokenize=k;return k(j,i)},cleanChain:function(j,i,k){i.tokenize=null;i.localState=null;i.localMode=null;return(typeof k=="string")?(k?k:null):k(j,i)},maybeBackup:function(o,j,k){j=a(j);var n=o.current();var l=n.search(j),i;if(l>-1){o.backUp(n.length-l)}else{if(i=n.match(/<\/?$/)){o.backUp(n.length);if(!o.match(j,false)){o.match(n[0])}}}return k}};d={html:function(j,i){if(!i.inLiteral&&j.match(e.htmlHasLeftDelimeter,false)&&i.htmlMixedState.htmlState.tagName===null){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}else{if(!i.inLiteral&&j.match("[",false)){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}}return h.token(j,i.htmlMixedState)},bbcode:function(j,i){if(j.match("]",false)){j.eat("]");i.tokenize=d.html;i.localMode=h;i.localState=i.htmlMixedState;return"tag"}return g.maybeBackup(j,"]",b.token(j,i.localState))},inBlock:function(j,i){return function(l,k){while(!l.eol()){if(l.match(i)){g.cleanChain(l,k,"");break}l.next()}return j}}};return{startState:function(){var i=h.startState();return{token:d.html,localMode:null,localState:null,htmlMixedState:i,tokenize:null,inLiteral:false}},copyState:function(k){var j=null,i=(k.tokenize||k.token);if(k.localState){j=CodeMirror.copyState((i!=d.html?b:h),k.localState)}return{token:k.token,tokenize:k.tokenize,localMode:k.localMode,localState:j,htmlMixedState:CodeMirror.copyState(h,k.htmlMixedState),inLiteral:k.inLiteral}},token:function(k,j){if(k.match("[",false)){if(!j.inLiteral&&k.match(e.literalOpen,true)){j.inLiteral=true;return"keyword"}else{if(j.inLiteral&&k.match(e.literalClose,true)){j.inLiteral=false;return"keyword"}}}if(j.inLiteral&&j.localState!=j.htmlMixedState){j.tokenize=d.html;j.localMode=h;j.localState=j.htmlMixedState}var i=(j.tokenize||j.token)(k,j);return i},indent:function(j,i){if(j.localMode==b||(j.inLiteral&&!j.localMode)||e.hasLeftDelimeter.test(i)){return CodeMirror.Pass}return h.indent(j.htmlMixedState,i)},innerMode:function(i){return{state:i.localState||i.htmlMixedState,mode:i.localMode||h}}}},"xml","javascript","css");CodeMirror.defineMIME("text/x-bbcode","bbcodemixed");
@@ -0,0 +1 @@
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/simple.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function r(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g," "));return t}function o(e,o){(e.next||e.push)&&t(o,e.next||e.push),this.regex=n(e.regex),this.token=r(e.token),this.data=e}function i(e,t){return function(n,r){if(r.pending){var o=r.pending.shift();return 0==r.pending.length&&(r.pending=null),n.pos+=o.text.length,o.token}if(r.local){if(r.local.end&&n.match(r.local.end)){var i=r.local.endToken||null;return r.local=r.localState=null,i}var a,i=r.local.mode.token(n,r.localState);return r.local.endScan&&(a=r.local.endScan.exec(n.current()))&&(n.pos=n.start+a.index),i}for(var d=e[r.state],s=0;s<d.length;s++){var c=d[s],u=(!c.data.sol||n.sol())&&n.match(c.regex);if(u){c.data.next?r.state=c.data.next:c.data.push?((r.stack||(r.stack=[])).push(r.state),r.state=c.data.push):c.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),c.data.mode&&l(t,r,c.data.mode,c.token),c.data.indent&&r.indent.push(n.indentation()+t.indentUnit),c.data.dedent&&r.indent.pop();var f=c.token;if(f&&f.apply&&(f=f(u)),u.length>2&&c.token&&"string"!=typeof c.token){r.pending=[];for(var m=2;m<u.length;m++)u[m]&&r.pending.push({text:u[m],token:c.token[m-1]});return n.backUp(u[0].length-(u[1]?u[1].length:0)),f[0]}return f&&f.join?f[0]:f}}return n.next(),null}}function a(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=0;for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)||!a(e[r],t[r]))return!1;n++}for(var r in t)t.hasOwnProperty(r)&&n--;return 0==n}function l(t,r,o,i){var l;if(o.persistent)for(var d=r.persistentStates;d&&!l;d=d.next)(o.spec?a(o.spec,d.spec):o.mode==d.mode)&&(l=d);var s=l?l.mode:o.mode||e.getMode(t,o.spec),c=l?l.state:e.startState(s);o.persistent&&!l&&(r.persistentStates={mode:s,spec:o.spec,state:c,next:r.persistentStates}),r.localState=c,r.local={mode:s,end:o.end&&n(o.end),endScan:o.end&&!1!==o.forceEnd&&n(o.end,!1),endToken:i&&i.join?i[i.length-1]:i}}function d(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}function s(t,n){return function(r,o,i){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,o,i);if(null==r.indent||r.local||n.dontIndentStates&&d(r.state,n.dontIndentStates)>-1)return e.Pass;var a=r.indent.length-1,l=t[r.state];e:for(;;){for(var s=0;s<l.length;s++){var c=l[s];if(c.data.dedent&&!1!==c.data.dedentIfLineStart){var u=c.regex.exec(o);if(u&&u[0]){a--,(c.next||c.push)&&(l=t[c.next||c.push]),o=o.slice(u[0].length);continue e}}}break}return a<0?0:r.indent[a]}}e.defineSimpleMode=function(t,n){e.defineMode(t,function(t){return e.simpleMode(t,n)})},e.simpleMode=function(n,r){t(r,"start");var a={},l=r.meta||{},d=!1;for(var c in r)if(c!=l&&r.hasOwnProperty(c))for(var u=a[c]=[],f=r[c],m=0;m<f.length;m++){var p=f[m];u.push(new o(p,r)),(p.indent||p.dedent)&&(d=!0)}var g={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:d?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var r=t.persistentStates;r;r=r.next)n.persistentStates={mode:r.mode,spec:r.spec,state:r.state==t.localState?n.localState:e.copyState(r.mode,r.state),next:n.persistentStates};return n},token:i(a,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:s(a,l)};if(l)for(var h in l)l.hasOwnProperty(h)&&(g[h]=l[h]);return g}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function n(e,t,n,r){if("string"==typeof t){var o=e.indexOf(t,n);return r&&o>-1?o+t.length:o}var i=t.exec(n?e.slice(n):e);return i?i.index+n+(r?i[0].length:0):-1}var r=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(o,i){if(i.innerActive){var a=i.innerActive,l=o.string;if(!a.close&&o.sol())return i.innerActive=i.inner=null,this.token(o,i);var d=a.close?n(l,a.close,o.pos,a.parseDelimiters):-1;if(d==o.pos&&!a.parseDelimiters)return o.match(a.close),i.innerActive=i.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";d>-1&&(o.string=l.slice(0,d));var s=a.mode.token(o,i.inner);return d>-1&&(o.string=l),d==o.pos&&a.parseDelimiters&&(i.innerActive=i.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var c=1/0,l=o.string,u=0;u<r.length;++u){var f=r[u],d=n(l,f.open,o.pos);if(d==o.pos){f.parseDelimiters||o.match(f.open),i.innerActive=f;var m=0;if(t.indent){var p=t.indent(i.outer,"");p!==e.Pass&&(m=p)}return i.inner=e.startState(f.mode,m),f.delimStyle&&f.delimStyle+" "+f.delimStyle+"-open"}-1!=d&&d<c&&(c=d)}c!=1/0&&(o.string=l.slice(0,c));var g=t.token(o,i.outer);return c!=1/0&&(o.string=l),g},indent:function(n,r){var o=n.innerActive?n.innerActive.mode:t;return o.indent?o.indent(n.innerActive?n.inner:n.outer,r):e.Pass},blankLine:function(n){var o=n.innerActive?n.innerActive.mode:t;if(o.blankLine&&o.blankLine(n.innerActive?n.inner:n.outer),n.innerActive)"\n"===n.innerActive.close&&(n.innerActive=n.inner=null);else for(var i=0;i<r.length;++i){var a=r[i];"\n"===a.open&&(n.innerActive=a,n.inner=e.startState(a.mode,o.indent?o.indent(n.outer,""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define("mode/handlebars/handlebars.js",["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineSimpleMode("handlebars-tags",{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"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),e.defineMode("handlebars",function(t,n){var r=e.getMode(t,"handlebars-tags");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:"{{",close:"}}",mode:r,parseDelimiters:!0}):r}),e.defineMIME("text/x-handlebars-template","handlebars")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(r,o){function i(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(d("atom","]]>")):null:e.match("--")?n(d("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(s(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=i,T=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return T="equals",null;if("<"==n){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=l(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function d(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=i;break}n.next()}return e}}function s(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=s(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=i;break}return n.tokenize=s(e-1),n.tokenize(t,n)}}return"meta"}}function c(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(w.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!w.contextGrabbers.hasOwnProperty(n)||!w.contextGrabbers[n].hasOwnProperty(t))return;u(e)}}function m(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?g:m}function p(e,t,n){return"word"==e?(n.tagName=t.current(),C="tag",v):w.allowMissingTagName&&"endTag"==e?(C="tag bracket",v(e,t,n)):(C="error",p)}function g(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&w.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n),n.context&&n.context.tagName==r||!1===w.matchClosing?(C="tag",h):(C="tag error",x)}return w.allowMissingTagName&&"endTag"==e?(C="tag bracket",h(e,t,n)):(C="error",x)}function h(e,t,n){return"endTag"!=e?(C="error",h):(u(n),m)}function x(e,t,n){return C="error",h(e,t,n)}function v(e,t,n){if("word"==e)return C="attribute",k;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||w.autoSelfClosers.hasOwnProperty(r)?f(n,r):(f(n,r),n.context=new c(n,r,o==n.indented)),m}return C="error",v}function k(e,t,n){return"equals"==e?b:(w.allowMissing||(C="error"),v(e,t,n))}function b(e,t,n){return"string"==e?S:"word"==e&&w.allowUnquoted?(C="string",v):(C="error",v(e,t,n))}function S(e,t,n){return"string"==e?S:v(e,t,n)}var y=r.indentUnit,w={},M=o.htmlMode?t:n;for(var A in M)w[A]=M[A];for(var A in o)w[A]=o[A];var T,C;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var n=t.tokenize(e,t);return(n||T)&&"comment"!=n&&(C=null,t.state=t.state(T||n,e,t),C&&(n="error"==C?n+" error":C)),n},indent:function(t,n,r){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+y;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=i)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==w.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+y*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var l=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(l&&l[1])for(;o;){if(o.tagName==l[2]){o=o.prev;break}if(!w.implicitlyClosed.hasOwnProperty(o.tagName))break;o=o.prev}else if(l)for(;o;){var d=w.contextGrabbers[o.tagName];if(!d||!d.hasOwnProperty(l[2]))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+y:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(e){e.state==b&&(e.state=v)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"function"==typeof e.define&&e.define("modeHandlebars",["mode/handlebars/handlebars.js"],function(){})}(this);
@@ -1,2 +1,2 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(n,o){function a(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(S=e.eat("/")?"closeTag":"openTag",t.tokenize=i,"tag bracket");if("&"==n){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function i(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=a,S=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return S="equals",null;if("<"==r){t.tokenize=a,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=i;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=a;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=a;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function d(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(M.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!M.contextGrabbers.hasOwnProperty(r)||!M.contextGrabbers[r].hasOwnProperty(t))return;u(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),T="tag",y):M.allowMissingTagName&&"endTag"==e?(T="tag bracket",y(e,t,r)):(T="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&M.implicitlyClosed.hasOwnProperty(r.context.tagName)&&u(r),r.context&&r.context.tagName==n||!1===M.matchClosing?(T="tag",g):(T="tag error",b)}return M.allowMissingTagName&&"endTag"==e?(T="tag bracket",g(e,t,r)):(T="error",b)}function g(e,t,r){return"endTag"!=e?(T="error",g):(u(r),m)}function b(e,t,r){return T="error",g(e,t,r)}function y(e,t,r){if("word"==e)return T="attribute",k;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||M.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new d(r,n,o==r.indented)),m}return T="error",y}function k(e,t,r){return"equals"==e?v:(M.allowMissing||(T="error"),y(e,t,r))}function v(e,t,r){return"string"==e?w:"word"==e&&M.allowUnquoted?(T="string",y):(T="error",y(e,t,r))}function w(e,t,r){return"string"==e?w:y(e,t,r)}var x=n.indentUnit,M={},z=o.htmlMode?t:r;for(var j in z)M[j]=z[j];for(var j in o)M[j]=o[j];var S,T;return a.isInText=!0,{startState:function(e){var t={tokenize:a,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;S=null;var r=t.tokenize(e,t);return(r||S)&&"comment"!=r&&(T=null,t.state=t.state(S||r,e,t),T&&(r="error"==T?r+" error":T)),r},indent:function(t,r,n){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+x;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=a)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==M.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+x*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;o;){if(o.tagName==l[2]){o=o.prev;break}if(!M.implicitlyClosed.hasOwnProperty(o.tagName))break;o=o.prev}else if(l)for(;o;){var s=M.contextGrabbers[o.tagName];if(!s||!s.hasOwnProperty(l[2]))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+x:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(e){e.state==v&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return qe=e,Pe=r,t}function a(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=i(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):Ce(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eat("="),o("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),o("error","error");if(Be.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),o("operator","operator",e.current());if($e.test(r)){e.eatWhile($e);var a=e.current();if("."!=t.lastType){if(Ve.propertyIsEnumerable(a)){var c=Ve[a];return o(c.type,c.style,a)}if("async"==a&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return o("async","keyword",a)}return o("variable","variable",a)}}function i(e){return function(t,r){var n,i=!1;if(Oe&&"@"==t.peek()&&t.match(We))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ke){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,a=!1,i=r-1;i>=0;--i){var l=e.string.charAt(i),s=_e.indexOf(l);if(s>=0&&s<3){if(!o){++i;break}if(0==--o){"("==l&&(a=!0);break}}else if(s>=3&&s<6)++o;else if($e.test(l))a=!0;else{if(/["'\/]/.test(l))return;if(a&&!o){++i;break}}}a&&!o&&(t.fatArrowAt=i)}}function d(e,t,r,n,o,a){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=a,null!=n&&(this.align=n)}function u(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,o){var a=e.cc;for(De.state=e,De.stream=o,De.marked=null,De.cc=a,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((a.length?a.pop():Ne?M:x)(r,n)){for(;a.length&&a[a.length-1].lex;)a.pop()();return De.marked?De.marked:"variable"==r&&u(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function h(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=De.state;if(De.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function g(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function b(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=Fe}function y(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function k(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new d(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function v(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?f():";"==e?m():f(t)}return t}function x(e,t){return"var"==e?f(k("vardef",t.length),re,w(";"),v):"keyword a"==e?f(k("form"),j,x,v):"keyword b"==e?f(k("form"),x,v):"keyword d"==e?De.stream.match(/^\s*$/,!1)?f():f(k("stat"),T,w(";"),v):"debugger"==e?f(w(";")):"{"==e?f(k("}"),F,v):";"==e?f():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==v&&De.state.cc.pop()(),f(k("form"),j,x,v,le)):"function"==e?f(me):"for"==e?f(k("form"),se,x,v):"class"==e||Ke&&"interface"==t?(De.marked="keyword",f(k("form"),ge,v)):"variable"==e?Ke&&"type"==t?(De.marked="keyword",f(R,w("operator"),R,w(";"))):Ke&&"declare"==t?(De.marked="keyword",f(x)):Ke&&("module"==t||"enum"==t)&&De.stream.match(/^\s*\w/,!1)?(De.marked="keyword",f(k("form"),ne,w("{"),k("}"),F,v,v)):Ke&&"namespace"==t?(De.marked="keyword",f(k("form"),M,F,v)):f(k("stat"),$):"switch"==e?f(k("form"),j,w("{"),k("}","switch"),F,v,v):"case"==e?f(M,w(":")):"default"==e?f(w(":")):"catch"==e?f(k("form"),b,w("("),fe,w(")"),x,v,y):"export"==e?f(k("stat"),ve,v):"import"==e?f(k("stat"),xe,v):"async"==e?f(x):"@"==t?f(M,x):m(k("stat"),M,w(";"),v)}function M(e,t){return S(e,t,!1)}function z(e,t){return S(e,t,!0)}function j(e){return"("!=e?m():f(k(")"),M,w(")"),v)}function S(e,t,r){if(De.state.fatArrowAt==De.stream.start){var n=r?E:I;if("("==e)return f(b,k(")"),L(fe,")"),v,w("=>"),n,y);if("variable"==e)return m(b,ne,w("=>"),n,y)}var o=r?C:A;return Le.hasOwnProperty(e)?f(o):"function"==e?f(me,o):"class"==e||Ke&&"interface"==t?(De.marked="keyword",f(k("form"),he,v)):"keyword c"==e||"async"==e?f(r?z:M):"("==e?f(k(")"),T,w(")"),v,o):"operator"==e||"spread"==e?f(r?z:M):"["==e?f(k("]"),Te,v,o):"{"==e?D(B,"}",null,o):"quasi"==e?m(q,o):"new"==e?f(O(r)):f()}function T(e){return e.match(/[;\}\)\],]/)?m():m(M)}function A(e,t){return","==e?f(M):C(e,t,!1)}function C(e,t,r){var n=0==r?A:C,o=0==r?M:z;return"=>"==e?f(b,r?E:I,y):"operator"==e?/\+\+|--/.test(t)||Ke&&"!"==t?f(n):Ke&&"<"==t&&De.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(k(">"),L(R,">"),v,n):"?"==t?f(M,w(":"),o):f(o):"quasi"==e?m(q,n):";"!=e?"("==e?D(z,")","call",n):"."==e?f(V,n):"["==e?f(k("]"),T,w("]"),v,n):Ke&&"as"==t?(De.marked="keyword",f(R,n)):"regexp"==e?(De.state.lastType=De.marked="operator",De.stream.backUp(De.stream.pos-De.stream.start-1),f(o)):void 0:void 0}function q(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(q):f(M,P)}function P(e){if("}"==e)return De.marked="string-2",De.state.tokenize=s,f(q)}function I(e){return c(De.stream,De.state),m("{"==e?x:M)}function E(e){return c(De.stream,De.state),m("{"==e?x:z)}function O(e){return function(t){return"."==t?f(e?K:N):"variable"==t&&Ke?f(Q,e?C:A):m(e?z:M)}}function N(e,t){if("target"==t)return De.marked="keyword",f(A)}function K(e,t){if("target"==t)return De.marked="keyword",f(C)}function $(e){return":"==e?f(v,x):m(A,w(";"),v)}function V(e){if("variable"==e)return De.marked="property",f()}function B(e,t){if("async"==e)return De.marked="property",f(B);if("variable"==e||"keyword"==De.style){if(De.marked="property","get"==t||"set"==t)return f(W);var r;return Ke&&De.state.fatArrowAt==De.stream.start&&(r=De.stream.match(/^\s*:\s*/,!1))&&(De.state.fatArrowAt=De.stream.pos+r[0].length),f(_)}return"number"==e||"string"==e?(De.marked=Oe?"property":De.style+" property",f(_)):"jsonld-keyword"==e?f(_):Ke&&g(t)?(De.marked="keyword",f(B)):"["==e?f(M,U,w("]"),_):"spread"==e?f(z,_):"*"==t?(De.marked="keyword",f(B)):":"==e?m(_):void 0}function W(e){return"variable"!=e?m(_):(De.marked="property",f(me))}function _(e){return":"==e?f(z):"("==e?m(me):void 0}function L(e,t,r){function n(o,a){if(r?r.indexOf(o)>-1:","==o){var i=De.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return o==t||a==t?f():f(w(t))}return function(r,o){return r==t||o==t?f():m(e,n)}}function D(e,t,r){for(var n=3;n<arguments.length;n++)De.cc.push(arguments[n]);return f(k(t,r),L(e,t),v)}function F(e){return"}"==e?f():m(x,F)}function U(e,t){if(Ke){if(":"==e)return f(R);if("?"==t)return f(U)}}function H(e){if(Ke&&":"==e)return De.stream.match(/^\s*\w+\s+is\b/,!1)?f(M,G,R):f(R)}function G(e,t){if("is"==t)return De.marked="keyword",f()}function R(e,t){return"variable"==e||"void"==t?"keyof"==t?(De.marked="keyword",f(R)):(De.marked="type",f(J)):"string"==e||"number"==e||"atom"==e?f(J):"["==e?f(k("]"),L(R,"]",","),v,J):"{"==e?f(k("}"),L(X,"}",",;"),v,J):"("==e?f(L(Z,")"),Y):void 0}function Y(e){if("=>"==e)return f(R)}function X(e,t){return"variable"==e||"keyword"==De.style?(De.marked="property",f(X)):"?"==t?f(X):":"==e?f(R):"["==e?f(M,U,w("]"),X):void 0}function Z(e){return"variable"==e?f(Z):":"==e?f(R):void 0}function J(e,t){return"<"==t?f(k(">"),L(R,">"),v,J):"|"==t||"."==e?f(R):"["==e?f(w("]"),J):"extends"==t||"implements"==t?(De.marked="keyword",f(R)):void 0}function Q(e,t){if("<"==t)return f(k(">"),L(R,">"),v,J)}function ee(){return m(R,te)}function te(e,t){if("="==t)return f(R)}function re(){return m(ne,U,ae,ie)}function ne(e,t){return Ke&&g(t)?(De.marked="keyword",f(ne)):"variable"==e?(h(t),f()):"spread"==e?f(ne):"["==e?D(ne,"]"):"{"==e?D(oe,"}"):void 0}function oe(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?f(ne):"}"==e?m():f(w(":"),ne,ae)):(h(t),f(ae))}function ae(e,t){if("="==t)return f(z)}function ie(e){if(","==e)return f(re)}function le(e,t){if("keyword b"==e&&"else"==t)return f(k("form","else"),x,v)}function se(e){if("("==e)return f(k(")"),ce,w(")"),v)}function ce(e){return"var"==e?f(re,w(";"),ue):";"==e?f(ue):"variable"==e?f(de):m(M,w(";"),ue)}function de(e,t){return"in"==t||"of"==t?(De.marked="keyword",f(M)):f(A,ue)}function ue(e,t){return";"==e?f(pe):"in"==t||"of"==t?(De.marked="keyword",f(M)):m(M,w(";"),pe)}function pe(e){")"!=e&&f(M)}function me(e,t){return"*"==t?(De.marked="keyword",f(me)):"variable"==e?(h(t),f(me)):"("==e?f(b,k(")"),L(fe,")"),v,H,x,y):Ke&&"<"==t?f(k(">"),L(ee,">"),v,me):void 0}function fe(e,t){return"@"==t&&f(M,fe),"spread"==e?f(fe):Ke&&g(t)?(De.marked="keyword",f(fe)):m(ne,U,ae)}function he(e,t){return"variable"==e?ge(e,t):be(e,t)}function ge(e,t){if("variable"==e)return h(t),f(be)}function be(e,t){return"<"==t?f(k(">"),L(ee,">"),v,be):"extends"==t||"implements"==t||Ke&&","==e?f(Ke?R:M,be):"{"==e?f(k("}"),ye,v):void 0}function ye(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Ke&&g(t))&&De.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(De.marked="keyword",f(ye)):"variable"==e||"keyword"==De.style?(De.marked="property",f(Ke?ke:me,ye)):"["==e?f(M,U,w("]"),Ke?ke:me,ye):"*"==t?(De.marked="keyword",f(ye)):";"==e?f(ye):"}"==e?f():"@"==t?f(M,ye):void 0}function ke(e,t){return"?"==t?f(ke):":"==e?f(R,ae):"="==t?f(z):m(me)}function ve(e,t){return"*"==t?(De.marked="keyword",f(Se,w(";"))):"default"==t?(De.marked="keyword",f(M,w(";"))):"{"==e?f(L(we,"}"),Se,w(";")):m(x)}function we(e,t){return"as"==t?(De.marked="keyword",f(w("variable"))):"variable"==e?m(z,we):void 0}function xe(e){return"string"==e?f():m(Me,ze,Se)}function Me(e,t){return"{"==e?D(Me,"}"):("variable"==e&&h(t),"*"==t&&(De.marked="keyword"),f(je))}function ze(e){if(","==e)return f(Me,ze)}function je(e,t){if("as"==t)return De.marked="keyword",f(Me)}function Se(e,t){if("from"==t)return De.marked="keyword",f(M)}function Te(e){return"]"==e?f():m(L(z,"]"))}function Ae(e,t){return"operator"==e.lastType||","==e.lastType||Be.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ce(e,t,r){return t.tokenize==a&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var qe,Pe,Ie=t.indentUnit,Ee=r.statementIndent,Oe=r.jsonld,Ne=r.json||Oe,Ke=r.typescript,$e=r.wordCharacters||/[\w$\xa1-\uffff]/,Ve=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),a=e("operator"),i={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Be=/[+\-*&%=<>!?|~^@]/,We=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,_e="([{}])",Le={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},Fe={name:"this",next:{name:"arguments"}};return v.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-Ie,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==qe?r:(t.lastType="operator"!=qe||"++"!=Pe&&"--"!=Pe?qe:"incdec",p(t,r,qe,Pe,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=a)return 0;var o,i=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var d=t.cc[c];if(d==v)s=s.prev;else if(d!=le)break}for(;("stat"==s.type||"form"==s.type)&&("}"==i||(o=t.cc[t.cc.length-1])&&(o==A||o==C)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Ee&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,p=i==u;return"vardef"==u?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==u&&"{"==i?s.indented:"form"==u?s.indented+Ie:"stat"==u?s.indented+(Ae(t,n)?Ee||Ie:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:Ie):s.indented+(/^(?:case|default)\b/.test(n)?Ie:2*Ie)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Ne?null:"/*",blockCommentEnd:Ne?null:"*/",blockCommentContinue:Ne?null:" * ",lineComment:Ne?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Ne?"json":"javascript",jsonldMode:Oe,jsonMode:Ne,expressionAllowed:Ce,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=M&&t!=z||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return f=t,e}function o(e,t){var r=e.next();if(b[r]){var o=b[r](e,t);if(!1!==o)return o}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=a(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=i,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function a(e){return function(t,r){for(var o,a=!1;null!=(o=t.next());){if(o==e&&!a){")"==e&&t.backUp(1);break}a=!a&&"\\"==o}return(o==e||!a&&")"!=e)&&(r.tokenize=null),n("string","string")}}function i(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=a(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function d(e,t,r){return P[r.context.type](e,t,r)}function u(e,t,r,n){for(var o=n||1;o>0;o--)r.context=r.context.prev;return d(e,t,r)}function p(e){var t=e.current().toLowerCase();h=T.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,h,g=t.indentUnit,b=r.tokenHooks,y=r.documentTypes||{},k=r.mediaTypes||{},v=r.mediaFeatures||{},w=r.mediaValueKeywords||{},x=r.propertyKeywords||{},M=r.nonStandardPropertyKeywords||{},z=r.fontProperties||{},j=r.counterDescriptors||{},S=r.colorKeywords||{},T=r.valueKeywords||{},A=r.allowNested,C=r.lineComment,q=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(q&&/@component/i.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)h="builtin";else if("word"==e)h="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return x.hasOwnProperty(n)?(h="property","maybeprop"):M.hasOwnProperty(n)?(h="string-2","maybeprop"):A?(h=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(h+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(h="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):d(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return u(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else h+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(h="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?u(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(h="variable-3",r.context.type):d(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(h="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();h="only"==n||"not"==n||"and"==n||"or"==n?"keyword":k.hasOwnProperty(n)?"attribute":v.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":M.hasOwnProperty(n)?"string-2":T.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?u(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(h="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?u(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(h="variable","restricted_atBlock_before"):d(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(h="@font-face"==r.stateArg&&!z.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!j.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(h="variable","keyframes"):"{"==e?s(r,t,"top"):d(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?u(e,t,r):("word"==e?h="tag":"hash"==e&&(h="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?u(e,t,r):("word"==e?h="variable":"variable"!=e&&"("!=e&&")"!=e&&(h="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||o)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),h=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),h},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),o=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(o=Math.max(0,r.indent-g)):(r=r.prev,o=r.indent)),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}})
2
- ;var n=["domain","regexp","url","url-prefix"],o=t(n),a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(a),l=["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"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],d=t(c),u=["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-blend-mode","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","caret-color","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-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","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","justify-items","justify-self","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","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","place-content","place-items","place-self","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","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"],p=t(u),m=["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"],f=t(m),h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(h),b=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(b),k=["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"],v=t(k),w=["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","auto-flow","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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","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","lighten","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","luminosity","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","multiply","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","opacity","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","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","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","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","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"],x=t(w),M=n.concat(a).concat(l).concat(c).concat(u).concat(m).concat(k).concat(w);e.registerHelper("hintWords","css",M),e.defineMIME("text/css",{documentTypes:o,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:v,valueKeywords:x,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:i,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:v,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),o=n.search(t);return o>-1?e.backUp(n.length-o):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function o(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function a(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),o=e[r],a=o.length-1;a>=0;a--)n.unshift(o[a])}function i(e,t){for(var r=0;r<e.length;r++){var o=e[r];if(!o[0]||o[1].test(n(t,o[0])))return o[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/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"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,a){var l,u=c.token(n,a.htmlState),p=/\btag\b/.test(u);if(p&&!/[<>\s\/]/.test(n.current())&&(l=a.htmlState.tagName&&a.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(l))a.inTag=l+" ";else if(a.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(a.inTag);a.inTag=null;var f=">"==n.current()&&i(d[m[1]],m[2]),h=e.getMode(r,f),g=o(m[1],!0),b=o(m[1],!1);a.token=function(e,r){return e.match(g,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,b,r.localMode.token(e,r.localState))},a.localMode=h,a.localState=e.startState(h,c.indent(a.htmlState,""))}else a.inTag&&(a.inTag+=n.current(),n.eol()&&(a.inTag+=" "));return u}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),d={},u=n&&n.tags,p=n&&n.scriptTypes;if(a(l,d),u&&a(u,d),p)for(var m=p.length-1;m>=0;m--)d.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function r(e,t,r,n){if("string"==typeof t){var o=e.indexOf(t,r);return n&&o>-1?o+t.length:o}var a=t.exec(r?e.slice(r):e);return a?a.index+r+(n?a[0].length:0):-1}var n=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(r){return{outer:e.copyState(t,r.outer),innerActive:r.innerActive,inner:r.innerActive&&e.copyState(r.innerActive.mode,r.inner)}},token:function(o,a){if(a.innerActive){var i=a.innerActive,l=o.string;if(!i.close&&o.sol())return a.innerActive=a.inner=null,this.token(o,a);var s=i.close?r(l,i.close,o.pos,i.parseDelimiters):-1;if(s==o.pos&&!i.parseDelimiters)return o.match(i.close),a.innerActive=a.inner=null,i.delimStyle&&i.delimStyle+" "+i.delimStyle+"-close";s>-1&&(o.string=l.slice(0,s));var c=i.mode.token(o,a.inner);return s>-1&&(o.string=l),s==o.pos&&i.parseDelimiters&&(a.innerActive=a.inner=null),i.innerStyle&&(c=c?c+" "+i.innerStyle:i.innerStyle),c}for(var d=1/0,l=o.string,u=0;u<n.length;++u){var p=n[u],s=r(l,p.open,o.pos);if(s==o.pos)return p.parseDelimiters||o.match(p.open),a.innerActive=p,a.inner=e.startState(p.mode,t.indent?t.indent(a.outer,""):0),p.delimStyle&&p.delimStyle+" "+p.delimStyle+"-open";-1!=s&&s<d&&(d=s)}d!=1/0&&(o.string=l.slice(0,d));var m=t.token(o,a.outer);return d!=1/0&&(o.string=l),m},indent:function(r,n){var o=r.innerActive?r.innerActive.mode:t;return o.indent?o.indent(r.innerActive?r.inner:r.outer,n):e.Pass},blankLine:function(r){var o=r.innerActive?r.innerActive.mode:t;if(o.blankLine&&o.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var a=0;a<n.length;++a){var i=n[a];"\n"===i.open&&(r.innerActive=i,r.inner=e.startState(i.mode,o.indent?o.indent(r.outer,""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define("mode/htmlembedded/htmlembedded.js",["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("htmlembedded",function(t,r){var n=r.closeComment||"--%>";return e.multiplexingMode(e.getMode(t,"htmlmixed"),{open:r.openComment||"<%--",close:n,delimStyle:"comment",mode:{token:function(e){return e.skipTo(n)||e.skipToEnd(),"comment"}}},{open:r.open||r.scriptStartRegex||"<%",close:r.close||r.scriptEndRegex||"%>",mode:e.getMode(t,r.scriptingModeSpec)})},"htmlmixed"),e.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),e.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),e.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),e.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})}),function(e){"function"==typeof define&&define("modeHtml",["mode/htmlembedded/htmlembedded.js"],function(){})}();
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(n,o){function a(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(S=e.eat("/")?"closeTag":"openTag",t.tokenize=i,"tag bracket");if("&"==n){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function i(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=a,S=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return S="equals",null;if("<"==r){t.tokenize=a,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=i;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=a;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=a;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function d(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(M.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!M.contextGrabbers.hasOwnProperty(r)||!M.contextGrabbers[r].hasOwnProperty(t))return;u(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),T="tag",y):M.allowMissingTagName&&"endTag"==e?(T="tag bracket",y(e,t,r)):(T="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&M.implicitlyClosed.hasOwnProperty(r.context.tagName)&&u(r),r.context&&r.context.tagName==n||!1===M.matchClosing?(T="tag",g):(T="tag error",b)}return M.allowMissingTagName&&"endTag"==e?(T="tag bracket",g(e,t,r)):(T="error",b)}function g(e,t,r){return"endTag"!=e?(T="error",g):(u(r),m)}function b(e,t,r){return T="error",g(e,t,r)}function y(e,t,r){if("word"==e)return T="attribute",k;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||M.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new d(r,n,o==r.indented)),m}return T="error",y}function k(e,t,r){return"equals"==e?v:(M.allowMissing||(T="error"),y(e,t,r))}function v(e,t,r){return"string"==e?w:"word"==e&&M.allowUnquoted?(T="string",y):(T="error",y(e,t,r))}function w(e,t,r){return"string"==e?w:y(e,t,r)}var x=n.indentUnit,M={},z=o.htmlMode?t:r;for(var j in z)M[j]=z[j];for(var j in o)M[j]=o[j];var S,T;return a.isInText=!0,{startState:function(e){var t={tokenize:a,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;S=null;var r=t.tokenize(e,t);return(r||S)&&"comment"!=r&&(T=null,t.state=t.state(S||r,e,t),T&&(r="error"==T?r+" error":T)),r},indent:function(t,r,n){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+x;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=a)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==M.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+x*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;o;){if(o.tagName==l[2]){o=o.prev;break}if(!M.implicitlyClosed.hasOwnProperty(o.tagName))break;o=o.prev}else if(l)for(;o;){var s=M.contextGrabbers[o.tagName];if(!s||!s.hasOwnProperty(l[2]))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+x:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(e){e.state==v&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return Ve=e,Be=r,t}function a(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=i(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),o("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):$e(e,t,1)?(n(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),o("regexp","string-2")):(e.eat("="),o("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),o("error","error");if(Ge.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),o("operator","operator",e.current());if(Ue.test(r)){e.eatWhile(Ue);var a=e.current();if("."!=t.lastType){if(He.propertyIsEnumerable(a)){var c=He[a];return o(c.type,c.style,a)}if("async"==a&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return o("async","keyword",a)}return o("variable","variable",a)}}function i(e){return function(t,r){var n,i=!1;if(Le&&"@"==t.peek()&&t.match(Re))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Fe){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,a=!1,i=r-1;i>=0;--i){var l=e.string.charAt(i),s=Ye.indexOf(l);if(s>=0&&s<3){if(!o){++i;break}if(0==--o){"("==l&&(a=!0);break}}else if(s>=3&&s<6)++o;else if(Ue.test(l))a=!0;else{if(/["'\/]/.test(l))return;if(a&&!o){++i;break}}}a&&!o&&(t.fatArrowAt=i)}}function d(e,t,r,n,o,a){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=a,null!=n&&(this.align=n)}function u(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,o){var a=e.cc;for(Ze.state=e,Ze.stream=o,Ze.marked=null,Ze.cc=a,Ze.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((a.length?a.pop():De?C:T)(r,n)){for(;a.length&&a[a.length-1].lex;)a.pop()();return Ze.marked?Ze.marked:"variable"==r&&u(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)Ze.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function h(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function g(e){var t=Ze.state;if(Ze.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=b(e,t.context);if(null!=n)return void(t.context=n)}else if(!h(e,t.localVars))return void(t.localVars=new v(e,t.localVars));r.globalVars&&!h(e,t.globalVars)&&(t.globalVars=new v(e,t.globalVars))}function b(e,t){if(t){if(t.block){var r=b(e,t.prev);return r?r==t.prev?t:new k(r,t.vars,!0):null}return h(e,t.vars)?t:new k(t.prev,new v(e,t.vars),!1)}return null}function y(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function k(e,t,r){this.prev=e,this.vars=t,this.block=r}function v(e,t){this.name=e,this.next=t}function w(){Ze.state.context=new k(Ze.state.context,Ze.state.localVars,!1),Ze.state.localVars=Je}function x(){Ze.state.context=new k(Ze.state.context,Ze.state.localVars,!0),Ze.state.localVars=null}function M(){Ze.state.localVars=Ze.state.context.vars,Ze.state.context=Ze.state.context.prev}function z(e,t){var r=function(){var r=Ze.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new d(n,Ze.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function j(){var e=Ze.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function S(e){function t(r){return r==e?f():";"==e||"}"==r||")"==r||"]"==r?m():f(t)}return t}function T(e,t){return"var"==e?f(z("vardef",t),se,S(";"),j):"keyword a"==e?f(z("form"),P,T,j):"keyword b"==e?f(z("form"),T,j):"keyword d"==e?Ze.stream.match(/^\s*$/,!1)?f():f(z("stat"),E,S(";"),j):"debugger"==e?f(S(";")):"{"==e?f(z("}"),x,X,j,M):";"==e?f():"if"==e?("else"==Ze.state.lexical.info&&Ze.state.cc[Ze.state.cc.length-1]==j&&Ze.state.cc.pop()(),f(z("form"),P,T,j,me)):"function"==e?f(ke):"for"==e?f(z("form"),fe,T,j):"class"==e||Fe&&"interface"==t?(Ze.marked="keyword",f(z("form"),xe,j)):"variable"==e?Fe&&"declare"==t?(Ze.marked="keyword",f(T)):Fe&&("module"==t||"enum"==t||"type"==t)&&Ze.stream.match(/^\s*\w/,!1)?(Ze.marked="keyword","enum"==t?f(Oe):"type"==t?f(ee,S("operator"),ee,S(";")):f(z("form"),ce,S("{"),z("}"),X,j,j)):Fe&&"namespace"==t?(Ze.marked="keyword",f(z("form"),C,X,j)):Fe&&"abstract"==t?(Ze.marked="keyword",f(T)):f(z("stat"),D):"switch"==e?f(z("form"),P,S("{"),z("}","switch"),x,X,j,j,M):"case"==e?f(C,S(":")):"default"==e?f(S(":")):"catch"==e?f(z("form"),w,A,T,j,M):"export"==e?f(z("stat"),Se,j):"import"==e?f(z("stat"),Ae,j):"async"==e?f(T):"@"==t?f(C,T):m(z("stat"),C,S(";"),j)}function A(e){if("("==e)return f(ve,S(")"))}function C(e,t){return I(e,t,!1)}function q(e,t){return I(e,t,!0)}function P(e){return"("!=e?m():f(z(")"),C,S(")"),j)}function I(e,t,r){if(Ze.state.fatArrowAt==Ze.stream.start){var n=r?B:V;if("("==e)return f(w,z(")"),R(ve,")"),j,S("=>"),n,M);if("variable"==e)return m(w,ce,S("=>"),n,M)}var o=r?N:O;return Xe.hasOwnProperty(e)?f(o):"function"==e?f(ke,o):"class"==e||Fe&&"interface"==t?(Ze.marked="keyword",f(z("form"),we,j)):"keyword c"==e||"async"==e?f(r?q:C):"("==e?f(z(")"),E,S(")"),j,o):"operator"==e||"spread"==e?f(r?q:C):"["==e?f(z("]"),Ee,j,o):"{"==e?Y(U,"}",null,o):"quasi"==e?m(K,o):"new"==e?f(_(r)):"import"==e?f(C):f()}function E(e){return e.match(/[;\}\)\],]/)?m():m(C)}function O(e,t){return","==e?f(C):N(e,t,!1)}function N(e,t,r){var n=0==r?O:N,o=0==r?C:q;return"=>"==e?f(w,r?B:V,M):"operator"==e?/\+\+|--/.test(t)||Fe&&"!"==t?f(n):Fe&&"<"==t&&Ze.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(z(">"),R(ee,">"),j,n):"?"==t?f(C,S(":"),o):f(o):"quasi"==e?m(K,n):";"!=e?"("==e?Y(q,")","call",n):"."==e?f(F,n):"["==e?f(z("]"),E,S("]"),j,n):Fe&&"as"==t?(Ze.marked="keyword",f(ee,n)):"regexp"==e?(Ze.state.lastType=Ze.marked="operator",Ze.stream.backUp(Ze.stream.pos-Ze.stream.start-1),f(o)):void 0:void 0}function K(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(K):f(C,$)}function $(e){if("}"==e)return Ze.marked="string-2",Ze.state.tokenize=s,f(K)}function V(e){return c(Ze.stream,Ze.state),m("{"==e?T:C)}function B(e){return c(Ze.stream,Ze.state),m("{"==e?T:q)}function _(e){return function(t){return"."==t?f(e?L:W):"variable"==t&&Fe?f(ae,e?N:O):m(e?q:C)}}function W(e,t){if("target"==t)return Ze.marked="keyword",f(O)}function L(e,t){if("target"==t)return Ze.marked="keyword",f(N)}function D(e){return":"==e?f(j,T):m(O,S(";"),j)}function F(e){if("variable"==e)return Ze.marked="property",f()}function U(e,t){if("async"==e)return Ze.marked="property",f(U);if("variable"==e||"keyword"==Ze.style){if(Ze.marked="property","get"==t||"set"==t)return f(H);var r;return Fe&&Ze.state.fatArrowAt==Ze.stream.start&&(r=Ze.stream.match(/^\s*:\s*/,!1))&&(Ze.state.fatArrowAt=Ze.stream.pos+r[0].length),f(G)}return"number"==e||"string"==e?(Ze.marked=Le?"property":Ze.style+" property",f(G)):"jsonld-keyword"==e?f(G):Fe&&y(t)?(Ze.marked="keyword",f(U)):"["==e?f(C,Z,S("]"),G):"spread"==e?f(q,G):"*"==t?(Ze.marked="keyword",f(U)):":"==e?m(G):void 0}function H(e){return"variable"!=e?m(G):(Ze.marked="property",f(ke))}function G(e){return":"==e?f(q):"("==e?m(ke):void 0}function R(e,t,r){function n(o,a){if(r?r.indexOf(o)>-1:","==o){var i=Ze.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return o==t||a==t?f():f(S(t))}return function(r,o){return r==t||o==t?f():m(e,n)}}function Y(e,t,r){for(var n=3;n<arguments.length;n++)Ze.cc.push(arguments[n]);return f(z(t,r),R(e,t),j)}function X(e){return"}"==e?f():m(T,X)}function Z(e,t){if(Fe){if(":"==e)return f(ee);if("?"==t)return f(Z)}}function J(e){if(Fe&&":"==e)return Ze.stream.match(/^\s*\w+\s+is\b/,!1)?f(C,Q,ee):f(ee)}function Q(e,t){if("is"==t)return Ze.marked="keyword",f()}function ee(e,t){return"keyof"==t||"typeof"==t?(Ze.marked="keyword",f("keyof"==t?ee:q)):"variable"==e||"void"==t?(Ze.marked="type",f(oe)):"string"==e||"number"==e||"atom"==e?f(oe):"["==e?f(z("]"),R(ee,"]",","),j,oe):"{"==e?f(z("}"),R(re,"}",",;"),j,oe):"("==e?f(R(ne,")"),te):"<"==e?f(R(ee,">"),ee):void 0}function te(e){if("=>"==e)return f(ee)}function re(e,t){return"variable"==e||"keyword"==Ze.style?(Ze.marked="property",f(re)):"?"==t?f(re):":"==e?f(ee):"["==e?f(C,Z,S("]"),re):void 0}function ne(e,t){return"variable"==e&&Ze.stream.match(/^\s*[?:]/,!1)||"?"==t?f(ne):":"==e?f(ee):m(ee)}function oe(e,t){return"<"==t?f(z(">"),R(ee,">"),j,oe):"|"==t||"."==e||"&"==t?f(ee):"["==e?f(S("]"),oe):"extends"==t||"implements"==t?(Ze.marked="keyword",f(ee)):void 0}function ae(e,t){if("<"==t)return f(z(">"),R(ee,">"),j,oe)}function ie(){return m(ee,le)}function le(e,t){if("="==t)return f(ee)}function se(e,t){return"enum"==t?(Ze.marked="keyword",f(Oe)):m(ce,Z,ue,pe)}function ce(e,t){return Fe&&y(t)?(Ze.marked="keyword",f(ce)):"variable"==e?(g(t),f()):"spread"==e?f(ce):"["==e?Y(ce,"]"):"{"==e?Y(de,"}"):void 0}function de(e,t){return"variable"!=e||Ze.stream.match(/^\s*:/,!1)?("variable"==e&&(Ze.marked="property"),"spread"==e?f(ce):"}"==e?m():f(S(":"),ce,ue)):(g(t),f(ue))}function ue(e,t){if("="==t)return f(q)}function pe(e){if(","==e)return f(se)}function me(e,t){if("keyword b"==e&&"else"==t)return f(z("form","else"),T,j)}function fe(e,t){return"await"==t?f(fe):"("==e?f(z(")"),he,S(")"),j):void 0}function he(e){return"var"==e?f(se,S(";"),be):";"==e?f(be):"variable"==e?f(ge):m(C,S(";"),be)}function ge(e,t){return"in"==t||"of"==t?(Ze.marked="keyword",f(C)):f(O,be)}function be(e,t){return";"==e?f(ye):"in"==t||"of"==t?(Ze.marked="keyword",f(C)):m(C,S(";"),ye)}function ye(e){")"!=e&&f(C)}function ke(e,t){return"*"==t?(Ze.marked="keyword",f(ke)):"variable"==e?(g(t),f(ke)):"("==e?f(w,z(")"),R(ve,")"),j,J,T,M):Fe&&"<"==t?f(z(">"),R(ie,">"),j,ke):void 0}function ve(e,t){return"@"==t&&f(C,ve),"spread"==e?f(ve):Fe&&y(t)?(Ze.marked="keyword",f(ve)):m(ce,Z,ue)}function we(e,t){return"variable"==e?xe(e,t):Me(e,t)}function xe(e,t){if("variable"==e)return g(t),f(Me)}function Me(e,t){return"<"==t?f(z(">"),R(ie,">"),j,Me):"extends"==t||"implements"==t||Fe&&","==e?("implements"==t&&(Ze.marked="keyword"),f(Fe?ee:C,Me)):"{"==e?f(z("}"),ze,j):void 0}function ze(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Fe&&y(t))&&Ze.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ze.marked="keyword",f(ze)):"variable"==e||"keyword"==Ze.style?(Ze.marked="property",f(Fe?je:ke,ze)):"["==e?f(C,Z,S("]"),Fe?je:ke,ze):"*"==t?(Ze.marked="keyword",f(ze)):";"==e?f(ze):"}"==e?f():"@"==t?f(C,ze):void 0}function je(e,t){return"?"==t?f(je):":"==e?f(ee,ue):"="==t?f(q):m(ke)}function Se(e,t){return"*"==t?(Ze.marked="keyword",f(Ie,S(";"))):"default"==t?(Ze.marked="keyword",f(C,S(";"))):"{"==e?f(R(Te,"}"),Ie,S(";")):m(T)}function Te(e,t){return"as"==t?(Ze.marked="keyword",f(S("variable"))):"variable"==e?m(q,Te):void 0}function Ae(e){return"string"==e?f():"("==e?m(C):m(Ce,qe,Ie)}function Ce(e,t){return"{"==e?Y(Ce,"}"):("variable"==e&&g(t),"*"==t&&(Ze.marked="keyword"),f(Pe))}function qe(e){if(","==e)return f(Ce,qe)}function Pe(e,t){if("as"==t)return Ze.marked="keyword",f(Ce)}function Ie(e,t){if("from"==t)return Ze.marked="keyword",f(C)}function Ee(e){return"]"==e?f():m(R(q,"]"))}function Oe(){return m(z("form"),ce,S("{"),z("}"),R(Ne,"}"),j,j)}function Ne(){return m(ce,ue)}function Ke(e,t){return"operator"==e.lastType||","==e.lastType||Ge.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function $e(e,t,r){return t.tokenize==a&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Ve,Be,_e=t.indentUnit,We=r.statementIndent,Le=r.jsonld,De=r.json||Le,Fe=r.typescript,Ue=r.wordCharacters||/[\w$\xa1-\uffff]/,He=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),a=e("operator"),i={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Ge=/[+\-*&%=<>!?|~^@]/,Re=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ye="([{}])",Xe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ze={state:null,column:null,marked:null,cc:null},Je=new v("this",new v("arguments",null));return M.lex=!0,j.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-_e,0,"block",!1),localVars:r.localVars,context:r.localVars&&new k(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Ve?r:(t.lastType="operator"!=Ve||"++"!=Be&&"--"!=Be?Ve:"incdec",p(t,r,Ve,Be,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=a)return 0;var o,i=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var d=t.cc[c];if(d==j)s=s.prev;else if(d!=me)break}for(;("stat"==s.type||"form"==s.type)&&("}"==i||(o=t.cc[t.cc.length-1])&&(o==O||o==N)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;We&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,p=i==u;return"vardef"==u?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==u&&"{"==i?s.indented:"form"==u?s.indented+_e:"stat"==u?s.indented+(Ke(t,n)?We||_e:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:_e):s.indented+(/^(?:case|default)\b/.test(n)?_e:2*_e)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:De?null:"/*",blockCommentEnd:De?null:"*/",blockCommentContinue:De?null:" * ",lineComment:De?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:De?"json":"javascript",jsonldMode:Le,jsonMode:De,expressionAllowed:$e,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=q||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return f=t,e}function o(e,t){var r=e.next();if(b[r]){var o=b[r](e,t);if(!1!==o)return o}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=a(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=i,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function a(e){return function(t,r){for(var o,a=!1;null!=(o=t.next());){if(o==e&&!a){")"==e&&t.backUp(1);break}a=!a&&"\\"==o}return(o==e||!a&&")"!=e)&&(r.tokenize=null),n("string","string")}}function i(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=a(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function d(e,t,r){return P[r.context.type](e,t,r)}function u(e,t,r,n){for(var o=n||1;o>0;o--)r.context=r.context.prev;return d(e,t,r)}function p(e){var t=e.current().toLowerCase();h=T.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,h,g=t.indentUnit,b=r.tokenHooks,y=r.documentTypes||{},k=r.mediaTypes||{},v=r.mediaFeatures||{},w=r.mediaValueKeywords||{},x=r.propertyKeywords||{},M=r.nonStandardPropertyKeywords||{},z=r.fontProperties||{},j=r.counterDescriptors||{},S=r.colorKeywords||{},T=r.valueKeywords||{},A=r.allowNested,C=r.lineComment,q=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(q&&/@component/i.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)h="builtin";else if("word"==e)h="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return x.hasOwnProperty(n)?(h="property","maybeprop"):M.hasOwnProperty(n)?(h="string-2","maybeprop"):A?(h=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(h+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(h="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):d(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return u(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else h+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(h="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?u(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(h="variable-3",r.context.type):d(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(h="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();h="only"==n||"not"==n||"and"==n||"or"==n?"keyword":k.hasOwnProperty(n)?"attribute":v.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":M.hasOwnProperty(n)?"string-2":T.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?u(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(h="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?u(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(h="variable","restricted_atBlock_before"):d(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(h="@font-face"==r.stateArg&&!z.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!j.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(h="variable","keyframes"):"{"==e?s(r,t,"top"):d(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?u(e,t,r):("word"==e?h="tag":"hash"==e&&(h="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?u(e,t,r):("word"==e?h="variable":"variable"!=e&&"("!=e&&")"!=e&&(h="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||o)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),h=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),h},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),o=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(o=Math.max(0,r.indent-g)):(r=r.prev,o=r.indent)),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}})
2
+ ;var n=["domain","regexp","url","url-prefix"],o=t(n),a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(a),l=["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"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],d=t(c),u=["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-blend-mode","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","caret-color","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-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","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","justify-items","justify-self","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","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","place-content","place-items","place-self","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","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"],p=t(u),m=["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"],f=t(m),h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(h),b=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(b),k=["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"],v=t(k),w=["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","auto-flow","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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","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","lighten","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","luminosity","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","multiply","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","opacity","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","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","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","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","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"],x=t(w),M=n.concat(a).concat(l).concat(c).concat(u).concat(m).concat(k).concat(w);e.registerHelper("hintWords","css",M),e.defineMIME("text/css",{documentTypes:o,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:v,valueKeywords:x,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:i,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:v,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),o=n.search(t);return o>-1?e.backUp(n.length-o):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function o(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function a(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),o=e[r],a=o.length-1;a>=0;a--)n.unshift(o[a])}function i(e,t){for(var r=0;r<e.length;r++){var o=e[r];if(!o[0]||o[1].test(n(t,o[0])))return o[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/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"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,a){var l,u=c.token(n,a.htmlState),p=/\btag\b/.test(u);if(p&&!/[<>\s\/]/.test(n.current())&&(l=a.htmlState.tagName&&a.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(l))a.inTag=l+" ";else if(a.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(a.inTag);a.inTag=null;var f=">"==n.current()&&i(d[m[1]],m[2]),h=e.getMode(r,f),g=o(m[1],!0),b=o(m[1],!1);a.token=function(e,r){return e.match(g,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,b,r.localMode.token(e,r.localState))},a.localMode=h,a.localState=e.startState(h,c.indent(a.htmlState,""))}else a.inTag&&(a.inTag+=n.current(),n.eol()&&(a.inTag+=" "));return u}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),d={},u=n&&n.tags,p=n&&n.scriptTypes;if(a(l,d),u&&a(u,d),p)for(var m=p.length-1;m>=0;m--)d.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function r(e,t,r,n){if("string"==typeof t){var o=e.indexOf(t,r);return n&&o>-1?o+t.length:o}var a=t.exec(r?e.slice(r):e);return a?a.index+r+(n?a[0].length:0):-1}var n=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(r){return{outer:e.copyState(t,r.outer),innerActive:r.innerActive,inner:r.innerActive&&e.copyState(r.innerActive.mode,r.inner)}},token:function(o,a){if(a.innerActive){var i=a.innerActive,l=o.string;if(!i.close&&o.sol())return a.innerActive=a.inner=null,this.token(o,a);var s=i.close?r(l,i.close,o.pos,i.parseDelimiters):-1;if(s==o.pos&&!i.parseDelimiters)return o.match(i.close),a.innerActive=a.inner=null,i.delimStyle&&i.delimStyle+" "+i.delimStyle+"-close";s>-1&&(o.string=l.slice(0,s));var c=i.mode.token(o,a.inner);return s>-1&&(o.string=l),s==o.pos&&i.parseDelimiters&&(a.innerActive=a.inner=null),i.innerStyle&&(c=c?c+" "+i.innerStyle:i.innerStyle),c}for(var d=1/0,l=o.string,u=0;u<n.length;++u){var p=n[u],s=r(l,p.open,o.pos);if(s==o.pos){p.parseDelimiters||o.match(p.open),a.innerActive=p;var m=0;if(t.indent){var f=t.indent(a.outer,"");f!==e.Pass&&(m=f)}return a.inner=e.startState(p.mode,m),p.delimStyle&&p.delimStyle+" "+p.delimStyle+"-open"}-1!=s&&s<d&&(d=s)}d!=1/0&&(o.string=l.slice(0,d));var h=t.token(o,a.outer);return d!=1/0&&(o.string=l),h},indent:function(r,n){var o=r.innerActive?r.innerActive.mode:t;return o.indent?o.indent(r.innerActive?r.inner:r.outer,n):e.Pass},blankLine:function(r){var o=r.innerActive?r.innerActive.mode:t;if(o.blankLine&&o.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var a=0;a<n.length;++a){var i=n[a];"\n"===i.open&&(r.innerActive=i,r.inner=e.startState(i.mode,o.indent?o.indent(r.outer,""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define("mode/htmlembedded/htmlembedded.js",["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("htmlembedded",function(t,r){var n=r.closeComment||"--%>";return e.multiplexingMode(e.getMode(t,"htmlmixed"),{open:r.openComment||"<%--",close:n,delimStyle:"comment",mode:{token:function(e){return e.skipTo(n)||e.skipToEnd(),"comment"}}},{open:r.open||r.scriptStartRegex||"<%",close:r.close||r.scriptEndRegex||"%>",mode:e.getMode(t,r.scriptingModeSpec)})},"htmlmixed"),e.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),e.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),e.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),e.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})}),function(e){"function"==typeof define&&define("modeHtml",["mode/htmlembedded/htmlembedded.js"],function(){})}();
@@ -1 +1 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return Te=e,$e=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),a("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),a("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=c,c(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):Ie(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Ue.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(We.test(r)){e.eatWhile(We);var i=e.current();if("."!=t.lastType){if(Ne.propertyIsEnumerable(i)){var u=Ne[i];return a(u.type,u.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(Oe&&"@"==t.peek()&&t.match(Be))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function c(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Se){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=He.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(We.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function f(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function l(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function d(e,t,r,n,a){var i=e.cc;for(De.state=e,De.stream=a,De.marked=null,De.cc=i,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():Pe?j:g)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return De.marked?De.marked:"variable"==r&&l(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function m(){return p.apply(null,arguments),!0}function v(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=De.state;if(De.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function k(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function y(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=Fe}function b(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function w(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new f(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function x(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function h(e){function t(r){return r==e?m():";"==e?p():m(t)}return t}function g(e,t){return"var"==e?m(w("vardef",t.length),re,h(";"),x):"keyword a"==e?m(w("form"),V,g,x):"keyword b"==e?m(w("form"),g,x):"keyword d"==e?De.stream.match(/^\s*$/,!1)?m():m(w("stat"),E,h(";"),x):"debugger"==e?m(h(";")):"{"==e?m(w("}"),F,x):";"==e?m():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==x&&De.state.cc.pop()(),m(w("form"),V,g,x,ce)):"function"==e?m(pe):"for"==e?m(w("form"),se,g,x):"class"==e||Se&&"interface"==t?(De.marked="keyword",m(w("form"),ke,x)):"variable"==e?Se&&"type"==t?(De.marked="keyword",m(Q,h("operator"),Q,h(";"))):Se&&"declare"==t?(De.marked="keyword",m(g)):Se&&("module"==t||"enum"==t)&&De.stream.match(/^\s*\w/,!1)?(De.marked="keyword",m(w("form"),ne,h("{"),w("}"),F,x,x)):Se&&"namespace"==t?(De.marked="keyword",m(w("form"),j,F,x)):m(w("stat"),W):"switch"==e?m(w("form"),V,h("{"),w("}","switch"),F,x,x):"case"==e?m(j,h(":")):"default"==e?m(h(":")):"catch"==e?m(w("form"),y,h("("),me,h(")"),g,x,b):"export"==e?m(w("stat"),xe,x):"import"==e?m(w("stat"),ge,x):"async"==e?m(g):"@"==t?m(j,g):p(w("stat"),j,h(";"),x)}function j(e,t){return A(e,t,!1)}function M(e,t){return A(e,t,!0)}function V(e){return"("!=e?p():m(w(")"),j,h(")"),x)}function A(e,t,r){if(De.state.fatArrowAt==De.stream.start){var n=r?q:C;if("("==e)return m(y,w(")"),J(me,")"),x,h("=>"),n,b);if("variable"==e)return p(y,ne,h("=>"),n,b)}var a=r?I:z;return Je.hasOwnProperty(e)?m(a):"function"==e?m(pe,a):"class"==e||Se&&"interface"==t?(De.marked="keyword",m(w("form"),ve,x)):"keyword c"==e||"async"==e?m(r?M:j):"("==e?m(w(")"),E,h(")"),x,a):"operator"==e||"spread"==e?m(r?M:j):"["==e?m(w("]"),Ee,x,a):"{"==e?D(U,"}",null,a):"quasi"==e?p(T,a):"new"==e?m(O(r)):m()}function E(e){return e.match(/[;\}\)\],]/)?p():p(j)}function z(e,t){return","==e?m(j):I(e,t,!1)}function I(e,t,r){var n=0==r?z:I,a=0==r?j:M;return"=>"==e?m(y,r?q:C,b):"operator"==e?/\+\+|--/.test(t)||Se&&"!"==t?m(n):Se&&"<"==t&&De.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?m(w(">"),J(Q,">"),x,n):"?"==t?m(j,h(":"),a):m(a):"quasi"==e?p(T,n):";"!=e?"("==e?D(M,")","call",n):"."==e?m(N,n):"["==e?m(w("]"),E,h("]"),x,n):Se&&"as"==t?(De.marked="keyword",m(Q,n)):"regexp"==e?(De.state.lastType=De.marked="operator",De.stream.backUp(De.stream.pos-De.stream.start-1),m(a)):void 0:void 0}function T(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?m(T):m(j,$)}function $(e){if("}"==e)return De.marked="string-2",De.state.tokenize=s,m(T)}function C(e){return u(De.stream,De.state),p("{"==e?g:j)}function q(e){return u(De.stream,De.state),p("{"==e?g:M)}function O(e){return function(t){return"."==t?m(e?S:P):"variable"==t&&Se?m(_,e?I:z):p(e?M:j)}}function P(e,t){if("target"==t)return De.marked="keyword",m(z)}function S(e,t){if("target"==t)return De.marked="keyword",m(I)}function W(e){return":"==e?m(x,g):p(z,h(";"),x)}function N(e){if("variable"==e)return De.marked="property",m()}function U(e,t){if("async"==e)return De.marked="property",m(U);if("variable"==e||"keyword"==De.style){if(De.marked="property","get"==t||"set"==t)return m(B);var r;return Se&&De.state.fatArrowAt==De.stream.start&&(r=De.stream.match(/^\s*:\s*/,!1))&&(De.state.fatArrowAt=De.stream.pos+r[0].length),m(H)}return"number"==e||"string"==e?(De.marked=Oe?"property":De.style+" property",m(H)):"jsonld-keyword"==e?m(H):Se&&k(t)?(De.marked="keyword",m(U)):"["==e?m(j,G,h("]"),H):"spread"==e?m(M,H):"*"==t?(De.marked="keyword",m(U)):":"==e?p(H):void 0}function B(e){return"variable"!=e?p(H):(De.marked="property",m(pe))}function H(e){return":"==e?m(M):"("==e?p(pe):void 0}function J(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=De.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),m(function(r,n){return r==t||n==t?p():p(e)},n)}return a==t||i==t?m():m(h(t))}return function(r,a){return r==t||a==t?m():p(e,n)}}function D(e,t,r){for(var n=3;n<arguments.length;n++)De.cc.push(arguments[n]);return m(w(t,r),J(e,t),x)}function F(e){return"}"==e?m():p(g,F)}function G(e,t){if(Se){if(":"==e)return m(Q);if("?"==t)return m(G)}}function K(e){if(Se&&":"==e)return De.stream.match(/^\s*\w+\s+is\b/,!1)?m(j,L,Q):m(Q)}function L(e,t){if("is"==t)return De.marked="keyword",m()}function Q(e,t){return"variable"==e||"void"==t?"keyof"==t?(De.marked="keyword",m(Q)):(De.marked="type",m(Z)):"string"==e||"number"==e||"atom"==e?m(Z):"["==e?m(w("]"),J(Q,"]",","),x,Z):"{"==e?m(w("}"),J(X,"}",",;"),x,Z):"("==e?m(J(Y,")"),R):void 0}function R(e){if("=>"==e)return m(Q)}function X(e,t){return"variable"==e||"keyword"==De.style?(De.marked="property",m(X)):"?"==t?m(X):":"==e?m(Q):"["==e?m(j,G,h("]"),X):void 0}function Y(e){return"variable"==e?m(Y):":"==e?m(Q):void 0}function Z(e,t){return"<"==t?m(w(">"),J(Q,">"),x,Z):"|"==t||"."==e?m(Q):"["==e?m(h("]"),Z):"extends"==t||"implements"==t?(De.marked="keyword",m(Q)):void 0}function _(e,t){if("<"==t)return m(w(">"),J(Q,">"),x,Z)}function ee(){return p(Q,te)}function te(e,t){if("="==t)return m(Q)}function re(){return p(ne,G,ie,oe)}function ne(e,t){return Se&&k(t)?(De.marked="keyword",m(ne)):"variable"==e?(v(t),m()):"spread"==e?m(ne):"["==e?D(ne,"]"):"{"==e?D(ae,"}"):void 0}function ae(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?m(ne):"}"==e?p():m(h(":"),ne,ie)):(v(t),m(ie))}function ie(e,t){if("="==t)return m(M)}function oe(e){if(","==e)return m(re)}function ce(e,t){if("keyword b"==e&&"else"==t)return m(w("form","else"),g,x)}function se(e){if("("==e)return m(w(")"),ue,h(")"),x)}function ue(e){return"var"==e?m(re,h(";"),le):";"==e?m(le):"variable"==e?m(fe):p(j,h(";"),le)}function fe(e,t){return"in"==t||"of"==t?(De.marked="keyword",m(j)):m(z,le)}function le(e,t){return";"==e?m(de):"in"==t||"of"==t?(De.marked="keyword",m(j)):p(j,h(";"),de)}function de(e){")"!=e&&m(j)}function pe(e,t){return"*"==t?(De.marked="keyword",m(pe)):"variable"==e?(v(t),m(pe)):"("==e?m(y,w(")"),J(me,")"),x,K,g,b):Se&&"<"==t?m(w(">"),J(ee,">"),x,pe):void 0}function me(e,t){return"@"==t&&m(j,me),"spread"==e?m(me):Se&&k(t)?(De.marked="keyword",m(me)):p(ne,G,ie)}function ve(e,t){return"variable"==e?ke(e,t):ye(e,t)}function ke(e,t){if("variable"==e)return v(t),m(ye)}function ye(e,t){return"<"==t?m(w(">"),J(ee,">"),x,ye):"extends"==t||"implements"==t||Se&&","==e?m(Se?Q:j,ye):"{"==e?m(w("}"),be,x):void 0}function be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Se&&k(t))&&De.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(De.marked="keyword",m(be)):"variable"==e||"keyword"==De.style?(De.marked="property",m(Se?we:pe,be)):"["==e?m(j,G,h("]"),Se?we:pe,be):"*"==t?(De.marked="keyword",m(be)):";"==e?m(be):"}"==e?m():"@"==t?m(j,be):void 0}function we(e,t){return"?"==t?m(we):":"==e?m(Q,ie):"="==t?m(M):p(pe)}function xe(e,t){return"*"==t?(De.marked="keyword",m(Ae,h(";"))):"default"==t?(De.marked="keyword",m(j,h(";"))):"{"==e?m(J(he,"}"),Ae,h(";")):p(g)}function he(e,t){return"as"==t?(De.marked="keyword",m(h("variable"))):"variable"==e?p(M,he):void 0}function ge(e){return"string"==e?m():p(je,Me,Ae)}function je(e,t){return"{"==e?D(je,"}"):("variable"==e&&v(t),"*"==t&&(De.marked="keyword"),m(Ve))}function Me(e){if(","==e)return m(je,Me)}function Ve(e,t){if("as"==t)return De.marked="keyword",m(je)}function Ae(e,t){if("from"==t)return De.marked="keyword",m(j)}function Ee(e){return"]"==e?m():p(J(M,"]"))}function ze(e,t){return"operator"==e.lastType||","==e.lastType||Ue.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ie(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Te,$e,Ce=t.indentUnit,qe=r.statementIndent,Oe=r.jsonld,Pe=r.json||Oe,Se=r.typescript,We=r.wordCharacters||/[\w$\xa1-\uffff]/,Ne=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Ue=/[+\-*&%=<>!?|~^@]/,Be=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,He="([{}])",Je={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},Fe={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new f((e||0)-Ce,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=c&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Te?r:(t.lastType="operator"!=Te||"++"!=$e&&"--"!=$e?Te:"incdec",d(t,r,Te,$e,e))},indent:function(t,n){if(t.tokenize==c)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var f=t.cc[u];if(f==x)s=s.prev;else if(f!=ce)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==z||a==I)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;qe&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var l=s.type,d=o==l;return"vardef"==l?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==l&&"{"==o?s.indented:"form"==l?s.indented+Ce:"stat"==l?s.indented+(ze(t,n)?qe||Ce:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:Ce):s.indented+(/^(?:case|default)\b/.test(n)?Ce:2*Ce)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Pe?null:"/*",blockCommentEnd:Pe?null:"*/",blockCommentContinue:Pe?null:" * ",lineComment:Pe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Pe?"json":"javascript",jsonldMode:Oe,jsonMode:Pe,expressionAllowed:Ie,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=j&&t!=M||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"function"==typeof e.define&&e.define("modeJs",["mode/javascript/javascript.js"],function(){})}(this);
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return Ue=e,Be=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=c,c(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):Ne(e,t,1)?(n(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Le.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(Ge.test(r)){e.eatWhile(Ge);var i=e.current();if("."!=t.lastType){if(Ke.propertyIsEnumerable(i)){var u=Ke[i];return a(u.type,u.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(We&&"@"==t.peek()&&t.match(Qe))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function c(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Fe){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=Re.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(Ge.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function f(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function l(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function d(e,t,r,n,a){var i=e.cc;for(Ye.state=e,Ye.stream=a,Ye.marked=null,Ye.cc=i,Ye.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():De?I:E)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ye.marked?Ye.marked:"variable"==r&&l(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)Ye.cc.push(arguments[e])}function m(){return p.apply(null,arguments),!0}function v(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function k(e){var t=Ye.state;if(Ye.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=y(e,t.context);if(null!=n)return void(t.context=n)}else if(!v(e,t.localVars))return void(t.localVars=new x(e,t.localVars));r.globalVars&&!v(e,t.globalVars)&&(t.globalVars=new x(e,t.globalVars))}function y(e,t){if(t){if(t.block){var r=y(e,t.prev);return r?r==t.prev?t:new b(r,t.vars,!0):null}return v(e,t.vars)?t:new b(t.prev,new x(e,t.vars),!1)}return null}function w(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function b(e,t,r){this.prev=e,this.vars=t,this.block=r}function x(e,t){this.name=e,this.next=t}function h(){Ye.state.context=new b(Ye.state.context,Ye.state.localVars,!1),Ye.state.localVars=Ze}function g(){Ye.state.context=new b(Ye.state.context,Ye.state.localVars,!0),Ye.state.localVars=null}function j(){Ye.state.localVars=Ye.state.context.vars,Ye.state.context=Ye.state.context.prev}function M(e,t){var r=function(){var r=Ye.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new f(n,Ye.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function V(){var e=Ye.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function A(e){function t(r){return r==e?m():";"==e||"}"==r||")"==r||"]"==r?p():m(t)}return t}function E(e,t){return"var"==e?m(M("vardef",t),se,A(";"),V):"keyword a"==e?m(M("form"),$,E,V):"keyword b"==e?m(M("form"),E,V):"keyword d"==e?Ye.stream.match(/^\s*$/,!1)?m():m(M("stat"),q,A(";"),V):"debugger"==e?m(A(";")):"{"==e?m(M("}"),g,X,V,j):";"==e?m():"if"==e?("else"==Ye.state.lexical.info&&Ye.state.cc[Ye.state.cc.length-1]==V&&Ye.state.cc.pop()(),m(M("form"),$,E,V,pe)):"function"==e?m(be):"for"==e?m(M("form"),me,E,V):"class"==e||Fe&&"interface"==t?(Ye.marked="keyword",m(M("form"),ge,V)):"variable"==e?Fe&&"declare"==t?(Ye.marked="keyword",m(E)):Fe&&("module"==t||"enum"==t||"type"==t)&&Ye.stream.match(/^\s*\w/,!1)?(Ye.marked="keyword","enum"==t?m(Oe):"type"==t?m(ee,A("operator"),ee,A(";")):m(M("form"),ue,A("{"),M("}"),X,V,V)):Fe&&"namespace"==t?(Ye.marked="keyword",m(M("form"),I,X,V)):Fe&&"abstract"==t?(Ye.marked="keyword",m(E)):m(M("stat"),D):"switch"==e?m(M("form"),$,A("{"),M("}","switch"),g,X,V,V,j):"case"==e?m(I,A(":")):"default"==e?m(A(":")):"catch"==e?m(M("form"),h,z,E,V,j):"export"==e?m(M("stat"),Ae,V):"import"==e?m(M("stat"),ze,V):"async"==e?m(E):"@"==t?m(I,E):p(M("stat"),I,A(";"),V)}function z(e){if("("==e)return m(xe,A(")"))}function I(e,t){return C(e,t,!1)}function T(e,t){return C(e,t,!0)}function $(e){return"("!=e?p():m(M(")"),I,A(")"),V)}function C(e,t,r){if(Ye.state.fatArrowAt==Ye.stream.start){var n=r?B:U;if("("==e)return m(h,M(")"),Q(xe,")"),V,A("=>"),n,j);if("variable"==e)return p(h,ue,A("=>"),n,j)}var a=r?P:O;return Xe.hasOwnProperty(e)?m(a):"function"==e?m(be,a):"class"==e||Fe&&"interface"==t?(Ye.marked="keyword",m(M("form"),he,V)):"keyword c"==e||"async"==e?m(r?T:I):"("==e?m(M(")"),q,A(")"),V,a):"operator"==e||"spread"==e?m(r?T:I):"["==e?m(M("]"),qe,V,a):"{"==e?R(G,"}",null,a):"quasi"==e?p(S,a):"new"==e?m(H(r)):"import"==e?m(I):m()}function q(e){return e.match(/[;\}\)\],]/)?p():p(I)}function O(e,t){return","==e?m(I):P(e,t,!1)}function P(e,t,r){var n=0==r?O:P,a=0==r?I:T;return"=>"==e?m(h,r?B:U,j):"operator"==e?/\+\+|--/.test(t)||Fe&&"!"==t?m(n):Fe&&"<"==t&&Ye.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?m(M(">"),Q(ee,">"),V,n):"?"==t?m(I,A(":"),a):m(a):"quasi"==e?p(S,n):";"!=e?"("==e?R(T,")","call",n):"."==e?m(F,n):"["==e?m(M("]"),q,A("]"),V,n):Fe&&"as"==t?(Ye.marked="keyword",m(ee,n)):"regexp"==e?(Ye.state.lastType=Ye.marked="operator",Ye.stream.backUp(Ye.stream.pos-Ye.stream.start-1),m(a)):void 0:void 0}function S(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?m(S):m(I,N)}function N(e){if("}"==e)return Ye.marked="string-2",Ye.state.tokenize=s,m(S)}function U(e){return u(Ye.stream,Ye.state),p("{"==e?E:I)}function B(e){return u(Ye.stream,Ye.state),p("{"==e?E:T)}function H(e){return function(t){return"."==t?m(e?W:J):"variable"==t&&Fe?m(ie,e?P:O):p(e?T:I)}}function J(e,t){if("target"==t)return Ye.marked="keyword",m(O)}function W(e,t){if("target"==t)return Ye.marked="keyword",m(P)}function D(e){return":"==e?m(V,E):p(O,A(";"),V)}function F(e){if("variable"==e)return Ye.marked="property",m()}function G(e,t){if("async"==e)return Ye.marked="property",m(G);if("variable"==e||"keyword"==Ye.style){if(Ye.marked="property","get"==t||"set"==t)return m(K);var r;return Fe&&Ye.state.fatArrowAt==Ye.stream.start&&(r=Ye.stream.match(/^\s*:\s*/,!1))&&(Ye.state.fatArrowAt=Ye.stream.pos+r[0].length),m(L)}return"number"==e||"string"==e?(Ye.marked=We?"property":Ye.style+" property",m(L)):"jsonld-keyword"==e?m(L):Fe&&w(t)?(Ye.marked="keyword",m(G)):"["==e?m(I,Y,A("]"),L):"spread"==e?m(T,L):"*"==t?(Ye.marked="keyword",m(G)):":"==e?p(L):void 0}function K(e){return"variable"!=e?p(L):(Ye.marked="property",m(be))}function L(e){return":"==e?m(T):"("==e?p(be):void 0}function Q(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=Ye.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),m(function(r,n){return r==t||n==t?p():p(e)},n)}return a==t||i==t?m():m(A(t))}return function(r,a){return r==t||a==t?m():p(e,n)}}function R(e,t,r){for(var n=3;n<arguments.length;n++)Ye.cc.push(arguments[n]);return m(M(t,r),Q(e,t),V)}function X(e){return"}"==e?m():p(E,X)}function Y(e,t){if(Fe){if(":"==e)return m(ee);if("?"==t)return m(Y)}}function Z(e){if(Fe&&":"==e)return Ye.stream.match(/^\s*\w+\s+is\b/,!1)?m(I,_,ee):m(ee)}function _(e,t){if("is"==t)return Ye.marked="keyword",m()}function ee(e,t){return"keyof"==t||"typeof"==t?(Ye.marked="keyword",m("keyof"==t?ee:T)):"variable"==e||"void"==t?(Ye.marked="type",m(ae)):"string"==e||"number"==e||"atom"==e?m(ae):"["==e?m(M("]"),Q(ee,"]",","),V,ae):"{"==e?m(M("}"),Q(re,"}",",;"),V,ae):"("==e?m(Q(ne,")"),te):"<"==e?m(Q(ee,">"),ee):void 0}function te(e){if("=>"==e)return m(ee)}function re(e,t){return"variable"==e||"keyword"==Ye.style?(Ye.marked="property",m(re)):"?"==t?m(re):":"==e?m(ee):"["==e?m(I,Y,A("]"),re):void 0}function ne(e,t){return"variable"==e&&Ye.stream.match(/^\s*[?:]/,!1)||"?"==t?m(ne):":"==e?m(ee):p(ee)}function ae(e,t){return"<"==t?m(M(">"),Q(ee,">"),V,ae):"|"==t||"."==e||"&"==t?m(ee):"["==e?m(A("]"),ae):"extends"==t||"implements"==t?(Ye.marked="keyword",m(ee)):void 0}function ie(e,t){if("<"==t)return m(M(">"),Q(ee,">"),V,ae)}function oe(){return p(ee,ce)}function ce(e,t){if("="==t)return m(ee)}function se(e,t){return"enum"==t?(Ye.marked="keyword",m(Oe)):p(ue,Y,le,de)}function ue(e,t){return Fe&&w(t)?(Ye.marked="keyword",m(ue)):"variable"==e?(k(t),m()):"spread"==e?m(ue):"["==e?R(ue,"]"):"{"==e?R(fe,"}"):void 0}function fe(e,t){return"variable"!=e||Ye.stream.match(/^\s*:/,!1)?("variable"==e&&(Ye.marked="property"),"spread"==e?m(ue):"}"==e?p():m(A(":"),ue,le)):(k(t),m(le))}function le(e,t){if("="==t)return m(T)}function de(e){if(","==e)return m(se)}function pe(e,t){if("keyword b"==e&&"else"==t)return m(M("form","else"),E,V)}function me(e,t){return"await"==t?m(me):"("==e?m(M(")"),ve,A(")"),V):void 0}function ve(e){return"var"==e?m(se,A(";"),ye):";"==e?m(ye):"variable"==e?m(ke):p(I,A(";"),ye)}function ke(e,t){return"in"==t||"of"==t?(Ye.marked="keyword",m(I)):m(O,ye)}function ye(e,t){return";"==e?m(we):"in"==t||"of"==t?(Ye.marked="keyword",m(I)):p(I,A(";"),we)}function we(e){")"!=e&&m(I)}function be(e,t){return"*"==t?(Ye.marked="keyword",m(be)):"variable"==e?(k(t),m(be)):"("==e?m(h,M(")"),Q(xe,")"),V,Z,E,j):Fe&&"<"==t?m(M(">"),Q(oe,">"),V,be):void 0}function xe(e,t){return"@"==t&&m(I,xe),"spread"==e?m(xe):Fe&&w(t)?(Ye.marked="keyword",m(xe)):p(ue,Y,le)}function he(e,t){return"variable"==e?ge(e,t):je(e,t)}function ge(e,t){if("variable"==e)return k(t),m(je)}function je(e,t){return"<"==t?m(M(">"),Q(oe,">"),V,je):"extends"==t||"implements"==t||Fe&&","==e?("implements"==t&&(Ye.marked="keyword"),m(Fe?ee:I,je)):"{"==e?m(M("}"),Me,V):void 0}function Me(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Fe&&w(t))&&Ye.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ye.marked="keyword",m(Me)):"variable"==e||"keyword"==Ye.style?(Ye.marked="property",m(Fe?Ve:be,Me)):"["==e?m(I,Y,A("]"),Fe?Ve:be,Me):"*"==t?(Ye.marked="keyword",m(Me)):";"==e?m(Me):"}"==e?m():"@"==t?m(I,Me):void 0}function Ve(e,t){return"?"==t?m(Ve):":"==e?m(ee,le):"="==t?m(T):p(be)}function Ae(e,t){return"*"==t?(Ye.marked="keyword",m(Ce,A(";"))):"default"==t?(Ye.marked="keyword",m(I,A(";"))):"{"==e?m(Q(Ee,"}"),Ce,A(";")):p(E)}function Ee(e,t){return"as"==t?(Ye.marked="keyword",m(A("variable"))):"variable"==e?p(T,Ee):void 0}function ze(e){return"string"==e?m():"("==e?p(I):p(Ie,Te,Ce)}function Ie(e,t){return"{"==e?R(Ie,"}"):("variable"==e&&k(t),"*"==t&&(Ye.marked="keyword"),m($e))}function Te(e){if(","==e)return m(Ie,Te)}function $e(e,t){if("as"==t)return Ye.marked="keyword",m(Ie)}function Ce(e,t){if("from"==t)return Ye.marked="keyword",m(I)}function qe(e){return"]"==e?m():p(Q(T,"]"))}function Oe(){return p(M("form"),ue,A("{"),M("}"),Q(Pe,"}"),V,V)}function Pe(){return p(ue,le)}function Se(e,t){return"operator"==e.lastType||","==e.lastType||Le.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ne(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Ue,Be,He=t.indentUnit,Je=r.statementIndent,We=r.jsonld,De=r.json||We,Fe=r.typescript,Ge=r.wordCharacters||/[\w$\xa1-\uffff]/,Ke=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Le=/[+\-*&%=<>!?|~^@]/,Qe=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Re="([{}])",Xe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ye={state:null,column:null,marked:null,cc:null},Ze=new x("this",new x("arguments",null));return j.lex=!0,V.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new f((e||0)-He,0,"block",!1),localVars:r.localVars,context:r.localVars&&new b(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=c&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Ue?r:(t.lastType="operator"!=Ue||"++"!=Be&&"--"!=Be?Ue:"incdec",d(t,r,Ue,Be,e))},indent:function(t,n){if(t.tokenize==c)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var f=t.cc[u];if(f==V)s=s.prev;else if(f!=pe)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==O||a==P)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Je&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var l=s.type,d=o==l;return"vardef"==l?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==l&&"{"==o?s.indented:"form"==l?s.indented+He:"stat"==l?s.indented+(Se(t,n)?Je||He:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:He):s.indented+(/^(?:case|default)\b/.test(n)?He:2*He)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:De?null:"/*",blockCommentEnd:De?null:"*/",blockCommentContinue:De?null:" * ",lineComment:De?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:De?"json":"javascript",jsonldMode:We,jsonMode:De,expressionAllowed:Ne,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=I&&t!=T||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"function"==typeof e.define&&e.define("modeJs",["mode/javascript/javascript.js"],function(){})}(this);
@@ -1,3 +1,3 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(n,a){function i(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(z=e.eat("/")?"closeTag":"openTag",t.tokenize=o,"tag bracket");if("&"==n){var a;return a=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),a?"atom":"error"}return e.eatWhile(/[^&<]/),null}function o(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=i,z=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return z="equals",null;if("<"==r){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=o;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=i;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=i;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?g:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",y):x.allowMissingTagName&&"endTag"==e?(M="tag bracket",y(e,t,r)):(M="error",f)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&x.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===x.matchClosing?(M="tag",_):(M="tag error",h)}return x.allowMissingTagName&&"endTag"==e?(M="tag bracket",_(e,t,r)):(M="error",h)}function _(e,t,r){return"endTag"!=e?(M="error",_):(d(r),m)}function h(e,t,r){return M="error",_(e,t,r)}function y(e,t,r){if("word"==e)return M="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,a=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new u(r,n,a==r.indented)),m}return M="error",y}function b(e,t,r){return"equals"==e?k:(x.allowMissing||(M="error"),y(e,t,r))}function k(e,t,r){return"string"==e?w:"word"==e&&x.allowUnquoted?(M="string",y):(M="error",y(e,t,r))}function w(e,t,r){return"string"==e?w:y(e,t,r)}var v=n.indentUnit,x={},q=a.htmlMode?t:r;for(var S in q)x[S]=q[S];for(var S in a)x[S]=a[S];var z,M;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;z=null;var r=t.tokenize(e,t);return(r||z)&&"comment"!=r&&(M=null,t.state=t.state(z||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,n){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+v;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=o&&t.tokenize!=i)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==x.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+v*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;a;){if(a.tagName==l[2]){a=a.prev;break}if(!x.implicitlyClosed.hasOwnProperty(a.tagName))break;a=a.prev}else if(l)for(;a;){var s=x.contextGrabbers[a.tagName];if(!s||!s.hasOwnProperty(l[2]))break;a=a.prev}for(;a&&a.prev&&!a.startOfLine;)a=a.prev;return a?a.indent+v:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return je=e,Pe=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),a("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),a("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):Ce(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Fe.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(De.test(r)){e.eatWhile(De);var i=e.current();if("."!=t.lastType){if($e.propertyIsEnumerable(i)){var c=$e[i];return a(c.type,c.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(Ae&&"@"==t.peek()&&t.match(Be))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Oe){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var l=e.string.charAt(o),s=Ne.indexOf(l);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==l&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(De.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function u(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function d(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,a){var i=e.cc;for(Ve.state=e,Ve.stream=a,Ve.marked=null,Ve.cc=i,Ve.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():Le?x:v)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ve.marked?Ve.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)Ve.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function g(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=Ve.state;if(Ve.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function _(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function h(){Ve.state.context={prev:Ve.state.context,vars:Ve.state.localVars},Ve.state.localVars=Ue}function y(){Ve.state.localVars=Ve.state.context.vars,Ve.state.context=Ve.state.context.prev}function b(e,t){var r=function(){var r=Ve.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new u(n,Ve.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function k(){var e=Ve.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?f():";"==e?m():f(t)}return t}function v(e,t){return"var"==e?f(b("vardef",t.length),re,w(";"),k):"keyword a"==e?f(b("form"),S,v,k):"keyword b"==e?f(b("form"),v,k):"keyword d"==e?Ve.stream.match(/^\s*$/,!1)?f():f(b("stat"),M,w(";"),k):"debugger"==e?f(w(";")):"{"==e?f(b("}"),U,k):";"==e?f():"if"==e?("else"==Ve.state.lexical.info&&Ve.state.cc[Ve.state.cc.length-1]==k&&Ve.state.cc.pop()(),f(b("form"),S,v,k,le)):"function"==e?f(me):"for"==e?f(b("form"),se,v,k):"class"==e||Oe&&"interface"==t?(Ve.marked="keyword",f(b("form"),_e,k)):"variable"==e?Oe&&"type"==t?(Ve.marked="keyword",f(G,w("operator"),G,w(";"))):Oe&&"declare"==t?(Ve.marked="keyword",f(v)):Oe&&("module"==t||"enum"==t)&&Ve.stream.match(/^\s*\w/,!1)?(Ve.marked="keyword",f(b("form"),ne,w("{"),b("}"),U,k,k)):Oe&&"namespace"==t?(Ve.marked="keyword",f(b("form"),x,U,k)):f(b("stat"),D):"switch"==e?f(b("form"),S,w("{"),b("}","switch"),U,k,k):"case"==e?f(x,w(":")):"default"==e?f(w(":")):"catch"==e?f(b("form"),h,w("("),fe,w(")"),v,k,y):"export"==e?f(b("stat"),ke,k):"import"==e?f(b("stat"),ve,k):"async"==e?f(v):"@"==t?f(x,v):m(b("stat"),x,w(";"),k)}function x(e,t){return z(e,t,!1)}function q(e,t){return z(e,t,!0)}function S(e){return"("!=e?m():f(b(")"),x,w(")"),k)}function z(e,t,r){if(Ve.state.fatArrowAt==Ve.stream.start){var n=r?E:I;if("("==e)return f(h,b(")"),K(fe,")"),k,w("=>"),n,y);if("variable"==e)return m(h,ne,w("=>"),n,y)}var a=r?C:T;return Ke.hasOwnProperty(e)?f(a):"function"==e?f(me,a):"class"==e||Oe&&"interface"==t?(Ve.marked="keyword",f(b("form"),ge,k)):"keyword c"==e||"async"==e?f(r?q:x):"("==e?f(b(")"),M,w(")"),k,a):"operator"==e||"spread"==e?f(r?q:x):"["==e?f(b("]"),Me,k,a):"{"==e?V(F,"}",null,a):"quasi"==e?m(j,a):"new"==e?f(A(r)):f()}function M(e){return e.match(/[;\}\)\],]/)?m():m(x)}function T(e,t){return","==e?f(x):C(e,t,!1)}function C(e,t,r){var n=0==r?T:C,a=0==r?x:q;return"=>"==e?f(h,r?E:I,y):"operator"==e?/\+\+|--/.test(t)||Oe&&"!"==t?f(n):Oe&&"<"==t&&Ve.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(b(">"),K(G,">"),k,n):"?"==t?f(x,w(":"),a):f(a):"quasi"==e?m(j,n):";"!=e?"("==e?V(q,")","call",n):"."==e?f($,n):"["==e?f(b("]"),M,w("]"),k,n):Oe&&"as"==t?(Ve.marked="keyword",f(G,n)):"regexp"==e?(Ve.state.lastType=Ve.marked="operator",Ve.stream.backUp(Ve.stream.pos-Ve.stream.start-1),f(a)):void 0:void 0}function j(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(j):f(x,P)}function P(e){if("}"==e)return Ve.marked="string-2",Ve.state.tokenize=s,f(j)}function I(e){return c(Ve.stream,Ve.state),m("{"==e?v:x)}function E(e){return c(Ve.stream,Ve.state),m("{"==e?v:q)}function A(e){return function(t){return"."==t?f(e?O:L):"variable"==t&&Oe?f(J,e?C:T):m(e?q:x)}}function L(e,t){if("target"==t)return Ve.marked="keyword",f(T)}function O(e,t){if("target"==t)return Ve.marked="keyword",f(C)}function D(e){return":"==e?f(k,v):m(T,w(";"),k)}function $(e){if("variable"==e)return Ve.marked="property",f()}function F(e,t){if("async"==e)return Ve.marked="property",f(F);if("variable"==e||"keyword"==Ve.style){if(Ve.marked="property","get"==t||"set"==t)return f(B);var r;return Oe&&Ve.state.fatArrowAt==Ve.stream.start&&(r=Ve.stream.match(/^\s*:\s*/,!1))&&(Ve.state.fatArrowAt=Ve.stream.pos+r[0].length),f(N)}return"number"==e||"string"==e?(Ve.marked=Ae?"property":Ve.style+" property",f(N)):"jsonld-keyword"==e?f(N):Oe&&_(t)?(Ve.marked="keyword",f(F)):"["==e?f(x,W,w("]"),N):"spread"==e?f(q,N):"*"==t?(Ve.marked="keyword",f(F)):":"==e?m(N):void 0}function B(e){return"variable"!=e?m(N):(Ve.marked="property",f(me))}function N(e){return":"==e?f(q):"("==e?m(me):void 0}function K(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=Ve.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return a==t||i==t?f():f(w(t))}return function(r,a){return r==t||a==t?f():m(e,n)}}function V(e,t,r){for(var n=3;n<arguments.length;n++)Ve.cc.push(arguments[n]);return f(b(t,r),K(e,t),k)}function U(e){return"}"==e?f():m(v,U)}function W(e,t){if(Oe){if(":"==e)return f(G);if("?"==t)return f(W)}}function R(e){if(Oe&&":"==e)return Ve.stream.match(/^\s*\w+\s+is\b/,!1)?f(x,H,G):f(G)}function H(e,t){if("is"==t)return Ve.marked="keyword",f()}function G(e,t){return"variable"==e||"void"==t?"keyof"==t?(Ve.marked="keyword",f(G)):(Ve.marked="type",f(Q)):"string"==e||"number"==e||"atom"==e?f(Q):"["==e?f(b("]"),K(G,"]",","),k,Q):"{"==e?f(b("}"),K(Y,"}",",;"),k,Q):"("==e?f(K(X,")"),Z):void 0}function Z(e){if("=>"==e)return f(G)}function Y(e,t){return"variable"==e||"keyword"==Ve.style?(Ve.marked="property",f(Y)):"?"==t?f(Y):":"==e?f(G):"["==e?f(x,W,w("]"),Y):void 0}function X(e){return"variable"==e?f(X):":"==e?f(G):void 0}function Q(e,t){return"<"==t?f(b(">"),K(G,">"),k,Q):"|"==t||"."==e?f(G):"["==e?f(w("]"),Q):"extends"==t||"implements"==t?(Ve.marked="keyword",f(G)):void 0}function J(e,t){if("<"==t)return f(b(">"),K(G,">"),k,Q)}function ee(){return m(G,te)}function te(e,t){if("="==t)return f(G)}function re(){return m(ne,W,ie,oe)}function ne(e,t){return Oe&&_(t)?(Ve.marked="keyword",f(ne)):"variable"==e?(g(t),f()):"spread"==e?f(ne):"["==e?V(ne,"]"):"{"==e?V(ae,"}"):void 0}function ae(e,t){return"variable"!=e||Ve.stream.match(/^\s*:/,!1)?("variable"==e&&(Ve.marked="property"),"spread"==e?f(ne):"}"==e?m():f(w(":"),ne,ie)):(g(t),f(ie))}function ie(e,t){if("="==t)return f(q)}function oe(e){if(","==e)return f(re)}function le(e,t){if("keyword b"==e&&"else"==t)return f(b("form","else"),v,k)}function se(e){if("("==e)return f(b(")"),ce,w(")"),k)}function ce(e){return"var"==e?f(re,w(";"),de):";"==e?f(de):"variable"==e?f(ue):m(x,w(";"),de)}function ue(e,t){return"in"==t||"of"==t?(Ve.marked="keyword",f(x)):f(T,de)}function de(e,t){return";"==e?f(pe):"in"==t||"of"==t?(Ve.marked="keyword",f(x)):m(x,w(";"),pe)}function pe(e){")"!=e&&f(x)}function me(e,t){return"*"==t?(Ve.marked="keyword",f(me)):"variable"==e?(g(t),f(me)):"("==e?f(h,b(")"),K(fe,")"),k,R,v,y):Oe&&"<"==t?f(b(">"),K(ee,">"),k,me):void 0}function fe(e,t){return"@"==t&&f(x,fe),"spread"==e?f(fe):Oe&&_(t)?(Ve.marked="keyword",f(fe)):m(ne,W,ie)}function ge(e,t){return"variable"==e?_e(e,t):he(e,t)}function _e(e,t){if("variable"==e)return g(t),f(he)}function he(e,t){return"<"==t?f(b(">"),K(ee,">"),k,he):"extends"==t||"implements"==t||Oe&&","==e?f(Oe?G:x,he):"{"==e?f(b("}"),ye,k):void 0}function ye(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Oe&&_(t))&&Ve.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ve.marked="keyword",f(ye)):"variable"==e||"keyword"==Ve.style?(Ve.marked="property",f(Oe?be:me,ye)):"["==e?f(x,W,w("]"),Oe?be:me,ye):"*"==t?(Ve.marked="keyword",f(ye)):";"==e?f(ye):"}"==e?f():"@"==t?f(x,ye):void 0}function be(e,t){return"?"==t?f(be):":"==e?f(G,ie):"="==t?f(q):m(me)}function ke(e,t){return"*"==t?(Ve.marked="keyword",f(ze,w(";"))):"default"==t?(Ve.marked="keyword",f(x,w(";"))):"{"==e?f(K(we,"}"),ze,w(";")):m(v)}function we(e,t){return"as"==t?(Ve.marked="keyword",f(w("variable"))):"variable"==e?m(q,we):void 0}function ve(e){return"string"==e?f():m(xe,qe,ze)}function xe(e,t){return"{"==e?V(xe,"}"):("variable"==e&&g(t),"*"==t&&(Ve.marked="keyword"),f(Se))}function qe(e){if(","==e)return f(xe,qe)}function Se(e,t){if("as"==t)return Ve.marked="keyword",f(xe)}function ze(e,t){if("from"==t)return Ve.marked="keyword",f(x)}function Me(e){return"]"==e?f():m(K(q,"]"))}function Te(e,t){return"operator"==e.lastType||","==e.lastType||Fe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ce(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var je,Pe,Ie=t.indentUnit,Ee=r.statementIndent,Ae=r.jsonld,Le=r.json||Ae,Oe=r.typescript,De=r.wordCharacters||/[\w$\xa1-\uffff]/,$e=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Fe=/[+\-*&%=<>!?|~^@]/,Be=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ne="([{}])",Ke={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ve={state:null,column:null,marked:null,cc:null},Ue={name:"this",next:{name:"arguments"}};return k.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new u((e||0)-Ie,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==je?r:(t.lastType="operator"!=je||"++"!=Pe&&"--"!=Pe?je:"incdec",p(t,r,je,Pe,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==k)s=s.prev;else if(u!=le)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==T||a==C)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Ee&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,p=o==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==d&&"{"==o?s.indented:"form"==d?s.indented+Ie:"stat"==d?s.indented+(Te(t,n)?Ee||Ie:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:Ie):s.indented+(/^(?:case|default)\b/.test(n)?Ie:2*Ie)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Le?null:"/*",blockCommentEnd:Le?null:"*/",blockCommentContinue:Le?null:" * ",lineComment:Le?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Le?"json":"javascript",jsonldMode:Ae,jsonMode:Le,expressionAllowed:Ce,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=x&&t!=q||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return f=t,e}function a(e,t){var r=e.next();if(h[r]){var a=h[r](e,t);if(!1!==a)return a}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=i(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=o,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function i(e){return function(t,r){for(var a,i=!1;null!=(a=t.next());){if(a==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==a}return(a==e||!i&&")"!=e)&&(r.tokenize=null),n("string","string")}}function o(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:_),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return P[r.context.type](e,t,r)}function d(e,t,r,n){for(var a=n||1;a>0;a--)r.context=r.context.prev;return u(e,t,r)}function p(e){var t=e.current().toLowerCase();g=M.hasOwnProperty(t)?"atom":z.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,g,_=t.indentUnit,h=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},k=r.mediaFeatures||{},w=r.mediaValueKeywords||{},v=r.propertyKeywords||{},x=r.nonStandardPropertyKeywords||{},q=r.fontProperties||{},S=r.counterDescriptors||{},z=r.colorKeywords||{},M=r.valueKeywords||{},T=r.allowNested,C=r.lineComment,j=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(j&&/@component/i.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(T&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return v.hasOwnProperty(n)?(g="property","maybeprop"):x.hasOwnProperty(n)?(g="string-2","maybeprop"):T?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":T||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(g="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&T)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(g="variable-3",r.context.type):u(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,T?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":k.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":v.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"string-2":M.hasOwnProperty(n)?"atom":z.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,T?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!q.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||a)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),g=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-_)):(r=r.prev,a=r.indent)),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}})
2
- ;var n=["domain","regexp","url","url-prefix"],a=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),l=["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"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["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-blend-mode","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","caret-color","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-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","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","justify-items","justify-self","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","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","place-content","place-items","place-self","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","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"],p=t(d),m=["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"],f=t(m),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],_=t(g),h=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(h),b=["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"],k=t(b),w=["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","auto-flow","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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","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","lighten","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","luminosity","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","multiply","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","opacity","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","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","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","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","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"],v=t(w),x=n.concat(i).concat(l).concat(c).concat(d).concat(m).concat(b).concat(w);e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:a,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:v,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:v,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:v,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:o,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:v,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),a=n.search(t);return a>-1?e.backUp(n.length-a):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function i(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),a=e[r],i=a.length-1;i>=0;i--)n.unshift(a[i])}function o(e,t){for(var r=0;r<e.length;r++){var a=e[r];if(!a[0]||a[1].test(n(t,a[0])))return a[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/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"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,i){var l,d=c.token(n,i.htmlState),p=/\btag\b/.test(d);if(p&&!/[<>\s\/]/.test(n.current())&&(l=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))i.inTag=l+" ";else if(i.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var f=">"==n.current()&&o(u[m[1]],m[2]),g=e.getMode(r,f),_=a(m[1],!0),h=a(m[1],!1);i.token=function(e,r){return e.match(_,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,h,r.localMode.token(e,r.localState))},i.localMode=g,i.localState=e.startState(g,c.indent(i.htmlState,""))}else i.inTag&&(i.inTag+=n.current(),n.eol()&&(i.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,p=n&&n.scriptTypes;if(i(l,u),d&&i(d,u),p)for(var m=p.length-1;m>=0;m--)u.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/clike/clike",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.info=n,this.align=a,this.prev=i}function r(e,r,n,a){var i=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=n&&(i=e.context.indented),e.context=new t(i,r,n,a,null,e.context)}function n(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function a(e,t,r){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,r))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function i(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function o(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function l(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}function s(e,t){if(!t.startOfLine)return!1;for(var r,n=null;r=e.peek();){if("\\"==r&&e.match(/^.$/)){n=s;break}if("/"==r&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=n,"meta"}function c(e,t){return"type"==t.prevToken&&"type"}function u(e){return e.eatWhile(/[\w\.']/),"number"}function d(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var r=e.match(/"([^\s\\()]{0,16})\(/);return!!r&&(t.cpp11RawStringDelim=r[1],t.tokenize=f,f(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function p(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function m(e,t){for(var r;null!=(r=e.next());)if('"'==r&&!e.eat('"')){t.tokenize=null;break}return"string"}function f(e,t){var r=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+r+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function g(t,r){function n(e){if(e)for(var t in e)e.hasOwnProperty(t)&&a.push(t)}"string"==typeof t&&(t=[t]);var a=[];n(r.keywords),n(r.types),n(r.builtin),n(r.atoms),a.length&&(r.helperType=t[0],e.registerHelper("hintWords",t[0],a));for(var i=0;i<t.length;++i)e.defineMIME(t[i],r)}function _(e,t){for(var r=!1;!e.eol();){if(!r&&e.match('"""')){t.tokenize=null;break}r="\\"==e.next()&&!r}return"string"}function h(e){return function(t,r){for(var n;n=t.next();){if("*"==n&&t.eat("/")){if(1==e){r.tokenize=null;break}return r.tokenize=h(e-1),r.tokenize(t,r)}if("/"==n&&t.eat("*"))return r.tokenize=h(e+1),r.tokenize(t,r)}return"comment"}}function y(e){return function(t,r){for(var n,a=!1,i=!1;!t.eol();){if(!e&&!a&&t.match('"')){i=!0;break}if(e&&t.match('"""')){i=!0;break}n=t.next(),!a&&"$"==n&&t.match("{")&&t.skipTo("}"),a=!a&&"\\"==n&&!e}return!i&&e||(r.tokenize=null),"string"}}function b(e){return function(t,r){for(var n,a=!1,i=!1;!t.eol();){if(!a&&t.match('"')&&("single"==e||t.match('""'))){i=!0;break}if(!a&&t.match("``")){v=b(e),i=!0;break}n=t.next(),a="single"==e&&!a&&"\\"==n}return i&&(r.tokenize=null),"string"}}e.defineMode("clike",function(o,s){function c(e,t){var r=e.next();if(q[r]){var n=q[r](e,t);if(!1!==n)return n}if('"'==r||"'"==r)return t.tokenize=u(r),t.tokenize(e,t);if(C.test(r))return m=r,null;if(j.test(r)){if(e.backUp(1),e.match(P))return"number";e.next()}if("/"==r){if(e.eat("*"))return t.tokenize=d,d(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(I.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(I););return"operator"}if(e.eatWhile(E),T)for(;e.match(T);)e.eatWhile(E);var a=e.current();return l(y,a)?(l(w,a)&&(m="newstatement"),l(v,a)&&(f=!0),"keyword"):l(b,a)?"type":l(k,a)?(l(w,a)&&(m="newstatement"),"builtin"):l(x,a)?"atom":"variable"}function u(e){return function(t,r){for(var n,a=!1,i=!1;null!=(n=t.next());){if(n==e&&!a){i=!0;break}a=!a&&"\\"==n}return(i||!a&&!S)&&(r.tokenize=null),"string"}}function d(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=null;break}n="*"==r}return"comment"}function p(e,t){s.typeFirstDefinitions&&e.eol()&&i(t.context)&&(t.typeAtEndOfLine=a(e,t,e.pos))}var m,f,g=o.indentUnit,_=s.statementIndentUnit||g,h=s.dontAlignCalls,y=s.keywords||{},b=s.types||{},k=s.builtin||{},w=s.blockKeywords||{},v=s.defKeywords||{},x=s.atoms||{},q=s.hooks||{},S=s.multiLineStrings,z=!1!==s.indentStatements,M=!1!==s.indentSwitch,T=s.namespaceSeparator,C=s.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,j=s.numberStart||/[\d\.]/,P=s.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,I=s.isOperatorChar||/[+\-*&%=<>!?|\/]/,E=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-g,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var o=t.context;if(e.sol()&&(null==o.align&&(o.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return p(e,t),null;m=f=null;var l=(t.tokenize||c)(e,t);if("comment"==l||"meta"==l)return l;if(null==o.align&&(o.align=!0),";"==m||":"==m||","==m&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)n(t);else if("{"==m)r(t,e.column(),"}");else if("["==m)r(t,e.column(),"]");else if("("==m)r(t,e.column(),")");else if("}"==m){for(;"statement"==o.type;)o=n(t);for("}"==o.type&&(o=n(t));"statement"==o.type;)o=n(t)}else m==o.type?n(t):z&&(("}"==o.type||"top"==o.type)&&";"!=m||"statement"==o.type&&"newstatement"==m)&&r(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&a(e,t,e.start)&&i(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),q.token){var u=q.token(e,t,l);void 0!==u&&(l=u)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=f?"def":l||m,p(e,t),l},indent:function(t,r){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var n=t.context,a=r&&r.charAt(0);if("statement"==n.type&&"}"==a&&(n=n.prev),s.dontIndentStatements)for(;"statement"==n.type&&s.dontIndentStatements.test(n.info);)n=n.prev;if(q.indent){var i=q.indent(t,n,r);if("number"==typeof i)return i}var o=a==n.type,l=n.prev&&"switch"==n.prev.info;if(s.allmanIndentation&&/[{(]/.test(a)){for(;"top"!=n.type&&"}"!=n.type;)n=n.prev;return n.indented}return"statement"==n.type?n.indented+("{"==a?0:_):!n.align||h&&")"==n.type?")"!=n.type||o?n.indented+(o?0:g)+(o||!l||/^(?:case|default)\b/.test(r)?0:g):n.indented+_:n.column+(o?0:1)},electricInput:M?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var k="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",w="int long char short double float unsigned signed void size_t ptrdiff_t";g(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:o(k),types:o(w+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:o("case do else for if switch while struct"),defKeywords:o("struct"),typeFirstDefinitions:!0,atoms:o("null true false"),hooks:{"#":s,"*":c},modeProps:{fold:["brace","include"]}}),g(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:o(k+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:o(w+" bool wchar_t"),blockKeywords:o("catch class do else finally for if struct switch try while"),defKeywords:o("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:o("true false null"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":s,"*":c,u:d,U:d,L:d,R:d,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,r){if("variable"==r&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&p(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),g("text/x-java",{name:"clike",keywords:o("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:o("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:o("catch class do else finally for if switch try while"),defKeywords:o("class interface enum @interface"),typeFirstDefinitions:!0,atoms:o("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),g("text/x-csharp",{name:"clike",keywords:o("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:o("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:o("catch class do else finally for foreach if struct switch try while"),defKeywords:o("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=m,m(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),g("text/x-scala",{name:"clike",keywords:o("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:o("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,
3
- blockKeywords:o("catch class enum do else finally for forSome if match switch try while"),defKeywords:o("class enum def object package trait type val var"),atoms:o("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=_,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,r){var n=r.context;return!("}"!=n.type||!n.align||!e.eat(">"))&&(r.context=new t(n.indented,n.column,n.type,n.info,null,n.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=h(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{triples:'"'}}}),g("text/x-kotlin",{name:"clike",keywords:o("package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect"),types:o("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object interface fun"),atoms:o("true false null this"),hooks:{'"':function(e,t){return t.tokenize=y(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),g(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:o("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:o("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:o("for while do if else struct"),builtin:o("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:o("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-nesc",{name:"clike",keywords:o(k+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:o(w),blockKeywords:o("case do else for if switch while struct"),atoms:o("null true false"),hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-objectivec",{name:"clike",keywords:o(k+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:o(w),atoms:o("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":s,indent:function(e,t,r){if("statement"==t.type&&/^@\w/.test(r))return t.indented}},modeProps:{fold:"brace"}}),g("text/x-squirrel",{name:"clike",keywords:o("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:o(w),blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"#":s},modeProps:{fold:["brace","include"]}});var v=null;g("text/x-ceylon",{name:"clike",keywords:o("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:o("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:o("class dynamic function interface module object package value"),builtin:o("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:o("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=b(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!v||!e.match("`"))&&(t.tokenize=v,v=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,r){if(("variable"==r||"type"==r)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define("mode/php/php.js",["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function r(e,t,a){return 0==e.length?n(t):function(i,o){for(var l=e[0],s=0;s<l.length;s++)if(i.match(l[s][0]))return o.tokenize=r(e.slice(1),t),l[s][1];return o.tokenize=n(t,a),"string"}}function n(e,t){return function(r,n){return a(r,n,e,t)}}function a(e,t,n,a){if(!1!==a&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(!1!==a&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=r([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],n,a)),e.match(/\-\>\w/,!1)&&(t.tokenize=r([[["->",null]],[[/[\w]+/,"variable"]]],n,a)),"variable-2";for(var i=!1;!e.eol()&&(i||!1===a||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(n)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}var i="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",o="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",l="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[i,o,l].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var s={name:"clike",helperType:"php",keywords:t(i),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(o),builtin:t(l),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var r;if(r=e.match(/<<\s*/)){var a=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(r[0].length+(a?2:1));if(a&&e.eat(a),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=n(i,"'"!=a),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=n('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=n(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,r){function n(t,r){var n=r.curMode==i;if(t.sol()&&r.pending&&'"'!=r.pending&&"'"!=r.pending&&(r.pending=null),n)return n&&null==r.php.tokenize&&t.match("?>")?(r.curMode=a,r.curState=r.html,r.php.context.prev||(r.php=null),"meta"):i.token(t,r.curState);if(t.match(/^<\?\w*/))return r.curMode=i,r.php||(r.php=e.startState(i,a.indent(r.html,""))),r.curState=r.php,"meta";if('"'==r.pending||"'"==r.pending){for(;!t.eol()&&t.next()!=r.pending;);var o="string"}else if(r.pending&&t.pos<r.pending.end){t.pos=r.pending.end;var o=r.pending.style}else var o=a.token(t,r.curState);r.pending&&(r.pending=null);var l,s=t.current(),c=s.search(/<\?/);return-1!=c&&("string"==o&&(l=s.match(/[\'\"]$/))&&!/\?>/.test(s)?r.pending=l[0]:r.pending={end:t.pos,style:o},t.backUp(s.length-c)),o}var a=e.getMode(t,r&&r.htmlMode||"text/html"),i=e.getMode(t,s);return{startState:function(){var t=e.startState(a),n=r.startOpen?e.startState(i):null;return{html:t,php:n,curMode:r.startOpen?i:a,curState:r.startOpen?n:t,pending:null}},copyState:function(t){var r,n=t.html,o=e.copyState(a,n),l=t.php,s=l&&e.copyState(i,l);return r=t.curMode==a?o:s,{html:o,php:s,curMode:t.curMode,curState:r,pending:t.pending}},token:n,indent:function(e,t){return e.curMode!=i&&/^\s*<\//.test(t)||e.curMode==i&&/^\?>/.test(t)?a.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",s)}),function(e){"function"==typeof e.define&&e.define("modePHP",["mode/php/php.js"],function(){})}(this);
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(n,a){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(z=e.eat("/")?"closeTag":"openTag",t.tokenize=i,"tag bracket");if("&"==n){var a;return a=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),a?"atom":"error"}return e.eatWhile(/[^&<]/),null}function i(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,z=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return z="equals",null;if("<"==r){t.tokenize=o,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=i;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?g:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",y):x.allowMissingTagName&&"endTag"==e?(M="tag bracket",y(e,t,r)):(M="error",f)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&x.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===x.matchClosing?(M="tag",_):(M="tag error",h)}return x.allowMissingTagName&&"endTag"==e?(M="tag bracket",_(e,t,r)):(M="error",h)}function _(e,t,r){return"endTag"!=e?(M="error",_):(d(r),m)}function h(e,t,r){return M="error",_(e,t,r)}function y(e,t,r){if("word"==e)return M="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,a=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new u(r,n,a==r.indented)),m}return M="error",y}function b(e,t,r){return"equals"==e?k:(x.allowMissing||(M="error"),y(e,t,r))}function k(e,t,r){return"string"==e?w:"word"==e&&x.allowUnquoted?(M="string",y):(M="error",y(e,t,r))}function w(e,t,r){return"string"==e?w:y(e,t,r)}var v=n.indentUnit,x={},q=a.htmlMode?t:r;for(var S in q)x[S]=q[S];for(var S in a)x[S]=a[S];var z,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;z=null;var r=t.tokenize(e,t);return(r||z)&&"comment"!=r&&(M=null,t.state=t.state(z||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,n){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+v;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==x.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+v*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;a;){if(a.tagName==l[2]){a=a.prev;break}if(!x.implicitlyClosed.hasOwnProperty(a.tagName))break;a=a.prev}else if(l)for(;a;){var s=x.contextGrabbers[a.tagName];if(!s||!s.hasOwnProperty(l[2]))break;a=a.prev}for(;a&&a.prev&&!a.startOfLine;)a=a.prev;return a?a.indent+v:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return $e=e,Fe=r,t}function o(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=i(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):De(e,t,1)?(n(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(He.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(We.test(r)){e.eatWhile(We);var o=e.current();if("."!=t.lastType){if(Re.propertyIsEnumerable(o)){var c=Re[o];return a(c.type,c.style,o)}if("async"==o&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return a("async","keyword",o)}return a("variable","variable",o)}}function i(e){return function(t,r){var n,i=!1;if(Ke&&"@"==t.peek()&&t.match(Ge))return r.tokenize=o,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=o),a("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=o;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=o;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ue){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,o=!1,i=r-1;i>=0;--i){var l=e.string.charAt(i),s=Ze.indexOf(l);if(s>=0&&s<3){if(!a){++i;break}if(0==--a){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++a;else if(We.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!a){++i;break}}}o&&!a&&(t.fatArrowAt=i)}}function u(e,t,r,n,a,o){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=o,null!=n&&(this.align=n)}function d(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,a){var o=e.cc;for(Xe.state=e,Xe.stream=a,Xe.marked=null,Xe.cc=o,Xe.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():Ve?C:M)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Xe.marked?Xe.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)Xe.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function g(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function _(e){var t=Xe.state;if(Xe.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=h(e,t.context);if(null!=n)return void(t.context=n)}else if(!g(e,t.localVars))return void(t.localVars=new k(e,t.localVars));r.globalVars&&!g(e,t.globalVars)&&(t.globalVars=new k(e,t.globalVars))}function h(e,t){if(t){if(t.block){var r=h(e,t.prev);return r?r==t.prev?t:new b(r,t.vars,!0):null}return g(e,t.vars)?t:new b(t.prev,new k(e,t.vars),!1)}return null}function y(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function b(e,t,r){this.prev=e,this.vars=t,this.block=r}function k(e,t){this.name=e,this.next=t}function w(){Xe.state.context=new b(Xe.state.context,Xe.state.localVars,!1),Xe.state.localVars=Qe}function v(){Xe.state.context=new b(Xe.state.context,Xe.state.localVars,!0),Xe.state.localVars=null}function x(){Xe.state.localVars=Xe.state.context.vars,Xe.state.context=Xe.state.context.prev}function q(e,t){var r=function(){var r=Xe.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new u(n,Xe.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function S(){var e=Xe.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function z(e){function t(r){return r==e?f():";"==e||"}"==r||")"==r||"]"==r?m():f(t)}return t}function M(e,t){return"var"==e?f(q("vardef",t),se,z(";"),S):"keyword a"==e?f(q("form"),P,M,S):"keyword b"==e?f(q("form"),M,S):"keyword d"==e?Xe.stream.match(/^\s*$/,!1)?f():f(q("stat"),A,z(";"),S):"debugger"==e?f(z(";")):"{"==e?f(q("}"),v,Y,S,x):";"==e?f():"if"==e?("else"==Xe.state.lexical.info&&Xe.state.cc[Xe.state.cc.length-1]==S&&Xe.state.cc.pop()(),f(q("form"),P,M,S,me)):"function"==e?f(be):"for"==e?f(q("form"),fe,M,S):"class"==e||Ue&&"interface"==t?(Xe.marked="keyword",f(q("form"),ve,S)):"variable"==e?Ue&&"declare"==t?(Xe.marked="keyword",f(M)):Ue&&("module"==t||"enum"==t||"type"==t)&&Xe.stream.match(/^\s*\w/,!1)?(Xe.marked="keyword","enum"==t?f(Ee):"type"==t?f(ee,z("operator"),ee,z(";")):f(q("form"),ce,z("{"),q("}"),Y,S,S)):Ue&&"namespace"==t?(Xe.marked="keyword",f(q("form"),C,Y,S)):Ue&&"abstract"==t?(Xe.marked="keyword",f(M)):f(q("stat"),V):"switch"==e?f(q("form"),P,z("{"),q("}","switch"),v,Y,S,S,x):"case"==e?f(C,z(":")):"default"==e?f(z(":")):"catch"==e?f(q("form"),w,T,M,S,x):"export"==e?f(q("stat"),ze,S):"import"==e?f(q("stat"),Te,S):"async"==e?f(M):"@"==t?f(C,M):m(q("stat"),C,z(";"),S)}function T(e){if("("==e)return f(ke,z(")"))}function C(e,t){return I(e,t,!1)}function j(e,t){return I(e,t,!0)}function P(e){return"("!=e?m():f(q(")"),C,z(")"),S)}function I(e,t,r){if(Xe.state.fatArrowAt==Xe.stream.start){var n=r?F:$;if("("==e)return f(w,q(")"),G(ke,")"),S,z("=>"),n,x);if("variable"==e)return m(w,ce,z("=>"),n,x)}var a=r?L:E;return Ye.hasOwnProperty(e)?f(a):"function"==e?f(be,a):"class"==e||Ue&&"interface"==t?(Xe.marked="keyword",f(q("form"),we,S)):"keyword c"==e||"async"==e?f(r?j:C):"("==e?f(q(")"),A,z(")"),S,a):"operator"==e||"spread"==e?f(r?j:C):"["==e?f(q("]"),Ae,S,a):"{"==e?Z(W,"}",null,a):"quasi"==e?m(O,a):"new"==e?f(B(r)):"import"==e?f(C):f()}function A(e){return e.match(/[;\}\)\],]/)?m():m(C)}function E(e,t){return","==e?f(C):L(e,t,!1)}function L(e,t,r){var n=0==r?E:L,a=0==r?C:j;return"=>"==e?f(w,r?F:$,x):"operator"==e?/\+\+|--/.test(t)||Ue&&"!"==t?f(n):Ue&&"<"==t&&Xe.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(q(">"),G(ee,">"),S,n):"?"==t?f(C,z(":"),a):f(a):"quasi"==e?m(O,n):";"!=e?"("==e?Z(j,")","call",n):"."==e?f(U,n):"["==e?f(q("]"),A,z("]"),S,n):Ue&&"as"==t?(Xe.marked="keyword",f(ee,n)):"regexp"==e?(Xe.state.lastType=Xe.marked="operator",Xe.stream.backUp(Xe.stream.pos-Xe.stream.start-1),f(a)):void 0:void 0}function O(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(O):f(C,D)}function D(e){if("}"==e)return Xe.marked="string-2",Xe.state.tokenize=s,f(O)}function $(e){return c(Xe.stream,Xe.state),m("{"==e?M:C)}function F(e){return c(Xe.stream,Xe.state),m("{"==e?M:j)}function B(e){return function(t){return"."==t?f(e?K:N):"variable"==t&&Ue?f(oe,e?L:E):m(e?j:C)}}function N(e,t){if("target"==t)return Xe.marked="keyword",f(E)}function K(e,t){if("target"==t)return Xe.marked="keyword",f(L)}function V(e){return":"==e?f(S,M):m(E,z(";"),S)}function U(e){if("variable"==e)return Xe.marked="property",f()}function W(e,t){if("async"==e)return Xe.marked="property",f(W);if("variable"==e||"keyword"==Xe.style){if(Xe.marked="property","get"==t||"set"==t)return f(R);var r;return Ue&&Xe.state.fatArrowAt==Xe.stream.start&&(r=Xe.stream.match(/^\s*:\s*/,!1))&&(Xe.state.fatArrowAt=Xe.stream.pos+r[0].length),f(H)}return"number"==e||"string"==e?(Xe.marked=Ke?"property":Xe.style+" property",f(H)):"jsonld-keyword"==e?f(H):Ue&&y(t)?(Xe.marked="keyword",f(W)):"["==e?f(C,X,z("]"),H):"spread"==e?f(j,H):"*"==t?(Xe.marked="keyword",f(W)):":"==e?m(H):void 0}function R(e){return"variable"!=e?m(H):(Xe.marked="property",f(be))}function H(e){return":"==e?f(j):"("==e?m(be):void 0}function G(e,t,r){function n(a,o){if(r?r.indexOf(a)>-1:","==a){var i=Xe.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return a==t||o==t?f():f(z(t))}return function(r,a){return r==t||a==t?f():m(e,n)}}function Z(e,t,r){for(var n=3;n<arguments.length;n++)Xe.cc.push(arguments[n]);return f(q(t,r),G(e,t),S)}function Y(e){return"}"==e?f():m(M,Y)}function X(e,t){if(Ue){if(":"==e)return f(ee);if("?"==t)return f(X)}}function Q(e){if(Ue&&":"==e)return Xe.stream.match(/^\s*\w+\s+is\b/,!1)?f(C,J,ee):f(ee)}function J(e,t){if("is"==t)return Xe.marked="keyword",f()}function ee(e,t){return"keyof"==t||"typeof"==t?(Xe.marked="keyword",f("keyof"==t?ee:j)):"variable"==e||"void"==t?(Xe.marked="type",f(ae)):"string"==e||"number"==e||"atom"==e?f(ae):"["==e?f(q("]"),G(ee,"]",","),S,ae):"{"==e?f(q("}"),G(re,"}",",;"),S,ae):"("==e?f(G(ne,")"),te):"<"==e?f(G(ee,">"),ee):void 0}function te(e){if("=>"==e)return f(ee)}function re(e,t){return"variable"==e||"keyword"==Xe.style?(Xe.marked="property",f(re)):"?"==t?f(re):":"==e?f(ee):"["==e?f(C,X,z("]"),re):void 0}function ne(e,t){return"variable"==e&&Xe.stream.match(/^\s*[?:]/,!1)||"?"==t?f(ne):":"==e?f(ee):m(ee)}function ae(e,t){return"<"==t?f(q(">"),G(ee,">"),S,ae):"|"==t||"."==e||"&"==t?f(ee):"["==e?f(z("]"),ae):"extends"==t||"implements"==t?(Xe.marked="keyword",f(ee)):void 0}function oe(e,t){if("<"==t)return f(q(">"),G(ee,">"),S,ae)}function ie(){return m(ee,le)}function le(e,t){if("="==t)return f(ee)}function se(e,t){return"enum"==t?(Xe.marked="keyword",f(Ee)):m(ce,X,de,pe)}function ce(e,t){return Ue&&y(t)?(Xe.marked="keyword",f(ce)):"variable"==e?(_(t),f()):"spread"==e?f(ce):"["==e?Z(ce,"]"):"{"==e?Z(ue,"}"):void 0}function ue(e,t){return"variable"!=e||Xe.stream.match(/^\s*:/,!1)?("variable"==e&&(Xe.marked="property"),"spread"==e?f(ce):"}"==e?m():f(z(":"),ce,de)):(_(t),f(de))}function de(e,t){if("="==t)return f(j)}function pe(e){if(","==e)return f(se)}function me(e,t){if("keyword b"==e&&"else"==t)return f(q("form","else"),M,S)}function fe(e,t){return"await"==t?f(fe):"("==e?f(q(")"),ge,z(")"),S):void 0}function ge(e){return"var"==e?f(se,z(";"),he):";"==e?f(he):"variable"==e?f(_e):m(C,z(";"),he)}function _e(e,t){return"in"==t||"of"==t?(Xe.marked="keyword",f(C)):f(E,he)}function he(e,t){return";"==e?f(ye):"in"==t||"of"==t?(Xe.marked="keyword",f(C)):m(C,z(";"),ye)}function ye(e){")"!=e&&f(C)}function be(e,t){return"*"==t?(Xe.marked="keyword",f(be)):"variable"==e?(_(t),f(be)):"("==e?f(w,q(")"),G(ke,")"),S,Q,M,x):Ue&&"<"==t?f(q(">"),G(ie,">"),S,be):void 0}function ke(e,t){return"@"==t&&f(C,ke),"spread"==e?f(ke):Ue&&y(t)?(Xe.marked="keyword",f(ke)):m(ce,X,de)}function we(e,t){return"variable"==e?ve(e,t):xe(e,t)}function ve(e,t){if("variable"==e)return _(t),f(xe)}function xe(e,t){return"<"==t?f(q(">"),G(ie,">"),S,xe):"extends"==t||"implements"==t||Ue&&","==e?("implements"==t&&(Xe.marked="keyword"),f(Ue?ee:C,xe)):"{"==e?f(q("}"),qe,S):void 0}function qe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Ue&&y(t))&&Xe.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Xe.marked="keyword",f(qe)):"variable"==e||"keyword"==Xe.style?(Xe.marked="property",f(Ue?Se:be,qe)):"["==e?f(C,X,z("]"),Ue?Se:be,qe):"*"==t?(Xe.marked="keyword",f(qe)):";"==e?f(qe):"}"==e?f():"@"==t?f(C,qe):void 0}function Se(e,t){return"?"==t?f(Se):":"==e?f(ee,de):"="==t?f(j):m(be)}function ze(e,t){return"*"==t?(Xe.marked="keyword",f(Ie,z(";"))):"default"==t?(Xe.marked="keyword",f(C,z(";"))):"{"==e?f(G(Me,"}"),Ie,z(";")):m(M)}function Me(e,t){return"as"==t?(Xe.marked="keyword",f(z("variable"))):"variable"==e?m(j,Me):void 0}function Te(e){return"string"==e?f():"("==e?m(C):m(Ce,je,Ie)}function Ce(e,t){return"{"==e?Z(Ce,"}"):("variable"==e&&_(t),"*"==t&&(Xe.marked="keyword"),f(Pe))}function je(e){if(","==e)return f(Ce,je)}function Pe(e,t){if("as"==t)return Xe.marked="keyword",f(Ce)}function Ie(e,t){if("from"==t)return Xe.marked="keyword",f(C)}function Ae(e){return"]"==e?f():m(G(j,"]"))}function Ee(){return m(q("form"),ce,z("{"),q("}"),G(Le,"}"),S,S)}function Le(){return m(ce,de)}function Oe(e,t){return"operator"==e.lastType||","==e.lastType||He.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function De(e,t,r){return t.tokenize==o&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var $e,Fe,Be=t.indentUnit,Ne=r.statementIndent,Ke=r.jsonld,Ve=r.json||Ke,Ue=r.typescript,We=r.wordCharacters||/[\w$\xa1-\uffff]/,Re=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),o=e("operator"),i={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),He=/[+\-*&%=<>!?|~^@]/,Ge=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ze="([{}])",Ye={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Xe={state:null,column:null,marked:null,cc:null},Qe=new k("this",new k("arguments",null));return x.lex=!0,S.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new u((e||0)-Be,0,"block",!1),localVars:r.localVars,context:r.localVars&&new b(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==$e?r:(t.lastType="operator"!=$e||"++"!=Fe&&"--"!=Fe?$e:"incdec",p(t,r,$e,Fe,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=o)return 0;var a,i=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==S)s=s.prev;else if(u!=me)break}for(;("stat"==s.type||"form"==s.type)&&("}"==i||(a=t.cc[t.cc.length-1])&&(a==E||a==L)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Ne&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,p=i==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==d&&"{"==i?s.indented:"form"==d?s.indented+Be:"stat"==d?s.indented+(Oe(t,n)?Ne||Be:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:Be):s.indented+(/^(?:case|default)\b/.test(n)?Be:2*Be)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Ve?null:"/*",blockCommentEnd:Ve?null:"*/",blockCommentContinue:Ve?null:" * ",lineComment:Ve?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Ve?"json":"javascript",jsonldMode:Ke,jsonMode:Ve,expressionAllowed:De,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=j||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return f=t,e}function a(e,t){var r=e.next();if(h[r]){var a=h[r](e,t);if(!1!==a)return a}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=o(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=i,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function o(e){return function(t,r){for(var a,o=!1;null!=(a=t.next());){if(a==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==a}return(a==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function i(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:_),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return P[r.context.type](e,t,r)}function d(e,t,r,n){for(var a=n||1;a>0;a--)r.context=r.context.prev;return u(e,t,r)}function p(e){var t=e.current().toLowerCase();g=M.hasOwnProperty(t)?"atom":z.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,g,_=t.indentUnit,h=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},k=r.mediaFeatures||{},w=r.mediaValueKeywords||{},v=r.propertyKeywords||{},x=r.nonStandardPropertyKeywords||{},q=r.fontProperties||{},S=r.counterDescriptors||{},z=r.colorKeywords||{},M=r.valueKeywords||{},T=r.allowNested,C=r.lineComment,j=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(j&&/@component/i.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(T&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return v.hasOwnProperty(n)?(g="property","maybeprop"):x.hasOwnProperty(n)?(g="string-2","maybeprop"):T?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":T||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(g="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&T)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(g="variable-3",r.context.type):u(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,T?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":k.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":v.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"string-2":M.hasOwnProperty(n)?"atom":z.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,T?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!q.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||a)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),g=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-_)):(r=r.prev,a=r.indent)),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}})
2
+ ;var n=["domain","regexp","url","url-prefix"],a=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(o),l=["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"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["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-blend-mode","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","caret-color","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-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","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","justify-items","justify-self","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","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","place-content","place-items","place-self","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","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"],p=t(d),m=["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"],f=t(m),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],_=t(g),h=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(h),b=["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"],k=t(b),w=["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","auto-flow","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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","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","lighten","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","luminosity","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","multiply","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","opacity","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","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","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","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","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"],v=t(w),x=n.concat(o).concat(l).concat(c).concat(d).concat(m).concat(b).concat(w);e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:a,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:v,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:v,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:v,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:i,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:v,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),a=n.search(t);return a>-1?e.backUp(n.length-a):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),a=e[r],o=a.length-1;o>=0;o--)n.unshift(a[o])}function i(e,t){for(var r=0;r<e.length;r++){var a=e[r];if(!a[0]||a[1].test(n(t,a[0])))return a[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/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"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,o){var l,d=c.token(n,o.htmlState),p=/\btag\b/.test(d);if(p&&!/[<>\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==n.current()&&i(u[m[1]],m[2]),g=e.getMode(r,f),_=a(m[1],!0),h=a(m[1],!1);o.token=function(e,r){return e.match(_,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,h,r.localMode.token(e,r.localState))},o.localMode=g,o.localState=e.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,p=n&&n.scriptTypes;if(o(l,u),d&&o(d,u),p)for(var m=p.length-1;m>=0;m--)u.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/clike/clike",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r,n,a,o){this.indented=e,this.column=t,this.type=r,this.info=n,this.align=a,this.prev=o}function r(e,r,n,a){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=n&&(o=e.context.indented),e.context=new t(o,r,n,a,null,e.context)}function n(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function a(e,t,r){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,r))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function i(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function l(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}function s(e,t){if(!t.startOfLine)return!1;for(var r,n=null;r=e.peek();){if("\\"==r&&e.match(/^.$/)){n=s;break}if("/"==r&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=n,"meta"}function c(e,t){return"type"==t.prevToken&&"type"}function u(e){return e.eatWhile(/[\w\.']/),"number"}function d(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var r=e.match(/"([^\s\\()]{0,16})\(/);return!!r&&(t.cpp11RawStringDelim=r[1],t.tokenize=f,f(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function p(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function m(e,t){for(var r;null!=(r=e.next());)if('"'==r&&!e.eat('"')){t.tokenize=null;break}return"string"}function f(e,t){var r=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+r+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function g(t,r){function n(e){if(e)for(var t in e)e.hasOwnProperty(t)&&a.push(t)}"string"==typeof t&&(t=[t]);var a=[];n(r.keywords),n(r.types),n(r.builtin),n(r.atoms),a.length&&(r.helperType=t[0],e.registerHelper("hintWords",t[0],a));for(var o=0;o<t.length;++o)e.defineMIME(t[o],r)}function _(e,t){for(var r=!1;!e.eol();){if(!r&&e.match('"""')){t.tokenize=null;break}r="\\"==e.next()&&!r}return"string"}function h(e){return function(t,r){for(var n;n=t.next();){if("*"==n&&t.eat("/")){if(1==e){r.tokenize=null;break}return r.tokenize=h(e-1),r.tokenize(t,r)}if("/"==n&&t.eat("*"))return r.tokenize=h(e+1),r.tokenize(t,r)}return"comment"}}function y(e){return function(t,r){for(var n,a=!1,o=!1;!t.eol();){if(!e&&!a&&t.match('"')){o=!0;break}if(e&&t.match('"""')){o=!0;break}n=t.next(),!a&&"$"==n&&t.match("{")&&t.skipTo("}"),a=!a&&"\\"==n&&!e}return!o&&e||(r.tokenize=null),"string"}}function b(e){return function(t,r){for(var n,a=!1,o=!1;!t.eol();){if(!a&&t.match('"')&&("single"==e||t.match('""'))){o=!0;break}if(!a&&t.match("``")){v=b(e),o=!0;break}n=t.next(),a="single"==e&&!a&&"\\"==n}return o&&(r.tokenize=null),"string"}}e.defineMode("clike",function(i,s){function c(e,t){var r=e.next();if(q[r]){var n=q[r](e,t);if(!1!==n)return n}if('"'==r||"'"==r)return t.tokenize=u(r),t.tokenize(e,t);if(C.test(r))return m=r,null;if(j.test(r)){if(e.backUp(1),e.match(P))return"number";e.next()}if("/"==r){if(e.eat("*"))return t.tokenize=d,d(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(I.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(I););return"operator"}if(e.eatWhile(A),T)for(;e.match(T);)e.eatWhile(A);var a=e.current();return l(y,a)?(l(w,a)&&(m="newstatement"),l(v,a)&&(f=!0),"keyword"):l(b,a)?"type":l(k,a)?(l(w,a)&&(m="newstatement"),"builtin"):l(x,a)?"atom":"variable"}function u(e){return function(t,r){for(var n,a=!1,o=!1;null!=(n=t.next());){if(n==e&&!a){o=!0;break}a=!a&&"\\"==n}return(o||!a&&!S)&&(r.tokenize=null),"string"}}function d(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=null;break}n="*"==r}return"comment"}function p(e,t){s.typeFirstDefinitions&&e.eol()&&o(t.context)&&(t.typeAtEndOfLine=a(e,t,e.pos))}var m,f,g=i.indentUnit,_=s.statementIndentUnit||g,h=s.dontAlignCalls,y=s.keywords||{},b=s.types||{},k=s.builtin||{},w=s.blockKeywords||{},v=s.defKeywords||{},x=s.atoms||{},q=s.hooks||{},S=s.multiLineStrings,z=!1!==s.indentStatements,M=!1!==s.indentSwitch,T=s.namespaceSeparator,C=s.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,j=s.numberStart||/[\d\.]/,P=s.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,I=s.isOperatorChar||/[+\-*&%=<>!?|\/]/,A=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-g,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return p(e,t),null;m=f=null;var l=(t.tokenize||c)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.align=!0),";"==m||":"==m||","==m&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)n(t);else if("{"==m)r(t,e.column(),"}");else if("["==m)r(t,e.column(),"]");else if("("==m)r(t,e.column(),")");else if("}"==m){for(;"statement"==i.type;)i=n(t);for("}"==i.type&&(i=n(t));"statement"==i.type;)i=n(t)}else m==i.type?n(t):z&&(("}"==i.type||"top"==i.type)&&";"!=m||"statement"==i.type&&"newstatement"==m)&&r(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&a(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),q.token){var u=q.token(e,t,l);void 0!==u&&(l=u)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=f?"def":l||m,p(e,t),l},indent:function(t,r){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var n=t.context,a=r&&r.charAt(0);if("statement"==n.type&&"}"==a&&(n=n.prev),s.dontIndentStatements)for(;"statement"==n.type&&s.dontIndentStatements.test(n.info);)n=n.prev;if(q.indent){var o=q.indent(t,n,r);if("number"==typeof o)return o}var i=a==n.type,l=n.prev&&"switch"==n.prev.info;if(s.allmanIndentation&&/[{(]/.test(a)){for(;"top"!=n.type&&"}"!=n.type;)n=n.prev;return n.indented}return"statement"==n.type?n.indented+("{"==a?0:_):!n.align||h&&")"==n.type?")"!=n.type||i?n.indented+(i?0:g)+(i||!l||/^(?:case|default)\b/.test(r)?0:g):n.indented+_:n.column+(i?0:1)},electricInput:M?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var k="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",w="int long char short double float unsigned signed void size_t ptrdiff_t";g(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:i(k),types:i(w+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:i("case do else for if switch while struct"),defKeywords:i("struct"),typeFirstDefinitions:!0,atoms:i("NULL true false"),hooks:{"#":s,"*":c},modeProps:{fold:["brace","include"]}}),g(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:i(k+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:i(w+" bool wchar_t"),blockKeywords:i("catch class do else finally for if struct switch try while"),defKeywords:i("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:i("true false NULL"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":s,"*":c,u:d,U:d,L:d,R:d,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,r){if("variable"==r&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&p(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),g("text/x-java",{name:"clike",keywords:i("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:i("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:i("catch class do else finally for if switch try while"),defKeywords:i("class interface enum @interface"),typeFirstDefinitions:!0,atoms:i("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),g("text/x-csharp",{name:"clike",keywords:i("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:i("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:i("catch class do else finally for foreach if struct switch try while"),defKeywords:i("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=m,m(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),g("text/x-scala",{name:"clike",keywords:i("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:i("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,
3
+ blockKeywords:i("catch class enum do else finally for forSome if match switch try while"),defKeywords:i("class enum def object package trait type val var"),atoms:i("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=_,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,r){var n=r.context;return!("}"!=n.type||!n.align||!e.eat(">"))&&(r.context=new t(n.indented,n.column,n.type,n.info,null,n.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=h(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{triples:'"'}}}),g("text/x-kotlin",{name:"clike",keywords:i("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:i("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:i("catch class do else finally for if where try while enum"),defKeywords:i("class val var object interface fun"),atoms:i("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=y(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),g(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:i("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:i("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:i("for while do if else struct"),builtin:i("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:i("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-nesc",{name:"clike",keywords:i(k+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:i(w),blockKeywords:i("case do else for if switch while struct"),atoms:i("null true false"),hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-objectivec",{name:"clike",keywords:i(k+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:i(w),atoms:i("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":s,indent:function(e,t,r){if("statement"==t.type&&/^@\w/.test(r))return t.indented}},modeProps:{fold:"brace"}}),g("text/x-squirrel",{name:"clike",keywords:i("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:i(w),blockKeywords:i("case catch class else for foreach if switch try while"),defKeywords:i("function local class"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"#":s},modeProps:{fold:["brace","include"]}});var v=null;g("text/x-ceylon",{name:"clike",keywords:i("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:i("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:i("class dynamic function interface module object package value"),builtin:i("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:i("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=b(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!v||!e.match("`"))&&(t.tokenize=v,v=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,r){if(("variable"==r||"type"==r)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define("mode/php/php.js",["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function r(e,t,a){return 0==e.length?n(t):function(o,i){for(var l=e[0],s=0;s<l.length;s++)if(o.match(l[s][0]))return i.tokenize=r(e.slice(1),t),l[s][1];return i.tokenize=n(t,a),"string"}}function n(e,t){return function(r,n){return a(r,n,e,t)}}function a(e,t,n,a){if(!1!==a&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(!1!==a&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=r([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],n,a)),e.match(/\-\>\w/,!1)&&(t.tokenize=r([[["->",null]],[[/[\w]+/,"variable"]]],n,a)),"variable-2";for(var o=!1;!e.eol()&&(o||!1===a||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!o&&e.match(n)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}o="\\"==e.next()&&!o}return"string"}var o="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",i="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",l="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[o,i,l].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var s={name:"clike",helperType:"php",keywords:t(o),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(i),builtin:t(l),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var r;if(r=e.match(/<<\s*/)){var a=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var o=e.current().slice(r[0].length+(a?2:1));if(a&&e.eat(a),o)return(t.tokStack||(t.tokStack=[])).push(o,0),t.tokenize=n(o,"'"!=a),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=n('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=n(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,r){function n(t,r){var n=r.curMode==o;if(t.sol()&&r.pending&&'"'!=r.pending&&"'"!=r.pending&&(r.pending=null),n)return n&&null==r.php.tokenize&&t.match("?>")?(r.curMode=a,r.curState=r.html,r.php.context.prev||(r.php=null),"meta"):o.token(t,r.curState);if(t.match(/^<\?\w*/))return r.curMode=o,r.php||(r.php=e.startState(o,a.indent(r.html,""))),r.curState=r.php,"meta";if('"'==r.pending||"'"==r.pending){for(;!t.eol()&&t.next()!=r.pending;);var i="string"}else if(r.pending&&t.pos<r.pending.end){t.pos=r.pending.end;var i=r.pending.style}else var i=a.token(t,r.curState);r.pending&&(r.pending=null);var l,s=t.current(),c=s.search(/<\?/);return-1!=c&&("string"==i&&(l=s.match(/[\'\"]$/))&&!/\?>/.test(s)?r.pending=l[0]:r.pending={end:t.pos,style:i},t.backUp(s.length-c)),i}var a=e.getMode(t,r&&r.htmlMode||"text/html"),o=e.getMode(t,s);return{startState:function(){var t=e.startState(a),n=r.startOpen?e.startState(o):null;return{html:t,php:n,curMode:r.startOpen?o:a,curState:r.startOpen?n:t,pending:null}},copyState:function(t){var r,n=t.html,i=e.copyState(a,n),l=t.php,s=l&&e.copyState(o,l);return r=t.curMode==a?i:s,{html:i,php:s,curMode:t.curMode,curState:r,pending:t.pending}},token:n,indent:function(e,t){return e.curMode!=o&&/^\s*<\//.test(t)||e.curMode==o&&/^\?>/.test(t)?a.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",s)}),function(e){"function"==typeof e.define&&e.define("modePHP",["mode/php/php.js"],function(){})}(this);
@@ -1 +1 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(n){function t(e,n,t,i){if("string"==typeof n){var r=e.indexOf(n,t);return i&&r>-1?r+n.length:r}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner)}},token:function(r,o){if(o.innerActive){var a=o.innerActive,c=r.string;if(!a.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);var s=a.close?t(c,a.close,r.pos,a.parseDelimiters):-1;if(s==r.pos&&!a.parseDelimiters)return r.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(r.string=c.slice(0,s));var l=a.mode.token(r,o.inner);return s>-1&&(r.string=c),s==r.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(l=l?l+" "+a.innerStyle:a.innerStyle),l}for(var d=1/0,c=r.string,u=0;u<i.length;++u){var m=i[u],s=t(c,m.open,r.pos);if(s==r.pos)return m.parseDelimiters||r.match(m.open),o.innerActive=m,o.inner=e.startState(m.mode,n.indent?n.indent(o.outer,""):0),m.delimStyle&&m.delimStyle+" "+m.delimStyle+"-open";-1!=s&&s<d&&(d=s)}d!=1/0&&(r.string=c.slice(0,d));var f=n.token(r,o.outer);return d!=1/0&&(r.string=c),f},indent:function(t,i){var r=t.innerActive?t.innerActive.mode:n;return r.indent?r.indent(t.innerActive?t.inner:t.outer,i):e.Pass},blankLine:function(t){var r=t.innerActive?t.innerActive.mode:n;if(r.blankLine&&r.blankLine(t.innerActive?t.inner:t.outer),t.innerActive)"\n"===t.innerActive.close&&(t.innerActive=t.inner=null);else for(var o=0;o<i.length;++o){var a=i[o];"\n"===a.open&&(t.innerActive=a,t.inner=e.startState(a.mode,r.indent?r.indent(t.outer,""):0))}},electricChars:n.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:n}}}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define("mode/twig/twig.js",["../../lib/codemirror","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("twig:inner",function(){function e(e,a){var c=e.peek();if(a.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,e.match(r))return"atom";if(e.match(o))return"number"}if(a.sign){if(a.sign=!1,e.match(r))return"atom";if(e.match(o))return"number"}if(a.instring)return c==a.instring&&(a.instring=!1),e.next(),"string";if("'"==c||'"'==c)return a.instring=c,e.next(),"string";if(e.match(a.intag+"}")||e.eat("-")&&e.match(a.intag+"}"))return a.intag=!1,"tag";if(e.match(t))return a.operator=!0,"operator";if(e.match(i))a.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(n))return"keyword";if(e.match(r))return"atom";if(e.match(o))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(e.eat("#"))return a.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(c=e.eat(/\{|%/))return a.intag=c,"{"==c&&(a.intag="}"),e.eat("-"),"tag"}e.next()}var n=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],t=/^[+\-*&%=<>!?|~^]/,i=/^[:\[\(\{]/,r=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],o=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return n=new RegExp("(("+n.join(")|(")+"))\\b"),r=new RegExp("(("+r.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(n,t){return e(n,t)}}}),e.defineMode("twig",function(n,t){var i=e.getMode(n,"twig:inner");return t&&t.base?e.multiplexingMode(e.getMode(n,t.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:i,parseDelimiters:!0}):i}),e.defineMIME("text/x-twig","twig")}),function(e){"function"==typeof e.define&&e.define("modeTwig",["mode/twig/twig.js"],function(){})}(this);
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(n){function t(e,n,t,i){if("string"==typeof n){var r=e.indexOf(n,t);return i&&r>-1?r+n.length:r}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner)}},token:function(r,o){if(o.innerActive){var a=o.innerActive,c=r.string;if(!a.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);var s=a.close?t(c,a.close,r.pos,a.parseDelimiters):-1;if(s==r.pos&&!a.parseDelimiters)return r.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(r.string=c.slice(0,s));var l=a.mode.token(r,o.inner);return s>-1&&(r.string=c),s==r.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(l=l?l+" "+a.innerStyle:a.innerStyle),l}for(var d=1/0,c=r.string,u=0;u<i.length;++u){var f=i[u],s=t(c,f.open,r.pos);if(s==r.pos){f.parseDelimiters||r.match(f.open),o.innerActive=f;var m=0;if(n.indent){var p=n.indent(o.outer,"");p!==e.Pass&&(m=p)}return o.inner=e.startState(f.mode,m),f.delimStyle&&f.delimStyle+" "+f.delimStyle+"-open"}-1!=s&&s<d&&(d=s)}d!=1/0&&(r.string=c.slice(0,d));var v=n.token(r,o.outer);return d!=1/0&&(r.string=c),v},indent:function(t,i){var r=t.innerActive?t.innerActive.mode:n;return r.indent?r.indent(t.innerActive?t.inner:t.outer,i):e.Pass},blankLine:function(t){var r=t.innerActive?t.innerActive.mode:n;if(r.blankLine&&r.blankLine(t.innerActive?t.inner:t.outer),t.innerActive)"\n"===t.innerActive.close&&(t.innerActive=t.inner=null);else for(var o=0;o<i.length;++o){var a=i[o];"\n"===a.open&&(t.innerActive=a,t.inner=e.startState(a.mode,r.indent?r.indent(t.outer,""):0))}},electricChars:n.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:n}}}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define("mode/twig/twig.js",["../../lib/codemirror","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("twig:inner",function(){function e(e,a){var c=e.peek();if(a.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,e.match(r))return"atom";if(e.match(o))return"number"}if(a.sign){if(a.sign=!1,e.match(r))return"atom";if(e.match(o))return"number"}if(a.instring)return c==a.instring&&(a.instring=!1),e.next(),"string";if("'"==c||'"'==c)return a.instring=c,e.next(),"string";if(e.match(a.intag+"}")||e.eat("-")&&e.match(a.intag+"}"))return a.intag=!1,"tag";if(e.match(t))return a.operator=!0,"operator";if(e.match(i))a.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(n))return"keyword";if(e.match(r))return"atom";if(e.match(o))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(e.eat("#"))return a.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(c=e.eat(/\{|%/))return a.intag=c,"{"==c&&(a.intag="}"),e.eat("-"),"tag"}e.next()}var n=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],t=/^[+\-*&%=<>!?|~^]/,i=/^[:\[\(\{]/,r=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],o=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return n=new RegExp("(("+n.join(")|(")+"))\\b"),r=new RegExp("(("+r.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(n,t){return e(n,t)}}}),e.defineMode("twig",function(n,t){var i=e.getMode(n,"twig:inner");return t&&t.base?e.multiplexingMode(e.getMode(n,t.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:i,parseDelimiters:!0}):i}),e.defineMIME("text/x-twig","twig")}),function(e){"function"==typeof e.define&&e.define("modeTwig",["mode/twig/twig.js"],function(){})}(this);
@@ -1,12 +1,12 @@
1
- /*
1
+ /*
2
2
  Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
5
  CKEDITOR.plugins.setLang( 'codemirror', 'bg', {
6
- toolbar: 'Източник',
7
- searchCode: 'Search Source',
8
- autoFormat: 'Format Selection',
9
- commentSelectedRange: 'Comment Selection',
10
- uncommentSelectedRange: 'Uncomment Selection',
11
- autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
6
+ toolbar: 'Код',
7
+ searchCode: 'Търси в кода',
8
+ autoFormat: 'Форматирай избраното',
9
+ commentSelectedRange: 'Коментирай избраното',
10
+ uncommentSelectedRange: 'Откоментирай избраното',
11
+ autoCompleteToggle: 'Активирай/деактивирай авто довършване за HTML тагове'
12
12
  });