@sapui5/sap.ui.richtexteditor 1.121.0 → 1.121.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/richtexteditor/.library +3 -3
  3. package/src/sap/ui/richtexteditor/RTESplitButton.js +1 -1
  4. package/src/sap/ui/richtexteditor/js/tiny_mce5/icons/default/icons.js +6 -0
  5. package/src/sap/ui/richtexteditor/js/tiny_mce5/icons/default/icons.min.js +6 -0
  6. package/src/sap/ui/richtexteditor/js/tiny_mce5/jquery.tinymce.min.js +5 -2
  7. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/he_IL.js +420 -1
  8. package/src/sap/ui/richtexteditor/js/tiny_mce5/license.txt +3 -3
  9. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/license.txt +3 -3
  10. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advlist/plugin.js +7 -2
  11. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advlist/plugin.min.js +7 -2
  12. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/anchor/plugin.js +7 -2
  13. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/anchor/plugin.min.js +7 -2
  14. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autolink/plugin.js +8 -3
  15. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autolink/plugin.min.js +8 -3
  16. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autoresize/plugin.js +7 -2
  17. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autoresize/plugin.min.js +7 -2
  18. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autosave/plugin.js +7 -2
  19. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autosave/plugin.min.js +7 -2
  20. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/bbcode/plugin.js +7 -2
  21. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/bbcode/plugin.min.js +7 -2
  22. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/charmap/plugin.js +7 -2
  23. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/charmap/plugin.min.js +7 -2
  24. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/code/plugin.js +7 -2
  25. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/code/plugin.min.js +7 -2
  26. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/codesample/plugin.js +274 -146
  27. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/codesample/plugin.min.js +8 -3
  28. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/colorpicker/plugin.js +7 -2
  29. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/colorpicker/plugin.min.js +7 -2
  30. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/contextmenu/plugin.js +7 -2
  31. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/contextmenu/plugin.min.js +7 -2
  32. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/directionality/plugin.js +7 -2
  33. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/directionality/plugin.min.js +7 -2
  34. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojiimages.js +6 -0
  35. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojiimages.min.js +6 -0
  36. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojis.js +6 -0
  37. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojis.min.js +6 -0
  38. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/plugin.js +7 -2
  39. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/plugin.min.js +7 -2
  40. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullpage/plugin.js +7 -2
  41. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullpage/plugin.min.js +7 -2
  42. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullscreen/plugin.js +9 -3
  43. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullscreen/plugin.min.js +8 -3
  44. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/help/plugin.js +7 -2
  45. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/help/plugin.min.js +7 -2
  46. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/hr/plugin.js +7 -2
  47. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/hr/plugin.min.js +7 -2
  48. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/image/plugin.js +7 -2
  49. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/image/plugin.min.js +7 -2
  50. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/imagetools/plugin.js +7 -2
  51. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/imagetools/plugin.min.js +7 -2
  52. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/importcss/plugin.js +7 -2
  53. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/importcss/plugin.min.js +7 -2
  54. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/insertdatetime/plugin.js +7 -2
  55. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/insertdatetime/plugin.min.js +7 -2
  56. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/legacyoutput/plugin.js +7 -2
  57. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/legacyoutput/plugin.min.js +7 -2
  58. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/link/plugin.js +7 -2
  59. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/link/plugin.min.js +7 -2
  60. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/lists/plugin.js +7 -2
  61. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/lists/plugin.min.js +7 -2
  62. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/media/plugin.js +7 -2
  63. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/media/plugin.min.js +7 -2
  64. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/nonbreaking/plugin.js +7 -2
  65. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/nonbreaking/plugin.min.js +7 -2
  66. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/noneditable/plugin.js +7 -2
  67. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/noneditable/plugin.min.js +7 -2
  68. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/pagebreak/plugin.js +7 -2
  69. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/pagebreak/plugin.min.js +7 -2
  70. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/paste/plugin.js +8 -3
  71. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/paste/plugin.min.js +8 -3
  72. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/CHANGELOG.md +5 -0
  73. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/license.txt +3 -3
  74. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/plugin.js +2 -2
  75. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/plugin.min.js +2 -2
  76. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/readme.txt +1 -1
  77. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/version.txt +1 -1
  78. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/preview/plugin.js +7 -2
  79. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/preview/plugin.min.js +7 -2
  80. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/print/plugin.js +7 -2
  81. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/print/plugin.min.js +7 -2
  82. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/quickbars/plugin.js +7 -2
  83. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/quickbars/plugin.min.js +7 -2
  84. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/save/plugin.js +7 -2
  85. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/save/plugin.min.js +7 -2
  86. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/searchreplace/plugin.js +7 -2
  87. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/searchreplace/plugin.min.js +7 -2
  88. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/spellchecker/plugin.js +7 -2
  89. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/spellchecker/plugin.min.js +7 -2
  90. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/tabfocus/plugin.js +7 -2
  91. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/tabfocus/plugin.min.js +7 -2
  92. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/table/plugin.js +7 -2
  93. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/table/plugin.min.js +7 -2
  94. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/template/plugin.js +7 -2
  95. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/template/plugin.min.js +7 -2
  96. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textcolor/plugin.js +7 -2
  97. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textcolor/plugin.min.js +7 -2
  98. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textpattern/plugin.js +8 -3
  99. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textpattern/plugin.min.js +8 -3
  100. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/toc/plugin.js +7 -2
  101. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/toc/plugin.min.js +7 -2
  102. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualblocks/plugin.js +7 -2
  103. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualblocks/plugin.min.js +7 -2
  104. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualchars/plugin.js +7 -2
  105. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualchars/plugin.min.js +7 -2
  106. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/wordcount/plugin.js +7 -2
  107. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/wordcount/plugin.min.js +7 -2
  108. package/src/sap/ui/richtexteditor/js/tiny_mce5/readme.txt +1 -1
  109. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/dark/content.css +5 -5
  110. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/dark/content.min.css +5 -5
  111. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/default/content.css +5 -5
  112. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/default/content.min.css +5 -5
  113. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/document/content.css +5 -5
  114. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/document/content.min.css +5 -5
  115. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/writer/content.css +5 -5
  116. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/writer/content.min.css +5 -5
  117. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.css +5 -5
  118. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.inline.css +5 -5
  119. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.inline.min.css +5 -5
  120. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.min.css +5 -5
  121. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.mobile.css +5 -5
  122. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.mobile.min.css +5 -5
  123. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.css +5 -5
  124. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.min.css +5 -5
  125. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.mobile.css +5 -5
  126. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.mobile.min.css +5 -5
  127. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.shadowdom.css +5 -5
  128. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.shadowdom.min.css +5 -5
  129. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.css +5 -5
  130. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.inline.css +5 -5
  131. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.inline.min.css +5 -5
  132. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.min.css +5 -5
  133. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.mobile.css +5 -5
  134. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.mobile.min.css +5 -5
  135. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.css +5 -5
  136. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.min.css +5 -5
  137. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.mobile.css +5 -5
  138. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.mobile.min.css +5 -5
  139. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.shadowdom.css +5 -5
  140. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.shadowdom.min.css +5 -5
  141. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/mobile/theme.js +7 -2
  142. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/mobile/theme.min.js +7 -2
  143. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/silver/theme.js +1645 -84
  144. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/silver/theme.min.js +8 -3
  145. package/src/sap/ui/richtexteditor/js/tiny_mce5/tinymce.d.ts +3 -0
  146. package/src/sap/ui/richtexteditor/js/tiny_mce5/tinymce.js +1458 -1360
  147. package/src/sap/ui/richtexteditor/js/tiny_mce5/tinymce.min.js +8 -3
  148. package/src/sap/ui/richtexteditor/js/tiny_mce5/version.txt +1 -1
  149. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.js +3 -0
  150. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.min.js +1 -1
  151. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ar.js +1 -1
  152. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/bg_BG.js +1 -1
  153. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ca.js +1 -1
  154. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/cs.js +1 -1
  155. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/da.js +1 -1
  156. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/de.js +1 -1
  157. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/el.js +1 -1
  158. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/es.js +1 -1
  159. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/eu.js +1 -1
  160. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fa.js +1 -1
  161. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fi.js +1 -1
  162. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fr_FR.js +1 -1
  163. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/he_IL.js +1 -1
  164. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hi.js +1 -1
  165. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hr.js +1 -1
  166. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hu_HU.js +1 -1
  167. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/id.js +1 -1
  168. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/it.js +1 -1
  169. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ja.js +1 -1
  170. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/kk.js +1 -1
  171. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ko_KR.js +1 -1
  172. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ms.js +1 -1
  173. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nb_NO.js +1 -1
  174. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nl.js +1 -1
  175. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pl.js +1 -1
  176. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_BR.js +1 -1
  177. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_PT.js +1 -1
  178. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ro.js +1 -1
  179. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ru.js +1 -1
  180. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sk.js +1 -1
  181. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sl_SI.js +1 -1
  182. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sv_SE.js +1 -1
  183. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/th_TH.js +1 -1
  184. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/tr.js +1 -1
  185. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/uk.js +1 -1
  186. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/vi.js +1 -1
  187. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_CN.js +1 -1
  188. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_TW.js +1 -1
  189. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.js +1 -1
  190. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.min.js +1 -1
  191. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/plugin.js +39 -18
  192. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/plugin.min.js +2 -2
  193. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/CHANGELOG.md +10 -0
  194. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.css +1 -1
  195. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.js +1 -1
  196. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror_css.js +13 -0
  197. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.js +2 -2
  198. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.min.js +2 -2
  199. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.js +2 -2
  200. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.min.js +2 -2
  201. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/readme.txt +1 -1
  202. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/version.txt +1 -1
  203. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.js +1 -1
  204. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.min.js +1 -1
  205. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.js +1 -1
  206. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.min.js +1 -1
  207. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.js +1 -1
  208. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.min.js +1 -1
  209. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.js +1 -1
  210. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.min.js +1 -1
  211. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.js +1 -1
  212. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.min.js +1 -1
  213. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.js +1 -1
  214. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.min.js +1 -1
  215. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.js +1 -1
  216. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.min.js +1 -1
  217. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.js +1 -1
  218. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.min.js +1 -1
  219. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.js +1 -1
  220. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.min.js +1 -1
  221. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.js +1 -1
  222. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.min.js +1 -1
  223. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.js +1 -1
  224. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.min.js +1 -1
  225. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ar.js +5 -5
  226. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/bg_BG.js +5 -5
  227. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ca.js +5 -5
  228. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/cs.js +5 -5
  229. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/da.js +5 -5
  230. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/de.js +5 -5
  231. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/el.js +5 -5
  232. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/en.js +5 -5
  233. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/es.js +5 -5
  234. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/eu.js +6 -6
  235. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fa.js +5 -5
  236. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fi.js +5 -5
  237. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fr_FR.js +5 -5
  238. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/he_IL.js +5 -5
  239. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hi.js +5 -5
  240. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hr.js +5 -5
  241. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hu_HU.js +5 -5
  242. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/id.js +5 -5
  243. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/it.js +5 -5
  244. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ja.js +5 -5
  245. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/kk.js +5 -5
  246. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ko_KR.js +5 -5
  247. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ms.js +5 -5
  248. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/nb_NO.js +5 -5
  249. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/nl.js +5 -5
  250. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pl.js +5 -5
  251. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pt_BR.js +5 -5
  252. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pt_PT.js +5 -5
  253. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ro.js +5 -5
  254. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ru.js +5 -5
  255. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sk.js +5 -5
  256. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sl_SI.js +5 -5
  257. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sv_SE.js +5 -5
  258. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/th_TH.js +5 -5
  259. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/tr.js +5 -5
  260. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/uk.js +5 -5
  261. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/vi.js +5 -5
  262. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/zh_CN.js +5 -5
  263. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/zh_TW.js +5 -5
  264. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.js +10 -5
  265. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.min.js +2 -2
  266. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.js +4 -3
  267. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.min.js +2 -2
  268. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.js +2 -2
  269. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.min.js +2 -2
  270. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.js +1 -1
  271. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.min.js +1 -1
  272. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.js +3 -2
  273. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.min.js +2 -2
  274. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.js +282 -58
  275. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.min.js +2 -2
  276. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.js +7 -25
  277. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.min.js +2 -2
  278. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.js +1 -1
  279. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.min.js +1 -1
  280. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.js +1 -1
  281. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.min.js +1 -1
  282. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/CHANGELOG.md +19 -0
  283. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/js/wordimport.js +1972 -1673
  284. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ar.js +0 -1
  285. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/bg_BG.js +0 -1
  286. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ca.js +0 -1
  287. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/cs.js +0 -1
  288. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/da.js +0 -1
  289. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/de.js +0 -1
  290. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/el.js +0 -1
  291. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/es.js +0 -1
  292. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/eu.js +0 -1
  293. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fa.js +0 -1
  294. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fi.js +0 -1
  295. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fr_FR.js +0 -1
  296. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/he_IL.js +0 -1
  297. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hi.js +0 -1
  298. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hr.js +0 -1
  299. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hu_HU.js +0 -1
  300. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/id.js +0 -1
  301. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/it.js +0 -1
  302. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ja.js +0 -1
  303. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/kk.js +0 -1
  304. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ko_KR.js +0 -1
  305. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ms.js +0 -1
  306. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/nb_NO.js +0 -1
  307. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/nl.js +0 -1
  308. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pl.js +0 -1
  309. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pt_BR.js +0 -1
  310. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pt_PT.js +0 -1
  311. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ro.js +0 -1
  312. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ru.js +0 -1
  313. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sk.js +0 -1
  314. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sl_SI.js +0 -1
  315. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sv_SE.js +0 -1
  316. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/th_TH.js +0 -1
  317. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/tr.js +0 -1
  318. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/uk.js +0 -1
  319. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/vi.js +0 -1
  320. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/zh_CN.js +0 -1
  321. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/zh_TW.js +0 -1
  322. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.js +2 -2
  323. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.min.js +2 -2
  324. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/readme.txt +1 -1
  325. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/version.txt +1 -1
  326. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.js +1 -1
  327. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.min.js +1 -1
  328. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.js +13 -4
  329. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.min.js +2 -2
  330. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.js +1 -1
  331. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.min.js +1 -1
  332. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.js +3 -3
  333. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.min.js +2 -2
  334. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.js +2 -2
  335. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.min.js +2 -2
  336. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.js +1 -1
  337. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.min.js +1 -1
  338. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.js +1 -1
  339. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.min.js +1 -1
  340. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.js +1 -1
  341. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.min.js +1 -1
  342. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.js +1 -1
  343. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.min.js +1 -1
  344. package/src/sap/ui/richtexteditor/js/tiny_mce6/readme.txt +1 -1
  345. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/dark/content.js +8 -0
  346. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/default/content.js +8 -0
  347. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/document/content.js +8 -0
  348. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5/content.js +8 -0
  349. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5-dark/content.js +8 -0
  350. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/writer/content.js +8 -0
  351. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.css +1 -1
  352. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.css +1 -1
  353. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.js +8 -0
  354. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.min.css +1 -1
  355. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.js +8 -0
  356. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.min.css +1 -1
  357. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.css +86 -11
  358. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.js +8 -0
  359. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.min.css +1 -1
  360. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.shadowdom.js +8 -0
  361. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.css +1 -1
  362. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.css +1 -1
  363. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.js +8 -0
  364. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.min.css +1 -1
  365. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.js +8 -0
  366. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.min.css +1 -1
  367. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.css +89 -14
  368. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.js +8 -0
  369. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.min.css +1 -1
  370. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.shadowdom.js +8 -0
  371. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.css +1 -1
  372. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.css +1 -1
  373. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.js +8 -0
  374. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.min.css +1 -1
  375. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.js +8 -0
  376. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.min.css +1 -1
  377. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.css +86 -11
  378. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.js +8 -0
  379. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.min.css +1 -1
  380. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.shadowdom.js +8 -0
  381. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.css +1 -1
  382. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.css +1 -1
  383. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.js +8 -0
  384. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
  385. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.js +8 -0
  386. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.min.css +1 -1
  387. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.css +86 -11
  388. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.js +8 -0
  389. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  390. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.shadowdom.js +8 -0
  391. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.js +20786 -20200
  392. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.min.js +2 -2
  393. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.d.ts +40 -8
  394. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.js +2031 -1572
  395. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.min.js +2 -2
  396. package/src/sap/ui/richtexteditor/js/tiny_mce6/version.txt +1 -1
  397. package/src/sap/ui/richtexteditor/library.js +1 -1
@@ -7,7 +7,7 @@
7
7
  * This resource uses JavaScript from the codemirror package, licensed under the MIT License.
8
8
  * https://github.com/codemirror/CodeMirror
9
9
  *
10
- * Version: 3.3.0-95
10
+ * Version: 3.4.0-107
11
11
  */
12
12
 
13
13
  tinymce.Resource.add("tinymce.plugins.advcode.CodeMirror",function(){var e,t,n=window.CodeMirror;window.CodeMirror=void 0,e=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=r||i||o,a=l&&(r?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\/(\d+)/.exec(e),f=u&&+u[1],h=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),m=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=m||/Mac/.test(t),x=/\bCrOS\b/.test(e),C=/win/i.test(t),w=h&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,s=!0);var S=b&&(c||h&&(null==w||w<12.11)),k=n||l&&a>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var M,T=function(e,t){var n=e.className,r=L(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return N(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"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 D(e,t,n,r){var i=A(e,t,n,r);return i.setAttribute("role","presentation"),i}function F(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 P(e){var t;try{t=e.activeElement}catch(n){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function W(e,t){var n=e.className;L(t).test(n)||(e.className+=(n?" ":"")+t)}function H(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!L(n[r]).test(t)&&(t+=" "+n[r]);return t}M=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var I=function(e){e.select()};function E(e){return e.display.wrapper.ownerDocument}function R(e){return E(e).defaultView}function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function U(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,l=i||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}m?I=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(I=function(e){try{e.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function G(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}K.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},K.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var V=50,q={toString:function(){return"CodeMirror.Pass"}},j={scroll:!1},_={origin:"*mouse"},$={origin:"+move"};function X(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var Y=[""];function Z(e){for(;Y.length<=e;)Y.push(Q(Y)+" ");return Y[e]}function Q(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function ee(){}function te(e,t){var n;return Object.create?n=Object.create(e):(ee.prototype=e,n=new ee),t&&z(t,n),n}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function ie(e,t){return t?!!(t.source.indexOf("\\w")>-1&&re(e))||t.test(e):re(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var le=/[\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 ae(e){return e.charCodeAt(0)>=768&&le.test(e)}function se(e,t,n){for(;(n<0?t>0:t<e.length)&&ae(e.charAt(t));)t+=n;return t}function ce(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ue=null;function fe(e,t,n){var r;ue=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"==n?r=i:ue=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ue=i)}return null!=r?r:ue}var he=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(l,a){var s="ltr"==a?"L":"R";if(0==l.length||"ltr"==a&&!e.test(l))return!1;for(var c,u=l.length,f=[],h=0;h<u;++h)f.push((c=l.charCodeAt(h))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var d=0,p=s;d<u;++d){var g=f[d];"m"==g?f[d]=p:p=g}for(var m=0,v=s;m<u;++m){var y=f[m];"1"==y&&"r"==v?f[m]="n":n.test(y)&&(v=y,"r"==y&&(f[m]="R"))}for(var b=1,x=f[0];b<u-1;++b){var C=f[b];"+"==C&&"1"==x&&"1"==f[b+1]?f[b]="1":","!=C||x!=f[b+1]||"1"!=x&&"n"!=x||(f[b]=x),x=C}for(var w=0;w<u;++w){var S=f[w];if(","==S)f[w]="N";else if("%"==S){var k=void 0;for(k=w+1;k<u&&"%"==f[k];++k);for(var L=w&&"!"==f[w-1]||k<u&&"1"==f[k]?"1":"N",M=w;M<k;++M)f[M]=L;w=k-1}}for(var T=0,N=s;T<u;++T){var O=f[T];"L"==N&&"1"==O?f[T]="L":n.test(O)&&(N=O)}for(var A=0;A<u;++A)if(t.test(f[A])){var D=void 0;for(D=A+1;D<u&&t.test(f[D]);++D);for(var F="L"==(A?f[A-1]:s),P=F==("L"==(D<u?f[D]:s))?F?"L":"R":s,W=A;W<D;++W)f[W]=P;A=D-1}for(var H,I=[],E=0;E<u;)if(r.test(f[E])){var R=E;for(++E;E<u&&r.test(f[E]);++E);I.push(new o(0,R,E))}else{var B=E,z=I.length,U="rtl"==a?1:0;for(++E;E<u&&"L"!=f[E];++E);for(var K=B;K<E;)if(i.test(f[K])){B<K&&(I.splice(z,0,new o(1,B,K)),z+=U);var G=K;for(++K;K<E&&i.test(f[K]);++K);I.splice(z,0,new o(2,G,K)),z+=U,B=K}else++K;B<E&&I.splice(z,0,new o(1,B,E))}return"ltr"==a&&(1==I[0].level&&(H=l.match(/^\s+/))&&(I[0].from=H[0].length,I.unshift(new o(0,0,H[0].length))),1==Q(I).level&&(H=l.match(/\s+$/))&&(Q(I).to-=H[0].length,I.push(new o(0,u-H[0].length,u)))),"rtl"==a?I.reverse():I}}();function de(e,t){var n=e.order;return null==n&&(n=e.order=he(e.text,t)),n}var pe=[],ge=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||pe).concat(n)}};function me(e,t){return e._handlers&&e._handlers[t]||pe}function ve(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=G(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ye(e,t){var n=me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function be(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,n||t.type,e,t),Le(t)||t.codemirrorIgnore}function xe(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==G(n,t[r])&&n.push(t[r])}function Ce(e,t){return me(e,t).length>0}function we(e){e.prototype.on=function(e,t){ge(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function Se(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Le(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Me(e){Se(e),ke(e)}function Te(e){return e.target||e.srcElement}function Ne(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Oe,Ae,De=function(){if(l&&a<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Fe(e){if(null==Oe){var t=A("span","\u200b");O(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var n=Oe?A("span","\u200b"):A("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Pe(e){if(null!=Ae)return Ae;var t=O(e,document.createTextNode("A\u062eA")),n=M(t,0,1).getBoundingClientRect(),r=M(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(Ae=r.right-n.right<3)}var We,He=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){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?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ie=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)},Ee="oncopy"in(We=A("div"))||(We.setAttribute("oncopy","return;"),"function"==typeof We.oncopy),Re=null,Be={},ze={};function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Be[e]=t}function Ke(e){if("string"==typeof e&&ze.hasOwnProperty(e))e=ze[e];else if(e&&"string"==typeof e.name&&ze.hasOwnProperty(e.name)){var t=ze[e.name];"string"==typeof t&&(t={name:t}),(e=te(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ke("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ke("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=Ke(t);var n=Be[t.name];if(!n)return Ge(e,"text/plain");var r=n(e,t);if(Ve.hasOwnProperty(t.name)){var i=Ve[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var Ve={};function qe(e,t){z(t,Ve.hasOwnProperty(e)?Ve[e]:Ve[e]={})}function je(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function _e(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function $e(e,t,n){return!e.startState||e.startState(t,n)}var Xe=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ye(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 n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Ze(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Qe(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Je(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function et(e){if(null==e.parent)return null;for(var t=e.parent,n=G(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function tt(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var l=0;l<e.lines.length;++l){var a=e.lines[l].height;if(t<a)break;t-=a}return n+l}function nt(e,t){return t>=e.first&&t<e.first+e.size}function rt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,n){if(void 0===n&&(n=null),!(this instanceof it))return new it(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ot(e,t){return e.line-t.line||e.ch-t.ch}function lt(e,t){return e.sticky==t.sticky&&0==ot(e,t)}function at(e){return it(e.line,e.ch)}function st(e,t){return ot(e,t)<0?t:e}function ct(e,t){return ot(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ft(e,t){if(t.line<e.first)return it(e.first,0);var n=e.first+e.size-1;return t.line>n?it(n,Ye(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}(t,Ye(e,t.line).text.length)}function ht(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ft(e,t[r]);return n}Xe.prototype.eol=function(){return this.pos>=this.string.length},Xe.prototype.sol=function(){return this.pos==this.lineStart},Xe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xe.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},Xe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Xe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Xe.prototype.skipToEnd=function(){this.pos=this.string.length},Xe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Xe.prototype.backUp=function(e){this.pos-=e},Xe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=U(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.indentation=function(){return U(this.string,null,this.tabSize)-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Xe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Xe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Xe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var dt=function(e,t){this.state=e,this.lookAhead=t},pt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,n,r){var i=[e.state.modeGen],o={};kt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var l=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],s=1,c=0;n.state=!0,kt(e,t.text,a.mode,n,(function(e,t){for(var n=s;c<e;){var r=i[s];r>e&&i.splice(s,1,e,i[s+1],r),s+=2,c=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=l,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)a(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function mt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=vt(e,et(t)),i=t.text.length>e.options.maxHighlightLength&&je(e.doc.mode,r.state),o=gt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function vt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new pt(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=Ye(o,a-1),c=s.stateAfter;if(c&&(!n||a+(c instanceof dt?c.lookAhead:0)<=o.modeFrontier))return a;var u=U(s.text,null,e.options.tabSize);(null==i||r>u)&&(i=a-1,r=u)}return i}(e,t,n),l=o>r.first&&Ye(r,o-1).stateAfter,a=l?pt.fromSaved(r,l,o):new pt(r,$e(r.mode),o);return r.iter(o,t,(function(n){yt(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?a.save():null,a.nextLine()})),n&&(r.modeFrontier=a.line),a}function yt(e,t,n,r){var i=e.doc.mode,o=new Xe(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&bt(i,n.state);!o.eol();)xt(i,o,n.state),o.start=o.pos}function bt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=_e(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function xt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=_e(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}pt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},pt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},pt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pt.fromSaved=function(e,t,n){return t instanceof dt?new pt(e,je(e.mode,t.state),n,t.lookAhead):new pt(e,je(e.mode,t),n)},pt.prototype.save=function(e){var t=!1!==e?je(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new dt(t,this.maxLookAhead):t};var Ct=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function wt(e,t,n,r){var i,o,l=e.doc,a=l.mode,s=Ye(l,(t=ft(l,t)).line),c=vt(e,t.line,n),u=new Xe(s.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=xt(a,u,c.state),r&&o.push(new Ct(u,i,je(l.mode,c.state)));return r?o:new Ct(u,i,c.state)}function St(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function kt(e,t,n,r,i,o,l){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var s,c=0,u=null,f=new Xe(t,e.options.tabSize,r),h=e.options.addModeClass&&[null];for(""==t&&St(bt(n,r.state),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(a=!1,l&&yt(e,t,r,f.pos),f.pos=t.length,s=null):s=St(xt(n,f,r.state,h),o),h){var d=h[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!a||u!=s){for(;c<f.start;)i(c=Math.min(f.start,c+5e3),u);u=s}f.start=f.pos}for(;c<f.pos;){var p=Math.min(f.pos,c+5e3);i(p,u),c=p}}var Lt=!1,Mt=!1;function Tt(e,t,n){this.marker=e,this.from=t,this.to=n}function Nt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ot(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function At(e,t){if(t.full)return null;var n=nt(e,t.from.line)&&Ye(e,t.from.line).markedSpans,r=nt(e,t.to.line)&&Ye(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,l=0==ot(t.from,t.to),a=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Tt(l,o.from,a?null:o.to))}}return r}(n,i,l),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Tt(l,a?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,l),c=1==t.text.length,u=Q(t.text).length+(c?i:0);if(a)for(var f=0;f<a.length;++f){var h=a[f];if(null==h.to){var d=Nt(s,h.marker);d?c&&(h.to=null==d.to?null:d.to+u):h.to=i}}if(s)for(var p=0;p<s.length;++p){var g=s[p];null!=g.to&&(g.to+=u),null==g.from?Nt(a,g.marker)||(g.from=u,c&&(a||(a=[])).push(g)):(g.from+=u,c&&(a||(a=[])).push(g))}a&&(a=Dt(a)),s&&s!=a&&(s=Dt(s));var m=[a];if(!c){var v,y=t.text.length-2;if(y>0&&a)for(var b=0;b<a.length;++b)null==a[b].to&&(v||(v=[])).push(new Tt(a[b].marker,null,null));for(var x=0;x<y;++x)m.push(v);m.push(s)}return m}function Dt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ft(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Pt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Wt(e){return e.inclusiveLeft?-1:0}function Ht(e){return e.inclusiveRight?1:0}function It(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ot(r.from,i.from)||Wt(e)-Wt(t);return o?-o:ot(r.to,i.to)||Ht(e)-Ht(t)||t.id-e.id}function Et(e,t){var n,r=Mt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||It(n,i.marker)<0)&&(n=i.marker);return n}function Rt(e){return Et(e,!0)}function Bt(e){return Et(e,!1)}function zt(e,t){var n,r=Mt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||It(n,o.marker)<0)&&(n=o.marker)}return n}function Ut(e,t,n,r,i){var o=Ye(e,t),l=Mt&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(s.marker.collapsed){var c=s.marker.find(0),u=ot(c.from,n)||Wt(s.marker)-Wt(i),f=ot(c.to,r)||Ht(s.marker)-Ht(i);if(!(u>=0&&f<=0||u<=0&&f>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ot(c.to,n)>=0:ot(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ot(c.from,r)<=0:ot(c.from,r)<0)))return!0}}}function Kt(e){for(var t;t=Rt(e);)e=t.find(-1,!0).line;return e}function Gt(e,t){var n=Ye(e,t),r=Kt(n);return n==r?t:et(r)}function Vt(e,t){if(t>e.lastLine())return t;var n,r=Ye(e,t);if(!qt(e,r))return t;for(;n=Bt(r);)r=n.find(1,!0).line;return et(r)+1}function qt(e,t){var n=Mt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&jt(e,t,r))return!0}}function jt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return jt(e,r.line,Nt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&jt(e,t,i))return!0}function _t(e){for(var t=0,n=(e=Kt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==n)break;t+=a.height}return t}function $t(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Rt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Bt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function Xt(e){var t=e.display,n=e.doc;t.maxLine=Ye(n,n.first),t.maxLineLength=$t(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=$t(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Yt=function(e,t,n){this.text=e,Pt(this,t),this.height=n?n(this):1};function Zt(e){e.parent=null,Ft(e)}Yt.prototype.lineNo=function(){return et(this)},we(Yt);var Qt={},Jt={};function en(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jt:Qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function tn(e,t){var n=D("span",null,null,s?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=rn,Pe(e.display.measure)&&(l=de(o,e.doc.direction))&&(r.addToken=on(r.addToken,l)),r.map=[],an(o,r,mt(e,o,t!=e.display.externalMeasured&&et(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=H(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=H(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Fe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var a=r.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=H(r.pre.className,r.textClass||"")),r}function nn(e){var t=A("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function rn(e,t,n,r,i,o,s){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o="\xa0"),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,f=e.cm.state.specialChars,h=!1;if(f.test(t)){c=document.createDocumentFragment();for(var d=0;;){f.lastIndex=d;var p=f.exec(t),g=p?p.index-d:t.length-d;if(g){var m=document.createTextNode(u.slice(d,d+g));l&&a<9?c.appendChild(A("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(A("span",Z(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((v=c.appendChild(A("span","\r"==p[0]?"\u240d":"\u2424","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&a<9?c.appendChild(A("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),l&&a<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||h||o||s){var x=n||"";r&&(x+=r),i&&(x+=i);var C=A("span",[c],x,o);if(s)for(var w in s)s.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&C.setAttribute(w,s[w]);return e.content.appendChild(C)}e.content.appendChild(c)}}function on(e,t){return function(n,r,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var f=void 0,h=0;h<t.length&&!((f=t[h]).to>c&&f.from<=c);h++);if(f.to>=u)return e(n,r,i,o,l,a,s);e(n,r.slice(0,f.to-c),i,o,null,a,s),o=null,r=r.slice(f.to-c),c=f.to}}}function ln(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function an(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var l,a,s,c,u,f,h,d=i.length,p=0,g=1,m="",v=0;;){if(v==p){s=c=u=a="",h=null,f=null,v=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var C=r[x],w=C.marker;if("bookmark"==w.type&&C.from==p&&w.widgetNode)y.push(w);else if(C.from<=p&&(null==C.to||C.to>p||w.collapsed&&C.to==p&&C.from==p)){if(null!=C.to&&C.to!=p&&v>C.to&&(v=C.to,c=""),w.className&&(s+=" "+w.className),w.css&&(a=(a?a+";":"")+w.css),w.startStyle&&C.from==p&&(u+=" "+w.startStyle),w.endStyle&&C.to==v&&(b||(b=[])).push(w.endStyle,C.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var S in w.attributes)(h||(h={}))[S]=w.attributes[S];w.collapsed&&(!f||It(f.marker,w)<0)&&(f=C)}else C.from>p&&v>C.from&&(v=C.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==v&&(c+=" "+b[k]);if(!f||f.from==p)for(var L=0;L<y.length;++L)ln(t,0,y[L]);if(f&&(f.from||0)==p){if(ln(t,(null==f.to?d+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=d)break;for(var M=Math.min(d,v);;){if(m){var T=p+m.length;if(!f){var N=T>M?m.slice(0,M-p):m;t.addToken(t,N,l?l+s:s,u,p+N.length==v?c:"",a,h)}if(T>=M){m=m.slice(M-p),p=M;break}p=T,u=""}m=i.slice(o,o=n[g++]),l=en(n[g++],t.cm.options)}}else for(var O=1;O<n.length;O+=2)t.addToken(t,i.slice(o,o=n[O]),en(n[O+1],t.cm.options))}function sn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Bt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?et(Q(this.rest))-n+1:1,this.node=this.text=null,this.hidden=qt(e,t)}function cn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var l=new sn(e.doc,Ye(e.doc,o),o);r=o+l.size,i.push(l)}return i}var un=null,fn=null;function hn(e,t){var n=me(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);un?r=un.delayedCallbacks:fn?r=fn:(r=fn=[],setTimeout(dn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},l=0;l<n.length;++l)o(l)}}function dn(){var e=fn;fn=null;for(var t=0;t<e.length;++t)e[t]()}function pn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?vn(e,t):"gutter"==o?bn(e,t,n,r):"class"==o?yn(e,t):"widget"==o&&xn(e,t,r)}t.changes=null}function gn(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&a<8&&(e.node.style.zIndex=2)),e.node}function mn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):tn(e,t)}function vn(e,t){var n=t.text.className,r=mn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,yn(e,t)):n&&(t.text.className=n)}function yn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=gn(t);t.background=r.insertBefore(A("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?gn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function bn(e,t,n,r){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 i=gn(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=gn(t),a=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(a.setAttribute("aria-hidden","true"),e.display.input.setUneditable(a),l.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(A("div",rt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=o.hasOwnProperty(c)&&o[c];u&&a.appendChild(A("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function xn(e,t,n){t.alignable&&(t.alignable=null);for(var r=L("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);wn(e,t,n)}function Cn(e,t,n,r){var i=mn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),yn(e,t),bn(e,t,n,r),wn(e,t,r),t.node}function wn(e,t,n){if(Sn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Sn(e,t.rest[r],t,n,!1)}function Sn(e,t,n,r,i){if(t.widgets)for(var o=gn(n),l=0,a=t.widgets;l<a.length;++l){var s=a[l],c=A("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),kn(s,c,n,r),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),hn(s,"redraw")}}function kn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Ln(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!F(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),O(t.display.measure,A("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Mn(e,t){for(var n=Te(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Tn(e){return e.lineSpace.offsetTop}function Nn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function On(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=O(e.measure,A("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function An(e){return V-e.display.nativeBarWidth}function Dn(e){return e.display.scroller.clientWidth-An(e)-e.display.barWidth}function Fn(e){return e.display.scroller.clientHeight-An(e)-e.display.barHeight}function Pn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(et(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Wn(e,t,n,r){return En(e,In(e,t),n,r)}function Hn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[pr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function In(e,t){var n=et(t),r=Hn(e,n);r&&!r.text?r=null:r&&r.changes&&(pn(e,r,n,cr(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=et(t=Kt(t)),r=e.display.externalMeasured=new sn(e.doc,t,n);r.lineN=n;var i=r.built=tn(e,r);return r.text=i.pre,O(e.display.lineMeasure,i.pre),r}(e,t));var i=Pn(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function En(e,t,n,r,i){t.before&&(n=-1);var o,s=n+(r||"");return t.cache.hasOwnProperty(s)?o=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&Dn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),a=0;a<l.length-1;a++){var s=l[a],c=l[a+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),o=function(e,t,n,r){var i,o=zn(t.map,n,r),s=o.node,c=o.start,u=o.end,f=o.collapse;if(3==s.nodeType){for(var h=0;h<4;h++){for(;c&&ae(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&ae(t.line.text.charAt(o.coverStart+u));)++u;if((i=l&&a<9&&0==c&&u==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():Un(M(s,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,f="right"}l&&a<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Re)return Re;var t=O(e,A("span","x")),n=t.getBoundingClientRect(),r=M(t,0,1).getBoundingClientRect();return Re=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var d;c>0&&(f=r="right"),i=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==r?d.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!c&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+sr(e.display),top:p.top,bottom:p.bottom}:Bn}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var x=b?y[b-1]:0,C=y[b],w={left:("right"==f?i.right:i.left)-t.rect.left,right:("left"==f?i.left:i.right)-t.rect.left,top:x,bottom:C};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=g,w.rbottom=m),w}(e,t,n,r),o.bogus||(t.cache[s]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Rn,Bn={left:0,right:0,top:0,bottom:0};function zn(e,t,n){for(var r,i,o,l,a,s,c=0;c<e.length;c+=3)if(a=e[c],s=e[c+1],t<a?(i=0,o=1,l="left"):t<s?o=1+(i=t-a):(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-a)-1,t>=s&&(l="right")),null!=i){if(r=e[c+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],l="left";if("right"==n&&i==s-a)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],l="right";break}return{node:r,start:i,end:o,collapse:l,coverStart:a,coverEnd:s}}function Un(e,t){var n=Bn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Kn(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 Gn(e){e.display.externalMeasure=null,N(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Kn(e.display.view[t])}function Vn(e){Gn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function qn(e){return u&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function jn(e){return u&&v?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function _n(e){var t=Kt(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Ln(t[r]));return n}function $n(e,t,n,r,i){if(!i){var o=_n(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var l=_t(t);if("local"==r?l+=Tn(e.display):l-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();l+=a.top+("window"==r?0:jn(E(e)));var s=a.left+("window"==r?0:qn(E(e)));n.left+=s,n.right+=s}return n.top+=l,n.bottom+=l,n}function Xn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=qn(E(e)),i-=jn(E(e));else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:r-l.left,top:i-l.top}}function Yn(e,t,n,r,i){return r||(r=Ye(e.doc,t.line)),$n(e,r,Wn(e,r,t.ch,i),n)}function Zn(e,t,n,r,i,o){function l(t,l){var a=En(e,i,t,l?"right":"left",o);return l?a.left=a.right:a.right=a.left,$n(e,r,a,n)}r=r||Ye(e.doc,t.line),i||(i=In(e,r));var a=de(r,e.doc.direction),s=t.ch,c=t.sticky;if(s>=r.text.length?(s=r.text.length,c="before"):s<=0&&(s=0,c="after"),!a)return l("before"==c?s-1:s,"before"==c);function u(e,t,n){return l(n?e-1:e,1==a[t].level!=n)}var f=fe(a,s,c),h=ue,d=u(s,f,"before"==c);return null!=h&&(d.other=u(s,h,"before"!=c)),d}function Qn(e,t){var n=0;t=ft(e.doc,t),e.options.lineWrapping||(n=sr(e.display)*t.ch);var r=Ye(e.doc,t.line),i=_t(r)+Tn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Jn(e,t,n,r,i){var o=it(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function er(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Jn(r.first,0,null,-1,-1);var i=tt(r,n),o=r.first+r.size-1;if(i>o)return Jn(r.first+r.size-1,Ye(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=Ye(r,i);;){var a=ir(e,l,i,t,n),s=zt(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var c=s.find(1);if(c.line==i)return c;l=Ye(r,i=c.line)}}function tr(e,t,n,r){r-=_n(t);var i=t.text.length,o=ce((function(t){return En(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=ce((function(t){return En(e,n,t).top>r}),o,i)}}function nr(e,t,n,r){return n||(n=In(e,t)),tr(e,t,n,$n(e,t,En(e,n,r),"line").top)}function rr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function ir(e,t,n,r,i){i-=_t(t);var o=In(e,t),l=_n(t),a=0,s=t.text.length,c=!0,u=de(t,e.doc.direction);if(u){var f=(e.options.lineWrapping?lr:or)(e,t,n,o,u,r,i);a=(c=1!=f.level)?f.from:f.to-1,s=c?f.to:f.from-1}var h,d,p=null,g=null,m=ce((function(t){var n=En(e,o,t);return n.top+=l,n.bottom+=l,!!rr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)}),a,s),v=!1;if(g){var y=r-g.left<g.right-r,b=y==c;m=p+(b?0:1),d=b?"after":"before",h=y?g.left:g.right}else{c||m!=s&&m!=a||m++,d=0==m?"after":m==t.text.length?"before":En(e,o,m-(c?1:0)).bottom+l<=i==c?"after":"before";var x=Zn(e,it(n,m,d),"line",t,o);h=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return Jn(n,m=se(t.text,m,1),d,v,r-h)}function or(e,t,n,r,i,o,l){var a=ce((function(a){var s=i[a],c=1!=s.level;return rr(Zn(e,it(n,c?s.to:s.from,c?"before":"after"),"line",t,r),o,l,!0)}),0,i.length-1),s=i[a];if(a>0){var c=1!=s.level,u=Zn(e,it(n,c?s.from:s.to,c?"after":"before"),"line",t,r);rr(u,o,l,!0)&&u.top>l&&(s=i[a-1])}return s}function lr(e,t,n,r,i,o,l){var a=tr(e,t,r,l),s=a.begin,c=a.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,f=null,h=0;h<i.length;h++){var d=i[h];if(!(d.from>=c||d.to<=s)){var p=En(e,r,1!=d.level?Math.min(c,d.to)-1:Math.max(s,d.from)).right,g=p<o?o-p+1e9:p-o;(!u||f>g)&&(u=d,f=g)}}return u||(u=i[i.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function ar(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Rn){Rn=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Rn.appendChild(document.createTextNode("x")),Rn.appendChild(A("br"));Rn.appendChild(document.createTextNode("x"))}O(e.measure,Rn);var n=Rn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),N(e.measure),n||1}function sr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");O(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function cr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:ur(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ur(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function fr(e){var t=ar(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/sr(e.display)-3);return function(i){if(qt(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 n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function hr(e){var t=e.doc,n=fr(e);t.iter((function(e){var t=n(e);t!=e.height&&Je(e,t)}))}function dr(e,t,n,r){var i=e.display;if(!n&&"true"==Te(t).getAttribute("cm-not-content"))return null;var o,l,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,l=t.clientY-a.top}catch(e){return null}var s,c=er(e,o,l);if(r&&c.xRel>0&&(s=Ye(e.doc,c.line).text).length==c.ch){var u=U(s,s.length,e.options.tabSize)-s.length;c=it(c.line,Math.max(0,Math.round((o-On(e.display).left)/sr(e.display))-u))}return c}function pr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function gr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Mt&&Gt(e.doc,t)<i.viewTo&&vr(e);else if(n<=i.viewFrom)Mt&&Vt(e.doc,n+r)>i.viewFrom?vr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)vr(e);else if(t<=i.viewFrom){var o=yr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):vr(e)}else if(n>=i.viewTo){var l=yr(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):vr(e)}else{var a=yr(e,t,t,-1),s=yr(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(cn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):vr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function mr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[pr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==G(l,n)&&l.push(n)}}}function vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function yr(e,t,n,r){var i,o=pr(e,t),l=e.display.view;if(!Mt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,s=0;s<o;s++)a+=l[s].size;if(a!=t){if(r>0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,n+=i}for(;Gt(e.doc,n)!=n;){if(o==(r<0?0:l.length-1))return null;n+=r*l[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function br(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function xr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Cr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),l=e.options.$customCursor;l&&(t=!0);for(var a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var c=s.empty();if(l){var u=l(e,s);u&&wr(e,u,i)}else(c||e.options.showCursorWhenSelecting)&&wr(e,s.head,i);c||kr(e,s,o)}}return r}function wr(e,t,n){var r=Zn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(A("div","\xa0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=Yn(e,t,"div",null,null),l=o.right-o.left;i.style.width=(l>0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(A("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Sr(e,t){return e.top-t.top||e.left-t.left}function kr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=On(e.display),a=l.left,s=Math.max(r.sizerWidth,Dn(e)-r.sizer.offsetLeft)-l.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function f(t,n,r){var o,l,f=Ye(i,t),h=f.text.length;function d(n,r){return Yn(e,it(t,n),"div",f,r)}function p(t,n,r){var i=nr(e,f,null,t),o="ltr"==n==("after"==r)?"left":"right";return d("after"==r?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=de(f,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),1==l.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(g,n||0,null==r?h:r,(function(e,t,i,f){var m="ltr"==i,v=d(e,m?"left":"right"),y=d(t-1,m?"right":"left"),b=null==n&&0==e,x=null==r&&t==h,C=0==f,w=!g||f==g.length-1;if(y.top-v.top<=3){var S=(c?x:b)&&w,k=(c?b:x)&&C?a:(m?v:y).left,L=S?s:(m?y:v).right;u(k,v.top,L-k,v.bottom)}else{var M,T,N,O;m?(M=c&&b&&C?a:v.left,T=c?s:p(e,i,"before"),N=c?a:p(t,i,"after"),O=c&&x&&w?s:y.right):(M=c?p(e,i,"before"):a,T=!c&&b&&C?s:v.right,N=!c&&x&&w?a:y.left,O=c?p(t,i,"after"):s),u(M,v.top,T-M,v.bottom),v.bottom<y.top&&u(a,v.bottom,null,y.top),u(N,y.top,O-N,y.bottom)}(!o||Sr(v,o)<0)&&(o=v),Sr(y,o)<0&&(o=y),(!l||Sr(v,l)<0)&&(l=v),Sr(y,l)<0&&(l=y)})),{start:o,end:l}}var h=t.from(),d=t.to();if(h.line==d.line)f(h.line,h.ch,d.ch);else{var p=Ye(i,h.line),g=Ye(i,d.line),m=Kt(p)==Kt(g),v=f(h.line,h.ch,m?p.text.length+1:null).end,y=f(d.line,m?0:null,d.ch).start;m&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(a,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(a,v.bottom,null,y.top)}n.appendChild(o)}function Lr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Or(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Mr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Nr(e))}function Tr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Or(e))}),100)}function Nr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,W(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Lr(e))}function Or(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Ar(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s<t.view.length;s++){var c=t.view[s],u=e.options.lineWrapping,f=void 0,h=0;if(!c.hidden){if(i+=c.line.height,l&&a<8){var d=c.node.offsetTop+c.node.offsetHeight;f=d-n,n=d}else{var p=c.node.getBoundingClientRect();f=p.bottom-p.top,!u&&c.text.firstChild&&(h=c.text.firstChild.getBoundingClientRect().right-p.left-1)}var g=c.line.height-f;if((g>.005||g<-.005)&&(i<r&&(o-=g),Je(c.line,f),Dr(c.line),c.rest))for(var m=0;m<c.rest.length;m++)Dr(c.rest[m]);if(h>e.display.sizerWidth){var v=Math.ceil(h/sr(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Dr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Fr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Tn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=tt(t,r),l=tt(t,i);if(n&&n.ensure){var a=n.ensure.from.line,s=n.ensure.to.line;a<o?(o=a,l=tt(t,_t(Ye(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=tt(t,_t(Ye(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function Pr(e,t){var n=e.display,r=ar(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Fn(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Nn(n),s=t.top<r,c=t.bottom>a-r;if(t.top<i)l.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?a:t.bottom)-o);u!=i&&(l.scrollTop=u)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,d=Dn(e)-n.gutters.offsetWidth,p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?l.scrollLeft=0:t.left<h?l.scrollLeft=Math.max(0,t.left+f-(p?0:10)):t.right>d+h-3&&(l.scrollLeft=t.right+(p?0:10)-d),l}function Wr(e,t){null!=t&&(Er(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Hr(e){Er(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ir(e,t,n){null==t&&null==n||Er(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Er(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Rr(e,Qn(e,t.from),Qn(e,t.to),t.margin))}function Rr(e,t,n,r){var i=Pr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ir(e,i.scrollLeft,i.scrollTop)}function Br(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||di(e,{top:t}),zr(e,t,!0),n&&di(e),ai(e,100))}function zr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Ur(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,mi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Kr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Nn(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?n:0,docHeight:r,scrollHeight:r+An(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Gr=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ge(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),ge(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Gr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r: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==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Gr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Gr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Gr.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},Gr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,r)}))},Gr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Vr=function(){};function qr(e,t){t||(t=Kr(e));var n=e.display.barWidth,r=e.display.barHeight;jr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Ar(e),jr(e,Kr(e)),n=e.display.barWidth,r=e.display.barHeight}function jr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Vr.prototype.update=function(){return{bottom:0,right:0}},Vr.prototype.setScrollLeft=function(){},Vr.prototype.setScrollTop=function(){},Vr.prototype.clear=function(){};var _r={native:Gr,null:Vr};function $r(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new _r[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ge(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Ur(e,t):Br(e,t)}),e),e.display.scrollbars.addClass&&W(e.display.wrapper,e.display.scrollbars.addClass)}var Xr=0;function Yr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Xr,markArrays:null},t=e.curOp,un?un.ops.push(t):t.ownsGroup=un={ops:[t],delayedCallbacks:[]}}function Zr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{un=null,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Qr(t[n]);for(var r=0;r<t.length;r++)Jr(t[r]);for(var i=0;i<t.length;i++)ei(t[i]);for(var o=0;o<t.length;o++)ti(t[o]);for(var l=0;l<t.length;l++)ni(t[l])}(e)}(n)}}(t)}function Qr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=An(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=An(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Xt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ci(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Jr(e){e.updatedDisplay=e.mustUpdate&&fi(e.cm,e.update)}function ei(e){var t=e.cm,n=t.display;e.updatedDisplay&&Ar(t),e.barMeasure=Kr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Wn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+An(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Dn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ti(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ur(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==P(E(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&qr(t,e.barMeasure),e.updatedDisplay&&gi(t,e.barMeasure),e.selectionChanged&&Lr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Mr(e.cm)}function ni(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&hi(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&zr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Ur(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=Zn(e,t),s=n&&n!=t?Zn(e,n):a,c=Pr(e,i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r}),u=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=c.scrollTop&&(Br(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(l=!0)),null!=c.scrollLeft&&(Ur(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}(t,ft(r,e.scrollToPos.from),ft(r,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!be(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var l=A("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Tn(e.display))+"px;\n height: "+(t.bottom-t.top+An(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}(t,i)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||ye(o[a],"hide");if(l)for(var s=0;s<l.length;++s)l[s].lines.length&&ye(l[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function ri(e,t){if(e.curOp)return t();Yr(e);try{return t()}finally{Zr(e)}}function ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Yr(e);try{return t.apply(e,arguments)}finally{Zr(e)}}}function oi(e){return function(){if(this.curOp)return e.apply(this,arguments);Yr(this);try{return e.apply(this,arguments)}finally{Zr(this)}}}function li(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Yr(t);try{return e.apply(this,arguments)}finally{Zr(t)}}}function ai(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(si,e))}function si(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=vt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?je(t.mode,r.state):null,s=gt(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!f&&h<l.length;++h)f=l[h]!=o.styles[h];f&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&yt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ai(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&ri(e,(function(){for(var t=0;t<i.length;t++)mr(e,i[t],"text")}))}}var ci=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Fr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Dn(e),this.force=n,this.dims=cr(e),this.events=[]};function ui(e){if(e.hasFocus())return null;var t=P(E(e));if(!t||!F(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=R(e).getSelection();r.anchorNode&&r.extend&&F(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function fi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return vr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==br(e))return!1;vi(e)&&(vr(e),t.dims=cr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),Mt&&(o=Gt(e.doc,o),l=Vt(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=cn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=cn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(pr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(cn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,pr(e,n)))),r.viewTo=n}(e,o,l),n.viewOffset=_t(Ye(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=br(e);if(!a&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=ui(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(t){var n=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,f=0;f<c.length;f++){var h=c[f];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;l!=h.node;)l=a(l);var d=i&&null!=t&&t<=u&&h.lineNumber;h.changes&&(G(h.changes,"gutter")>-1&&(d=!1),pn(e,h,u,n)),d&&(N(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(rt(e.options,u)))),l=h.node.nextSibling}else{var p=Cn(e,h,u,n);o.insertBefore(p,l)}u+=h.size}for(;l;)l=a(l)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=P(e.activeElt.ownerDocument)&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&F(document.body,e.anchorNode)&&F(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ai(e,400)),n.updateLineNumbers=null,!0}function hi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Dn(e))r&&(t.visible=Fr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Nn(e.display)-Fn(e),n.top)}),t.visible=Fr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!fi(e,t))break;Ar(e);var i=Kr(e);xr(e),qr(e,i),gi(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 di(e,t){var n=new ci(e,t);if(fi(e,n)){Ar(e),hi(e,n);var r=Kr(e);xr(e),qr(e,r),gi(e,r),n.finish()}}function pi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",hn(e,"gutterChanged",e)}function gi(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+An(e)+"px"}function mi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ur(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l<n.length;l++)if(!n[l].hidden){e.options.fixedGutter&&(n[l].gutter&&(n[l].gutter.style.left=o),n[l].gutterBackground&&(n[l].gutterBackground.style.left=o));var a=n[l].alignable;if(a)for(var s=0;s<a.length;s++)a[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function vi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=rt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(A("div",[A("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-l)+1,r.lineNumWidth=r.lineNumInnerWidth+l,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",pi(e.display),!0}return!1}function yi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],l=null;if("string"!=typeof o&&(l=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:l})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function bi(e){var t=e.gutters,n=e.gutterSpecs;N(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,l=i.style,a=t.appendChild(A("div",null,"CodeMirror-gutter "+o));l&&(a.style.cssText=l),"CodeMirror-linenumbers"==o&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",pi(e)}function xi(e){bi(e.display),gr(e),mi(e)}function Ci(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=D("div",null,"CodeMirror-code"),o.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=A("div",null,"CodeMirror-cursors"),o.measure=A("div",null,"CodeMirror-measure"),o.lineMeasure=A("div",null,"CodeMirror-measure"),o.lineSpace=D("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=D("div",[o.lineSpace],"CodeMirror-lines");o.mover=A("div",[c],null,"position: relative"),o.sizer=A("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=A("div",null,null,"position: absolute; height: "+V+"px; width: 1px;"),o.gutters=A("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),u&&f>=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),l&&a<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),s||n&&y||(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,o.gutterSpecs=yi(i.gutters,i.lineNumbers),bi(o),r.init(o)}ci.prototype.signal=function(e,t){Ce(e,t)&&this.events.push(arguments)},ci.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};var wi=0,Si=null;function ki(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Li(e){var t=ki(e);return t.x*=Si,t.y*=Si,t}function Mi(e,t){u&&102==f&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var r=ki(t),i=r.x,o=r.y,l=Si;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,l=1);var a=e.display,c=a.scroller,d=c.scrollWidth>c.clientWidth,p=c.scrollHeight>c.clientHeight;if(i&&d||o&&p){if(o&&b&&s)e:for(var g=t.target,m=a.view;g!=c;g=g.parentNode)for(var v=0;v<m.length;v++)if(m[v].node==g){e.display.currentWheelTarget=g;break e}if(i&&!n&&!h&&null!=l)return o&&p&&Br(e,Math.max(0,c.scrollTop+o*l)),Ur(e,Math.max(0,c.scrollLeft+i*l)),(!o||o&&p)&&Se(t),void(a.wheelStartX=null);if(o&&null!=l){var y=o*l,x=e.doc.scrollTop,C=x+a.wrapper.clientHeight;y<0?x=Math.max(0,x+y-50):C=Math.min(e.doc.height,C+y+50),di(e,{top:x,bottom:C})}wi<20&&0!==t.deltaMode&&(null==a.wheelStartX?(a.wheelStartX=c.scrollLeft,a.wheelStartY=c.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=c.scrollLeft-a.wheelStartX,t=c.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(Si=(Si*wi+n)/(wi+1),++wi)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}l?Si=-.53:n?Si=15:u?Si=-.7:d&&(Si=-1/3);var Ti=function(e,t){this.ranges=e,this.primIndex=t};Ti.prototype.primary=function(){return this.ranges[this.primIndex]},Ti.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!lt(n.anchor,r.anchor)||!lt(n.head,r.head))return!1}return!0},Ti.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ni(at(this.ranges[t].anchor),at(this.ranges[t].head));return new Ti(e,this.primIndex)},Ti.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ti.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ot(t,r.from())>=0&&ot(e,r.to())<=0)return n}return-1};var Ni=function(e,t){this.anchor=e,this.head=t};function Oi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return ot(e.from(),t.from())})),n=G(t,i);for(var o=1;o<t.length;o++){var l=t[o],a=t[o-1],s=ot(a.to(),l.from());if(r&&!l.empty()?s>0:s>=0){var c=ct(a.from(),l.from()),u=st(a.to(),l.to()),f=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new Ni(f?u:c,f?c:u))}}return new Ti(t,n)}function Ai(e,t){return new Ti([new Ni(e,t||e)],0)}function Di(e){return e.text?it(e.from.line+e.text.length-1,Q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Fi(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return Di(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Di(t).ch-t.to.ch),it(n,r)}function Pi(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Ni(Fi(i.anchor,t),Fi(i.head,t)))}return Oi(e.cm,n,e.sel.primIndex)}function Wi(e,t,n){return e.line==t.line?it(n.line,e.ch-t.ch+n.ch):it(n.line+(e.line-t.line),e.ch)}function Hi(e){e.doc.mode=Ge(e.options,e.doc.modeOption),Ii(e)}function Ii(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ai(e,100),e.state.modeGen++,e.curOp&&gr(e)}function Ei(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ri(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ft(e),Pt(e,n);var i=r?r(e):1;i!=e.height&&Je(e,i)}(e,n,i,r),hn(e,"change",e,t)}function l(e,t){for(var n=[],o=e;o<t;++o)n.push(new Yt(c[o],i(o),r));return n}var a=t.from,s=t.to,c=t.text,u=Ye(e,a.line),f=Ye(e,s.line),h=Q(c),d=i(c.length-1),p=s.line-a.line;if(t.full)e.insert(0,l(0,c.length)),e.remove(c.length,e.size-c.length);else if(Ei(e,t)){var g=l(0,c.length-1);o(f,f.text,d),p&&e.remove(a.line,p),g.length&&e.insert(a.line,g)}else if(u==f)if(1==c.length)o(u,u.text.slice(0,a.ch)+h+u.text.slice(s.ch),d);else{var m=l(1,c.length-1);m.push(new Yt(h+u.text.slice(s.ch),d,r)),o(u,u.text.slice(0,a.ch)+c[0],i(0)),e.insert(a.line+1,m)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+f.text.slice(s.ch),i(0)),e.remove(a.line+1,p);else{o(u,u.text.slice(0,a.ch)+c[0],i(0)),o(f,h+f.text.slice(s.ch),d);var v=l(1,c.length-1);p>1&&e.remove(a.line+1,p-1),e.insert(a.line+1,v)}hn(e,"change",e,t)}function Bi(e,t,n){!function e(r,i,o){if(r.linked)for(var l=0;l<r.linked.length;++l){var a=r.linked[l];if(a.doc!=i){var s=o&&a.sharedHist;n&&!s||(t(a.doc,s),e(a.doc,r,s))}}}(e,null,!0)}function zi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,hr(e),Hi(e),Ui(e),e.options.direction=t.direction,e.options.lineWrapping||Xt(e),e.options.mode=t.modeOption,gr(e)}function Ui(e){("rtl"==e.doc.direction?W:T)(e.display.lineDiv,"CodeMirror-rtl")}function Ki(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Gi(e,t){var n={from:at(t.from),to:Di(t),text:Ze(e,t.from,t.to)};return _i(e,n,t.from.line,t.to.line+1),Bi(e,(function(e){return _i(e,n,t.from.line,t.to.line+1)}),!0),n}function Vi(e){for(;e.length&&Q(e).ranges;)e.pop()}function qi(e,t,n,r){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Vi(e.done),Q(e.done)):e.done.length&&!Q(e.done).ranges?Q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Q(e.done)):void 0}(i,i.lastOp==r)))l=Q(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,l.to)?l.to=Di(t):o.changes.push(Gi(e,t));else{var s=Q(i.done);for(s&&s.ranges||ji(e.sel,i.done),o={changes:[Gi(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(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||ye(e,"historyAdded")}function ji(e,t){var n=Q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function _i(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function $i(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Xi(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push($i(n[i]));return r}(e,t),r=At(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],l=r[i];if(o&&l)e:for(var a=0;a<l.length;++a){for(var s=l[a],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else l&&(n[i]=l)}return n}function Yi(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Ti.prototype.deepCopy.call(o):o);else{var l=o.changes,a=[];r.push({changes:a});for(var s=0;s<l.length;++s){var c=l[s],u=void 0;if(a.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&G(t,Number(u[1]))>-1&&(Q(a)[f]=c[f],delete c[f])}}}return r}function Zi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ot(t,i)<0;o!=ot(n,i)<0?(i=t,t=n):o!=ot(t,n)<0&&(t=n)}return new Ni(i,t)}return new Ni(n||t,t)}function Qi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),ro(e,new Ti([Zi(e.sel.primary(),t,n,i)],0),r)}function Ji(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Zi(e.sel.ranges[o],t[o],null,i);ro(e,Oi(e.cm,r,e.sel.primIndex),n)}function eo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,ro(e,Oi(e.cm,i,e.sel.primIndex),r)}function to(e,t,n,r){ro(e,Ai(t,n),r)}function no(e,t,n){var r=e.history.done,i=Q(r);i&&i.ranges?(r[r.length-1]=t,io(e,t,n)):ro(e,t,n)}function ro(e,t,n){io(e,t,n),function(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Q(i.done),t))?i.done[i.done.length-1]=t:ji(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Vi(i.undone)}(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function io(e,t,n){(Ce(e,"beforeSelectionChange")||e.cm&&Ce(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Ni(ft(e,t[n].anchor),ft(e,t[n].head))},origin:n&&n.origin};return ye(e,"beforeSelectionChange",e,r),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Oi(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(ot(t.primary().head,e.sel.primary().head)<0?-1:1);oo(e,ao(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Hr(e.cm)}function oo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,xe(e.cm)),hn(e,"cursorActivity",e))}function lo(e){oo(e,ao(e,e.sel,null,!1))}function ao(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=co(e,l.anchor,a&&a.anchor,n,r),c=l.head==l.anchor?s:co(e,l.head,a&&a.head,n,r);(i||s!=l.anchor||c!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Ni(s,c))}return i?Oi(e.cm,i,t.primIndex):t}function so(e,t,n,r,i){var o=Ye(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var a=o.markedSpans[l],s=a.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==a.from||(c?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(u?a.to>=t.ch:a.to>t.ch))){if(i&&(ye(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(n){var f=s.find(r<0?1:-1),h=void 0;if((r<0?u:c)&&(f=uo(e,f,-r,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(h=ot(f,n))&&(r<0?h<0:h>0))return so(e,f,t,r,i)}var d=s.find(r<0?-1:1);return(r<0?c:u)&&(d=uo(e,d,r,d.line==t.line?o:null)),d?so(e,d,t,r,i):null}}return t}function co(e,t,n,r,i){var o=r||1;return so(e,t,n,o,i)||!i&&so(e,t,n,o,!0)||so(e,t,n,-o,i)||!i&&so(e,t,n,-o,!0)||(e.cantEdit=!0,it(e.first,0))}function uo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ft(e,it(t.line-1)):null:n>0&&t.ch==(r||Ye(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+n)}function fo(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),j)}function ho(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=ft(e,t)),n&&(r.to=ft(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),ye(e,"beforeChange",e,r),e.cm&&ye(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function po(e,t,n){if(e.cm){if(!e.cm.curOp)return ii(e.cm,po)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Ce(e,"beforeChange")||e.cm&&Ce(e.cm,"beforeChange"))||(t=ho(e,t,!0))){var r=Lt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=G(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var l=r[o],a=l.find(0),s=0;s<i.length;++s){var c=i[s];if(!(ot(c.to,a.from)<0||ot(c.from,a.to)>0)){var u=[s,1],f=ot(c.from,a.from),h=ot(c.to,a.to);(f<0||!l.inclusiveLeft&&!f)&&u.push({from:c.from,to:a.from}),(h>0||!l.inclusiveRight&&!h)&&u.push({from:a.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)go(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else go(e,t)}}function go(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var n=Pi(e,t);qi(e,t,n,e.cm?e.cm.curOp.id:NaN),yo(e,t,n,At(e,t));var r=[];Bi(e,(function(e,n){n||-1!=G(r,e.history)||(wo(e.history,t),r.push(e.history)),yo(e,t,null,At(e,t))}))}}function mo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,c=0;c<a.length&&(i=a[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=a.pop()).ranges){if(r)return void a.push(i);break}if(ji(i,s),n&&!i.equals(e.sel))return void ro(e,i,{clearRedo:!1});l=i}var u=[];ji(l,s),s.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var f=Ce(e,"beforeChange")||e.cm&&Ce(e.cm,"beforeChange"),h=function(n){var r=i.changes[n];if(r.origin=t,f&&!ho(e,r,!1))return a.length=0,{};u.push(Gi(e,r));var o=n?Pi(e,r):Q(a);yo(e,r,o,Xi(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Di(r)});var l=[];Bi(e,(function(e,t){t||-1!=G(l,e.history)||(wo(e.history,r),l.push(e.history)),yo(e,r,null,Xi(e,r))}))},d=i.changes.length-1;d>=0;--d){var p=h(d);if(p)return p.v}}}}function vo(e,t){if(0!=t&&(e.first+=t,e.sel=new Ti(J(e.sel.ranges,(function(e){return new Ni(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){gr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)mr(e.cm,r,"gutter")}}function yo(e,t,n,r){if(e.cm&&!e.cm.curOp)return ii(e.cm,yo)(e,t,n,r);if(t.to.line<e.first)vo(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);vo(e,i),t={from:it(e.first,0),to:it(t.to.line+i,t.to.ch),text:[Q(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,Ye(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ze(e,t.from,t.to),n||(n=Pi(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=et(Kt(Ye(r,o.line))),r.iter(s,l.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&xe(e),Ri(r,t,n,fr(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,(function(e){var t=$t(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Ye(e,r).stateAfter;if(i&&(!(i instanceof dt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,o.line),ai(e,400);var c=t.text.length-(l.line-o.line)-1;t.full?gr(e):o.line!=l.line||1!=t.text.length||Ei(e.doc,t)?gr(e,o.line,l.line+1,c):mr(e,o.line,"text");var u=Ce(e,"changes"),f=Ce(e,"change");if(f||u){var h={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&hn(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}(e.cm,t,r):Ri(e,t,r),io(e,n,j),e.cantEdit&&co(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function bo(e,t,n,r,i){var o;r||(r=n),ot(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),po(e,{from:n,to:r,text:t,origin:i})}function xo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Co(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)xo(o.ranges[a].anchor,t,n,r),xo(o.ranges[a].head,t,n,r)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(n<c.from.line)c.from=it(c.from.line+r,c.from.ch),c.to=it(c.to.line+r,c.to.ch);else if(t<=c.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function wo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Co(e.done,n,r,i),Co(e.undone,n,r,i)}function So(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Ye(e,ut(e,t)):i=et(t),null==i?null:(r(o,i)&&e.cm&&mr(e.cm,i,n),o)}function ko(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function Lo(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Ni.prototype.from=function(){return ct(this.anchor,this.head)},Ni.prototype.to=function(){return st(this.anchor,this.head)},Ni.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ko.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Zt(i),hn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},Lo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),l=r.height;if(r.removeInner(e,o),this.height-=l-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ko))){var a=[];this.collapse(a),this.children=[new ko(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,a=l;a<i.lines.length;){var s=new ko(i.lines.slice(a,a+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Lo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=G(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new Lo(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,n))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var Mo=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function To(e,t,n){_t(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Wr(e,n)}Mo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=et(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Ln(this);Je(n,Math.max(0,n.height-o)),e&&(ri(e,(function(){To(e,n,-o),mr(e,r,"widget")})),hn(e,"lineWidgetCleared",e,this,r))}},Mo.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Ln(this)-t;i&&(qt(this.doc,r)||Je(r,r.height+i),n&&ri(n,(function(){n.curOp.forceUpdate=!0,To(n,r,i),hn(n,"lineWidgetChanged",n,e,et(r))})))},we(Mo);var No=0,Oo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++No};function Ao(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=z(r)).shared=!1;var o=[Ao(e,t,n,r,i)],l=o[0],a=r.widgetNode;return Bi(e,(function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(Ao(e,ft(e,t),ft(e,n),r,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;l=Q(o)})),new Do(o,l)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ii(e.cm,Ao)(e,t,n,r,i);var o=new Oo(e,i),l=ot(t,n);if(r&&z(r,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ut(e,t.line,t,n,o)||t.line!=n.line&&Ut(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Mt=!0}o.addToHistory&&qi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,s=t.line,c=e.cm;if(e.iter(s,n.line+1,(function(r){c&&o.collapsed&&!c.options.lineWrapping&&Kt(r)==c.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&Je(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new Tt(o,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){qt(e,t)&&Je(t,0)})),o.clearOnEnter&&ge(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Lt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++No,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)gr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)mr(c,u,"text");o.atomic&&lo(c.doc),hn(c,"markerAdded",c,o)}return o}Oo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Yr(e),Ce(this,"clear")){var n=this.find();n&&hn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],a=Nt(l.markedSpans,this);e&&!this.collapsed?mr(e,et(l),"text"):e&&(null!=a.to&&(i=et(l)),null!=a.from&&(r=et(l))),l.markedSpans=Ot(l.markedSpans,a),null==a.from&&this.collapsed&&!qt(this.doc,l)&&e&&Je(l,ar(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Kt(this.lines[s]),u=$t(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&gr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&lo(e.doc)),e&&hn(e,"markerCleared",e,this,r,i),t&&Zr(e),this.parent&&this.parent.clear()}},Oo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=Nt(o.markedSpans,this);if(null!=l.from&&(n=it(t?o:et(o),l.from),-1==e))return n;if(null!=l.to&&(r=it(t?o:et(o),l.to),1==e))return r}return n&&{from:n,to:r}},Oo.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&ri(r,(function(){var i=t.line,o=et(t.line),l=Hn(r,o);if(l&&(Kn(l),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!qt(n.doc,i)&&null!=n.height){var a=n.height;n.height=null;var s=Ln(n)-a;s&&Je(i,i.height+s)}hn(r,"markerChanged",r,e)}))},Oo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=G(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Oo.prototype.detachLine=function(e){if(this.lines.splice(G(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},we(Oo);var Do=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Fo(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function Po(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Bi(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==G(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Do.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();hn(this,"clear")}},Do.prototype.find=function(e,t){return this.primary.find(e,t)},we(Do);var Wo=0,Ho=function(e,t,n,r,i){if(!(this instanceof Ho))return new Ho(e,t,n,r,i);null==n&&(n=0),Lo.call(this,[new ko([new Yt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=it(n,0);this.sel=Ai(o),this.history=new Ki(null),this.id=++Wo,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ri(this,{from:o,to:o,text:e}),ro(this,Ai(o),j)};Ho.prototype=te(Lo.prototype,{constructor:Ho,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Qe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:li((function(e){var t=it(this.first,0),n=this.first+this.size-1;po(this,{from:t,to:it(n,Ye(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ir(this.cm,0,0),ro(this,Ai(t),j)})),replaceRange:function(e,t,n,r){bo(this,e,t=ft(this,t),n=n?ft(this,n):t,r)},getRange:function(e,t,n){var r=Ze(this,ft(this,e),ft(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(nt(this,e))return Ye(this,e)},getLineNumber:function(e){return et(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ye(this,e)),Kt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ft(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:li((function(e,t,n){to(this,ft(this,"number"==typeof e?it(e,t||0):e),null,n)})),setSelection:li((function(e,t,n){to(this,ft(this,e),ft(this,t||e),n)})),extendSelection:li((function(e,t,n){Qi(this,ft(this,e),t&&ft(this,t),n)})),extendSelections:li((function(e,t){Ji(this,ht(this,e),t)})),extendSelectionsBy:li((function(e,t){Ji(this,ht(this,J(this.sel.ranges,e)),t)})),setSelections:li((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Ni(ft(this,e[i].anchor),ft(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),ro(this,Oi(this.cm,r,t),n)}})),addSelection:li((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Ni(ft(this,e),ft(this,t||e))),ro(this,Oi(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Ze(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Ze(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:li((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];r[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&"end"!=t&&function(e,t,n){for(var r=[],i=it(e.first,0),o=i,l=0;l<t.length;l++){var a=t[l],s=Wi(a.from,i,o),c=Wi(Di(a),i,o);if(i=a.to,o=c,"around"==n){var u=e.sel.ranges[l],f=ot(u.head,u.anchor)<0;r[l]=new Ni(f?c:s,f?s:c)}else r[l]=new Ni(s,s)}return new Ti(r,e.sel.primIndex)}(this,r,t),s=r.length-1;s>=0;s--)po(this,r[s]);a?no(this,a):this.cm&&Hr(this.cm)})),undo:li((function(){mo(this,"undo")})),redo:li((function(){mo(this,"redo")})),undoSelection:li((function(){mo(this,"undo",!0)})),redoSelection:li((function(){mo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Ki(this.history),Bi(this,(function(t){return t.history=e.history}),!0)},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:Yi(this.history.done),undone:Yi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ki(this.history);t.done=Yi(e.done.slice(0),null,!0),t.undone=Yi(e.undone.slice(0),null,!0)},setGutterMarker:li((function(e,t,n){return So(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&oe(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:li((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&So(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,oe(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!nt(this,e))return null;if(t=e,!(e=Ye(this,e)))return null}else if(null==(t=et(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:li((function(e,t,n){return So(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(L(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:li((function(e,t,n){return So(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(L(n));if(!o)return!1;var l=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0}))})),addLineWidget:li((function(e,t,n){return function(e,t,n,r){var i=new Mo(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),So(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!qt(e,t)){var r=_t(t)<e.scrollTop;Je(t,t.height+Ln(i)),r&&Wr(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&hn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:et(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Ao(this,ft(this,e),ft(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Ao(this,e=ft(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ye(this,(e=ft(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(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,n){e=ft(this,e),t=ft(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var a=0;a<l.length;a++){var s=l[a];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),ft(this,it(n,t))},indexFromPos:function(e){var t=(e=ft(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ho(Qe(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,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ho(Qe(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(ot(o,l)){var a=Ao(e,o,l,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}(r,Fo(this)),r},unlinkDoc:function(e){if(e instanceof Al&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Po(Fo(this));break}if(e.history==this.history){var n=[e.id];Bi(e,(function(e){return n.push(e.id)}),!0),e.history=new Ki(null),e.history.done=Yi(this.history.done,n),e.history.undone=Yi(this.history.undone,n)}},iterLinkedDocs:function(e){Bi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):He(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:li((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&function(e){ri(e,(function(){Ui(e),gr(e)}))}(this.cm))}))}),Ho.prototype.eachLine=Ho.prototype.iter;var Io=0;function Eo(e){var t=this;if(Ro(t),!be(t,e)&&!Mn(t.display,e)){Se(e),l&&(Io=+new Date);var n=dr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(){++a==i&&ii(t,(function(){var e={from:n=ft(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};po(t.doc,e),no(t.doc,Ai(ft(t.doc,n),ft(t.doc,Di(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==G(t.options.allowDropFileTypes,e.type))s();else{var r=new FileReader;r.onerror=function(){return s()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),s()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),io(t.doc,Ai(n,n)),h)for(var d=0;d<h.length;++d)bo(t.doc,"",h[d].anchor,h[d].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ro(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Bo(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var zo=!1;function Uo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ko={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:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Go=0;Go<10;Go++)Ko[Go+48]=Ko[Go+96]=String(Go);for(var Vo=65;Vo<=90;Vo++)Ko[Vo]=String.fromCharCode(Vo);for(var qo=1;qo<=12;qo++)Ko[qo+111]=Ko[qo+63235]="F"+qo;var jo={};function _o(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var a=o[l];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function $o(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=J(n.split(" "),_o),o=0;o<i.length;o++){var l=void 0,a=void 0;o==i.length-1?(a=i.join(" "),l=r):(a=i.slice(0,o+1).join(" "),l="...");var s=t[a];if(s){if(s!=l)throw new Error("Inconsistent bindings for "+a)}else t[a]=l}delete e[n]}for(var c in t)e[c]=t[c];return e}function Xo(e,t,n,r){var i=(t=Jo(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Xo(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var l=Xo(e,t.fallthrough[o],n,r);if(l)return l}}}function Yo(e){var t="string"==typeof e?e:Ko[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Zo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(S?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(S?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Qo(e,t){if(h&&34==e.keyCode&&e.char)return!1;var n=Ko[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Zo(n,e,t))}function Jo(e){return"string"==typeof e?jo[e]:e}function el(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&ot(o.from,Q(r).to)<=0;){var l=r.pop();if(ot(l.from,o.from)<0){o.from=l.from;break}}r.push(o)}ri(e,(function(){for(var t=r.length-1;t>=0;t--)bo(e.doc,"",r[t].from,r[t].to,"+delete");Hr(e)}))}function tl(e,t,n){var r=se(e.text,t+n,n);return r<0||r>e.text.length?null:r}function nl(e,t,n){var r=tl(e,t.ch,n);return null==r?null:new it(t.line,r,n<0?"after":"before")}function rl(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=de(n,t.doc.direction);if(o){var l,a=i<0?Q(o):o[0],s=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var c=In(t,n);l=i<0?n.text.length-1:0;var u=En(t,c,l).top;l=ce((function(e){return En(t,c,e).top==u}),i<0==(1==a.level)?a.from:a.to-1,l),"before"==s&&(l=tl(n,l,1))}else l=i<0?a.to:a.from;return new it(r,l,s)}}return new it(r,i<0?n.text.length:0,i<0?"before":"after")}jo.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"},jo.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"},jo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},jo.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"]},jo.default=b?jo.macDefault:jo.pcDefault;var il={selectAll:fo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),j)},killLine:function(e){return el(e,(function(t){if(t.empty()){var n=Ye(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:it(t.head.line+1,0)}:{from:t.head,to:it(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return el(e,(function(t){return{from:it(t.from().line,0),to:ft(e.doc,it(t.to().line+1,0))}}))},delLineLeft:function(e){return el(e,(function(e){return{from:it(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return el(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return el(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},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(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return ol(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ll(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ye(e.doc,t),r=function(e){for(var t;t=Bt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=et(r)),rl(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),$)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),$)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ll(e,t.head):r}),$)},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,"codepoint")},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=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),l=U(e.getLine(o.line),o.ch,r);t.push(Z(r-l%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return ri(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Ye(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new it(i.line,i.ch-1)),i.ch>0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ye(e.doc,i.line-1).text;l&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),it(i.line-1,l.length-1),i,"+transpose"))}n.push(new Ni(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return ri(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Hr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ol(e,t){var n=Ye(e.doc,t),r=Kt(n);return r!=n&&(t=et(r)),rl(!0,e,r,t,1)}function ll(e,t){var n=ol(e,t.line),r=Ye(e.doc,n.line),i=de(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return it(n.line,l?0:o,n.sticky)}return n}function al(e,t,n){if("string"==typeof t&&!(t=il[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=q}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var sl=new K;function cl(e,t,n,r){var i=e.state.keySeq;if(i){if(Yo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:sl.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),ul(e,i+" "+t,n,r))return!0}return ul(e,t,n,r)}function ul(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Xo(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Xo(t,e.options.extraKeys,n,e)||Xo(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&hn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(Se(n),Lr(e)),!!i}function fl(e,t){var n=Qo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?cl(e,"Shift-"+n,t,(function(t){return al(e,t,!0)}))||cl(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return al(e,t)})):cl(e,n,t,(function(t){return al(e,t)})))}var hl=null;function dl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=P(E(t)),be(t,e)))){l&&a<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=fl(t,e);h&&(hl=i?r:null,i||88!=r||Ee||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),ve(document,"keyup",n),ve(document,"mouseover",n))}W(t,"CodeMirror-crosshair"),ge(document,"keyup",n),ge(document,"mouseover",n)}(t)}}function pl(e){16==e.keyCode&&(this.doc.sel.shift=!1),be(this,e)}function gl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Mn(t.display,e)||be(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(h&&n==hl)return hl=null,void Se(e);if(!h||e.which&&!(e.which<10)||!fl(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return cl(e,"'"+n+"'",t,(function(t){return al(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var ml,vl,yl=function(e,t,n){this.time=e,this.pos=t,this.button=n};function bl(e){var t=this,n=t.display;if(!(be(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Mn(n,e))s||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!wl(t,e)){var r=dr(t,e),i=Ne(e),o=r?function(e,t){var n=+new Date;return vl&&vl.compare(n,e,t)?(ml=vl=null,"triple"):ml&&ml.compare(n,e,t)?(vl=new yl(n,e,t),ml=null,"double"):(ml=new yl(n,e,t),vl=null,"single")}(r,i):"single";R(t).focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),cl(e,Zo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=il[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=q}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){l?setTimeout(B(Mr,e),0):e.curOp.focus=P(E(e));var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=x?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=b?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?n.altKey:n.ctrlKey)),i}(e,n,r),c=e.doc.sel;e.options.dragDrop&&De&&!e.isReadOnly()&&"single"==n&&(i=c.contains(t))>-1&&(ot((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=ii(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Tr(e)),ve(i.wrapper.ownerDocument,"mouseup",c),ve(i.wrapper.ownerDocument,"mousemove",u),ve(i.scroller,"dragstart",f),ve(i.scroller,"drop",c),o||(Se(t),r.addNew||Qi(e.doc,n,null,null,r.extend),s&&!d||l&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,ge(i.wrapper.ownerDocument,"mouseup",c),ge(i.wrapper.ownerDocument,"mousemove",u),ge(i.scroller,"dragstart",f),ge(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,r,t,o):function(e,t,n,r){l&&Tr(e);var i=e.display,o=e.doc;Se(t);var a,s,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?u[s]:new Ni(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Ni(n,n)),n=dr(e,t,!0,!0),s=-1;else{var f=xl(e,n,r.unit);a=r.extend?Zi(a,f.anchor,f.head,r.extend):f}r.addNew?-1==s?(s=u.length,ro(o,Oi(e,u.concat([a]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==r.unit&&!r.extend?(ro(o,Oi(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):eo(o,s,a,_):(s=0,ro(o,new Ti([a],0),_),c=o.sel);var h=n;var d=i.wrapper.getBoundingClientRect(),p=0;function g(t){var l=++p,u=dr(e,t,!0,"rectangle"==r.unit);if(u)if(0!=ot(u,h)){e.curOp.focus=P(E(e)),function(t){if(0!=ot(h,t))if(h=t,"rectangle"==r.unit){for(var i=[],l=e.options.tabSize,u=U(Ye(o,n.line).text,n.ch,l),f=U(Ye(o,t.line).text,t.ch,l),d=Math.min(u,f),p=Math.max(u,f),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=Ye(o,g).text,y=X(v,d,l);d==p?i.push(new Ni(it(g,y),it(g,y))):v.length>y&&i.push(new Ni(it(g,y),it(g,X(v,p,l))))}i.length||i.push(new Ni(n,n)),ro(o,Oi(e,c.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=a,C=xl(e,t,r.unit),w=x.anchor;ot(C.anchor,w)>0?(b=C.head,w=ct(x.from(),C.anchor)):(b=C.anchor,w=st(x.to(),C.head));var S=c.ranges.slice(0);S[s]=function(e,t){var n=t.anchor,r=t.head,i=Ye(e.doc,n.line);if(0==ot(n,r)&&n.sticky==r.sticky)return t;var o=de(i);if(!o)return t;var l=fe(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s,c=l+(a.from==n.ch==(1!=a.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=fe(o,r.ch,r.sticky),f=u-l||(r.ch-n.ch)*(1==a.level?-1:1);s=u==c-1||u==c?f<0:f>0}var h=o[c+(s?-1:0)],d=s==(1==h.level),p=d?h.from:h.to,g=d?"after":"before";return n.ch==p&&n.sticky==g?t:new Ni(new it(n.line,p,g),r)}(e,new Ni(ft(o,w),b)),ro(o,Oi(e,S,s),_)}}(u);var f=Fr(i,o);(u.line>=f.to||u.line<f.from)&&setTimeout(ii(e,(function(){p==l&&g(t)})),150)}else{var m=t.clientY<d.top?-20:t.clientY>d.bottom?20:0;m&&setTimeout(ii(e,(function(){p==l&&(i.scroller.scrollTop+=m,g(t))})),50)}}function m(t){e.state.selectingText=!1,p=1/0,t&&(Se(t),i.input.focus()),ve(i.wrapper.ownerDocument,"mousemove",v),ve(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=ii(e,(function(e){0!==e.buttons&&Ne(e)?g(e):m(e)})),y=ii(e,m);e.state.selectingText=y,ge(i.wrapper.ownerDocument,"mousemove",v),ge(i.wrapper.ownerDocument,"mouseup",y)}(e,r,t,o)}(t,r,o,e):Te(e)==n.scroller&&Se(e):2==i?(r&&Qi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(k?t.display.input.onContextMenu(e):Tr(t)))}}function xl(e,t,n){if("char"==n)return new Ni(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ni(it(t.line,0),ft(e.doc,it(t.line+1,0)));var r=n(e,t);return new Ni(r.from,r.to)}function Cl(e,t,n,r){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(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Se(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ce(e,n))return Le(t);o-=a.top-l.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=l.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i)return ye(e,n,e,tt(e.doc,o),e.display.gutterSpecs[s].className,t),Le(t)}}function wl(e,t){return Cl(e,t,"gutterClick",!0)}function Sl(e,t){Mn(e.display,t)||function(e,t){return!!Ce(e,"gutterContextMenu")&&Cl(e,t,"gutterContextMenu",!1)}(e,t)||be(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function kl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Vn(e)}yl.prototype.compare=function(e,t,n){return this.time+400>e&&0==ot(t,this.pos)&&n==this.button};var Ll={toString:function(){return"CodeMirror.Init"}},Ml={},Tl={};function Nl(e,t,n){if(!t!=!(n&&n!=Ll)){var r=e.display.dragFunctions,i=t?ge:ve;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Ol(e){e.options.lineWrapping?(W(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),Xt(e)),hr(e),gr(e),Vn(e),setTimeout((function(){return qr(e)}),100)}function Al(e,t){var n=this;if(!(this instanceof Al))return new Al(e,t);this.options=t=t?z(t):{},z(Ml,t,!1);var r=t.value;"string"==typeof r?r=new Ho(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Al.inputStyles[t.inputStyle](this),o=this.display=new Ci(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,kl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),$r(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 K,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),l&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;ge(t.scroller,"mousedown",ii(e,bl)),ge(t.scroller,"dblclick",l&&a<11?ii(e,(function(t){if(!be(e,t)){var n=dr(e,t);if(n&&!wl(e,t)&&!Mn(e.display,t)){Se(t);var r=e.findWordAt(n);Qi(e.doc,r.anchor,r.head)}}})):function(t){return be(e,t)||Se(t)}),ge(t.scroller,"contextmenu",(function(t){return Sl(e,t)})),ge(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Sl(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}ge(t.scroller,"touchstart",(function(i){if(!be(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!wl(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),ge(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),ge(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Mn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var l,a=e.coordsChar(t.activeTouch,"page");l=!r.prev||o(r,r.prev)?new Ni(a,a):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(a):new Ni(it(a.line,0),ft(e.doc,it(a.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),Se(n)}i()})),ge(t.scroller,"touchcancel",i),ge(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Br(e,t.scroller.scrollTop),Ur(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))})),ge(t.scroller,"mousewheel",(function(t){return Mi(e,t)})),ge(t.scroller,"DOMMouseScroll",(function(t){return Mi(e,t)})),ge(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){be(e,t)||Me(t)},over:function(t){be(e,t)||(function(e,t){var n=dr(e,t);if(n){var r=document.createDocumentFragment();wr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,r)}}(e,t),Me(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-Io<100))Me(t);else if(!be(e,t)&&!Mn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(e,t)},drop:ii(e,Eo),leave:function(t){be(e,t)||Ro(e)}};var s=t.input.getField();ge(s,"keyup",(function(t){return pl.call(e,t)})),ge(s,"keydown",ii(e,dl)),ge(s,"keypress",ii(e,gl)),ge(s,"focus",(function(t){return Nr(e,t)})),ge(s,"blur",(function(t){return Or(e,t)}))}(this),function(){var e;zo||(ge(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Bo(Uo)}),100))})),ge(window,"blur",(function(){return Bo(Or)})),zo=!0)}(),Yr(this),this.curOp.forceUpdate=!0,zi(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Nr(n)}),20):Or(this),Tl)Tl.hasOwnProperty(c)&&Tl[c](this,t[c],Ll);vi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Dl.length;++u)Dl[u](this);Zr(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Al.defaults=Ml,Al.optionHandlers=Tl;var Dl=[];function Fl(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=vt(e,t).state:n="prev");var l=e.options.tabSize,a=Ye(o,t),s=U(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(i,a.text.slice(u.length),a.text))==q||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?U(Ye(o,t-1).text,null,l):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var f="",h=0;if(e.options.indentWithTabs)for(var d=Math.floor(c/l);d;--d)h+=l,f+="\t";if(h<c&&(f+=Z(c-h)),f!=u)return bo(o,f,it(t,0),it(t,u.length),"+input"),a.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<u.length){var m=it(t,u.length);eo(o,p,new Ni(m,m));break}}}Al.defineInitHook=function(e){return Dl.push(e)};var Pl=null;function Wl(e){Pl=e}function Hl(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var l=+new Date-200,a="paste"==i||e.state.pasteIncoming>l,s=He(t),c=null;if(a&&r.ranges.length>1)if(Pl&&Pl.text.join("\n")==t){if(r.ranges.length%Pl.text.length==0){c=[];for(var u=0;u<Pl.text.length;u++)c.push(o.splitLines(Pl.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=J(s,(function(e){return[e]})));for(var f=e.curOp.updateInput,h=r.ranges.length-1;h>=0;h--){var d=r.ranges[h],p=d.from(),g=d.to();d.empty()&&(n&&n>0?p=it(p.line,p.ch-n):e.state.overwrite&&!a?g=it(g.line,Math.min(Ye(o,g.line).text.length,g.ch+Q(s).length)):a&&Pl&&Pl.lineWise&&Pl.text.join("\n")==s.join("\n")&&(p=g=it(p.line,0)));var m={from:p,to:g,text:c?c[h%c.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};po(e.doc,m),hn(e,"inputRead",e,m)}t&&!a&&El(e,t),Hr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Il(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||ri(t,(function(){return Hl(t,n,0,null,"paste")})),!0}function El(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=Fl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ye(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Fl(e,i.head.line,"smart"));l&&hn(e,"electricInput",e,i.head.line)}}}function Rl(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:it(i,0),head:it(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Bl(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function zl(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),t}function Ul(e,t,n,r,i){var o=t,l=n,a=Ye(e,t.line),s=i&&"rtl"==e.direction?-n:n;function c(o){var l,c;if("codepoint"==r){var u=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))l=null;else{var f=n>0?u>=55296&&u<56320:u>=56320&&u<57343;l=new it(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(f?2:1))),-n)}}else l=i?function(e,t,n,r){var i=de(t,e.doc.direction);if(!i)return nl(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=fe(i,n.ch,n.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(r>0?l.to>n.ch:l.from<n.ch))return nl(t,n,r);var a,s=function(e,n){return tl(t,e instanceof it?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(a=a||In(e,t),nr(e,t,a,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==l.level){var f=1==l.level==r<0,h=s(n,f?1:-1);if(null!=h&&(f?h<=l.to&&h<=u.end:h>=l.from&&h>=u.begin)){var d=f?"before":"after";return new it(n.line,h,d)}}var p=function(e,t,r){for(var o=function(e,t){return t?new it(n.line,s(e,1),"before"):new it(n.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],a=t>0==(1!=l.level),c=a?r.begin:s(r.end,-1);if(l.from<=c&&c<l.to)return o(c,a);if(c=a?l.from:s(l.to,-1),r.begin<=c&&c<r.end)return o(c,a)}},g=p(o+r,r,u);if(g)return g;var m=r>0?u.end:s(u.begin,-1);return null==m||r>0&&m==t.text.length||!(g=p(r>0?0:i.length-1,r,c(m)))?null:g}(e.cm,a,t,n):nl(a,t,n);if(null==l){if(o||(c=t.line+s)<e.first||c>=e.first+e.size||(t=new it(c,t.ch,t.sticky),!(a=Ye(e,c))))return!1;t=rl(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,f="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(n<0)||c(!d);d=!1){var p=a.text.charAt(t.ch)||"\n",g=ie(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),t.sticky="after");break}if(g&&(u=g),n>0&&!c(!d))break}var m=co(e,t,o,l,!0);return lt(o,m)&&(m.hitSide=!0),m}function Kl(e,t,n,r){var i,o,l=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,R(e).innerHeight||l(e).documentElement.clientHeight),c=Math.max(s-.5*ar(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=er(e,a,i)).outside;){if(n<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*n}return o}var Gl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Vl(e,t){var n=Hn(e,t.line);if(!n||n.hidden)return null;var r=Ye(e.doc,t.line),i=Pn(n,r,t.line),o=de(r,e.doc.direction),l="left";o&&(l=fe(o,t.ch)%2?"right":"left");var a=zn(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function ql(e,t){return t&&(e.bad=!0),e}function jl(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return ql(e.clipPos(it(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return _l(o,t,n)}}function _l(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!F(r,t))return ql(it(et(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?Q(e.rest):e.line;return ql(it(et(o),o.text.length),i)}var l=3==t.nodeType?t:null,a=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var s=e.measure,c=s.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?s.map:c[i],l=0;l<o.length;l+=3){var a=o[l+2];if(a==t||a==n){var u=et(i<0?e.line:e.rest[i]),f=o[l]+r;return(r<0||a!=t)&&(f=o[l+(r?1:0)]),it(u,f)}}}var f=u(l,a,n);if(f)return ql(f,i);for(var h=a.nextSibling,d=l?l.nodeValue.length-n:0;h;h=h.nextSibling){if(f=u(h,h.firstChild,0))return ql(it(f.line,f.ch-d),i);d+=h.textContent.length}for(var p=a.previousSibling,g=n;p;p=p.previousSibling){if(f=u(p,p.firstChild,-1))return ql(it(f.line,f.ch+g),i);g+=p.textContent.length}}Gl.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function l(e){if(o(e)&&!be(r,e)){if(r.somethingSelected())Wl({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Rl(r);Wl({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,j),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var l=Pl.text.join("\n");if(e.clipboardData.setData("Text",l),e.clipboardData.getData("Text")==l)return void e.preventDefault()}var a=zl(),s=a.firstChild;Bl(s),r.display.lineSpace.insertBefore(a,r.display.lineSpace.firstChild),s.value=Pl.text.join("\n");var c=P(i.ownerDocument);I(s),setTimeout((function(){r.display.lineSpace.removeChild(a),c.focus(),c==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,Bl(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),ge(i,"paste",(function(e){!o(e)||be(r,e)||Il(e,r)||a<=11&&setTimeout(ii(r,(function(){return t.updateFromDOM()})),20)})),ge(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),ge(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),ge(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),ge(i,"touchstart",(function(){return n.forceCompositionEnd()})),ge(i,"input",(function(){t.composing||t.readFromDOMSoon()})),ge(i,"copy",l),ge(i,"cut",l)},Gl.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Gl.prototype.prepareSelection=function(){var e=Cr(this.cm,!1);return e.focus=P(this.div.ownerDocument)==this.div,e},Gl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Gl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Gl.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var l=jl(t,e.anchorNode,e.anchorOffset),a=jl(t,e.focusNode,e.focusOffset);if(!l||l.bad||!a||a.bad||0!=ot(ct(l,a),i)||0!=ot(st(l,a),o)){var s=t.display.view,c=i.line>=t.display.viewFrom&&Vl(t,i)||{node:s[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Vl(t,o);if(!u){var f=s[s.length-1].measure,h=f.maps?f.maps[f.maps.length-1]:f.map;u={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(c&&u){var d,p=e.rangeCount&&e.getRangeAt(0);try{d=M(c.node,c.offset,u.offset,u.node)}catch(e){}d&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Gl.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)},Gl.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors),O(this.cm.display.selectionDiv,e.selection)},Gl.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Gl.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return F(this.div,t)},Gl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&P(this.div.ownerDocument)==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Gl.prototype.blur=function(){this.div.blur()},Gl.prototype.getField=function(){return this.div},Gl.prototype.supportsTouch=function(){return!0},Gl.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):ri(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},Gl.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Gl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=jl(t,e.anchorNode,e.anchorOffset),r=jl(t,e.focusNode,e.focusOffset);n&&r&&ri(t,(function(){ro(t.doc,Ai(n,r),j),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Gl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),l=o.from(),a=o.to();if(0==l.ch&&l.line>r.firstLine()&&(l=it(l.line-1,Ye(r.doc,l.line-1).length)),a.ch==Ye(r.doc,a.line).text.length&&a.line<r.lastLine()&&(a=it(a.line+1,0)),l.line<i.viewFrom||a.line>i.viewTo-1)return!1;l.line==i.viewFrom||0==(e=pr(r,l.line))?(t=et(i.view[0].line),n=i.view[0].node):(t=et(i.view[e].line),n=i.view[e-1].node.nextSibling);var s,c,u=pr(r,a.line);if(u==i.view.length-1?(s=i.viewTo-1,c=i.lineDiv.lastChild):(s=et(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function u(e){e&&(c(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,h=t.getAttribute("cm-marker");if(h){var d=e.findMarks(it(r,0),it(i+1,0),(m=+h,function(e){return e.id==m}));return void(d.length&&(o=d[0].find(0))&&u(Ze(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),p&&(l=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var m}for(;f(t),t!=n;)t=t.nextSibling,s=!1;return o}(r,n,c,t,s)),h=Ze(r.doc,it(t,0),it(s,Ye(r.doc,s).text.length));f.length>1&&h.length>1;)if(Q(f)==Q(h))f.pop(),h.pop(),s--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),t++}for(var d=0,p=0,g=f[0],m=h[0],v=Math.min(g.length,m.length);d<v&&g.charCodeAt(d)==m.charCodeAt(d);)++d;for(var y=Q(f),b=Q(h),x=Math.min(y.length-(1==f.length?d:0),b.length-(1==h.length?d:0));p<x&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==f.length&&1==h.length&&t==l.line)for(;d&&d>l.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var C=it(t,d),w=it(s,h.length?Q(h).length-p:0);return f.length>1||f[0]||ot(C,w)?(bo(r.doc,f,C,w,"+input"),!0):void 0},Gl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Gl.prototype.reset=function(){this.forceCompositionEnd()},Gl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Gl.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))},Gl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ri(this.cm,(function(){return gr(e.cm)}))},Gl.prototype.setUneditable=function(e){e.contentEditable="false"},Gl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ii(this.cm,Hl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Gl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Gl.prototype.onContextMenu=function(){},Gl.prototype.resetPosition=function(){},Gl.prototype.needsContentAttribute=!0;var $l=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};$l.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!be(r,e)){if(r.somethingSelected())Wl({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Rl(r);Wl({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,j):(n.prevInput="",i.value=t.text.join("\n"),I(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),ge(i,"input",(function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),ge(i,"paste",(function(e){be(r,e)||Il(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ge(i,"cut",o),ge(i,"copy",o),ge(e.scroller,"paste",(function(t){if(!Mn(e,t)&&!be(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),ge(e.lineSpace,"selectstart",(function(t){Mn(e,t)||Se(t)})),ge(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ge(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},$l.prototype.createField=function(e){this.wrapper=zl(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Bl(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$l.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$l.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Cr(e);if(e.options.moveInputWithCursor){var i=Zn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$l.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$l.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&I(this.textarea),l&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null));this.resetting=!1}},$l.prototype.getField=function(){return this.textarea},$l.prototype.supportsTouch=function(){return!1},$l.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||P(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},$l.prototype.blur=function(){this.textarea.blur()},$l.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$l.prototype.receivedFocus=function(){this.slowPoll()},$l.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},$l.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},$l.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Ie(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||b&&/[\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||r||(r="\u200b"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(r.length,i.length);s<c&&r.charCodeAt(s)==i.charCodeAt(s);)++s;return ri(t,(function(){Hl(t,i.slice(s),r.length-s,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.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},$l.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$l.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},$l.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=dr(n,e),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ii(n,ro)(n.doc,Ai(o),j);var u,f=i.style.cssText,d=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(u=i.ownerDocument.defaultView.scrollY),r.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),l&&a>=9&&m(),k){Me(e);var g=function(){ve(window,"mouseup",g),setTimeout(v,20)};ge(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="\u200b"+(e?i.value:"");i.value="\u21da",i.value=o,t.prevInput=e?"":"\u200b",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=f,l&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!l||l&&a<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"\u200b"==t.prevInput?ii(n,fo)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},$l.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},$l.prototype.setUneditable=function(){},$l.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ll&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ll,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Hi(e)}),!0),n("indentUnit",2,Hi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Ii(e),Vn(e),gr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=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,n.push(it(r,o))}r++}));for(var i=n.length-1;i>=0;i--)bo(e.doc,t,n[i],it(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ll&&e.refresh()})),n("specialCharPlaceholder",nn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!C),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){kl(e),xi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Jo(t),i=n!=Ll&&Jo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ol,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=yi(t,e.options.lineNumbers),xi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ur(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return qr(e)}),!0),n("scrollbarStyle","native",(function(e){$r(e),qr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=yi(e.options.gutters,t),xi(e)}),!0),n("firstLineNumber",1,xi,!0),n("lineNumberFormatter",(function(e){return e}),xi,!0),n("showCursorWhenSelecting",!1,xr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Or(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Nl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,xr,!0),n("singleCursorHeightPerLine",!0,xr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ii,!0),n("addModeClass",!1,Ii,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Ii,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Al),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){R(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ii(this,t[e])(this,n,i),ye(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"](Jo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:oi((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,gr(this)})),removeOverlay:oi((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void gr(this)}})),indentLine:oi((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),nt(this.doc,e)&&Fl(this,e,t,n)})),indentSelection:oi((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Fl(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Hr(this));else{var o=i.from(),l=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s<n;++s)Fl(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&eo(this.doc,r,new Ni(o,c[r].to()),j)}}})),getTokenAt:function(e,t){return wt(this,e,t)},getLineTokens:function(e,t){return wt(this,it(e),t,!0)},getTokenTypeAt:function(e){e=ft(this.doc,e);var t,n=mt(this,Ye(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var l=r+i>>1;if((l?n[2*l-1]:0)>=o)i=l;else{if(!(n[2*l+1]<o)){t=n[2*l+2];break}r=l+1}}var a=t?t.indexOf("overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var a=i[o[t][l]];a&&r.push(a)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var s=0;s<i._global.length;s++){var c=i._global[s];c.pred(o,this)&&-1==G(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return vt(this,(e=ut(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Zn(this,null==e?n.head:"object"==typeof e?ft(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Yn(this,ft(this.doc,e),t||"page")},coordsChar:function(e,t){return er(this,(e=Xn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Xn(this,{top:e,left:0},t||"page").top,tt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,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),r=Ye(this.doc,e)}else r=e;return $n(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-_t(r):0)},defaultTextHeight:function(){return ar(this.display)},defaultCharWidth:function(){return sr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,l=(e=Zn(this,ft(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)l=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&function(e,t){var n=Pr(e,t);null!=n.scrollTop&&Br(e,n.scrollTop),null!=n.scrollLeft&&Ur(e,n.scrollLeft)}(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:oi(dl),triggerOnKeyPress:oi(gl),triggerOnKeyUp:pl,triggerOnMouseDown:oi(bl),execCommand:function(e){if(il.hasOwnProperty(e))return il[e].call(null,this)},triggerElectric:oi((function(e){El(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=ft(this.doc,e),l=0;l<t&&!(o=Ul(this.doc,o,i,n,r)).hitSide;++l);return o},moveH:oi((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Ul(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),$)})),deleteH:oi((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):el(this,(function(n){var i=Ul(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var l=ft(this.doc,e),a=0;a<t;++a){var s=Zn(this,l,"div");if(null==o?o=s.left:s.left=o,(l=Kl(this,s,i,n)).hitSide)break}return l},moveV:oi((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(l){if(o)return e<0?l.from():l.to();var a=Zn(n,l.head,"div");null!=l.goalColumn&&(a.left=l.goalColumn),i.push(a.left);var s=Kl(n,a,e,t);return"page"==t&&l==r.sel.primary()&&Wr(n,Yn(n,s,"div").top-a.top),s}),$),i.length)for(var l=0;l<r.sel.ranges.length;l++)r.sel.ranges[l].goalColumn=i[l]})),findWordAt:function(e){var t=Ye(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),l=ie(o,i)?function(e){return ie(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ie(e)};n>0&&l(t.charAt(n-1));)--n;for(;r<t.length&&l(t.charAt(r));)++r}return new Ni(it(e.line,n),it(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?W(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==P(E(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:oi((function(e,t){Ir(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-An(this)-this.display.barHeight,width:e.scrollWidth-An(this)-this.display.barWidth,clientHeight:Fn(this),clientWidth:Dn(this)}},scrollIntoView:oi((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:it(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?function(e,t){Er(e),e.curOp.scrollToPos=t}(this,e):Rr(this,e.from,e.to,e.margin)})),setSize:oi((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Gn(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){mr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ye(this,"refresh",this)})),operation:function(e){return ri(this,e)},startOperation:function(){return Yr(this)},endOperation:function(){return Zr(this)},refresh:oi((function(){var e=this.display.cachedTextHeight;gr(this),this.curOp.forceUpdate=!0,Vn(this),Ir(this,this.doc.scrollLeft,this.doc.scrollTop),pi(this.display),(null==e||Math.abs(e-ar(this.display))>.5||this.options.lineWrapping)&&hr(this),ye(this,"refresh",this)})),swapDoc:oi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),zi(this,e),Vn(this),this.display.input.reset(),Ir(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,hn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},we(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Al);var Xl="iter insert remove copy getEditor constructor".split(" ");for(var Yl in Ho.prototype)Ho.prototype.hasOwnProperty(Yl)&&G(Xl,Yl)<0&&(Al.prototype[Yl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ho.prototype[Yl]));return we(Ho),Al.inputStyles={textarea:$l,contenteditable:Gl},Al.defineMode=function(e){Al.defaults.mode||"null"==e||(Al.defaults.mode=e),Ue.apply(this,arguments)},Al.defineMIME=function(e,t){ze[e]=t},Al.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Al.defineMIME("text/plain","null"),Al.defineExtension=function(e,t){Al.prototype[e]=t},Al.defineDocExtension=function(e,t){Ho.prototype[e]=t},Al.fromTextArea=function(e,t){if((t=t?z(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=P(e.ownerDocument);t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ge(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Al((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a},function(e){e.off=ve,e.on=ge,e.wheelEventPixels=Li,e.Doc=Ho,e.splitLines=He,e.countColumn=U,e.findColumn=X,e.isWordChar=re,e.Pass=q,e.signal=ye,e.Line=Yt,e.changeEnd=Di,e.scrollbarModel=_r,e.Pos=it,e.cmpPos=ot,e.modes=Be,e.mimeModes=ze,e.resolveMode=Ke,e.getMode=Ge,e.modeExtensions=Ve,e.extendMode=qe,e.copyState=je,e.startState=$e,e.innerMode=_e,e.commands=il,e.keyMap=jo,e.keyName=Qo,e.isModifierKey=Yo,e.lookupKey=Xo,e.normalizeKeyMap=$o,e.StringStream=Xe,e.SharedTextMarker=Do,e.TextMarker=Oo,e.LineWidget=Mo,e.e_preventDefault=Se,e.e_stopPropagation=ke,e.e_stop=Me,e.addClass=W,e.contains=F,e.rmClass=T,e.keyNames=Ko}(Al),Al.version="5.65.13",Al},(this||self).CodeMirror=e(),t=function(e){"use strict";function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function n(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,t,n){return e.getSearchCursor(t,n,{caseFold:r(t),multiline:!0})}function o(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function l(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function a(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=l(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function s(e,t,n){t.queryText=n,t.query=a(n),e.removeOverlay(t.overlay,r(t.query)),t.overlay=function(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}(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 c(t,r,i,l){var a=n(t);if(a.query)return u(t,r);var c=t.getSelection()||a.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),i&&t.openDialog){var h=null,p=function(n,r){e.e_stop(r),n&&(n!=a.queryText&&(s(t,a,n),a.posFrom=a.posTo=t.getCursor()),h&&(h.style.opacity=1),u(t,r.shiftKey,(function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((h=r).style.opacity=.4)})))};!function(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){f(e)},onKeyDown:i,bottom:e.options.search.bottom})}(t,d(t),c,p,(function(r,i){var o=e.keyName(r),l=t.getOption("extraKeys"),a=l&&l[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==a||"findPrev"==a||"findPersistentNext"==a||"findPersistentPrev"==a?(e.e_stop(r),s(t,n(t),i),t.execCommand(a)):"find"!=a&&"findPersistent"!=a||(e.e_stop(r),p(i,r))})),l&&c&&(s(t,a,c),u(t,r))}else o(t,d(t),"Search for:",c,(function(e){e&&!a.query&&t.operation((function(){s(t,a,e),a.posFrom=a.posTo=t.getCursor(),u(t,r)}))}))}function u(t,r,o){t.operation((function(){var l=n(t),a=i(t,l.query,r?l.posFrom:l.posTo);(a.find(r)||(a=i(t,l.query,r?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(r))&&(t.setSelection(a.from(),a.to()),t.scrollIntoView({from:a.from(),to:a.to()},20),l.posFrom=a.from(),l.posTo=a.to(),o&&o(a.from(),a.to()))}))}function f(e){e.operation((function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function h(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var o=arguments[i];n.appendChild("string"==typeof o?document.createTextNode(o):o)}return n}function d(e){var t=h("label",{className:"CodeMirror-search-label"},e.phrase("Search:"),h("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return t.setAttribute("for","CodeMirror-search-field"),h("",null,t," ",h("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function p(e,t,n){e.operation((function(){for(var r=i(e,t);r.findNext();)if("string"!=typeof t){var o=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,(function(e,t){return o[t]})))}else r.replace(n)}))}function g(e,t){if(!e.getOption("readOnly")){var r=e.getSelection()||n(e).lastQuery,s=t?e.phrase("Replace all:"):e.phrase("Replace:"),c=h("",null,h("span",{className:"CodeMirror-search-label"},s),function(e){return h("",null," ",h("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",h("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}(e));o(e,c,s,r,(function(n){n&&(n=a(n),o(e,function(e){return h("",null,h("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",h("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}(e),e.phrase("Replace with:"),"",(function(r){if(r=l(r),t)p(e,n,r);else{f(e);var o=i(e,n,e.getCursor("from")),a=function(){var t,l=o.from();!(t=o.findNext())&&(o=i(e,n),!(t=o.findNext())||l&&o.from().line==l.line&&o.from().ch==l.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),function(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}(e,function(e){return h("",null,h("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",h("button",{},e.phrase("Yes"))," ",h("button",{},e.phrase("No"))," ",h("button",{},e.phrase("All"))," ",h("button",{},e.phrase("Stop")))}(e),e.phrase("Replace?"),[function(){s(t)},a,function(){p(e,n,r)}]))},s=function(e){o.replace("string"==typeof n?r:r.replace(/\$(\d)/g,(function(t,n){return e[n]}))),a()};a()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){f(e),c(e)},e.commands.findPersistent=function(e){f(e),c(e,!1,!0)},e.commands.findPersistentNext=function(e){c(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){c(e,!0,!0,!0)},e.commands.findNext=c,e.commands.findPrev=function(e){c(e,!0)},e.commands.clearSearch=f,e.commands.replace=g,e.commands.replaceAll=function(e){g(e,!0)}},t(CodeMirror),function(e){"use strict";var t,n,r=e.Pos;function i(e,t){for(var n=function(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}(e),r=n,i=0;i<t.length;i++)-1==r.indexOf(t.charAt(i))&&(r+=t.charAt(i));return n==r?e:new RegExp(e.source,r)}function o(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function l(e,t,n){t=i(t,"g");for(var o=n.line,l=n.ch,a=e.lastLine();o<=a;o++,l=0){t.lastIndex=l;var s=e.getLine(o),c=t.exec(s);if(c)return{from:r(o,c.index),to:r(o,c.index+c[0].length),match:c}}}function a(e,t,n){if(!o(t))return l(e,t,n);t=i(t,"gm");for(var a,s=1,c=n.line,u=e.lastLine();c<=u;){for(var f=0;f<s&&!(c>u);f++){var h=e.getLine(c++);a=null==a?h:a+"\n"+h}s*=2,t.lastIndex=n.ch;var d=t.exec(a);if(d){var p=a.slice(0,d.index).split("\n"),g=d[0].split("\n"),m=n.line+p.length-1,v=p[p.length-1].length;return{from:r(m,v),to:r(m+g.length-1,1==g.length?v+g[0].length:g[g.length-1].length),match:d}}}}function s(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var l=o.index+o[0].length;if(l>e.length-n)break;(!r||l>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function c(e,t,n){t=i(t,"g");for(var o=n.line,l=n.ch,a=e.firstLine();o>=a;o--,l=-1){var c=e.getLine(o),u=s(c,t,l<0?0:c.length-l);if(u)return{from:r(o,u.index),to:r(o,u.index+u[0].length),match:u}}}function u(e,t,n){if(!o(t))return c(e,t,n);t=i(t,"gm");for(var l,a=1,u=e.getLine(n.line).length-n.ch,f=n.line,h=e.firstLine();f>=h;){for(var d=0;d<a&&f>=h;d++){var p=e.getLine(f--);l=null==l?p:p+"\n"+l}a*=2;var g=s(l,t,u);if(g){var m=l.slice(0,g.index).split("\n"),v=g[0].split("\n"),y=f+m.length,b=m[m.length-1].length;return{from:r(y,b),to:r(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:g}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var l=i+o>>1,a=r(e.slice(0,l)).length;if(a==n)return l;a>n?o=l:i=l+1}}function h(e,i,o,l){if(!i.length)return null;var a=l?t:n,s=a(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,h=e.lastLine()+1-s.length;c<=h;c++,u=0){var d=e.getLine(c).slice(u),p=a(d);if(1==s.length){var g=p.indexOf(s[0]);if(-1==g)continue e;return o=f(d,p,g,a)+u,{from:r(c,f(d,p,g,a)+u),to:r(c,f(d,p,g+s[0].length,a)+u)}}var m=p.length-s[0].length;if(p.slice(m)==s[0]){for(var v=1;v<s.length-1;v++)if(a(e.getLine(c+v))!=s[v])continue e;var y=e.getLine(c+s.length-1),b=a(y),x=s[s.length-1];if(b.slice(0,x.length)==x)return{from:r(c,f(d,p,m,a)+u),to:r(c+s.length-1,f(y,b,x.length,a))}}}}function d(e,i,o,l){if(!i.length)return null;var a=l?t:n,s=a(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,h=e.firstLine()-1+s.length;c>=h;c--,u=-1){var d=e.getLine(c);u>-1&&(d=d.slice(0,u));var p=a(d);if(1==s.length){var g=p.lastIndexOf(s[0]);if(-1==g)continue e;return{from:r(c,f(d,p,g,a)),to:r(c,f(d,p,g+s[0].length,a))}}var m=s[s.length-1];if(p.slice(0,m.length)==m){var v=1;for(o=c-s.length+1;v<s.length-1;v++)if(a(e.getLine(o+v))!=s[v])continue e;var y=e.getLine(c+1-s.length),b=a(y);if(b.slice(b.length-s[0].length)==s[0])return{from:r(c+1-s.length,f(y,b,y.length-s[0].length,a)),to:r(c,f(d,p,m.length,a))}}}}function p(e,t,n,o){var s;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):r(0,0),this.pos={from:n,to:n},"object"==typeof o?s=o.caseFold:(s=o,o=null),"string"==typeof t?(null==s&&(s=!1),this.matches=function(n,r){return(n?d:h)(e,t,r,s)}):(t=i(t,"gm"),o&&!1===o.multiline?this.matches=function(n,r){return(n?c:l)(e,t,r)}:this.matches=function(n,r){return(n?u:a)(e,t,r)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),p.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=r(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var i=this.matches(t,n);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=r(t?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(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(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 p(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new p(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(CodeMirror),function(e){"use strict";function t(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var n=e.getCursor();!function(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}(e,function(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}(e),e.phrase("Jump to line:"),n.line+1+":"+n.ch,(function(r){var i;if(r)if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(r))e.setCursor(t(e,i[1]),Number(i[2]));else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(r)){var o=Math.round(e.lineCount()*Number(i[1])/100);/^[-+]/.test(i[1])&&(o=n.line+o+1),e.setCursor(o-1,n.ch)}else(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(r))&&e.setCursor(t(e,i[1]),n.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"}(CodeMirror),function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,i,o){o||(o={}),n(this,null);var l=t(this,r,o.bottom),a=!1,s=this;function c(t){if("string"==typeof t)f.value=t;else{if(a)return;a=!0,e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),s.focus(),o.onClose&&o.onClose(l)}}var u,f=l.getElementsByTagName("input")[0];return f?(f.focus(),o.value&&(f.value=o.value,!1!==o.selectValueOnOpen&&f.select()),o.onInput&&e.on(f,"input",(function(e){o.onInput(e,f.value,c)})),o.onKeyUp&&e.on(f,"keyup",(function(e){o.onKeyUp(e,f.value,c)})),e.on(f,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,f.value,c)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(f.blur(),e.e_stop(t),c()),13==t.keyCode&&i(f.value,t))})),!1!==o.closeOnBlur&&e.on(l,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=l.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),s.focus()})),!1!==o.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(r,i,o){n(this,null);var l=t(this,r,o&&o.bottom),a=l.getElementsByTagName("button"),s=!1,c=this,u=1;function f(){s||(s=!0,e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),c.focus())}a[0].focus();for(var h=0;h<a.length;++h){var d=a[h];!function(t){e.on(d,"click",(function(n){e.e_preventDefault(n),f(),t&&t(c)}))}(i[h]),e.on(d,"blur",(function(){--u,setTimeout((function(){u<=0&&f()}),200)})),e.on(d,"focus",(function(){++u}))}})),e.defineExtension("openNotification",(function(r,i){n(this,c);var o,l=t(this,r,i&&i.bottom),a=!1,s=i&&void 0!==i.duration?i.duration:5e3;function c(){a||(a=!0,clearTimeout(o),e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l))}return e.on(l,"click",(function(t){e.e_preventDefault(t),c()})),s&&(o=setTimeout(c,s)),c}))}(CodeMirror),function(e){"use strict";function t(t,n,i,o){if(i&&i.call){var l=i;i=null}else l=r(t,i,"rangeFinder");"number"==typeof n&&(n=e.Pos(n,0));var a=r(t,i,"minFoldSize");function s(e){var r=l(t,n);if(!r||r.to.line-r.from.line<a)return null;if("fold"===o)return r;for(var i=t.findMarksAt(r.from),s=0;s<i.length;++s)if(i[s].__isFold){if(!e)return null;r.cleared=!0,i[s].clear()}return r}var c=s(!0);if(r(t,i,"scanUp"))for(;!c&&n.line>t.firstLine();)n=e.Pos(n.line-1,0),c=s(!1);if(c&&!c.cleared&&"unfold"!==o){var u=function(e,t,n){var i=r(e,t,"widget");if("function"==typeof i&&(i=i(n.from,n.to)),"string"==typeof i){var o=document.createTextNode(i);(i=document.createElement("span")).appendChild(o),i.className="CodeMirror-foldmarker"}else i&&(i=i.cloneNode(!0));return i}(t,i,c);e.on(u,"mousedown",(function(t){f.clear(),e.e_preventDefault(t)}));var f=t.markText(c.from,c.to,{replacedWith:u,clearOnEnter:r(t,i,"clearOnEnter"),__isFold:!0});f.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,c.from,c.to)}}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),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(),{scanUp:!1},"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var n={rangeFinder:e.fold.auto,widget:"\u2194",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function r(e,t,r){if(t&&void 0!==t[r])return t[r];var i=e.options.foldOptions;return i&&void 0!==i[r]?i[r]:n[r]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return r(this,e,t)}))}(CodeMirror),function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,r,i){var o;i&&i!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",s),t.off("changes",u),t.off("viewportChange",f),t.off("fold",h),t.off("unfold",h),t.off("swapDoc",u),t.off("optionChange",c)),r&&(t.state.foldGutter=new n((!0===(o=r)&&(o={}),null==o.gutter&&(o.gutter="CodeMirror-foldgutter"),null==o.indicatorOpen&&(o.indicatorOpen="CodeMirror-foldgutter-open"),null==o.indicatorFolded&&(o.indicatorFolded="CodeMirror-foldgutter-folded"),o)),a(t),t.on("gutterClick",s),t.on("changes",u),t.on("viewportChange",f),t.on("fold",h),t.on("unfold",h),t.on("swapDoc",u),t.on("optionChange",c))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold){var o=r[i].find(-1);if(o&&o.line===n)return r[i]}}function i(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,n,o){var a=e.state.foldGutter.options,s=n-1,c=e.foldOption(a,"minFoldSize"),u=e.foldOption(a,"rangeFinder"),f="string"==typeof a.indicatorFolded&&l(a.indicatorFolded),h="string"==typeof a.indicatorOpen&&l(a.indicatorOpen);e.eachLine(n,o,(function(n){++s;var o=null,l=n.gutterMarkers;if(l&&(l=l[a.gutter]),r(e,s)){if(f&&l&&f.test(l.className))return;o=i(a.indicatorFolded)}else{var d=t(s,0),p=u&&u(e,d);if(p&&p.to.line-p.from.line>=c){if(h&&l&&h.test(l.className))return;o=i(a.indicatorOpen)}}(o||l)&&e.setGutterMarker(n,a.gutter,o)}))}function l(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}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 s(e,n,i){var o=e.state.foldGutter;if(o){var l=o.options;if(i==l.gutter){var a=r(e,n);a?a.clear():e.foldCode(t(n,0),l)}}}function c(e,t){"mode"==t&&u(e)}function u(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 f(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 h(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&o(e,r,r+1)}}}(CodeMirror),function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var r="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",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function l(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function a(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function s(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(a(e))continue;return}if(l(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 u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(l(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function f(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(a(e))continue;return}if(l(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function h(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(l(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 d(e,n){for(var r=[];;){var i,o=f(e),l=e.line,a=e.ch-(o?o[0].length:0);if(!o||!(i=c(e)))return;if("selfClose"!=i)if(o[1]){for(var s=r.length-1;s>=0;--s)if(r[s]==o[2]){r.length=s;break}if(s<0&&(!n||n==o[2]))return{tag:o[2],from:t(l,a),to:t(e.line,e.ch)}}else r.push(o[2])}}function p(e,n){for(var r=[];;){var i=h(e);if(!i)return;if("selfClose"!=i){var o=e.line,l=e.ch,a=u(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var s=r.length-1;s>=0;--s)if(r[s]==a[2]){r.length=s;break}if(s<0&&(!n||n==a[2]))return{tag:a[2],from:t(e.line,e.ch),to:t(o,l)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new o(e,r.line,0);;){var l=f(i);if(!l||i.line!=r.line)return;var a=c(i);if(!a)return;if(!l[1]&&"selfClose"!=a){var s=t(i.line,i.ch),u=d(i,l[2]);return u&&n(u.from,s)>0?{from:s,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var l=new o(e,r.line,r.ch,i);if(-1!=l.text.indexOf(">")||-1!=l.text.indexOf("<")){var a=c(l),s=a&&t(l.line,l.ch),f=a&&u(l);if(a&&f&&!(n(l,r)>0)){var h={from:t(l.line,l.ch),to:s,tag:f[2]};return"selfClose"==a?{open:h,close:null,at:"open"}:f[1]?{open:p(l,f[2]),close:h,at:"close"}:{open:h,close:d(l=new o(e,s.line,s.ch,i),f[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new o(e,t.line,t.ch,n);;){var l=p(i,r);if(!l)break;var a=d(new o(e,t.line,t.ch,n),l.tag);if(a)return{open:l,close:a}}},e.scanForClosingTag=function(e,t,n,r){return d(new o(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(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 r=n.getCursor(),i=n.getViewport();i.from=Math.min(i.from,r.line),i.to=Math.max(r.line+1,i.to);var o=e.findMatchingTag(n,r,i);if(o){if(n.state.matchBothTags){var l="open"==o.at?o.open:o.close;l&&(n.state.tagHit=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}))}var a="close"==o.at?o.open:o.close;a?n.state.tagOther=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}}))}function r(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,(function(i,o,l){l&&l!=e.Init&&(i.off("cursorActivity",n),i.off("viewportChange",r),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",n),i.on("viewportChange",r),n(i))})),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var r="close"==n.at?n.open:n.close;r&&t.extendSelection(r.to,r.from)}}}(CodeMirror),function(e){"use strict";var t="CodeMirror-hint-active";function n(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=function(e,t,n){var r=e.options.hintOptions,i={};for(var o in c)i[o]=c[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}(this,this.getCursor("start"),t);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<r.length;i++)if(r[i].head.line!=r[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new n(this,t);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var r=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},i=window.cancelAnimationFrame||clearTimeout;function o(e){return"string"==typeof e?e:e.text}function l(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function a(n,r){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=n,this.data=r,this.picked=!1;var i=this,a=n.cm,s=a.getInputField().ownerDocument,c=s.defaultView||s.parentWindow,u=this.hints=s.createElement("ul");u.setAttribute("role","listbox"),u.setAttribute("aria-expanded","true"),u.id=this.id;var f=n.cm.options.theme;u.className="CodeMirror-hints "+f,this.selectedHint=r.selectedHint||0;for(var h=r.list,d=0;d<h.length;++d){var p=u.appendChild(s.createElement("li")),g=h[d],m="CodeMirror-hint"+(d!=this.selectedHint?"":" "+t);null!=g.className&&(m=g.className+" "+m),p.className=m,d==this.selectedHint&&p.setAttribute("aria-selected","true"),p.id=this.id+"-"+d,p.setAttribute("role","option"),g.render?g.render(p,r,g):p.appendChild(s.createTextNode(g.displayText||o(g))),p.hintId=d}var v=n.options.container||s.body,y=a.cursorCoords(n.options.alignWithWord?r.from:null),b=y.left,x=y.bottom,C=!0,w=0,S=0;if(v!==s.body){var k=-1!==["absolute","relative","fixed"].indexOf(c.getComputedStyle(v).position)?v:v.offsetParent,L=k.getBoundingClientRect(),M=s.body.getBoundingClientRect();w=L.left-M.left-k.scrollLeft,S=L.top-M.top-k.scrollTop}u.style.left=b-w+"px",u.style.top=x-S+"px";var T=c.innerWidth||Math.max(s.body.offsetWidth,s.documentElement.offsetWidth),N=c.innerHeight||Math.max(s.body.offsetHeight,s.documentElement.offsetHeight);v.appendChild(u),a.getInputField().setAttribute("aria-autocomplete","list"),a.getInputField().setAttribute("aria-owns",this.id),a.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var O,A=n.options.moveOnOverlap?u.getBoundingClientRect():new DOMRect,D=!!n.options.paddingForScrollbar&&u.scrollHeight>u.clientHeight+1;if(setTimeout((function(){O=a.getScrollInfo()})),A.bottom-N>0){var F=A.bottom-A.top,P=A.top-(y.bottom-y.top)-2;N-A.top<P?(F>P&&(u.style.height=(F=P)+"px"),u.style.top=(x=y.top-F)+S+"px",C=!1):u.style.height=N-A.top-2+"px"}var W,H=A.right-T;if(D&&(H+=a.display.nativeBarWidth),H>0&&(A.right-A.left>T&&(u.style.width=T-5+"px",H-=A.right-A.left-T),u.style.left=(b=Math.max(y.left-H-w,0))+"px"),D)for(var I=u.firstChild;I;I=I.nextSibling)I.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var l in r)r.hasOwnProperty(l)&&o(l,r[l]);var a=e.options.extraKeys;if(a)for(var l in a)a.hasOwnProperty(l)&&o(l,a[l]);return i}(n,{moveFocus:function(e,t){i.changeActive(i.selectedHint+e,t)},setFocus:function(e){i.changeActive(e)},menuSize:function(){return i.screenAmount()},length:h.length,close:function(){n.close()},pick:function(){i.pick()},data:r})),n.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){W=setTimeout((function(){n.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(W)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();O||(O=a.getScrollInfo());var r=x+O.top-e.top,i=r-(c.pageYOffset||(s.documentElement||s.body).scrollTop);if(C||(i+=u.offsetHeight),i<=t.top||i>=t.bottom)return n.close();u.style.top=r+"px",u.style.left=b+O.left-e.left+"px"}),e.on(u,"dblclick",(function(e){var t=l(u,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),i.pick())})),e.on(u,"click",(function(e){var t=l(u,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),n.options.completeOnSingleClick&&i.pick())})),e.on(u,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var E=this.getSelectedHintRange();return 0===E.from&&0===E.to||this.scrollToActive(),e.signal(r,"select",h[this.selectedHint],u.childNodes[this.selectedHint]),!0}function s(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(o(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(i(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var o=this;this.debounce=r((function(){o.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;s(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new a(this,t),e.signal(t,"shown")))}},a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(n,r){if(n>=this.data.list.length?n=r?this.data.list.length-1:0:n<0&&(n=r?0:this.data.list.length-1),this.selectedHint!=n){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+t,""),i.removeAttribute("aria-selected")),(i=this.hints.childNodes[this.selectedHint=n]).className+=" "+t,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}(e,i);!function i(o){if(o==r.length)return t(null);s(r[o],e,n,(function(e){e&&e.list.length>0?t(e):i(o+1)}))}(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),l=e.Pos(i.line,o.start),a=i;o.start<i.ch&&/\w/.test(o.string.charAt(i.ch-o.start-1))?r=o.string.substr(0,i.ch-o.start):(r="",l=i);for(var s=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,r.length)==r&&s.push(u)}if(s.length)return{list:s,from:l,to:a}})),e.commands.autocomplete=e.showHint;var c={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(CodeMirror),function(e){"use strict";var t=e.Pos;function n(e,t,n){return n?e.indexOf(t)>=0:0==e.lastIndexOf(t,0)}e.registerHelper("hint","xml",(function(r,i){var o=i&&i.schemaInfo,l=i&&i.quoteChar||'"',a=i&&i.matchInMiddle;if(o){var s=r.getCursor(),c=r.getTokenAt(s);if(c.end>s.ch&&(c.end=s.ch,c.string=c.string.slice(0,s.ch-c.start)),(b=e.innerMode(r.getMode(),c.state)).mode.xmlCurrentTag){var u,f,h=[],d=!1,p=/\btag\b/.test(c.type)&&!/>$/.test(c.string),g=p&&/^\w/.test(c.string);if(g){var m=r.getLine(s.line).slice(Math.max(0,c.start-2),c.start),v=/<\/$/.test(m)?"close":/<$/.test(m)?"open":null;v&&(f=c.start-("close"==v?2:1))}else p&&"<"==c.string?v="open":p&&"</"==c.string&&(v="close");var y=b.mode.xmlCurrentTag(b.state);if(!p&&!y||v){g&&(u=c.string),d=v;var b,x=b.mode.xmlCurrentContext?b.mode.xmlCurrentContext(b.state):[],C=(b=x.length&&x[x.length-1])&&o[b],w=b?C&&C.children:o["!top"];if(w&&"close"!=v)for(var S=0;S<w.length;++S)u&&!n(w[S],u,a)||h.push("<"+w[S]);else if("close"!=v)for(var k in o)!o.hasOwnProperty(k)||"!top"==k||"!attrs"==k||u&&!n(k,u,a)||h.push("<"+k);b&&(!u||"close"==v&&n(b,u,a))&&h.push("</"+b+">")}else{var L=(C=y&&o[y.name])&&C.attrs,M=o["!attrs"];if(!L&&!M)return;if(L){if(M){var T={};for(var N in M)M.hasOwnProperty(N)&&(T[N]=M[N]);for(var N in L)L.hasOwnProperty(N)&&(T[N]=L[N]);L=T}}else L=M;if("string"==c.type||"="==c.string){var O,A=(m=r.getRange(t(s.line,Math.max(0,s.ch-60)),t(s.line,"string"==c.type?c.start:c.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!A||!L.hasOwnProperty(A[1])||!(O=L[A[1]]))return;if("function"==typeof O&&(O=O.call(this,r)),"string"==c.type){u=c.string;var D=0;/['"]/.test(c.string.charAt(0))&&(l=c.string.charAt(0),u=c.string.slice(1),D++);var F=c.string.length;if(/['"]/.test(c.string.charAt(F-1))&&(l=c.string.charAt(F-1),u=c.string.substr(D,F-2)),D){var P=r.getLine(s.line);P.length>c.end&&P.charAt(c.end)==l&&c.end++}d=!0}var W=function(e){if(e)for(var t=0;t<e.length;++t)u&&!n(e[t],u,a)||h.push(l+e[t]+l);return I()};return O&&O.then?O.then(W):W(O)}for(var H in"attribute"==c.type&&(u=c.string,d=!0),L)!L.hasOwnProperty(H)||u&&!n(H,u,a)||h.push(H)}return I()}}function I(){return{list:h,from:d?t(s.line,null==f?c.start:f):s,to:d?t(s.line,c.end):s}}}))}(CodeMirror),function(e){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),n=["_blank","_self","_top","_parent"],r=["ascii","utf-8","utf-16","latin1","latin1"],i=["get","post","put","delete"],o=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],l=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],a={attrs:{}},s={a:{attrs:{href:null,ping:null,type:null,media:l,target:n,hreflang:t}},abbr:a,acronym:a,address:a,applet:a,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:l,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:a,aside:a,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:a,base:{attrs:{href:null,target:n}},basefont:a,bdi:a,bdo:a,big:a,blockquote:{attrs:{cite:null}},body:a,br:a,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:o,formmethod:i,formnovalidate:["","novalidate"],formtarget:n,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:a,center:a,cite:a,code:a,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:a,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:a,dir:a,div:a,dialog:{attrs:{open:null}},dl:a,dt:a,em:a,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:a,figure:a,font:a,footer:a,form:{attrs:{action:null,name:null,"accept-charset":r,autocomplete:["on","off"],enctype:o,method:i,novalidate:["","novalidate"],target:n}},frame:a,frameset:a,h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:a,hgroup:a,hr:a,html:{attrs:{manifest:null},children:["head","body"]},i:a,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:o,formmethod:i,formnovalidate:["","novalidate"],formtarget:n,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:a,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:a,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:l,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:a,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:r,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:a,noframes:a,noscript:a,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:a,param:{attrs:{name:null,value:null}},pre:a,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:a,rt:a,ruby:a,s:a,samp:a,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:r}},section:a,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:a,source:{attrs:{src:null,type:null,media:null}},span:a,strike:a,strong:a,style:{attrs:{type:["text/css"],media:l,scoped:null}},sub:a,summary:a,sup:a,table:a,tbody:a,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:a,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:a,time:{attrs:{datetime:null}},title:a,tr:a,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:t}},tt:a,u:a,ul:a,var:a,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:a},c={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function u(e){for(var t in c)c.hasOwnProperty(t)&&(e.attrs[t]=c[t])}for(var f in u(a),s)s.hasOwnProperty(f)&&s[f]!=a&&u(s[f]);e.htmlSchema=s,e.registerHelper("hint","html",(function(t,n){var r={schemaInfo:s};if(n)for(var i in n)r[i]=n[i];return e.hint.xml(t,r)}))}(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,i){var o,l,a=r.indentUnit,s={},c=i.htmlMode?t:n;for(var u in c)s[u]=c[u];for(var u in i)s[u]=i[u];function f(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?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(p(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=f,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=f,t.state=b,t.tagName=t.tagStart=null;var l=t.tokenize(e,t);return l?l+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=h;break}return"string"},r.isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=f;break}n.next()}return e}}function p(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=p(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=f;break}return n.tokenize=p(e-1),n.tokenize(t,n)}}return"meta"}}function g(e){return e&&e.toLowerCase()}function m(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&(e.context=e.context.prev)}function y(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!s.contextGrabbers.hasOwnProperty(g(n))||!s.contextGrabbers[g(n)].hasOwnProperty(g(t)))return;v(e)}}function b(e,t,n){return"openTag"==e?(n.tagStart=t.column(),x):"closeTag"==e?C:b}function x(e,t,n){return"word"==e?(n.tagName=t.current(),l="tag",k):s.allowMissingTagName&&"endTag"==e?(l="tag bracket",k(e,t,n)):(l="error",x)}function C(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&s.implicitlyClosed.hasOwnProperty(g(n.context.tagName))&&v(n),n.context&&n.context.tagName==r||!1===s.matchClosing?(l="tag",w):(l="tag error",S)}return s.allowMissingTagName&&"endTag"==e?(l="tag bracket",w(e,t,n)):(l="error",S)}function w(e,t,n){return"endTag"!=e?(l="error",w):(v(n),b)}function S(e,t,n){return l="error",w(e,0,n)}function k(e,t,n){if("word"==e)return l="attribute",L;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(g(r))?y(n,r):(y(n,r),n.context=new m(n,r,i==n.indented)),b}return l="error",k}function L(e,t,n){return"equals"==e?M:(s.allowMissing||(l="error"),k(e,0,n))}function M(e,t,n){return"string"==e?T:"word"==e&&s.allowUnquoted?(l="string",k):(l="error",k(e,0,n))}function T(e,t,n){return"string"==e?T:k(e,0,n)}return f.isInText=!0,{startState:function(e){var t={tokenize:f,state:b,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;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(l=null,t.state=t.state(o||n,e,t),l&&(n="error"==l?n+" error":l)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+a;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=f)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+a*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!s.implicitlyClosed.hasOwnProperty(g(i.tagName)))break;i=i.prev}else if(o)for(;i;){var l=s.contextGrabbers[g(i.tagName)];if(!l||!l.hasOwnProperty(g(o[2])))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+a:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==M&&(e.state=k)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(CodeMirror),function(e){"use strict";var t={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"]]},n={};function r(e,t){var r=e.match(function(e){return n[e]||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"</\\s*"+e+"\\s*>","i")}function o(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}e.defineMode("htmlmixed",(function(n,l){var a=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:l.multilineTagIndentFactor,multilineTagIndentPastTag:l.multilineTagIndentPastTag,allowMissingTagName:l.allowMissingTagName}),s={},c=l&&l.tags,u=l&&l.scriptTypes;if(o(t,s),c&&o(c,s),u)for(var f=u.length-1;f>=0;f--)s.script.unshift(["type",u[f].matches,u[f].mode]);function h(t,o){var l,c=a.token(t,o.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(t.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&s.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&u&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var d=">"==t.current()&&function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(!i[0]||i[1].test(r(t,i[0])))return i[2]}}(s[f[1]],f[2]),p=e.getMode(n,d),g=i(f[1],!0),m=i(f[1],!1);o.token=function(e,t){return e.match(g,!1)?(t.token=h,t.localState=t.localMode=null,null):function(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}(e,m,t.localMode.token(e,t.localState))},o.localMode=p,o.localState=e.startState(p,a.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=t.current(),t.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:e.startState(a)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(a,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?a.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||a}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(CodeMirror),function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r){t.extendSelectionsBy((function(i){return t.display.shift||t.doc.extend||i.empty()?function(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var l,a="start",s=r.ch,c=s,u=i<0?0:o.length,f=0;c!=u;c+=i,f++){var h=o.charAt(i<0?c-1:c),d="_"!=h&&e.isWordChar(h)?"w":"o";if("w"==d&&h.toUpperCase()==h&&(d="W"),"start"==a)"o"!=d?(a="in",l=d):s=c+i;else if("in"==a&&l!=d){if("w"==l&&"W"==d&&i<0&&c--,"W"==l&&"w"==d&&i>0){if(c==s+1){l="w";continue}c--}break}}return n(r.line,c)}(t.doc,i.head,r):r<0?i.from():i.to()}))}function i(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,i=[],o=-1,l=0;l<e;l++){var a=t.listSelections()[l].head;if(!(a.line<=o)){var s=n(a.line+(r?0:1),0);t.replaceRange("\n",s,null,"+insertLine"),t.indentLine(s.line,null,!0),i.push({head:s,anchor:s}),o=a.line+1}}t.setSelections(i)})),t.execCommand("indentAuto")}function o(t,r){for(var i=r.ch,o=i,l=t.getLine(r.line);i&&e.isWordChar(l.charAt(i-1));)--i;for(;o<l.length&&e.isWordChar(l.charAt(o));)++o;return{from:n(r.line,i),to:n(r.line,o),word:l.slice(i,o)}}function l(e,t){for(var n=e.listSelections(),r=[],i=0;i<n.length;i++){var o=n[i],l=e.findPosV(o.anchor,t,"line",o.anchor.goalColumn),a=e.findPosV(o.head,t,"line",o.head.goalColumn);l.goalColumn=null!=o.anchor.goalColumn?o.anchor.goalColumn:e.cursorCoords(o.anchor,"div").left,a.goalColumn=null!=o.head.goalColumn?o.head.goalColumn:e.cursorCoords(o.head,"div").left;var s={anchor:l,head:a};r.push(o),r.push(s)}e.setSelections(r)}t.goSubwordLeft=function(e){r(e,-1)},t.goSubwordRight=function(e){r(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++)for(var o=t[i].from(),l=t[i].to(),a=o.line;a<=l.line;++a)l.line>o.line&&a==l.line&&0==l.ch||r.push({anchor:a==o.line?o:n(a,0),head:a==l.line?l:n(a)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){var o=t[i];r.push({anchor:n(o.from().line,0),head:n(o.to().line+1,0)})}e.setSelections(r)},t.insertLineAfter=function(e){return i(e,!1)},t.insertLineBefore=function(e){return i(e,!0)},t.selectNextOccurrence=function(t){var r=t.getCursor("from"),i=t.getCursor("to"),l=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(r,i)){var a=o(t,r);if(!a.word)return;t.setSelection(a.from,a.to),l=!0}else{var s=t.getRange(r,i),c=l?new RegExp("\\b"+s+"\\b"):s,u=t.getSearchCursor(c,i),f=u.findNext();if(f||(f=(u=t.getSearchCursor(c,n(t.firstLine(),0))).findNext()),!f||function(t,n,r){for(var i=0;i<t.length;i++)if(0==e.cmpPos(t[i].from(),n)&&0==e.cmpPos(t[i].to(),r))return!0;return!1}(t.listSelections(),u.from(),u.to()))return;t.addSelection(u.from(),u.to())}l&&(t.state.sublimeFindFullWord=t.doc.sel)},t.skipAndSelectNextOccurrence=function(n){var r=n.getCursor("anchor"),i=n.getCursor("head");t.selectNextOccurrence(n),0!=e.cmpPos(r,i)&&n.doc.setSelections(n.doc.listSelections().filter((function(e){return e.anchor!=r||e.head!=i})))},t.addCursorToPrevLine=function(e){l(e,-1)},t.addCursorToNextLine=function(e){l(e,1)};var a="(){}[]";function s(t){for(var r=t.listSelections(),i=[],o=0;o<r.length;o++){var l=r[o],s=l.head,c=t.scanForBracket(s,-1);if(!c)return!1;for(;;){var u=t.scanForBracket(s,1);if(!u)return!1;if(u.ch==a.charAt(a.indexOf(c.ch)+1)){var f=n(c.pos.line,c.pos.ch+1);if(0!=e.cmpPos(f,l.from())||0!=e.cmpPos(u.pos,l.to())){i.push({anchor:f,head:u.pos});break}if(!(c=t.scanForBracket(c.pos,-1)))return!1}s=n(u.pos.line,u.pos.ch+1)}}return t.setSelections(i),!0}function c(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}function u(t,r,i){if(t.isReadOnly())return e.Pass;for(var o,l=t.listSelections(),a=[],s=0;s<l.length;s++){var c=l[s];if(!c.empty()){for(var u=c.from().line,f=c.to().line;s<l.length-1&&l[s+1].from().line==f;)f=l[++s].to().line;l[s].to().ch||f--,a.push(u,f)}}a.length?o=!0:a.push(t.firstLine(),t.lastLine()),t.operation((function(){for(var e=[],l=0;l<a.length;l+=2){var s=a[l],c=a[l+1],u=n(s,0),f=n(c),h=t.getRange(u,f,!1);r?h.sort((function(e,t){return e<t?-i:e==t?0:i})):h.sort((function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-i:e==t?0:i})),t.replaceRange(h,u,f),o&&e.push({anchor:u,head:n(c+1,0)})}o&&t.setSelections(e,0)}))}function f(t,n){t.operation((function(){for(var r=t.listSelections(),i=[],l=[],a=0;a<r.length;a++)(c=r[a]).empty()?(i.push(a),l.push("")):l.push(n(t.getRange(c.from(),c.to())));var s;for(t.replaceSelections(l,"around","case"),a=i.length-1;a>=0;a--){var c=r[i[a]];if(!(s&&e.cmpPos(c.head,s)>0)){var u=o(t,c.head);s=u.from,t.replaceRange(n(u.word),u.from,u.to)}}}))}function h(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=o(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function d(e,t){var r=h(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){s(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!s(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var i=t.scanForBracket(r.head,1,c(t.getTokenTypeAt(r.head)));if(i&&0!=e.cmpPos(i.pos,r.head))return i.pos;var o=t.scanForBracket(r.head,-1,c(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return o&&n(o.pos.line,o.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.firstLine()-1,l=[],a=0;a<r.length;a++){var s=r[a],c=s.from().line-1,u=s.to().line;l.push({anchor:n(s.anchor.line-1,s.anchor.ch),head:n(s.head.line-1,s.head.ch)}),0!=s.to().ch||s.empty()||--u,c>o?i.push(c,u):i.length&&(i[i.length-1]=u),o=u}t.operation((function(){for(var e=0;e<i.length;e+=2){var r=i[e],o=i[e+1],a=t.getLine(r);t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),o>t.lastLine()?t.replaceRange("\n"+a,n(t.lastLine()),null,"+swapLine"):t.replaceRange(a+"\n",n(o,0),null,"+swapLine")}t.setSelections(l),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,l=r.length-1;l>=0;l--){var a=r[l],s=a.to().line+1,c=a.from().line;0!=a.to().ch||a.empty()||s--,s<o?i.push(s,c):i.length&&(i[i.length-1]=c),o=c}t.operation((function(){for(var e=i.length-2;e>=0;e-=2){var r=i[e],o=i[e+1],l=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(l+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){for(var o=t[i],l=o.from(),a=l.line,s=o.to().line;i<t.length-1&&t[i+1].from().line==s;)s=t[++i].to().line;r.push({start:a,end:s,anchor:!o.empty()&&l})}e.operation((function(){for(var t=0,i=[],o=0;o<r.length;o++){for(var l,a=r[o],s=a.anchor&&n(a.anchor.line-t,a.anchor.ch),c=a.start;c<=a.end;c++){var u=c-t;c==a.end&&(l=n(u,e.getLine(u).length+1)),u<e.lastLine()&&(e.replaceRange(" ",n(u),n(u+1,/^\s*/.exec(e.getLine(u+1))[0].length)),++t)}i.push({anchor:s||l,head:l})}e.setSelections(i,0)}))},t.duplicateLine=function(e){e.operation((function(){for(var t=e.listSelections().length,r=0;r<t;r++){var i=e.listSelections()[r];i.empty()?e.replaceRange(e.getLine(i.head.line)+"\n",n(i.head.line,0)):e.replaceRange(e.getRange(i.from(),i.to()),i.from())}e.scrollIntoView()}))},t.sortLines=function(e){u(e,!0,1)},t.reverseSortLines=function(e){u(e,!0,-1)},t.sortLinesInsensitive=function(e){u(e,!1,1)},t.reverseSortLinesInsensitive=function(e){u(e,!1,-1)},t.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},t.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},t.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var i=t[r].from(),o=t[r].to(),l=t[r].empty()?e.findMarksAt(i):e.findMarks(i,o),a=0;a<l.length;a++)if(l[a].sublimeBookmark){l[a].clear();for(var s=0;s<n.length;s++)n[s]==l[a]&&n.splice(s--,1);break}a==l.length&&n.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},t.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},t.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var i=t[r].find();i?n.push({anchor:i.from,head:i.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},t.smartBackspace=function(t){if(t.somethingSelected())return e.Pass;t.operation((function(){for(var r=t.listSelections(),i=t.getOption("indentUnit"),o=r.length-1;o>=0;o--){var l=r[o].head,a=t.getRange({line:l.line,ch:0},l),s=e.countColumn(a,null,t.getOption("tabSize")),c=t.findPosH(l,-1,"char",!1);if(a&&!/\S/.test(a)&&s%i==0){var u=new n(l.line,e.findColumn(a,s-i,i));u.ch!=l.ch&&(c=u)}t.replaceRange("",c,l,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){f(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){f(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){d(e,!0)},t.findUnderPrevious=function(e){d(e,!1)},t.findAllUnder=function(e){var t=h(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var p=e.keyMap;p.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(p.macSublime),p.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(p.pcSublime);var g=p.default==p.macDefault;p.sublime=g?p.macSublime:p.pcSublime}(CodeMirror);var r=window.CodeMirror;return window.CodeMirror=n,r}.bind(this));