Code Snippets - Version 2.2.0

Version Description

  • Introduced CodeSniffer testing on code
  • Fixed description heading disappearing when media buttons enabled
  • Added snippet scope selector
  • Minified all CSS and JS in plugin
  • Made CodeMirror theme names more readable
  • Fixed bug causing translations to not be loaded
Download this release

Release Info

Developer bungeshea
Plugin Icon Code Snippets
Version 2.2.0
Comparing to
See all releases

Code changes from version 2.1.0 to 2.2.0

Files changed (64) hide show
  1. code-snippets.php +7 -7
  2. css/min/cmthemes/3024-day.css +1 -0
  3. css/min/cmthemes/3024-night.css +1 -0
  4. css/min/cmthemes/ambiance-mobile.css +1 -0
  5. css/min/cmthemes/ambiance.css +1 -0
  6. css/min/cmthemes/base16-dark.css +1 -0
  7. css/min/cmthemes/base16-light.css +1 -0
  8. css/min/cmthemes/blackboard.css +1 -0
  9. css/min/cmthemes/cobalt.css +1 -0
  10. css/min/cmthemes/colorforth.css +1 -0
  11. css/min/cmthemes/eclipse.css +1 -0
  12. css/min/cmthemes/elegant.css +1 -0
  13. css/min/cmthemes/erlang-dark.css +1 -0
  14. css/min/cmthemes/lesser-dark.css +1 -0
  15. css/min/cmthemes/liquibyte.css +1 -0
  16. css/min/cmthemes/mbo.css +1 -0
  17. css/min/cmthemes/mdn-like.css +1 -0
  18. css/min/cmthemes/midnight.css +1 -0
  19. css/min/cmthemes/monokai.css +1 -0
  20. css/min/cmthemes/neat.css +1 -0
  21. css/min/cmthemes/neo.css +1 -0
  22. css/min/cmthemes/night.css +1 -0
  23. css/min/cmthemes/paraiso-dark.css +1 -0
  24. css/min/cmthemes/paraiso-light.css +1 -0
  25. css/min/cmthemes/pastel-on-dark.css +1 -0
  26. css/min/cmthemes/rubyblue.css +1 -0
  27. css/min/cmthemes/solarized.css +1 -0
  28. css/min/cmthemes/the-matrix.css +1 -0
  29. css/min/cmthemes/tomorrow-night-bright.css +1 -0
  30. css/min/cmthemes/tomorrow-night-eighties.css +1 -0
  31. css/min/cmthemes/twilight.css +1 -0
  32. css/min/cmthemes/vibrant-ink.css +1 -0
  33. css/min/cmthemes/xq-dark.css +1 -0
  34. css/min/cmthemes/xq-light.css +1 -0
  35. css/min/cmthemes/zenburn.css +1 -0
  36. css/min/codemirror.css +1 -0
  37. css/min/edit.css +1 -0
  38. css/min/manage.css +1 -0
  39. css/min/settings.css +1 -0
  40. css/min/tagit.css +1 -0
  41. includes/admin.php +36 -4
  42. includes/class-export.php +9 -14
  43. includes/db.php +8 -6
  44. includes/edit/admin-messages.php +6 -6
  45. includes/edit/admin.php +58 -59
  46. includes/edit/edit.php +49 -109
  47. includes/editor.php +1 -1
  48. includes/import/admin-messages.php +1 -1
  49. includes/manage/admin-help.php +2 -2
  50. includes/manage/admin-messages.php +7 -7
  51. includes/manage/admin.php +8 -8
  52. includes/manage/class-list-table.php +129 -125
  53. includes/manage/manage.php +0 -25
  54. includes/settings/admin.php +0 -2
  55. includes/settings/class-settings.php +10 -2
  56. includes/settings/editor-preview.php +13 -27
  57. includes/settings/settings-fields.php +3 -3
  58. includes/settings/settings.php +13 -16
  59. includes/snippet-ops.php +8 -6
  60. js/min/codemirror.js +6 -0
  61. js/min/tag-it.js +1 -0
  62. languages/code-snippets.pot +101 -77
  63. readme.txt +12 -1
  64. uninstall.php +2 -3
code-snippets.php CHANGED
@@ -7,7 +7,7 @@
7
  * contribute to the localization, please see http://code-snippets.bungeshea.com
8
  *
9
  * @package Code_Snippets
10
- * @version 2.1.0
11
  * @author Shea Bunge <http://bungeshea.com/>
12
  * @copyright Copyright (c) 2012-2014, Shea Bunge
13
  * @link http://code-snippets.bungeshea.com
@@ -20,11 +20,11 @@ Plugin URI: http://code-snippets.bungeshea.com
20
  Description: An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!
21
  Author: Shea Bunge
22
  Author URI: http://bungeshea.com
23
- Version: 2.1.0
24
  License: MIT
25
  License URI: license.txt
26
  Text Domain: code-snippets
27
- Domain Path: /languages/
28
  */
29
 
30
  /* Exit if accessed directly */
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
42
  * @since 2.0
43
  * @var string A PHP-standardized version number string
44
  */
45
- define( 'CODE_SNIPPETS_VERSION', '2.1.0' );
46
 
47
  /**
48
  * The full path to the main file of this plugin
@@ -53,7 +53,7 @@ define( 'CODE_SNIPPETS_VERSION', '2.1.0' );
53
  *
54
  * @since 2.0
55
  * @var string
56
- */
57
  define( 'CODE_SNIPPETS_FILE', __FILE__ );
58
 
59
  /**
@@ -107,13 +107,13 @@ add_action( 'plugins_loaded', 'execute_active_snippets', 1 );
107
 
108
  /**
109
  * Load up the localization file if we're using WordPress in a different language.
110
- * Place it in this plugin's "languages" folder and name it "code-snippets-[value in wp-config].mo"
111
  *
112
  * If you wish to contribute a language file to be included in the Code Snippets package,
113
  * please see create an issue on GitHub: https://github.com/sheabunge/code-snippets/issues
114
  */
115
  function code_snippets_load_textdomain() {
116
- load_plugin_textdomain( 'code-snippets', false, dirname( basename( __FILE__ ) ) . '/languages/' );
117
  }
118
 
119
  add_action( 'plugins_loaded', 'code_snippets_load_textdomain' );
7
  * contribute to the localization, please see http://code-snippets.bungeshea.com
8
  *
9
  * @package Code_Snippets
10
+ * @version 2.2.0
11
  * @author Shea Bunge <http://bungeshea.com/>
12
  * @copyright Copyright (c) 2012-2014, Shea Bunge
13
  * @link http://code-snippets.bungeshea.com
20
  Description: An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!
21
  Author: Shea Bunge
22
  Author URI: http://bungeshea.com
23
+ Version: 2.2.0
24
  License: MIT
25
  License URI: license.txt
26
  Text Domain: code-snippets
27
+ Domain Path: /languages
28
  */
29
 
30
  /* Exit if accessed directly */
42
  * @since 2.0
43
  * @var string A PHP-standardized version number string
44
  */
45
+ define( 'CODE_SNIPPETS_VERSION', '2.2.0' );
46
 
47
  /**
48
  * The full path to the main file of this plugin
53
  *
54
  * @since 2.0
55
  * @var string
56
+ */
57
  define( 'CODE_SNIPPETS_FILE', __FILE__ );
58
 
59
  /**
107
 
108
  /**
109
  * Load up the localization file if we're using WordPress in a different language.
110
+ * Place it in this plugin's "languages" folder and name it "code-snippets-[language_COUNTRY].mo"
111
  *
112
  * If you wish to contribute a language file to be included in the Code Snippets package,
113
  * please see create an issue on GitHub: https://github.com/sheabunge/code-snippets/issues
114
  */
115
  function code_snippets_load_textdomain() {
116
+ load_plugin_textdomain( 'code-snippets', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
117
  }
118
 
119
  add_action( 'plugins_loaded', 'code_snippets_load_textdomain' );
css/min/cmthemes/3024-day.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-3024-day.CodeMirror{background:#f7f7f7;color:#3a3432}.cm-s-3024-day div.CodeMirror-selected{background:#d6d5d4!important}.cm-s-3024-day.CodeMirror ::selection{background:#d6d5d4}.cm-s-3024-day.CodeMirror ::-moz-selection{background:#d9d9d9}.cm-s-3024-day .CodeMirror-gutters{background:#f7f7f7;border-right:0}.cm-s-3024-day .CodeMirror-guttermarker{color:#db2d20}.cm-s-3024-day .CodeMirror-guttermarker-subtle,.cm-s-3024-day .CodeMirror-linenumber{color:#807d7c}.cm-s-3024-day .CodeMirror-cursor{border-left:1px solid #5c5855!important}.cm-s-3024-day span.cm-comment{color:#cdab53}.cm-s-3024-day span.cm-atom,.cm-s-3024-day span.cm-number{color:#a16a94}.cm-s-3024-day span.cm-property,.cm-s-3024-day span.cm-attribute{color:#01a252}.cm-s-3024-day span.cm-keyword{color:#db2d20}.cm-s-3024-day span.cm-string{color:#fded02}.cm-s-3024-day span.cm-variable{color:#01a252}.cm-s-3024-day span.cm-variable-2{color:#01a0e4}.cm-s-3024-day span.cm-def{color:#e8bbd0}.cm-s-3024-day span.cm-bracket{color:#3a3432}.cm-s-3024-day span.cm-tag{color:#db2d20}.cm-s-3024-day span.cm-link{color:#a16a94}.cm-s-3024-day span.cm-error{background:#db2d20;color:#5c5855}.cm-s-3024-day .CodeMirror-activeline-background{background:#e8f2ff!important}.cm-s-3024-day .CodeMirror-matchingbracket{text-decoration:underline;color:#a16a94!important}
css/min/cmthemes/3024-night.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-3024-night.CodeMirror{background:#090300;color:#d6d5d4}.cm-s-3024-night div.CodeMirror-selected{background:#3a3432!important}.cm-s-3024-night.CodeMirror ::selection{background:rgba(58,52,50,.99)}.cm-s-3024-night.CodeMirror ::-moz-selection{background:rgba(58,52,50,.99)}.cm-s-3024-night .CodeMirror-gutters{background:#090300;border-right:0}.cm-s-3024-night .CodeMirror-guttermarker{color:#db2d20}.cm-s-3024-night .CodeMirror-guttermarker-subtle,.cm-s-3024-night .CodeMirror-linenumber{color:#5c5855}.cm-s-3024-night .CodeMirror-cursor{border-left:1px solid #807d7c!important}.cm-s-3024-night span.cm-comment{color:#cdab53}.cm-s-3024-night span.cm-atom,.cm-s-3024-night span.cm-number{color:#a16a94}.cm-s-3024-night span.cm-property,.cm-s-3024-night span.cm-attribute{color:#01a252}.cm-s-3024-night span.cm-keyword{color:#db2d20}.cm-s-3024-night span.cm-string{color:#fded02}.cm-s-3024-night span.cm-variable{color:#01a252}.cm-s-3024-night span.cm-variable-2{color:#01a0e4}.cm-s-3024-night span.cm-def{color:#e8bbd0}.cm-s-3024-night span.cm-bracket{color:#d6d5d4}.cm-s-3024-night span.cm-tag{color:#db2d20}.cm-s-3024-night span.cm-link{color:#a16a94}.cm-s-3024-night span.cm-error{background:#db2d20;color:#807d7c}.cm-s-3024-night .CodeMirror-activeline-background{background:#2F2F2F!important}.cm-s-3024-night .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
css/min/cmthemes/ambiance-mobile.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-ambiance.CodeMirror{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}
css/min/cmthemes/ambiance.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-ambiance .cm-keyword{color:#cda869}.cm-s-ambiance .cm-atom{color:#CF7EA9}.cm-s-ambiance .cm-number{color:#78CF8A}.cm-s-ambiance .cm-def{color:#aac6e3}.cm-s-ambiance .cm-variable{color:#ffb795}.cm-s-ambiance .cm-variable-2{color:#eed1b3}.cm-s-ambiance .cm-variable-3{color:#faded3}.cm-s-ambiance .cm-property{color:#eed1b3}.cm-s-ambiance .cm-operator{color:#fa8d6a}.cm-s-ambiance .cm-comment{color:#555;font-style:italic}.cm-s-ambiance .cm-string{color:#8f9d6a}.cm-s-ambiance .cm-string-2{color:#9d937c}.cm-s-ambiance .cm-meta{color:#D2A8A1}.cm-s-ambiance .cm-qualifier{color:#ff0}.cm-s-ambiance .cm-builtin{color:#99c}.cm-s-ambiance .cm-bracket{color:#24C2C7}.cm-s-ambiance .cm-tag{color:#fee4ff}.cm-s-ambiance .cm-attribute{color:#9B859D}.cm-s-ambiance .cm-header{color:#00f}.cm-s-ambiance .cm-quote{color:#24C2C7}.cm-s-ambiance .cm-hr{color:pink}.cm-s-ambiance .cm-link{color:#F4C20B}.cm-s-ambiance .cm-special{color:#FF9D00}.cm-s-ambiance .cm-error{color:#AF2018}.cm-s-ambiance .CodeMirror-matchingbracket{color:#0f0}.cm-s-ambiance .CodeMirror-nonmatchingbracket{color:#f22}.cm-s-ambiance .CodeMirror-selected{background:rgba(255,255,255,.15)}.cm-s-ambiance.CodeMirror-focused .CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-ambiance.CodeMirror ::selection{background:rgba(255,255,255,.1)}.cm-s-ambiance.CodeMirror ::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-ambiance.CodeMirror{line-height:1.4em;color:#E6E1DC;background-color:#202020;-webkit-box-shadow:inset 0 0 10px #000;-moz-box-shadow:inset 0 0 10px #000;box-shadow:inset 0 0 10px #000}.cm-s-ambiance .CodeMirror-gutters{background:#3D3D3D;border-right:1px solid #4D4D4D;box-shadow:0 10px 20px #000}.cm-s-ambiance .CodeMirror-linenumber{text-shadow:0 1px 1px #4d4d4d;color:#111;padding:0 5px}.cm-s-ambiance .CodeMirror-guttermarker{color:#aaa}.cm-s-ambiance .CodeMirror-guttermarker-subtle{color:#111}.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor{border-left:1px solid #7991E8}.cm-s-ambiance .CodeMirror-activeline-background{background:0% 0% rgba(255,255,255,.031)}.cm-s-ambiance.CodeMirror,.cm-s-ambiance .CodeMirror-gutters{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJ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H5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC")}
css/min/cmthemes/base16-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-base16-dark.CodeMirror{background:#151515;color:#e0e0e0}.cm-s-base16-dark div.CodeMirror-selected{background:#303030!important}.cm-s-base16-dark.CodeMirror ::selection{background:rgba(48,48,48,.99)}.cm-s-base16-dark.CodeMirror ::-moz-selection{background:rgba(48,48,48,.99)}.cm-s-base16-dark .CodeMirror-gutters{background:#151515;border-right:0}.cm-s-base16-dark .CodeMirror-guttermarker{color:#ac4142}.cm-s-base16-dark .CodeMirror-guttermarker-subtle,.cm-s-base16-dark .CodeMirror-linenumber{color:#505050}.cm-s-base16-dark .CodeMirror-cursor{border-left:1px solid #b0b0b0!important}.cm-s-base16-dark span.cm-comment{color:#8f5536}.cm-s-base16-dark span.cm-atom,.cm-s-base16-dark span.cm-number{color:#aa759f}.cm-s-base16-dark span.cm-property,.cm-s-base16-dark span.cm-attribute{color:#90a959}.cm-s-base16-dark span.cm-keyword{color:#ac4142}.cm-s-base16-dark span.cm-string{color:#f4bf75}.cm-s-base16-dark span.cm-variable{color:#90a959}.cm-s-base16-dark span.cm-variable-2{color:#6a9fb5}.cm-s-base16-dark span.cm-def{color:#d28445}.cm-s-base16-dark span.cm-bracket{color:#e0e0e0}.cm-s-base16-dark span.cm-tag{color:#ac4142}.cm-s-base16-dark span.cm-link{color:#aa759f}.cm-s-base16-dark span.cm-error{background:#ac4142;color:#b0b0b0}.cm-s-base16-dark .CodeMirror-activeline-background{background:#202020!important}.cm-s-base16-dark .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
css/min/cmthemes/base16-light.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-base16-light.CodeMirror{background:#f5f5f5;color:#202020}.cm-s-base16-light div.CodeMirror-selected{background:#e0e0e0!important}.cm-s-base16-light.CodeMirror ::selection{background:#e0e0e0}.cm-s-base16-light.CodeMirror ::-moz-selection{background:#e0e0e0}.cm-s-base16-light .CodeMirror-gutters{background:#f5f5f5;border-right:0}.cm-s-base16-light .CodeMirror-guttermarker{color:#ac4142}.cm-s-base16-light .CodeMirror-guttermarker-subtle,.cm-s-base16-light .CodeMirror-linenumber{color:#b0b0b0}.cm-s-base16-light .CodeMirror-cursor{border-left:1px solid #505050!important}.cm-s-base16-light span.cm-comment{color:#8f5536}.cm-s-base16-light span.cm-atom,.cm-s-base16-light span.cm-number{color:#aa759f}.cm-s-base16-light span.cm-property,.cm-s-base16-light span.cm-attribute{color:#90a959}.cm-s-base16-light span.cm-keyword{color:#ac4142}.cm-s-base16-light span.cm-string{color:#f4bf75}.cm-s-base16-light span.cm-variable{color:#90a959}.cm-s-base16-light span.cm-variable-2{color:#6a9fb5}.cm-s-base16-light span.cm-def{color:#d28445}.cm-s-base16-light span.cm-bracket{color:#202020}.cm-s-base16-light span.cm-tag{color:#ac4142}.cm-s-base16-light span.cm-link{color:#aa759f}.cm-s-base16-light span.cm-error{background:#ac4142;color:#505050}.cm-s-base16-light .CodeMirror-activeline-background{background:#DDDCDC!important}.cm-s-base16-light .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
css/min/cmthemes/blackboard.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-blackboard.CodeMirror{background:#0C1021;color:#F8F8F8}.cm-s-blackboard .CodeMirror-selected{background:#253B76!important}.cm-s-blackboard.CodeMirror ::selection{background:rgba(37,59,118,.99)}.cm-s-blackboard.CodeMirror ::-moz-selection{background:rgba(37,59,118,.99)}.cm-s-blackboard .CodeMirror-gutters{background:#0C1021;border-right:0}.cm-s-blackboard .CodeMirror-guttermarker{color:#FBDE2D}.cm-s-blackboard .CodeMirror-guttermarker-subtle,.cm-s-blackboard .CodeMirror-linenumber{color:#888}.cm-s-blackboard .CodeMirror-cursor{border-left:1px solid #A7A7A7!important}.cm-s-blackboard .cm-keyword{color:#FBDE2D}.cm-s-blackboard .cm-atom,.cm-s-blackboard .cm-number{color:#D8FA3C}.cm-s-blackboard .cm-def{color:#8DA6CE}.cm-s-blackboard .cm-variable{color:#FF6400}.cm-s-blackboard .cm-operator{color:#FBDE2D}.cm-s-blackboard .cm-comment{color:#AEAEAE}.cm-s-blackboard .cm-string,.cm-s-blackboard .cm-string-2{color:#61CE3C}.cm-s-blackboard .cm-meta{color:#D8FA3C}.cm-s-blackboard .cm-builtin,.cm-s-blackboard .cm-tag,.cm-s-blackboard .cm-attribute{color:#8DA6CE}.cm-s-blackboard .cm-header{color:#FF6400}.cm-s-blackboard .cm-hr{color:#AEAEAE}.cm-s-blackboard .cm-link{color:#8DA6CE}.cm-s-blackboard .cm-error{background:#9D1E15;color:#F8F8F8}.cm-s-blackboard .CodeMirror-activeline-background{background:#3C3636!important}.cm-s-blackboard .CodeMirror-matchingbracket{outline:1px solid grey;color:#fff!important}
css/min/cmthemes/cobalt.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-cobalt.CodeMirror{background:#002240;color:#fff}.cm-s-cobalt div.CodeMirror-selected{background:#b36539!important}.cm-s-cobalt.CodeMirror ::selection{background:rgba(179,101,57,.99)}.cm-s-cobalt.CodeMirror ::-moz-selection{background:rgba(179,101,57,.99)}.cm-s-cobalt .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-cobalt .CodeMirror-guttermarker{color:#ffee80}.cm-s-cobalt .CodeMirror-guttermarker-subtle,.cm-s-cobalt .CodeMirror-linenumber{color:#d0d0d0}.cm-s-cobalt .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-cobalt span.cm-comment{color:#08f}.cm-s-cobalt span.cm-atom{color:#845dc4}.cm-s-cobalt span.cm-number,.cm-s-cobalt span.cm-attribute{color:#ff80e1}.cm-s-cobalt span.cm-keyword{color:#ffee80}.cm-s-cobalt span.cm-string{color:#3ad900}.cm-s-cobalt span.cm-meta{color:#ff9d00}.cm-s-cobalt span.cm-variable-2,.cm-s-cobalt span.cm-tag{color:#9effff}.cm-s-cobalt span.cm-variable-3,.cm-s-cobalt span.cm-def{color:#fff}.cm-s-cobalt span.cm-bracket{color:#d8d8d8}.cm-s-cobalt span.cm-builtin,.cm-s-cobalt span.cm-special{color:#ff9e59}.cm-s-cobalt span.cm-link{color:#845dc4}.cm-s-cobalt span.cm-error{color:#9d1e15}.cm-s-cobalt .CodeMirror-activeline-background{background:#002D57!important}.cm-s-cobalt .CodeMirror-matchingbracket{outline:1px solid grey;color:#fff!important}
css/min/cmthemes/colorforth.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-colorforth.CodeMirror{background:#000;color:#f8f8f8}.cm-s-colorforth .CodeMirror-gutters{background:#0a001f;border-right:1px solid #aaa}.cm-s-colorforth .CodeMirror-guttermarker{color:#FFBD40}.cm-s-colorforth .CodeMirror-guttermarker-subtle{color:#78846f}.cm-s-colorforth .CodeMirror-linenumber{color:#bababa}.cm-s-colorforth .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-colorforth span.cm-comment{color:#ededed}.cm-s-colorforth span.cm-def{color:#ff1c1c;font-weight:700}.cm-s-colorforth span.cm-keyword{color:#ffd900}.cm-s-colorforth span.cm-builtin{color:#00d95a}.cm-s-colorforth span.cm-variable{color:#73ff00}.cm-s-colorforth span.cm-string{color:#007bff}.cm-s-colorforth span.cm-number{color:#00c4ff}.cm-s-colorforth span.cm-atom{color:#606060}.cm-s-colorforth span.cm-variable-2{color:#EEE}.cm-s-colorforth span.cm-variable-3{color:#DDD}.cm-s-colorforth span.cm-meta{color:#ff0}.cm-s-colorforth span.cm-qualifier{color:#FFF700}.cm-s-colorforth span.cm-bracket{color:#cc7}.cm-s-colorforth span.cm-tag{color:#FFBD40}.cm-s-colorforth span.cm-attribute{color:#FFF700}.cm-s-colorforth span.cm-error{color:red}.cm-s-colorforth .CodeMirror-selected{background:#333d53!important}.cm-s-colorforth span.cm-compilation{background:rgba(255,255,255,.12)}.cm-s-colorforth .CodeMirror-activeline-background{background:#253540!important}
css/min/cmthemes/eclipse.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-eclipse span.cm-meta{color:#FF1717}.cm-s-eclipse span.cm-keyword{line-height:1em;font-weight:700;color:#7F0055}.cm-s-eclipse span.cm-atom{color:#219}.cm-s-eclipse span.cm-number{color:#164}.cm-s-eclipse span.cm-def{color:#00f}.cm-s-eclipse span.cm-variable{color:#000}.cm-s-eclipse span.cm-variable-2,.cm-s-eclipse span.cm-variable-3{color:#0000C0}.cm-s-eclipse span.cm-property,.cm-s-eclipse span.cm-operator{color:#000}.cm-s-eclipse span.cm-comment{color:#3F7F5F}.cm-s-eclipse span.cm-string{color:#2A00FF}.cm-s-eclipse span.cm-string-2{color:#f50}.cm-s-eclipse span.cm-qualifier{color:#555}.cm-s-eclipse span.cm-builtin{color:#30a}.cm-s-eclipse span.cm-bracket{color:#cc7}.cm-s-eclipse span.cm-tag{color:#170}.cm-s-eclipse span.cm-attribute{color:#00c}.cm-s-eclipse span.cm-link{color:#219}.cm-s-eclipse span.cm-error{color:red}.cm-s-eclipse .CodeMirror-activeline-background{background:#e8f2ff!important}.cm-s-eclipse .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}
css/min/cmthemes/elegant.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-elegant span.cm-number,.cm-s-elegant span.cm-string,.cm-s-elegant span.cm-atom{color:#762}.cm-s-elegant span.cm-comment{color:#262;font-style:italic;line-height:1em}.cm-s-elegant span.cm-meta{color:#555;font-style:italic;line-height:1em}.cm-s-elegant span.cm-variable{color:#000}.cm-s-elegant span.cm-variable-2{color:#b11}.cm-s-elegant span.cm-qualifier{color:#555}.cm-s-elegant span.cm-keyword{color:#730}.cm-s-elegant span.cm-builtin{color:#30a}.cm-s-elegant span.cm-link{color:#762}.cm-s-elegant span.cm-error{background-color:#fdd}.cm-s-elegant .CodeMirror-activeline-background{background:#e8f2ff!important}.cm-s-elegant .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}
css/min/cmthemes/erlang-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-erlang-dark.CodeMirror{background:#002240;color:#fff}.cm-s-erlang-dark div.CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark.CodeMirror ::selection{background:rgba(179,101,57,.99)}.cm-s-erlang-dark.CodeMirror ::-moz-selection{background:rgba(179,101,57,.99)}.cm-s-erlang-dark .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-erlang-dark .CodeMirror-guttermarker{color:#fff}.cm-s-erlang-dark .CodeMirror-guttermarker-subtle,.cm-s-erlang-dark .CodeMirror-linenumber{color:#d0d0d0}.cm-s-erlang-dark .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-erlang-dark span.cm-atom{color:#f133f1}.cm-s-erlang-dark span.cm-attribute{color:#ff80e1}.cm-s-erlang-dark span.cm-bracket{color:#ff9d00}.cm-s-erlang-dark span.cm-builtin{color:#eaa}.cm-s-erlang-dark span.cm-comment{color:#77f}.cm-s-erlang-dark span.cm-def{color:#e7a}.cm-s-erlang-dark span.cm-keyword{color:#ffee80}.cm-s-erlang-dark span.cm-meta{color:#50fefe}.cm-s-erlang-dark span.cm-number{color:#ffd0d0}.cm-s-erlang-dark span.cm-operator{color:#d55}.cm-s-erlang-dark span.cm-property,.cm-s-erlang-dark span.cm-qualifier,.cm-s-erlang-dark span.cm-quote{color:#ccc}.cm-s-erlang-dark span.cm-special{color:#fbb}.cm-s-erlang-dark span.cm-string{color:#3ad900}.cm-s-erlang-dark span.cm-string-2{color:#ccc}.cm-s-erlang-dark span.cm-tag{color:#9effff}.cm-s-erlang-dark span.cm-variable{color:#50fe50}.cm-s-erlang-dark span.cm-variable-2{color:#e0e}.cm-s-erlang-dark span.cm-variable-3{color:#ccc}.cm-s-erlang-dark span.cm-error{color:#9d1e15}.cm-s-erlang-dark .CodeMirror-activeline-background{background:#013461!important}.cm-s-erlang-dark .CodeMirror-matchingbracket{outline:1px solid grey;color:#fff!important}
css/min/cmthemes/lesser-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-lesser-dark{line-height:1.3em}.cm-s-lesser-dark.CodeMirror{background:#262626;color:#EBEFE7;text-shadow:0 -1px 1px #262626}.cm-s-lesser-dark div.CodeMirror-selected{background:#45443B!important}.cm-s-lesser-dark.CodeMirror ::selection{background:rgba(69,68,59,.99)}.cm-s-lesser-dark.CodeMirror ::-moz-selection{background:rgba(69,68,59,.99)}.cm-s-lesser-dark .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-lesser-dark pre{padding:0 8px}.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket{color:#7EFC7E}.cm-s-lesser-dark .CodeMirror-gutters{background:#262626;border-right:1px solid #aaa}.cm-s-lesser-dark .CodeMirror-guttermarker{color:#599eff}.cm-s-lesser-dark .CodeMirror-guttermarker-subtle,.cm-s-lesser-dark .CodeMirror-linenumber{color:#777}.cm-s-lesser-dark span.cm-keyword{color:#599eff}.cm-s-lesser-dark span.cm-atom{color:#C2B470}.cm-s-lesser-dark span.cm-number{color:#B35E4D}.cm-s-lesser-dark span.cm-def{color:#fff}.cm-s-lesser-dark span.cm-variable{color:#D9BF8C}.cm-s-lesser-dark span.cm-variable-2{color:#669199}.cm-s-lesser-dark span.cm-variable-3{color:#fff}.cm-s-lesser-dark span.cm-property,.cm-s-lesser-dark span.cm-operator{color:#92A75C}.cm-s-lesser-dark span.cm-comment{color:#666}.cm-s-lesser-dark span.cm-string{color:#BCD279}.cm-s-lesser-dark span.cm-string-2{color:#f50}.cm-s-lesser-dark span.cm-meta{color:#738C73}.cm-s-lesser-dark span.cm-qualifier{color:#555}.cm-s-lesser-dark span.cm-builtin{color:#ff9e59}.cm-s-lesser-dark span.cm-bracket{color:#EBEFE7}.cm-s-lesser-dark span.cm-tag{color:#669199}.cm-s-lesser-dark span.cm-attribute{color:#00c}.cm-s-lesser-dark span.cm-header{color:#a0a}.cm-s-lesser-dark span.cm-quote{color:#090}.cm-s-lesser-dark span.cm-hr{color:#999}.cm-s-lesser-dark span.cm-link{color:#00c}.cm-s-lesser-dark span.cm-error{color:#9d1e15}.cm-s-lesser-dark .CodeMirror-activeline-background{background:#3C3A3A!important}.cm-s-lesser-dark .CodeMirror-matchingbracket{outline:1px solid grey;color:#fff!important}
css/min/cmthemes/liquibyte.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-liquibyte.CodeMirror{background-color:#000;color:#fff;line-height:1.2em;font-size:1em}.CodeMirror-focused .cm-matchhighlight{text-decoration:underline;text-decoration-color:#0f0;text-decoration-style:wavy}.cm-trailingspace{text-decoration-color:red}.cm-trailingspace,.cm-tab{text-decoration:line-through;text-decoration-style:dotted}.cm-tab{text-decoration-color:#404040}.cm-s-liquibyte .CodeMirror-gutters{background-color:#262626;border-right:1px solid #505050;padding-right:.8em}.cm-s-liquibyte .CodeMirror-gutter-elt div{font-size:1.2em}.cm-s-liquibyte .CodeMirror-linenumber{color:#606060;padding-left:0}.cm-s-liquibyte .CodeMirror-cursor{border-left:1px solid #eee!important}.cm-s-liquibyte span.cm-comment{color:green}.cm-s-liquibyte span.cm-def{color:#ffaf40;font-weight:700}.cm-s-liquibyte span.cm-keyword{color:#c080ff;font-weight:700}.cm-s-liquibyte span.cm-builtin{color:#ffaf40;font-weight:700}.cm-s-liquibyte span.cm-variable{color:#5967ff;font-weight:700}.cm-s-liquibyte span.cm-string{color:#ff8000}.cm-s-liquibyte span.cm-number{color:#0f0;font-weight:700}.cm-s-liquibyte span.cm-atom{color:#bf3030;font-weight:700}.cm-s-liquibyte span.cm-variable-2{color:#007f7f;font-weight:700}.cm-s-liquibyte span.cm-variable-3{color:#c080ff;font-weight:700}.cm-s-liquibyte span.cm-property{color:#999;font-weight:700}.cm-s-liquibyte span.cm-operator{color:#fff}.cm-s-liquibyte span.cm-meta{color:#0f0}.cm-s-liquibyte span.cm-qualifier{color:#fff700;font-weight:700}.cm-s-liquibyte span.cm-bracket{color:#cc7}.cm-s-liquibyte span.cm-tag{color:#ff0;font-weight:700}.cm-s-liquibyte span.cm-attribute{color:#c080ff;font-weight:700}.cm-s-liquibyte span.cm-error{color:red}.cm-s-liquibyte .CodeMirror-selected{background-color:rgba(255,0,0,.25)!important}.cm-s-liquibyte span.cm-compilation{background-color:rgba(255,255,255,.12)}.cm-s-liquibyte .CodeMirror-activeline-background{background-color:rgba(0,255,0,.15)!important}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0;font-weight:700}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:red;font-weight:700}.CodeMirror-matchingtag{background-color:rgba(150,255,0,.3)}div.CodeMirror-simplescroll-horizontal div:hover,div.CodeMirror-simplescroll-vertical div:hover{background-color:rgba(80,80,80,.7)}div.CodeMirror-simplescroll-horizontal div,div.CodeMirror-simplescroll-vertical div{background-color:rgba(80,80,80,.3);border:1px solid #404040;border-radius:5px}div.CodeMirror-simplescroll-vertical div{border-top:1px solid #404040;border-bottom:1px solid #404040}div.CodeMirror-simplescroll-horizontal div{border-left:1px solid #404040;border-right:1px solid #404040}div.CodeMirror-simplescroll-vertical{background-color:#262626}div.CodeMirror-simplescroll-horizontal{background-color:#262626;border-top:1px solid #404040}div.CodeMirror-overlayscroll-horizontal div,div.CodeMirror-overlayscroll-vertical div{background-color:#404040;border-radius:5px;border:1px solid #404040}
css/min/cmthemes/mbo.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-mbo.CodeMirror{background:#2c2c2c;color:#ffffec}.cm-s-mbo div.CodeMirror-selected{background:#716C62!important}.cm-s-mbo.CodeMirror ::selection{background:rgba(113,108,98,.99)}.cm-s-mbo.CodeMirror ::-moz-selection{background:rgba(113,108,98,.99)}.cm-s-mbo .CodeMirror-gutters{background:#4e4e4e;border-right:0}.cm-s-mbo .CodeMirror-guttermarker{color:#fff}.cm-s-mbo .CodeMirror-guttermarker-subtle{color:grey}.cm-s-mbo .CodeMirror-linenumber{color:#dadada}.cm-s-mbo .CodeMirror-cursor{border-left:1px solid #ffffec!important}.cm-s-mbo span.cm-comment{color:#95958a}.cm-s-mbo span.cm-atom,.cm-s-mbo span.cm-number{color:#00a8c6}.cm-s-mbo span.cm-property,.cm-s-mbo span.cm-attribute{color:#9ddfe9}.cm-s-mbo span.cm-keyword{color:#ffb928}.cm-s-mbo span.cm-string{color:#ffcf6c}.cm-s-mbo span.cm-string.cm-property,.cm-s-mbo span.cm-variable{color:#ffffec}.cm-s-mbo span.cm-variable-2{color:#00a8c6}.cm-s-mbo span.cm-def{color:#ffffec}.cm-s-mbo span.cm-bracket{color:#fffffc;font-weight:700}.cm-s-mbo span.cm-tag{color:#9ddfe9}.cm-s-mbo span.cm-link{color:#f54b07}.cm-s-mbo span.cm-error{border-bottom:#636363;color:#ffffec}.cm-s-mbo span.cm-qualifier{color:#ffffec}.cm-s-mbo .CodeMirror-activeline-background{background:#494b41!important}.cm-s-mbo .CodeMirror-matchingbracket{color:#222!important}.cm-s-mbo .CodeMirror-matchingtag{background:rgba(255,255,255,.37)}
css/min/cmthemes/mdn-like.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-mdn-like.CodeMirror{color:#999;background-color:#fff}.cm-s-mdn-like .CodeMirror-selected{background:#cfc!important}.cm-s-mdn-like.CodeMirror ::selection{background:#cfc}.cm-s-mdn-like.CodeMirror ::-moz-selection{background:#cfc}.cm-s-mdn-like .CodeMirror-gutters{background:#f8f8f8;border-left:6px solid rgba(0,83,159,.65);color:#333}.cm-s-mdn-like .CodeMirror-linenumber{color:#aaa;padding-left:8px}div.cm-s-mdn-like .CodeMirror-cursor{border-left:2px solid #222}.cm-s-mdn-like .cm-keyword{color:#6262FF}.cm-s-mdn-like .cm-atom{color:#F90}.cm-s-mdn-like .cm-number{color:#ca7841}.cm-s-mdn-like .cm-def{color:#8DA6CE}.cm-s-mdn-like span.cm-variable-2,.cm-s-mdn-like span.cm-tag{color:#690}.cm-s-mdn-like span.cm-variable-3,.cm-s-mdn-like span.cm-def,.cm-s-mdn-like .cm-variable{color:#07a}.cm-s-mdn-like .cm-property{color:#905}.cm-s-mdn-like .cm-qualifier{color:#690}.cm-s-mdn-like .cm-operator{color:#cda869}.cm-s-mdn-like .cm-comment{color:#777;font-weight:400}.cm-s-mdn-like .cm-string{color:#07a;font-style:italic}.cm-s-mdn-like .cm-string-2{color:#bd6b18}.cm-s-mdn-like .cm-meta{color:#000}.cm-s-mdn-like .cm-builtin{color:#9B7536}.cm-s-mdn-like .cm-tag{color:#997643}.cm-s-mdn-like .cm-attribute{color:#d6bb6d}.cm-s-mdn-like .cm-header{color:#FF6400}.cm-s-mdn-like .cm-hr{color:#AEAEAE}.cm-s-mdn-like .cm-link{color:#ad9361;font-style:italic;text-decoration:none}.cm-s-mdn-like .cm-error{border-bottom:1px solid red}div.cm-s-mdn-like .CodeMirror-activeline-background{background:#efefff}div.cm-s-mdn-like span.CodeMirror-matchingbracket{outline:1px solid grey;color:inherit}.cm-s-mdn-like.CodeMirror{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6AT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VORK5CYII=)}
css/min/cmthemes/midnight.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-midnight span.CodeMirror-matchhighlight{background:#494949}.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight{background:#314D67!important}.cm-s-midnight .CodeMirror-activeline-background{background:#253540!important}.cm-s-midnight.CodeMirror{background:#0F192A;color:#D1EDFF;border-top:1px solid #000;border-bottom:1px solid #000}.cm-s-midnight div.CodeMirror-selected{background:#314D67!important}.cm-s-midnight.CodeMirror ::selection{background:rgba(49,77,103,.99)}.cm-s-midnight.CodeMirror ::-moz-selection{background:rgba(49,77,103,.99)}.cm-s-midnight .CodeMirror-gutters{background:#0F192A;border-right:1px solid}.cm-s-midnight .CodeMirror-guttermarker{color:#fff}.cm-s-midnight .CodeMirror-guttermarker-subtle{color:#d0d0d0}.cm-s-midnight .CodeMirror-linenumber{color:#D0D0D0}.cm-s-midnight .CodeMirror-cursor{border-left:1px solid #F8F8F0!important}.cm-s-midnight span.cm-comment{color:#428BDD}.cm-s-midnight span.cm-atom{color:#AE81FF}.cm-s-midnight span.cm-number{color:#D1EDFF}.cm-s-midnight span.cm-property,.cm-s-midnight span.cm-attribute{color:#A6E22E}.cm-s-midnight span.cm-keyword{color:#E83737}.cm-s-midnight span.cm-string{color:#1DC116}.cm-s-midnight span.cm-variable,.cm-s-midnight span.cm-variable-2{color:#FFAA3E}.cm-s-midnight span.cm-def{color:#4DD}.cm-s-midnight span.cm-bracket{color:#D1EDFF}.cm-s-midnight span.cm-tag{color:#449}.cm-s-midnight span.cm-link{color:#AE81FF}.cm-s-midnight span.cm-error{background:#F92672;color:#F8F8F0}.cm-s-midnight .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
css/min/cmthemes/monokai.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483E!important}.cm-s-monokai.CodeMirror ::selection{background:rgba(73,72,62,.99)}.cm-s-monokai.CodeMirror ::-moz-selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-guttermarker{color:#fff}.cm-s-monokai .CodeMirror-guttermarker-subtle,.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0!important}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom,.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-property,.cm-s-monokai span.cm-attribute{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#f8f8f2}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831!important}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
css/min/cmthemes/neat.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-neat span.cm-comment{color:#a86}.cm-s-neat span.cm-keyword{line-height:1em;font-weight:700;color:#00f}.cm-s-neat span.cm-string{color:#a22}.cm-s-neat span.cm-builtin{line-height:1em;font-weight:700;color:#077}.cm-s-neat span.cm-special{line-height:1em;font-weight:700;color:#0aa}.cm-s-neat span.cm-variable{color:#000}.cm-s-neat span.cm-number,.cm-s-neat span.cm-atom{color:#3a3}.cm-s-neat span.cm-meta{color:#555}.cm-s-neat span.cm-link{color:#3a3}.cm-s-neat .CodeMirror-activeline-background{background:#e8f2ff!important}.cm-s-neat .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}
css/min/cmthemes/neo.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-neo.CodeMirror{background-color:#fff;color:#2e383c;line-height:1.4375}.cm-s-neo .cm-comment{color:#75787b}.cm-s-neo .cm-keyword,.cm-s-neo .cm-property{color:#1d75b3}.cm-s-neo .cm-atom,.cm-s-neo .cm-number{color:#75438a}.cm-s-neo .cm-node,.cm-s-neo .cm-tag{color:#9c3328}.cm-s-neo .cm-string{color:#b35e14}.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier{color:#047d65}.cm-s-neo pre{padding:0}.cm-s-neo .CodeMirror-gutters{border:none;border-right:10px solid transparent;background-color:transparent}.cm-s-neo .CodeMirror-linenumber{padding:0;color:#e0e2e5}.cm-s-neo .CodeMirror-guttermarker{color:#1d75b3}.cm-s-neo .CodeMirror-guttermarker-subtle{color:#e0e2e5}.cm-s-neo div.CodeMirror-cursor{width:auto;border:0;background:rgba(155,157,162,.37);z-index:1}
css/min/cmthemes/night.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-night.CodeMirror{background:#0a001f;color:#f8f8f8}.cm-s-night div.CodeMirror-selected{background:#447!important}.cm-s-night.CodeMirror ::selection{background:rgba(68,68,119,.99)}.cm-s-night.CodeMirror ::-moz-selection{background:rgba(68,68,119,.99)}.cm-s-night .CodeMirror-gutters{background:#0a001f;border-right:1px solid #aaa}.cm-s-night .CodeMirror-guttermarker{color:#fff}.cm-s-night .CodeMirror-guttermarker-subtle{color:#bbb}.cm-s-night .CodeMirror-linenumber{color:#f8f8f8}.cm-s-night .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-night span.cm-atom{color:#845dc4}.cm-s-night span.cm-number,.cm-s-night span.cm-attribute{color:#ffd500}.cm-s-night span.cm-keyword{color:#599eff}.cm-s-night span.cm-string{color:#37f14a}.cm-s-night span.cm-meta{color:#7678e2}.cm-s-night span.cm-variable-2,.cm-s-night span.cm-tag{color:#99b2ff}.cm-s-night span.cm-variable-3,.cm-s-night span.cm-def{color:#fff}.cm-s-night span.cm-bracket{color:#8da6ce}.cm-s-night span.cm-comment{color:#6900a1}.cm-s-night span.cm-builtin,.cm-s-night span.cm-special{color:#ff9e59}.cm-s-night span.cm-link{color:#845dc4}.cm-s-night span.cm-error{color:#9d1e15}.cm-s-night .CodeMirror-activeline-background{background:#1C005A!important}.cm-s-night .CodeMirror-matchingbracket{outline:1px solid grey;color:#fff!important}
css/min/cmthemes/paraiso-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-paraiso-dark.CodeMirror{background:#2f1e2e;color:#b9b6b0}.cm-s-paraiso-dark div.CodeMirror-selected{background:#41323f!important}.cm-s-paraiso-dark.CodeMirror ::selection{background:rgba(65,50,63,.99)}.cm-s-paraiso-dark.CodeMirror ::-moz-selection{background:rgba(65,50,63,.99)}.cm-s-paraiso-dark .CodeMirror-gutters{background:#2f1e2e;border-right:0}.cm-s-paraiso-dark .CodeMirror-guttermarker{color:#ef6155}.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle,.cm-s-paraiso-dark .CodeMirror-linenumber{color:#776e71}.cm-s-paraiso-dark .CodeMirror-cursor{border-left:1px solid #8d8687!important}.cm-s-paraiso-dark span.cm-comment{color:#e96ba8}.cm-s-paraiso-dark span.cm-atom,.cm-s-paraiso-dark span.cm-number{color:#815ba4}.cm-s-paraiso-dark span.cm-property,.cm-s-paraiso-dark span.cm-attribute{color:#48b685}.cm-s-paraiso-dark span.cm-keyword{color:#ef6155}.cm-s-paraiso-dark span.cm-string{color:#fec418}.cm-s-paraiso-dark span.cm-variable{color:#48b685}.cm-s-paraiso-dark span.cm-variable-2{color:#06b6ef}.cm-s-paraiso-dark span.cm-def{color:#f99b15}.cm-s-paraiso-dark span.cm-bracket{color:#b9b6b0}.cm-s-paraiso-dark span.cm-tag{color:#ef6155}.cm-s-paraiso-dark span.cm-link{color:#815ba4}.cm-s-paraiso-dark span.cm-error{background:#ef6155;color:#8d8687}.cm-s-paraiso-dark .CodeMirror-activeline-background{background:#4D344A!important}.cm-s-paraiso-dark .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
css/min/cmthemes/paraiso-light.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-paraiso-light.CodeMirror{background:#e7e9db;color:#41323f}.cm-s-paraiso-light div.CodeMirror-selected{background:#b9b6b0!important}.cm-s-paraiso-light.CodeMirror ::selection{background:#b9b6b0}.cm-s-paraiso-light.CodeMirror ::-moz-selection{background:#b9b6b0}.cm-s-paraiso-light .CodeMirror-gutters{background:#e7e9db;border-right:0}.cm-s-paraiso-light .CodeMirror-guttermarker{color:#000}.cm-s-paraiso-light .CodeMirror-guttermarker-subtle,.cm-s-paraiso-light .CodeMirror-linenumber{color:#8d8687}.cm-s-paraiso-light .CodeMirror-cursor{border-left:1px solid #776e71!important}.cm-s-paraiso-light span.cm-comment{color:#e96ba8}.cm-s-paraiso-light span.cm-atom,.cm-s-paraiso-light span.cm-number{color:#815ba4}.cm-s-paraiso-light span.cm-property,.cm-s-paraiso-light span.cm-attribute{color:#48b685}.cm-s-paraiso-light span.cm-keyword{color:#ef6155}.cm-s-paraiso-light span.cm-string{color:#fec418}.cm-s-paraiso-light span.cm-variable{color:#48b685}.cm-s-paraiso-light span.cm-variable-2{color:#06b6ef}.cm-s-paraiso-light span.cm-def{color:#f99b15}.cm-s-paraiso-light span.cm-bracket{color:#41323f}.cm-s-paraiso-light span.cm-tag{color:#ef6155}.cm-s-paraiso-light span.cm-link{color:#815ba4}.cm-s-paraiso-light span.cm-error{background:#ef6155;color:#776e71}.cm-s-paraiso-light .CodeMirror-activeline-background{background:#CFD1C4!important}.cm-s-paraiso-light .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
css/min/cmthemes/pastel-on-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-pastel-on-dark.CodeMirror{background:#2c2827;color:#8F938F;line-height:1.5;font-size:14px}.cm-s-pastel-on-dark div.CodeMirror-selected{background:rgba(221,240,255,.2)!important}.cm-s-pastel-on-dark.CodeMirror ::selection{background:rgba(221,240,255,.2)}.cm-s-pastel-on-dark.CodeMirror ::-moz-selection{background:rgba(221,240,255,.2)}.cm-s-pastel-on-dark .CodeMirror-gutters{background:#34302f;border-right:0;padding:0 3px}.cm-s-pastel-on-dark .CodeMirror-guttermarker{color:#fff}.cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle,.cm-s-pastel-on-dark .CodeMirror-linenumber{color:#8F938F}.cm-s-pastel-on-dark .CodeMirror-cursor{border-left:1px solid #A7A7A7!important}.cm-s-pastel-on-dark span.cm-comment{color:#A6C6FF}.cm-s-pastel-on-dark span.cm-atom{color:#DE8E30}.cm-s-pastel-on-dark span.cm-number{color:#ccc}.cm-s-pastel-on-dark span.cm-property{color:#8F938F}.cm-s-pastel-on-dark span.cm-attribute{color:#a6e22e}.cm-s-pastel-on-dark span.cm-keyword{color:#AEB2F8}.cm-s-pastel-on-dark span.cm-string{color:#66A968}.cm-s-pastel-on-dark span.cm-variable{color:#AEB2F8}.cm-s-pastel-on-dark span.cm-variable-2{color:#BEBF55}.cm-s-pastel-on-dark span.cm-variable-3{color:#DE8E30}.cm-s-pastel-on-dark span.cm-def{color:#757aD8}.cm-s-pastel-on-dark span.cm-bracket{color:#f8f8f2}.cm-s-pastel-on-dark span.cm-tag{color:#C1C144}.cm-s-pastel-on-dark span.cm-link{color:#ae81ff}.cm-s-pastel-on-dark span.cm-qualifier,.cm-s-pastel-on-dark span.cm-builtin{color:#C1C144}.cm-s-pastel-on-dark span.cm-error{background:#757aD8;color:#f8f8f0}.cm-s-pastel-on-dark .CodeMirror-activeline-background{background:rgba(255,255,255,.031)!important}.cm-s-pastel-on-dark .CodeMirror-matchingbracket{border:1px solid rgba(255,255,255,.25);color:#8F938F!important;margin:-1px -1px 0}
css/min/cmthemes/rubyblue.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-rubyblue.CodeMirror{background:#112435;color:#fff}.cm-s-rubyblue div.CodeMirror-selected{background:#38566F!important}.cm-s-rubyblue.CodeMirror ::selection{background:rgba(56,86,111,.99)}.cm-s-rubyblue.CodeMirror ::-moz-selection{background:rgba(56,86,111,.99)}.cm-s-rubyblue .CodeMirror-gutters{background:#1F4661;border-right:7px solid #3E7087}.cm-s-rubyblue .CodeMirror-guttermarker{color:#fff}.cm-s-rubyblue .CodeMirror-guttermarker-subtle{color:#3E7087}.cm-s-rubyblue .CodeMirror-linenumber{color:#fff}.cm-s-rubyblue .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-rubyblue span.cm-comment{color:#999;font-style:italic;line-height:1em}.cm-s-rubyblue span.cm-atom{color:#F4C20B}.cm-s-rubyblue span.cm-number,.cm-s-rubyblue span.cm-attribute{color:#82C6E0}.cm-s-rubyblue span.cm-keyword{color:#F0F}.cm-s-rubyblue span.cm-string{color:#F08047}.cm-s-rubyblue span.cm-meta{color:#F0F}.cm-s-rubyblue span.cm-variable-2,.cm-s-rubyblue span.cm-tag{color:#7BD827}.cm-s-rubyblue span.cm-variable-3,.cm-s-rubyblue span.cm-def{color:#fff}.cm-s-rubyblue span.cm-bracket{color:#F0F}.cm-s-rubyblue span.cm-link{color:#F4C20B}.cm-s-rubyblue span.CodeMirror-matchingbracket{color:#F0F!important}.cm-s-rubyblue span.cm-builtin,.cm-s-rubyblue span.cm-special{color:#FF9D00}.cm-s-rubyblue span.cm-error{color:#AF2018}.cm-s-rubyblue .CodeMirror-activeline-background{background:#173047!important}
css/min/cmthemes/solarized.css ADDED
@@ -0,0 +1 @@
 
1
+ .solarized.base03{color:#002b36}.solarized.base02{color:#073642}.solarized.base01{color:#586e75}.solarized.base00{color:#657b83}.solarized.base0{color:#839496}.solarized.base1{color:#93a1a1}.solarized.base2{color:#eee8d5}.solarized.base3{color:#fdf6e3}.solarized.solar-yellow{color:#b58900}.solarized.solar-orange{color:#cb4b16}.solarized.solar-red{color:#dc322f}.solarized.solar-magenta{color:#d33682}.solarized.solar-violet{color:#6c71c4}.solarized.solar-blue{color:#268bd2}.solarized.solar-cyan{color:#2aa198}.solarized.solar-green{color:#859900}.cm-s-solarized{line-height:1.45em;color-profile:sRGB;rendering-intent:auto}.cm-s-solarized.cm-s-dark{color:#839496;background-color:#002b36;text-shadow:#002b36 0 1px}.cm-s-solarized.cm-s-light{background-color:#fdf6e3;color:#657b83;text-shadow:#eee8d5 0 1px}.cm-s-solarized .CodeMirror-widget{text-shadow:none}.cm-s-solarized .cm-keyword{color:#cb4b16}.cm-s-solarized .cm-atom,.cm-s-solarized .cm-number{color:#d33682}.cm-s-solarized .cm-def{color:#2aa198}.cm-s-solarized .cm-variable{color:#839496}.cm-s-solarized .cm-variable-2{color:#b58900}.cm-s-solarized .cm-variable-3{color:#6c71c4}.cm-s-solarized .cm-property{color:#2aa198}.cm-s-solarized .cm-operator{color:#6c71c4}.cm-s-solarized .cm-comment{color:#586e75;font-style:italic}.cm-s-solarized .cm-string{color:#859900}.cm-s-solarized .cm-string-2{color:#b58900}.cm-s-solarized .cm-meta{color:#859900}.cm-s-solarized .cm-qualifier{color:#b58900}.cm-s-solarized .cm-builtin{color:#d33682}.cm-s-solarized .cm-bracket{color:#cb4b16}.cm-s-solarized .CodeMirror-matchingbracket{color:#859900}.cm-s-solarized .CodeMirror-nonmatchingbracket{color:#dc322f}.cm-s-solarized .cm-tag{color:#93a1a1}.cm-s-solarized .cm-attribute{color:#2aa198}.cm-s-solarized .cm-header{color:#586e75}.cm-s-solarized .cm-quote{color:#93a1a1}.cm-s-solarized .cm-hr{color:transparent;border-top:1px solid #586e75;display:block}.cm-s-solarized .cm-link{color:#93a1a1;cursor:pointer}.cm-s-solarized .cm-special{color:#6c71c4}.cm-s-solarized .cm-em{color:#999;text-decoration:underline;text-decoration-style:dotted}.cm-s-solarized .cm-strong{color:#eee}.cm-s-solarized .cm-error,.cm-s-solarized .cm-invalidchar{color:#586e75;border-bottom:1px dotted #dc322f}.cm-s-solarized.cm-s-dark .CodeMirror-selected{background:#073642}.cm-s-solarized.cm-s-dark.CodeMirror ::selection{background:rgba(7,54,66,.99)}.cm-s-solarized.cm-s-dark.CodeMirror ::-moz-selection{background:rgba(7,54,66,.99)}.cm-s-solarized.cm-s-light .CodeMirror-selected{background:#eee8d5}.cm-s-solarized.cm-s-light.CodeMirror ::selection{background:#eee8d5}.cm-s-solarized.cm-s-lightCodeMirror ::-moz-selection{background:#eee8d5}.cm-s-solarized.CodeMirror{-moz-box-shadow:inset 7px 0 12px -6px #000;-webkit-box-shadow:inset 7px 0 12px -6px #000;box-shadow:inset 7px 0 12px -6px #000}.cm-s-solarized .CodeMirror-gutters{border-right:1px solid}.cm-s-solarized.cm-s-dark .CodeMirror-gutters{background-color:#002b36;border-color:#00232c}.cm-s-solarized.cm-s-dark .CodeMirror-linenumber{text-shadow:#021014 0 -1px}.cm-s-solarized.cm-s-light .CodeMirror-gutters{background-color:#fdf6e3;border-color:#eee8d5}.cm-s-solarized .CodeMirror-linenumber{color:#586e75;padding:0 5px}.cm-s-solarized .CodeMirror-guttermarker-subtle{color:#586e75}.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker{color:#ddd}.cm-s-solarized.cm-s-light .CodeMirror-guttermarker{color:#cb4b16}.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text{color:#586e75}.cm-s-solarized .CodeMirror-lines .CodeMirror-cursor{border-left:1px solid #819090}.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background{background:rgba(255,255,255,.1)}.cm-s-solarized.cm-s-light .CodeMirror-activeline-background{background:rgba(0,0,0,.1)}
css/min/cmthemes/the-matrix.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-the-matrix.CodeMirror{background:#000;color:#0f0}.cm-s-the-matrix div.CodeMirror-selected{background:#2D2D2D!important}.cm-s-the-matrix.CodeMirror ::selection{background:rgba(45,45,45,.99)}.cm-s-the-matrix.CodeMirror ::-moz-selection{background:rgba(45,45,45,.99)}.cm-s-the-matrix .CodeMirror-gutters{background:#060;border-right:2px solid #0f0}.cm-s-the-matrix .CodeMirror-guttermarker{color:#0f0}.cm-s-the-matrix .CodeMirror-guttermarker-subtle,.cm-s-the-matrix .CodeMirror-linenumber{color:#fff}.cm-s-the-matrix .CodeMirror-cursor{border-left:1px solid #0f0!important}.cm-s-the-matrix span.cm-keyword{color:#008803;font-weight:700}.cm-s-the-matrix span.cm-atom{color:#3FF}.cm-s-the-matrix span.cm-number{color:#FFB94F}.cm-s-the-matrix span.cm-def{color:#99C}.cm-s-the-matrix span.cm-variable{color:#F6C}.cm-s-the-matrix span.cm-variable-2{color:#C6F}.cm-s-the-matrix span.cm-variable-3{color:#96F}.cm-s-the-matrix span.cm-property{color:#62FFA0}.cm-s-the-matrix span.cm-operator{color:#999}.cm-s-the-matrix span.cm-comment{color:#ccc}.cm-s-the-matrix span.cm-string{color:#39C}.cm-s-the-matrix span.cm-meta{color:#C9F}.cm-s-the-matrix span.cm-qualifier{color:#FFF700}.cm-s-the-matrix span.cm-builtin{color:#30a}.cm-s-the-matrix span.cm-bracket{color:#cc7}.cm-s-the-matrix span.cm-tag{color:#FFBD40}.cm-s-the-matrix span.cm-attribute{color:#FFF700}.cm-s-the-matrix span.cm-error{color:red}.cm-s-the-matrix .CodeMirror-activeline-background{background:#040}
css/min/cmthemes/tomorrow-night-bright.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-tomorrow-night-bright.CodeMirror{background:#000;color:#eaeaea}.cm-s-tomorrow-night-bright div.CodeMirror-selected{background:#424242!important}.cm-s-tomorrow-night-bright .CodeMirror-gutters{background:#000;border-right:0}.cm-s-tomorrow-night-bright .CodeMirror-guttermarker{color:#e78c45}.cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle{color:#777}.cm-s-tomorrow-night-bright .CodeMirror-linenumber{color:#424242}.cm-s-tomorrow-night-bright .CodeMirror-cursor{border-left:1px solid #6A6A6A!important}.cm-s-tomorrow-night-bright span.cm-comment{color:#d27b53}.cm-s-tomorrow-night-bright span.cm-atom,.cm-s-tomorrow-night-bright span.cm-number{color:#a16a94}.cm-s-tomorrow-night-bright span.cm-property,.cm-s-tomorrow-night-bright span.cm-attribute{color:#9c9}.cm-s-tomorrow-night-bright span.cm-keyword{color:#d54e53}.cm-s-tomorrow-night-bright span.cm-string{color:#e7c547}.cm-s-tomorrow-night-bright span.cm-variable{color:#b9ca4a}.cm-s-tomorrow-night-bright span.cm-variable-2{color:#7aa6da}.cm-s-tomorrow-night-bright span.cm-def{color:#e78c45}.cm-s-tomorrow-night-bright span.cm-bracket{color:#eaeaea}.cm-s-tomorrow-night-bright span.cm-tag{color:#d54e53}.cm-s-tomorrow-night-bright span.cm-link{color:#a16a94}.cm-s-tomorrow-night-bright span.cm-error{background:#d54e53;color:#6A6A6A}.cm-s-tomorrow-night-bright .CodeMirror-activeline-background{background:#2a2a2a!important}.cm-s-tomorrow-night-bright .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
css/min/cmthemes/tomorrow-night-eighties.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-tomorrow-night-eighties.CodeMirror{background:#000;color:#ccc}.cm-s-tomorrow-night-eighties div.CodeMirror-selected{background:#2D2D2D!important}.cm-s-tomorrow-night-eighties.CodeMirror ::selection{background:rgba(45,45,45,.99)}.cm-s-tomorrow-night-eighties.CodeMirror ::-moz-selection{background:rgba(45,45,45,.99)}.cm-s-tomorrow-night-eighties .CodeMirror-gutters{background:#000;border-right:0}.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker{color:#f2777a}.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle{color:#777}.cm-s-tomorrow-night-eighties .CodeMirror-linenumber{color:#515151}.cm-s-tomorrow-night-eighties .CodeMirror-cursor{border-left:1px solid #6A6A6A!important}.cm-s-tomorrow-night-eighties span.cm-comment{color:#d27b53}.cm-s-tomorrow-night-eighties span.cm-atom,.cm-s-tomorrow-night-eighties span.cm-number{color:#a16a94}.cm-s-tomorrow-night-eighties span.cm-property,.cm-s-tomorrow-night-eighties span.cm-attribute{color:#9c9}.cm-s-tomorrow-night-eighties span.cm-keyword{color:#f2777a}.cm-s-tomorrow-night-eighties span.cm-string{color:#fc6}.cm-s-tomorrow-night-eighties span.cm-variable{color:#9c9}.cm-s-tomorrow-night-eighties span.cm-variable-2{color:#69c}.cm-s-tomorrow-night-eighties span.cm-def{color:#f99157}.cm-s-tomorrow-night-eighties span.cm-bracket{color:#ccc}.cm-s-tomorrow-night-eighties span.cm-tag{color:#f2777a}.cm-s-tomorrow-night-eighties span.cm-link{color:#a16a94}.cm-s-tomorrow-night-eighties span.cm-error{background:#f2777a;color:#6A6A6A}.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background{background:#343600!important}.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
css/min/cmthemes/twilight.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-twilight.CodeMirror{background:#141414;color:#f7f7f7}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-twilight.CodeMirror ::selection{background:rgba(50,50,50,.99)}.cm-s-twilight.CodeMirror ::-moz-selection{background:rgba(50,50,50,.99)}.cm-s-twilight .CodeMirror-gutters{background:#222;border-right:1px solid #aaa}.cm-s-twilight .CodeMirror-guttermarker{color:#fff}.cm-s-twilight .CodeMirror-guttermarker-subtle,.cm-s-twilight .CodeMirror-linenumber{color:#aaa}.cm-s-twilight .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-twilight .cm-keyword{color:#f9ee98}.cm-s-twilight .cm-atom{color:#FC0}.cm-s-twilight .cm-number{color:#ca7841}.cm-s-twilight .cm-def{color:#8DA6CE}.cm-s-twilight span.cm-variable-2,.cm-s-twilight span.cm-tag,.cm-s-twilight span.cm-variable-3,.cm-s-twilight span.cm-def{color:#607392}.cm-s-twilight .cm-operator{color:#cda869}.cm-s-twilight .cm-comment{color:#777;font-style:italic;font-weight:400}.cm-s-twilight .cm-string{color:#8f9d6a;font-style:italic}.cm-s-twilight .cm-string-2{color:#bd6b18}.cm-s-twilight .cm-meta{background-color:#141414;color:#f7f7f7}.cm-s-twilight .cm-builtin{color:#cda869}.cm-s-twilight .cm-tag{color:#997643}.cm-s-twilight .cm-attribute{color:#d6bb6d}.cm-s-twilight .cm-header{color:#FF6400}.cm-s-twilight .cm-hr{color:#AEAEAE}.cm-s-twilight .cm-link{color:#ad9361;font-style:italic;text-decoration:none}.cm-s-twilight .cm-error{border-bottom:1px solid red}.cm-s-twilight .CodeMirror-activeline-background{background:#27282E!important}.cm-s-twilight .CodeMirror-matchingbracket{outline:1px solid grey;color:#fff!important}
css/min/cmthemes/vibrant-ink.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-vibrant-ink.CodeMirror{background:#000;color:#fff}.cm-s-vibrant-ink .CodeMirror-selected{background:#35493c!important}.cm-s-vibrant-ink.CodeMirror ::selection{background:rgba(53,73,60,.99)}.cm-s-vibrant-ink.CodeMirror ::-moz-selection{background:rgba(53,73,60,.99)}.cm-s-vibrant-ink .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-vibrant-ink .CodeMirror-guttermarker{color:#fff}.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle,.cm-s-vibrant-ink .CodeMirror-linenumber{color:#d0d0d0}.cm-s-vibrant-ink .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-vibrant-ink .cm-keyword{color:#CC7832}.cm-s-vibrant-ink .cm-atom{color:#FC0}.cm-s-vibrant-ink .cm-number{color:#FFEE98}.cm-s-vibrant-ink .cm-def{color:#8DA6CE}.cm-s-vibrant-ink span.cm-variable-2,.cm-s-vibrant span.cm-tag,.cm-s-vibrant-ink span.cm-variable-3,.cm-s-vibrant span.cm-def{color:#FFC66D}.cm-s-vibrant-ink .cm-operator{color:#888}.cm-s-vibrant-ink .cm-comment{color:gray;font-weight:700}.cm-s-vibrant-ink .cm-string{color:#A5C25C}.cm-s-vibrant-ink .cm-string-2{color:red}.cm-s-vibrant-ink .cm-meta{color:#D8FA3C}.cm-s-vibrant-ink .cm-builtin,.cm-s-vibrant-ink .cm-tag,.cm-s-vibrant-ink .cm-attribute{color:#8DA6CE}.cm-s-vibrant-ink .cm-header{color:#FF6400}.cm-s-vibrant-ink .cm-hr{color:#AEAEAE}.cm-s-vibrant-ink .cm-link{color:#00f}.cm-s-vibrant-ink .cm-error{border-bottom:1px solid red}.cm-s-vibrant-ink .CodeMirror-activeline-background{background:#27282E!important}.cm-s-vibrant-ink .CodeMirror-matchingbracket{outline:1px solid grey;color:#fff!important}
css/min/cmthemes/xq-dark.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-xq-dark.CodeMirror{background:#0a001f;color:#f8f8f8}.cm-s-xq-dark .CodeMirror-selected{background:#27007A!important}.cm-s-xq-dark.CodeMirror ::selection{background:rgba(39,0,122,.99)}.cm-s-xq-dark.CodeMirror ::-moz-selection{background:rgba(39,0,122,.99)}.cm-s-xq-dark .CodeMirror-gutters{background:#0a001f;border-right:1px solid #aaa}.cm-s-xq-dark .CodeMirror-guttermarker{color:#FFBD40}.cm-s-xq-dark .CodeMirror-guttermarker-subtle,.cm-s-xq-dark .CodeMirror-linenumber{color:#f8f8f8}.cm-s-xq-dark .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-xq-dark span.cm-keyword{color:#FFBD40}.cm-s-xq-dark span.cm-atom{color:#6C8CD5}.cm-s-xq-dark span.cm-number{color:#164}.cm-s-xq-dark span.cm-def{color:#FFF;text-decoration:underline}.cm-s-xq-dark span.cm-variable{color:#FFF}.cm-s-xq-dark span.cm-variable-2{color:#EEE}.cm-s-xq-dark span.cm-variable-3{color:#DDD}.cm-s-xq-dark span.cm-comment{color:gray}.cm-s-xq-dark span.cm-string{color:#9FEE00}.cm-s-xq-dark span.cm-meta{color:#ff0}.cm-s-xq-dark span.cm-qualifier{color:#FFF700}.cm-s-xq-dark span.cm-builtin{color:#30a}.cm-s-xq-dark span.cm-bracket{color:#cc7}.cm-s-xq-dark span.cm-tag{color:#FFBD40}.cm-s-xq-dark span.cm-attribute{color:#FFF700}.cm-s-xq-dark span.cm-error{color:red}.cm-s-xq-dark .CodeMirror-activeline-background{background:#27282E!important}.cm-s-xq-dark .CodeMirror-matchingbracket{outline:1px solid grey;color:#fff!important}
css/min/cmthemes/xq-light.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-xq-light span.cm-keyword{line-height:1em;font-weight:700;color:#5A5CAD}.cm-s-xq-light span.cm-atom{color:#6C8CD5}.cm-s-xq-light span.cm-number{color:#164}.cm-s-xq-light span.cm-def{text-decoration:underline}.cm-s-xq-light span.cm-variable,.cm-s-xq-light span.cm-variable-2,.cm-s-xq-light span.cm-variable-3{color:#000}.cm-s-xq-light span.cm-comment{color:#0080FF;font-style:italic}.cm-s-xq-light span.cm-string{color:red}.cm-s-xq-light span.cm-meta{color:#ff0}.cm-s-xq-light span.cm-qualifier{color:grey}.cm-s-xq-light span.cm-builtin{color:#7EA656}.cm-s-xq-light span.cm-bracket{color:#cc7}.cm-s-xq-light span.cm-tag{color:#3F7F7F}.cm-s-xq-light span.cm-attribute{color:#7F007F}.cm-s-xq-light span.cm-error{color:red}.cm-s-xq-light .CodeMirror-activeline-background{background:#e8f2ff!important}.cm-s-xq-light .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important;background:#ff0}
css/min/cmthemes/zenburn.css ADDED
@@ -0,0 +1 @@
 
1
+ .cm-s-zenburn .CodeMirror-gutters{background:#3f3f3f!important}.cm-s-zenburn .CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{color:#999}.cm-s-zenburn .CodeMirror-cursor{border-left:1px solid #fff!important}.cm-s-zenburn{background-color:#3f3f3f;color:#dcdccc}.cm-s-zenburn span.cm-builtin{color:#dcdccc;font-weight:700}.cm-s-zenburn span.cm-comment{color:#7f9f7f}.cm-s-zenburn span.cm-keyword{color:#f0dfaf;font-weight:700}.cm-s-zenburn span.cm-atom{color:#bfebbf}.cm-s-zenburn span.cm-def{color:#dcdccc}.cm-s-zenburn span.cm-variable{color:#dfaf8f}.cm-s-zenburn span.cm-variable-2{color:#dcdccc}.cm-s-zenburn span.cm-string,.cm-s-zenburn span.cm-string-2{color:#cc9393}.cm-s-zenburn span.cm-number{color:#dcdccc}.cm-s-zenburn span.cm-tag{color:#93e0e3}.cm-s-zenburn span.cm-property,.cm-s-zenburn span.cm-attribute{color:#dfaf8f}.cm-s-zenburn span.cm-qualifier{color:#7cb8bb}.cm-s-zenburn span.cm-meta{color:#f0dfaf}.cm-s-zenburn span.cm-header,.cm-s-zenburn span.cm-operator{color:#f0efd0}.cm-s-zenburn span.CodeMirror-matchingbracket{box-sizing:border-box;background:0 0;border-bottom:1px solid}.cm-s-zenburn span.CodeMirror-nonmatchingbracket{border-bottom:1px solid;background:0 0}.cm-s-zenburn .CodeMirror-activeline,.cm-s-zenburn .CodeMirror-activeline-background{background:#000}.cm-s-zenburn .CodeMirror-selected{background:#545454}.cm-s-zenburn .CodeMirror-focused .CodeMirror-selected{background:#4f4f4f}
css/min/codemirror.css ADDED
@@ -0,0 +1 @@
 
1
+ .CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1)infinite;-moz-animation:blink 1.06s steps(1)infinite;animation:blink 1.06s steps(1)infinite}@-moz-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@-webkit-keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}@keyframes blink{0%{background:#7e7}50%{background:0 0}100%{background:#7e7}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px;*zoom:1;*display:inline}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror ::selection{background:#d7d4f0}.CodeMirror ::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}
css/min/edit.css ADDED
@@ -0,0 +1 @@
 
1
+ h3{margin:1em 0}label{cursor:auto}label[for='snippet_description'] h3 div{position:absolute}.submit .button{margin-right:.5em}.snippet-scope div{margin-right:30px;display:inline-block}.CodeMirror{width:100%;height:auto;min-height:300px;border:1px solid #dfdfdf;border-radius:3px;background-color:#fff}.CodeMirror-scroll{overflow-x:auto;overflow-y:hidden}.CodeMirror-sizer{min-height:300px!important}.CodeMirror-focused .cm-matchhighlight{color:#fff!important;outline:1px solid green}
css/min/manage.css ADDED
@@ -0,0 +1 @@
 
1
+ .snippets th,.snippets td{color:#000}.snippets tr{background:#fff}.snippets .row-actions{color:#ddd}.snippets .clear-filters{vertical-align:middle}.snippets tfoot th{border-top:none!important}.snippets tfoot th.check-column{padding:13px 0 0 3px}.snippets thead th.check-column,.snippets tfoot th.check-column,.snippets .inactive th.check-column{padding-left:5px}.snippets .column-description p{color:#333}.snippets .inactive a{color:#579}.snippets .inactive td,.snippets .inactive th,.snippets .active td,.snippets .active th{padding:10px 9px;border:none;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.snippets .active td,.snippets .active th{background-color:rgba(120,200,230,.06)}.snippets .active th.check-column{border-left:2px solid #2ea2cc}.snippets tr.active+tr.inactive th,.snippets tr.active+tr.inactive td{border-top:1px solid rgba(0,0,0,.03);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1;box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.snippets a.delete:hover,.snippets #all-snippets-table a.delete:hover,.snippets #search-snippets-table a.delete:hover{border-bottom:1px solid red;color:red}#wpbody-content .snippets .column-name{white-space:nowrap}
css/min/settings.css ADDED
@@ -0,0 +1 @@
 
1
+ .form-table th{font-weight:400}#code_snippets_editor_preview .CodeMirror{height:200px}
css/min/tagit.css ADDED
@@ -0,0 +1 @@
 
1
+ ul.tagit{padding:1px 5px;overflow:auto;margin-left:inherit;margin-right:inherit}ul.tagit li{display:block;float:left;margin:2px 5px 2px 0}ul.tagit li.tagit-choice{position:relative;line-height:inherit}input.tagit-hidden-field{display:none}ul.tagit li.tagit-choice-read-only{padding:.2em .5em}ul.tagit li.tagit-choice-editable{padding:.2em 18px .2em .5em}ul.tagit li.tagit-new{padding:.25em 4px .25em 0}ul.tagit li.tagit-choice a.tagit-label{cursor:pointer;text-decoration:none}ul.tagit li.tagit-choice .tagit-close{cursor:pointer;position:absolute;top:50%;margin-top:-8px;line-height:17px}ul.tagit li.tagit-choice .tagit-close .text-icon{display:none}ul.tagit li.tagit-choice input{display:block;float:left;margin:2px 5px 2px 0}ul.tagit input[type="text"]{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;border:none;margin:0;padding:0;width:inherit;background-color:inherit;outline:none}ul.tagit{border-style:solid;border-width:1px;border-color:#C6C6C6;background:inherit}ul.tagit li.tagit-choice{-moz-border-radius:6px;border-radius:6px;-webkit-border-radius:6px;border:1px solid #CAD8F3;background:0 0;background-color:#DEE7F8;font-weight:400}ul.tagit li.tagit-choice .tagit-label:not(a){color:#555}ul.tagit li.tagit-choice a.tagit-close{text-decoration:none}ul.tagit li.tagit-choice .tagit-close{right:.4em}ul.tagit li.tagit-choice .ui-icon{display:none}ul.tagit li.tagit-choice .tagit-close .text-icon{display:inline;font-family:arial,sans-serif;font-size:16px;line-height:16px;color:#777}ul.tagit li.tagit-choice:hover,ul.tagit li.tagit-choice.remove{background-color:#bbcef1;border-color:#6d95e0}ul.tagit li.tagit-choice a.tagLabel:hover,ul.tagit li.tagit-choice a.tagit-close .text-icon:hover{color:#222}ul.tagit input[type="text"]{color:#333;background:0 0}.ui-widget{font-size:1.1em}.tagit-autocomplete.ui-autocomplete{position:absolute;cursor:default}* html .tagit-autocomplete.ui-autocomplete{width:1px}.tagit-autocomplete.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}.tagit-autocomplete.ui-menu .ui-menu{margin-top:-3px}.tagit-autocomplete.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.tagit-autocomplete.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.tagit-autocomplete .ui-menu .ui-menu-item a.ui-state-hover,.tagit-autocomplete .ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.tagit-autocomplete.ui-widget-content{border:1px solid #aaa;background:#fff 50% 50% repeat-x;color:#222}.tagit-autocomplete.ui-corner-all,.tagit-autocomplete .ui-corner-all{-moz-border-radius:4px;-webkit-border-radius:4px;-khtml-border-radius:4px;border-radius:4px}.tagit-autocomplete .ui-state-hover,.tagit-autocomplete .ui-state-focus{border:1px solid #999;background:#dadada;font-weight:400;color:#212121}.tagit-autocomplete .ui-state-active,.tagit-autocomplete .ui-widget-content{border:1px solid #aaa}.tagit .ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px,1px,1px,1px)}
includes/admin.php CHANGED
@@ -84,6 +84,38 @@ function code_snippets_mu_menu_items( $menu_items ) {
84
 
85
  add_filter( 'mu_menu_items', 'code_snippets_mu_menu_items' );
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  /**
88
  * Enqueue the icon stylesheet globally in the admin
89
  *
@@ -137,7 +169,7 @@ add_filter( 'plugin_action_links_' . plugin_basename( CODE_SNIPPETS_FILE ), 'cod
137
  function code_snippets_plugin_meta( $links, $file ) {
138
 
139
  /* We only want to affect the Code Snippets plugin listing */
140
- if ( $file !== plugin_basename( CODE_SNIPPETS_FILE ) ) {
141
  return $links;
142
  }
143
 
@@ -157,9 +189,9 @@ function code_snippets_plugin_meta( $links, $file ) {
157
  ),
158
  sprintf( $format,
159
  'http://code-snippets.bungeshea.com/donate/',
160
- __("Support this plugin's development", 'code-snippets' ),
161
  __( 'Donate', 'code-snippets' )
162
- )
163
  ) );
164
  }
165
 
@@ -215,7 +247,7 @@ function code_snippets_remove_debug_bar_codemirror() {
215
  global $pagenow;
216
 
217
  /* Try to discern if we are on the single snippet page as best as we can at this early time */
218
- is_admin() && 'admin.php' === $pagenow && isset( $_GET['page' ] ) && 'snippet' === $_GET['page']
219
 
220
  /* Remove the action and stop all Debug Bar Console scripts */
221
  && remove_action( 'debug_bar_enqueue_scripts', 'debug_bar_console_scripts' );
84
 
85
  add_filter( 'mu_menu_items', 'code_snippets_mu_menu_items' );
86
 
87
+ /**
88
+ * Enqueue the stylesheet for a snippet menu
89
+ *
90
+ * @since 2.2.0
91
+ * @uses wp_enqueue_style() To add the stylesheet to the queue
92
+ * @param string $hook The current page hook
93
+ */
94
+ function code_snippets_enqueue_admin_stylesheet( $hook ) {
95
+ $pages = array( 'manage', 'add', 'edit', 'settings' );
96
+ $hooks = array_map( 'code_snippets_get_menu_hook', $pages );
97
+
98
+ /* Only load the stylesheet on the right snippets page */
99
+ if ( ! in_array( $hook, $hooks ) ) {
100
+ return;
101
+ }
102
+
103
+ $hooks = array_combine( $hooks, $pages );
104
+ $page = $hooks[ $hook ];
105
+
106
+ // add snippet page uses edit stylesheet
107
+ 'add' === $page && $page = 'edit';
108
+
109
+ wp_enqueue_style(
110
+ "code-snippets-$page",
111
+ plugins_url( "css/min/$page.css", CODE_SNIPPETS_FILE ),
112
+ false,
113
+ CODE_SNIPPETS_VERSION
114
+ );
115
+ }
116
+
117
+ add_action( 'admin_enqueue_scripts', 'code_snippets_enqueue_admin_stylesheet' );
118
+
119
  /**
120
  * Enqueue the icon stylesheet globally in the admin
121
  *
169
  function code_snippets_plugin_meta( $links, $file ) {
170
 
171
  /* We only want to affect the Code Snippets plugin listing */
172
+ if ( plugin_basename( CODE_SNIPPETS_FILE ) !== $file ) {
173
  return $links;
174
  }
175
 
189
  ),
190
  sprintf( $format,
191
  'http://code-snippets.bungeshea.com/donate/',
192
+ __( "Support this plugin's development", 'code-snippets' ),
193
  __( 'Donate', 'code-snippets' )
194
+ ),
195
  ) );
196
  }
197
 
247
  global $pagenow;
248
 
249
  /* Try to discern if we are on the single snippet page as best as we can at this early time */
250
+ is_admin() && 'admin.php' === $pagenow && isset( $_GET['page'] ) && 'snippet' === $_GET['page']
251
 
252
  /* Remove the action and stop all Debug Bar Console scripts */
253
  && remove_action( 'debug_bar_enqueue_scripts', 'debug_bar_console_scripts' );
includes/class-export.php CHANGED
@@ -11,8 +11,6 @@
11
  * @subpackage Export
12
  */
13
 
14
- if ( ! class_exists( 'Code_Snippets_Export' ) ) :
15
-
16
  /**
17
  * Exports selected snippets to a XML or PHP file.
18
  *
@@ -120,10 +118,10 @@ class Code_Snippets_Export {
120
  }
121
 
122
  /* Build a generator line, like the WordPress export files */
123
- $gen = sprintf (
124
  'generator="Code Snippets/%s" created="%s"',
125
  CODE_SNIPPETS_VERSION,
126
- date('Y-m-d H:i')
127
  );
128
 
129
  /* Run the generator line through the standard WordPress filter */
@@ -195,18 +193,17 @@ class Code_Snippets_Export {
195
  * @param array $snippet
196
  */
197
  protected function do_item_php( $snippet ) {
 
198
 
199
- echo "\n/**\n * {$snippet['name']}\n";
200
-
201
- if ( ! empty( $snippet['description'] ) ) {
202
 
203
- /* Convert description to PhpDoc */
204
- $desc = strip_tags( str_replace( "\n", "\n * ", $snippet['description'] ) );
205
 
206
- echo " *\n * $desc\n";
207
- }
208
 
209
- echo " */\n{$snippet['code']}\n";
210
  }
211
 
212
  /**
@@ -250,5 +247,3 @@ class Code_Snippets_Export {
250
  exit;
251
  }
252
  }
253
-
254
- endif; // class exists check
11
  * @subpackage Export
12
  */
13
 
 
 
14
  /**
15
  * Exports selected snippets to a XML or PHP file.
16
  *
118
  }
119
 
120
  /* Build a generator line, like the WordPress export files */
121
+ $gen = sprintf(
122
  'generator="Code Snippets/%s" created="%s"',
123
  CODE_SNIPPETS_VERSION,
124
+ date( 'Y-m-d H:i' )
125
  );
126
 
127
  /* Run the generator line through the standard WordPress filter */
193
  * @param array $snippet
194
  */
195
  protected function do_item_php( $snippet ) {
196
+ echo "\n/**\n * {$snippet['name']}\n";
197
 
198
+ if ( ! empty( $snippet['description'] ) ) {
 
 
199
 
200
+ /* Convert description to PhpDoc */
201
+ $desc = strip_tags( str_replace( "\n", "\n * ", $snippet['description'] ) );
202
 
203
+ echo " *\n * $desc\n";
204
+ }
205
 
206
+ echo " */\n{$snippet['code']}\n";
207
  }
208
 
209
  /**
247
  exit;
248
  }
249
  }
 
 
includes/db.php CHANGED
@@ -14,12 +14,12 @@ function set_snippet_table_vars() {
14
  global $wpdb;
15
 
16
  /* Register the snippet table names with WordPress */
17
- $wpdb->tables[] = 'snippets';
18
  $wpdb->ms_global_tables[] = 'ms_snippets';
19
 
20
  /* Setup initial table variables */
21
- $wpdb->snippets = $wpdb->prefix . 'snippets';
22
- $wpdb->ms_snippets = $wpdb->base_prefix . 'ms_snippets';
23
  }
24
 
25
  /**
@@ -44,7 +44,7 @@ function get_snippets_table_name( $multisite = null ) {
44
 
45
  /* If multisite is not active, always return the site-wide table name */
46
  if ( ! is_multisite() ) {
47
- $multisire = false;
48
  }
49
 
50
  /* Retrieve the table name from $wpdb depending on the above conditionals */
@@ -115,12 +115,14 @@ function create_code_snippets_table( $table_name ) {
115
  /* Create the database table */
116
 
117
  $sql = "CREATE TABLE $table_name (
118
- id bigint(20) unsigned not null auto_increment primary key,
119
  name tinytext not null,
120
  description text,
121
  code longtext not null,
122
  tags longtext,
123
- active tinyint(1) not null default 0
 
 
124
  ) {$charset_collate};";
125
 
126
  dbDelta( $sql );
14
  global $wpdb;
15
 
16
  /* Register the snippet table names with WordPress */
17
+ $wpdb->tables[] = 'snippets';
18
  $wpdb->ms_global_tables[] = 'ms_snippets';
19
 
20
  /* Setup initial table variables */
21
+ $wpdb->snippets = $wpdb->prefix . 'snippets';
22
+ $wpdb->ms_snippets = $wpdb->base_prefix . 'ms_snippets';
23
  }
24
 
25
  /**
44
 
45
  /* If multisite is not active, always return the site-wide table name */
46
  if ( ! is_multisite() ) {
47
+ $multisite = false;
48
  }
49
 
50
  /* Retrieve the table name from $wpdb depending on the above conditionals */
115
  /* Create the database table */
116
 
117
  $sql = "CREATE TABLE $table_name (
118
+ id bigint(20) unsigned not null auto_increment,
119
  name tinytext not null,
120
  description text,
121
  code longtext not null,
122
  tags longtext,
123
+ scope tinyint(1) default 0,
124
+ active tinyint(1) not null default 0,
125
+ primary key (id)
126
  ) {$charset_collate};";
127
 
128
  dbDelta( $sql );
includes/edit/admin-messages.php CHANGED
@@ -11,26 +11,26 @@ $_f = '<div id="message" class="%2$s fade"><p>%1$s</p></div>';
11
 
12
  if ( isset( $_REQUEST['invalid'] ) && $_REQUEST['invalid'] ) :
13
 
14
- printf ( $_f, __( 'An error occurred when saving the snippet.', 'code-snippets' ), 'error' );
15
 
16
  elseif ( isset( $_REQUEST['activated'], $_REQUEST['updated'] ) && $_REQUEST['activated'] && $_REQUEST['updated'] ) :
17
 
18
- printf ( $_f, __( 'Snippet <strong>updated</strong> and <strong>activated</strong>.', 'code-snippets' ), 'updated' );
19
 
20
  elseif ( isset( $_REQUEST['activated'], $_REQUEST['added'] ) && $_REQUEST['activated'] && $_REQUEST['added'] ) :
21
 
22
- printf ( $_f, __( 'Snippet <strong>added</strong> and <strong>activated</strong>.', 'code-snippets' ), 'updated' );
23
 
24
  elseif ( isset( $_REQUEST['deactivated'], $_REQUEST['updated'] ) && $_REQUEST['deactivated'] && $_REQUEST['updated'] ) :
25
 
26
- printf ( $_f, __( 'Snippet <strong>updated</strong> and <strong>deactivated</strong>.', 'code-snippets' ), 'updated' );
27
 
28
  elseif ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] ) :
29
 
30
- printf ( $_f, __( 'Snippet <strong>updated</strong>.', 'code-snippets' ), 'updated' );
31
 
32
  elseif ( isset( $_REQUEST['added'] ) && $_REQUEST['added'] ) :
33
 
34
- printf ( $_f, __( 'Snippet <strong>added</strong>.', 'code-snippets' ), 'updated' );
35
 
36
  endif;
11
 
12
  if ( isset( $_REQUEST['invalid'] ) && $_REQUEST['invalid'] ) :
13
 
14
+ printf( $_f, __( 'An error occurred when saving the snippet.', 'code-snippets' ), 'error' );
15
 
16
  elseif ( isset( $_REQUEST['activated'], $_REQUEST['updated'] ) && $_REQUEST['activated'] && $_REQUEST['updated'] ) :
17
 
18
+ printf( $_f, __( 'Snippet <strong>updated</strong> and <strong>activated</strong>.', 'code-snippets' ), 'updated' );
19
 
20
  elseif ( isset( $_REQUEST['activated'], $_REQUEST['added'] ) && $_REQUEST['activated'] && $_REQUEST['added'] ) :
21
 
22
+ printf( $_f, __( 'Snippet <strong>added</strong> and <strong>activated</strong>.', 'code-snippets' ), 'updated' );
23
 
24
  elseif ( isset( $_REQUEST['deactivated'], $_REQUEST['updated'] ) && $_REQUEST['deactivated'] && $_REQUEST['updated'] ) :
25
 
26
+ printf( $_f, __( 'Snippet <strong>updated</strong> and <strong>deactivated</strong>.', 'code-snippets' ), 'updated' );
27
 
28
  elseif ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] ) :
29
 
30
+ printf( $_f, __( 'Snippet <strong>updated</strong>.', 'code-snippets' ), 'updated' );
31
 
32
  elseif ( isset( $_REQUEST['added'] ) && $_REQUEST['added'] ) :
33
 
34
+ printf( $_f, __( 'Snippet <strong>added</strong>.', 'code-snippets' ), 'updated' );
35
 
36
  endif;
includes/edit/admin.php CHANGED
@@ -22,30 +22,30 @@ $snippet = get_snippet( $edit_id );
22
  <div class="wrap">
23
  <?php screen_icon(); ?>
24
  <h2><?php
25
- if ( $edit_id ) {
26
- esc_html_e( 'Edit Snippet', 'code-snippets' );
27
-
28
- if ( current_user_can( get_snippets_cap() ) ) {
29
- printf( ' <a href="%1$s" class="add-new-h2">%2$s</a>',
30
- code_snippets_get_menu_url( 'add' ),
31
- esc_html_x( 'Add New', 'snippet', 'code-snippets' )
32
- );
33
- }
34
- } else {
35
- esc_html_e( 'Add New Snippet', 'code-snippets' );
36
  }
 
 
 
37
  ?></h2>
38
 
39
  <form method="post" action="" style="margin-top: 10px;">
40
  <?php
 
41
 
42
- /* Output the hidden fields */
 
 
43
 
44
- if ( 0 !== $snippet->id ) {
45
- printf ( '<input type="hidden" name="snippet_id" value="%d" />', $snippet->id );
46
- }
47
 
48
- printf ( '<input type="hidden" name="snippet_active" value="%d" />', $snippet->active );
49
  ?>
50
  <div id="titlediv">
51
  <div id="titlewrap">
@@ -61,68 +61,67 @@ $snippet = get_snippet( $edit_id );
61
  <textarea id="snippet_code" name="snippet_code" rows="20" spellcheck="false" style="font-family: monospace; width: 100%;"><?php echo esc_textarea( $snippet->code ); ?></textarea>
62
 
63
  <?php
 
 
64
 
65
- /* Allow addon plugins (and us!) to add fields and content to this page */
66
- do_action( 'code_snippets/admin/single', $snippet );
67
-
68
- /* Add a nonce for security */
69
- wp_nonce_field( 'save_snippet' );
70
  ?>
71
 
72
  <p class="submit">
73
  <?php
74
 
75
- /* Make the 'Save and Activate' button the default if the setting is enabled */
76
- if ( ! $snippet->active && code_snippets_get_setting( 'general', 'activate_by_default' ) ) {
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  submit_button(
79
  __( 'Save Changes and Activate', 'code-snippets' ),
80
- 'primary', 'save_snippet_activate', false
81
  );
82
 
83
- submit_button( null, 'secondary', 'save_snippet', false );
84
-
85
  } else {
86
-
87
- /* Save Snippet button */
88
- submit_button( null, 'primary', 'save_snippet', false );
89
-
90
- /* Save Snippet and Activate/Deactivate button */
91
- if ( ! $snippet->active ) {
92
- submit_button(
93
- __( 'Save Changes and Activate', 'code-snippets' ),
94
- 'secondary', 'save_snippet_activate', false
95
- );
96
-
97
- } else {
98
- submit_button(
99
- __( 'Save Changes and Deactivate', 'code-snippets' ),
100
- 'secondary', 'save_snippet_deactivate', false
101
- );
102
- }
103
  }
 
104
 
105
- if ( 0 !== $snippet->id ) {
106
 
107
- /* Export button */
108
 
109
- submit_button( __( 'Export', 'code-snippets' ), 'secondary', 'export_snippet', false );
110
 
111
- /* Delete button */
112
 
113
- $confirm_delete_js = esc_js(
114
- sprintf (
115
- 'return confirm("%s");',
116
- __( "You are about to permanently delete this snippet.\n'Cancel' to stop, 'OK' to delete.", 'code-snippets' )
117
- )
118
- );
119
 
120
- submit_button(
121
- __( 'Delete', 'code-snippets' ),
122
- 'secondary', 'delete_snippet', false,
123
- sprintf ( 'onclick="%s"', $confirm_delete_js )
124
- );
125
- }
126
 
127
  ?>
128
  </p>
22
  <div class="wrap">
23
  <?php screen_icon(); ?>
24
  <h2><?php
25
+ if ( $edit_id ) {
26
+ esc_html_e( 'Edit Snippet', 'code-snippets' );
27
+
28
+ if ( current_user_can( get_snippets_cap() ) ) {
29
+ printf( ' <a href="%1$s" class="add-new-h2">%2$s</a>',
30
+ code_snippets_get_menu_url( 'add' ),
31
+ esc_html_x( 'Add New', 'snippet', 'code-snippets' )
32
+ );
 
 
 
33
  }
34
+ } else {
35
+ esc_html_e( 'Add New Snippet', 'code-snippets' );
36
+ }
37
  ?></h2>
38
 
39
  <form method="post" action="" style="margin-top: 10px;">
40
  <?php
41
+ /* Output the hidden fields */
42
 
43
+ if ( 0 !== $snippet->id ) {
44
+ printf( '<input type="hidden" name="snippet_id" value="%d" />', $snippet->id );
45
+ }
46
 
47
+ printf( '<input type="hidden" name="snippet_active" value="%d" />', $snippet->active );
 
 
48
 
 
49
  ?>
50
  <div id="titlediv">
51
  <div id="titlewrap">
61
  <textarea id="snippet_code" name="snippet_code" rows="20" spellcheck="false" style="font-family: monospace; width: 100%;"><?php echo esc_textarea( $snippet->code ); ?></textarea>
62
 
63
  <?php
64
+ /* Allow addon plugins to add fields and content to this page */
65
+ do_action( 'code_snippets/admin/single', $snippet );
66
 
67
+ /* Add a nonce for security */
68
+ wp_nonce_field( 'save_snippet' );
 
 
 
69
  ?>
70
 
71
  <p class="submit">
72
  <?php
73
 
74
+ /* Make the 'Save and Activate' button the default if the setting is enabled */
75
+ if ( ! $snippet->active && code_snippets_get_setting( 'general', 'activate_by_default' ) ) {
76
 
77
+ submit_button(
78
+ __( 'Save Changes and Activate', 'code-snippets' ),
79
+ 'primary', 'save_snippet_activate', false
80
+ );
81
+
82
+ submit_button( null, 'secondary', 'save_snippet', false );
83
+
84
+ } else {
85
+
86
+ /* Save Snippet button */
87
+ submit_button( null, 'primary', 'save_snippet', false );
88
+
89
+ /* Save Snippet and Activate/Deactivate button */
90
+ if ( ! $snippet->active ) {
91
  submit_button(
92
  __( 'Save Changes and Activate', 'code-snippets' ),
93
+ 'secondary', 'save_snippet_activate', false
94
  );
95
 
 
 
96
  } else {
97
+ submit_button(
98
+ __( 'Save Changes and Deactivate', 'code-snippets' ),
99
+ 'secondary', 'save_snippet_deactivate', false
100
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  }
102
+ }
103
 
104
+ if ( 0 !== $snippet->id ) {
105
 
106
+ /* Export button */
107
 
108
+ submit_button( __( 'Export', 'code-snippets' ), 'secondary', 'export_snippet', false );
109
 
110
+ /* Delete button */
111
 
112
+ $confirm_delete_js = esc_js(
113
+ sprintf(
114
+ 'return confirm("%s");',
115
+ __( "You are about to permanently delete this snippet.\n'Cancel' to stop, 'OK' to delete.", 'code-snippets' )
116
+ )
117
+ );
118
 
119
+ submit_button(
120
+ __( 'Delete', 'code-snippets' ),
121
+ 'secondary', 'delete_snippet', false,
122
+ sprintf( 'onclick="%s"', $confirm_delete_js )
123
+ );
124
+ }
125
 
126
  ?>
127
  </p>
includes/edit/edit.php CHANGED
@@ -38,6 +38,8 @@ function code_snippets_add_single_menu() {
38
  'code_snippets_render_single_menu'
39
  );
40
 
 
 
41
  /* Check if we are currently editing a snippet */
42
  if ( isset( $_REQUEST['page'] ) && code_snippets_get_menu_slug( 'edit' ) === $_REQUEST['page'] ) {
43
 
@@ -52,8 +54,6 @@ function code_snippets_add_single_menu() {
52
 
53
  add_action( 'load-' . $edit_hook, 'code_snippets_load_single_menu' );
54
  }
55
-
56
- add_action( 'load-' . $add_hook, 'code_snippets_load_single_menu' );
57
  }
58
 
59
  add_action( 'admin_menu', 'code_snippets_add_single_menu', 5 );
@@ -116,7 +116,7 @@ function code_snippets_load_single_menu() {
116
  }
117
 
118
  /* Save the snippet to the database */
119
- $result = save_snippet( stripslashes_deep( $_POST ) );
120
 
121
  /* Build the status message and redirect */
122
  $query_args = array();
@@ -170,14 +170,13 @@ function code_snippets_load_single_menu() {
170
  */
171
  function code_snippets_description_editor_box( $snippet ) {
172
  $settings = code_snippets_get_settings();
173
- $settings = $settings['description_editor']
174
- ?>
175
 
176
- <label for="snippet_description">
177
- <h3><div><?php _e( 'Description', 'code-snippets' ); ?></div></h3>
178
- </label>
179
-
180
- <?php
181
 
182
  remove_editor_styles(); // stop custom theme styling interfering with the editor
183
 
@@ -188,12 +187,38 @@ function code_snippets_description_editor_box( $snippet ) {
188
  'textarea_name' => 'snippet_description',
189
  'textarea_rows' => $settings['rows'],
190
  'teeny' => ! $settings['use_full_mce'],
191
- 'media_buttons' => $settings['media_buttons'],
192
  ) )
193
  );
194
  }
195
 
196
- add_action( 'code_snippets/admin/single', 'code_snippets_description_editor_box', 5 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
 
198
  /**
199
  * Output the interface for editing snippet tags
@@ -227,122 +252,48 @@ add_action( 'code_snippets/admin/single', 'code_snippets_tags_editor' );
227
  * @since 1.7
228
  * @access private
229
  *
230
- * @uses wp_register_script()
231
- * @uses wp_register_style()
232
  * @uses wp_enqueue_script() To add the scripts to the queue
233
  * @uses wp_enqueue_style() To add the stylesheets to the queue
234
- *
235
- * @param string $hook The current page hook, to be compared with the single snippet page hook
236
  */
237
  function code_snippets_enqueue_codemirror() {
 
 
 
238
 
239
  /* Remove other CodeMirror styles */
240
  wp_deregister_style( 'codemirror' );
241
  wp_deregister_style( 'wpeditor' );
242
 
243
  /* CodeMirror */
244
-
245
- $codemirror_version = '5.2';
246
- $codemirror_url = plugins_url( 'vendor/codemirror/', CODE_SNIPPETS_FILE );
247
-
248
  wp_enqueue_style(
249
  'code-snippets-codemirror',
250
- $codemirror_url . 'lib/codemirror.css',
251
- false,
252
- $codemirror_version
253
  );
254
 
255
  wp_enqueue_script(
256
  'code-snippets-codemirror',
257
- $codemirror_url . 'lib/codemirror.js',
258
- false,
259
- $codemirror_version
260
- );
261
-
262
- /* CodeMirror Modes */
263
-
264
- wp_enqueue_script(
265
- 'code-snippets-codemirror-mode-clike',
266
- $codemirror_url . 'mode/clike/clike.js',
267
- array( 'code-snippets-codemirror' ),
268
- $codemirror_version
269
- );
270
-
271
- wp_enqueue_script(
272
- 'code-snippets-codemirror-mode-php',
273
- $codemirror_url . 'mode/php/php.js',
274
- array( 'code-snippets-codemirror', 'code-snippets-codemirror-mode-clike' ),
275
- $codemirror_version
276
- );
277
-
278
-
279
- /* CodeMirror Addons */
280
-
281
- wp_enqueue_script(
282
- 'code-snippets-codemirror-addon-searchcursor',
283
- $codemirror_url . 'addon/search/searchcursor.js',
284
- array( 'code-snippets-codemirror' ),
285
- $codemirror_version
286
- );
287
-
288
- wp_enqueue_script(
289
- 'code-snippets-codemirror-addon-search',
290
- $codemirror_url . 'addon/search/search.js',
291
- array( 'code-snippets-codemirror', 'code-snippets-codemirror-addon-searchcursor' ),
292
- $codemirror_version
293
- );
294
-
295
- wp_enqueue_script(
296
- 'code-snippets-codemirror-addon-matchbrackets',
297
- $codemirror_url . 'addon/edit/matchbrackets.js',
298
- array( 'code-snippets-codemirror' ),
299
- $codemirror_version
300
- );
301
-
302
- wp_enqueue_script(
303
- 'code-snippets-codemirror-addon-closebrackets',
304
- $codemirror_url . 'addon/edit/closebrackets.js',
305
- array( 'code-snippets-codemirror' ),
306
- $codemirror_version
307
- );
308
-
309
- wp_enqueue_script(
310
- 'code-snippets-codemirror-addon-match-highlighter',
311
- $codemirror_url . 'addon/search/match-highlighter.js',
312
- array( 'code-snippets-codemirror', 'code-snippets-codemirror-addon-searchcursor' ),
313
- $codemirror_version
314
- );
315
-
316
- /* Plugin Assets */
317
-
318
- wp_enqueue_style(
319
- 'code-snippets-edit',
320
- plugins_url( 'css/min/edit-snippet.css', CODE_SNIPPETS_FILE ),
321
- false,
322
- CODE_SNIPPETS_VERSION
323
  );
324
 
325
  /* CodeMirror Theme */
326
-
327
  $theme = code_snippets_get_setting( 'editor', 'theme' );
328
 
329
  if ( 'default' !== $theme ) {
330
 
331
  wp_enqueue_style(
332
  'code-snippets-codemirror-theme-' . $theme,
333
- $codemirror_url . "theme/$theme.css",
334
  array( 'code-snippets-codemirror' ),
335
  $codemirror_version
336
  );
337
  }
338
 
339
  /* Tag It UI */
340
-
341
- $tagit_version = '2.0';
342
-
343
  wp_enqueue_script(
344
  'code-snippets-tag-it',
345
- plugins_url( 'js/vendor/tag-it.min.js', CODE_SNIPPETS_FILE ),
346
  array(
347
  'jquery-ui-core',
348
  'jquery-ui-widget',
@@ -355,19 +306,8 @@ function code_snippets_enqueue_codemirror() {
355
  );
356
 
357
  wp_enqueue_style(
358
- 'code-snippets-tagit',
359
- plugins_url( 'js/vendor/jquery.tagit.css', CODE_SNIPPETS_FILE ),
360
- false,
361
- $tagit_version
362
- );
363
-
364
- wp_enqueue_style(
365
- 'code-snippets-tagit-zendesk-ui',
366
- plugins_url( 'js/vendor/tagit.ui-zendesk.css', CODE_SNIPPETS_FILE ),
367
- array( 'code-snippets-tagit' ),
368
- $tagit_version
369
  );
370
-
371
- /* Needed for resizable editor functionality */
372
- wp_enqueue_script( 'jquery-ui-resizable' );
373
  }
38
  'code_snippets_render_single_menu'
39
  );
40
 
41
+ add_action( 'load-' . $add_hook, 'code_snippets_load_single_menu' );
42
+
43
  /* Check if we are currently editing a snippet */
44
  if ( isset( $_REQUEST['page'] ) && code_snippets_get_menu_slug( 'edit' ) === $_REQUEST['page'] ) {
45
 
54
 
55
  add_action( 'load-' . $edit_hook, 'code_snippets_load_single_menu' );
56
  }
 
 
57
  }
58
 
59
  add_action( 'admin_menu', 'code_snippets_add_single_menu', 5 );
116
  }
117
 
118
  /* Save the snippet to the database */
119
+ $result = save_snippet( stripslashes_deep( $_POST ) );
120
 
121
  /* Build the status message and redirect */
122
  $query_args = array();
170
  */
171
  function code_snippets_description_editor_box( $snippet ) {
172
  $settings = code_snippets_get_settings();
173
+ $settings = $settings['description_editor'];
174
+ $media_buttons = $settings['media_buttons'];
175
 
176
+ echo '<label for="snippet_description"><h3>';
177
+ $heading = __( 'Description', 'code-snippets' );
178
+ echo $media_buttons ? $heading : "<div>$heading</div>";
179
+ echo '</h3></label>';
 
180
 
181
  remove_editor_styles(); // stop custom theme styling interfering with the editor
182
 
187
  'textarea_name' => 'snippet_description',
188
  'textarea_rows' => $settings['rows'],
189
  'teeny' => ! $settings['use_full_mce'],
190
+ 'media_buttons' => $media_buttons,
191
  ) )
192
  );
193
  }
194
 
195
+ add_action( 'code_snippets/admin/single', 'code_snippets_description_editor_box', 9 );
196
+
197
+ function code_snippets_snippet_scope_setting( $snippet ) {
198
+
199
+ if ( ! code_snippets_get_setting( 'general', 'snippet_scope_enabled' ) ) {
200
+ return;
201
+ }
202
+
203
+ $scopes = array(
204
+ __( 'Run snippet everywhere', 'code-snippets' ),
205
+ __( 'Only run in adminstration area', 'code-snippets' ),
206
+ __( 'Only run on site front-end', 'code-snippets' ),
207
+ );
208
+
209
+ echo '<div class="snippet-scope">';
210
+ printf( '<label for="snippet_scope"><h3>%s</h3></label>', __( 'Scope', 'code-snippets' ) );
211
+
212
+ foreach ( $scopes as $scope => $label ) {
213
+ printf( '<div><input type="radio" name="snippet_scope" value="%s"', $scope );
214
+ checked( $scope, $snippet->scope );
215
+ echo "> $label</div>";
216
+ }
217
+
218
+ echo '</div>';
219
+ }
220
+
221
+ add_action( 'code_snippets/admin/single', 'code_snippets_snippet_scope_setting', 5 );
222
 
223
  /**
224
  * Output the interface for editing snippet tags
252
  * @since 1.7
253
  * @access private
254
  *
 
 
255
  * @uses wp_enqueue_script() To add the scripts to the queue
256
  * @uses wp_enqueue_style() To add the stylesheets to the queue
 
 
257
  */
258
  function code_snippets_enqueue_codemirror() {
259
+ $tagit_version = '2.0';
260
+ $codemirror_version = '5.2';
261
+ $url = plugin_dir_url( CODE_SNIPPETS_FILE );
262
 
263
  /* Remove other CodeMirror styles */
264
  wp_deregister_style( 'codemirror' );
265
  wp_deregister_style( 'wpeditor' );
266
 
267
  /* CodeMirror */
 
 
 
 
268
  wp_enqueue_style(
269
  'code-snippets-codemirror',
270
+ $url . 'css/min/codemirror.css',
271
+ false, $codemirror_version
 
272
  );
273
 
274
  wp_enqueue_script(
275
  'code-snippets-codemirror',
276
+ $url . 'js/min/codemirror.js',
277
+ false, $codemirror_version
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  );
279
 
280
  /* CodeMirror Theme */
 
281
  $theme = code_snippets_get_setting( 'editor', 'theme' );
282
 
283
  if ( 'default' !== $theme ) {
284
 
285
  wp_enqueue_style(
286
  'code-snippets-codemirror-theme-' . $theme,
287
+ $url . "css/min/cmthemes/$theme.css",
288
  array( 'code-snippets-codemirror' ),
289
  $codemirror_version
290
  );
291
  }
292
 
293
  /* Tag It UI */
 
 
 
294
  wp_enqueue_script(
295
  'code-snippets-tag-it',
296
+ $url . 'js/min/tag-it.js',
297
  array(
298
  'jquery-ui-core',
299
  'jquery-ui-widget',
306
  );
307
 
308
  wp_enqueue_style(
309
+ 'code-snippets-tag-it',
310
+ $url . 'css/min/tagit.css',
311
+ false, $tagit_version
 
 
 
 
 
 
 
 
312
  );
 
 
 
313
  }
includes/editor.php CHANGED
@@ -32,7 +32,7 @@ function code_snippets_get_editor_atts( $override_atts, $json_encode ) {
32
  $atts = json_encode( $atts, JSON_UNESCAPED_SLASHES );
33
  } else {
34
  /* Use a fallback for < 5.4 */
35
- $atts = str_replace('\\/', '/', json_encode( $atts ) );
36
  }
37
  }
38
 
32
  $atts = json_encode( $atts, JSON_UNESCAPED_SLASHES );
33
  } else {
34
  /* Use a fallback for < 5.4 */
35
+ $atts = str_replace( '\\/', '/', json_encode( $atts ) );
36
  }
37
  }
38
 
includes/import/admin-messages.php CHANGED
@@ -25,7 +25,7 @@ if ( isset( $_REQUEST['imported'] ) && 0 !== intval( $_REQUEST['imported'] ) ) {
25
  echo '</p></div>';
26
  }
27
  elseif ( isset( $_REQUEST['error'] ) && $_REQUEST['error'] ) {
28
- printf (
29
  '<div id="message" class="error fade"><p>%s</p></div>',
30
  __( 'An error occurred when processing the import file.', 'code-snippets' )
31
  );
25
  echo '</p></div>';
26
  }
27
  elseif ( isset( $_REQUEST['error'] ) && $_REQUEST['error'] ) {
28
+ printf(
29
  '<div id="message" class="error fade"><p>%s</p></div>',
30
  __( 'An error occurred when processing the import file.', 'code-snippets' )
31
  );
includes/manage/admin-help.php CHANGED
@@ -22,7 +22,7 @@ $screen->add_help_tab( array(
22
  'title' => __( 'Safe Mode', 'code-snippets' ),
23
  'content' =>
24
  '<p>' . __( 'Be sure to check your snippets for errors before you activate them, as a faulty snippet could bring your whole blog down. If your site starts doing strange things, deactivate all your snippets and activate them one at a time.', 'code-snippets' ) . '</p>' .
25
- '<p>' . __("If something goes wrong with a snippet and you can't use WordPress, you can cause all snippets to stop executing by adding <code>define('CODE_SNIPPETS_SAFE_MODE', true);</code> to your <code>wp-config.php</code> file. After you have deactivated the offending snippet, you can turn off safe mode by removing this line or replacing <strong>true</strong> with <strong>false</strong>.", 'code-snippets' ) . '</p>'
26
  ) );
27
 
28
  $screen->add_help_tab( array(
@@ -30,7 +30,7 @@ $screen->add_help_tab( array(
30
  'title' => __( 'Uninstall', 'code-snippets' ),
31
  'content' =>
32
  '<p>' . sprintf( __( 'When you delete Code Snippets through the Plugins menu in WordPress it will clear up the <code>%1$s</code> table and a few other bits of data stored in the database. If you want to keep this data (ie: you are only temporally uninstalling Code Snippets) then remove the <code>%2$s</code> folder using FTP.', 'code-snippets' ), get_snippets_table_name(), dirname( CODE_SNIPPETS_FILE ) ) .
33
- '<p>' . __("Even if you're sure that you don't want to use Code Snippets ever again on this WordPress installation, you may want to use the export feature to back up your snippets.", 'code-snippets' ) . '</p>'
34
  ) );
35
 
36
  $screen->set_help_sidebar(
22
  'title' => __( 'Safe Mode', 'code-snippets' ),
23
  'content' =>
24
  '<p>' . __( 'Be sure to check your snippets for errors before you activate them, as a faulty snippet could bring your whole blog down. If your site starts doing strange things, deactivate all your snippets and activate them one at a time.', 'code-snippets' ) . '</p>' .
25
+ '<p>' . __( "If something goes wrong with a snippet and you can't use WordPress, you can cause all snippets to stop executing by adding <code>define('CODE_SNIPPETS_SAFE_MODE', true);</code> to your <code>wp-config.php</code> file. After you have deactivated the offending snippet, you can turn off safe mode by removing this line or replacing <strong>true</strong> with <strong>false</strong>.", 'code-snippets' ) . '</p>'
26
  ) );
27
 
28
  $screen->add_help_tab( array(
30
  'title' => __( 'Uninstall', 'code-snippets' ),
31
  'content' =>
32
  '<p>' . sprintf( __( 'When you delete Code Snippets through the Plugins menu in WordPress it will clear up the <code>%1$s</code> table and a few other bits of data stored in the database. If you want to keep this data (ie: you are only temporally uninstalling Code Snippets) then remove the <code>%2$s</code> folder using FTP.', 'code-snippets' ), get_snippets_table_name(), dirname( CODE_SNIPPETS_FILE ) ) .
33
+ '<p>' . __( "Even if you're sure that you don't want to use Code Snippets ever again on this WordPress installation, you may want to use the export feature to back up your snippets.", 'code-snippets' ) . '</p>'
34
  ) );
35
 
36
  $screen->set_help_sidebar(
includes/manage/admin-messages.php CHANGED
@@ -11,32 +11,32 @@ $_f = '<div id="message" class="%2$s fade"><p>%1$s</p></div>';
11
 
12
  if ( defined( 'CODE_SNIPPETS_SAFE_MODE' ) && CODE_SNIPPETS_SAFE_MODE ) :
13
 
14
- printf ( $_f, __( '<strong>Warning:</strong> Safe mode is active and snippets will not execute! Remove the <code>CODE_SNIPPETS_SAFE_MODE</code> constant from <code>wp-config.php</code> to turn off safe mode. <a href="http://code-snippets.bungeshea.com/docs/safe-mode/" target="_blank">Help</a>', 'code-snippets' ), 'error' );
15
 
16
  endif;
17
 
18
  if ( isset( $_REQUEST['activate'] ) ) :
19
 
20
- printf ( $_f, __( 'Snippet <strong>activated</strong>.', 'code-snippets' ), 'updated' );
21
 
22
  elseif ( isset( $_REQUEST['activate-multi'] ) ) :
23
 
24
- printf ( $_f, __( 'Selected snippets <strong>activated</strong>.', 'code-snippets' ), 'updated' );
25
 
26
  elseif ( isset( $_REQUEST['deactivate'] ) ) :
27
 
28
- printf ( $_f, __( 'Snippet <strong>deactivated</strong>.', 'code-snippets' ), 'updated' );
29
 
30
  elseif ( isset( $_REQUEST['deactivate-multi'] ) ) :
31
 
32
- printf ( $_f, __( 'Selected snippets <strong>deactivated</strong>.', 'code-snippets' ), 'updated' );
33
 
34
  elseif ( isset( $_REQUEST['delete'] ) ) :
35
 
36
- printf ( $_f, __( 'Snippet <strong>deleted</strong>.', 'code-snippets' ), 'updated' );
37
 
38
  elseif ( isset( $_REQUEST['delete-multi'] ) ) :
39
 
40
- printf ( $_f, __( 'Selected snippets <strong>deleted</strong>.', 'code-snippets' ), 'updated' );
41
 
42
  endif;
11
 
12
  if ( defined( 'CODE_SNIPPETS_SAFE_MODE' ) && CODE_SNIPPETS_SAFE_MODE ) :
13
 
14
+ printf( $_f, __( '<strong>Warning:</strong> Safe mode is active and snippets will not execute! Remove the <code>CODE_SNIPPETS_SAFE_MODE</code> constant from <code>wp-config.php</code> to turn off safe mode. <a href="http://code-snippets.bungeshea.com/docs/safe-mode/" target="_blank">Help</a>', 'code-snippets' ), 'error' );
15
 
16
  endif;
17
 
18
  if ( isset( $_REQUEST['activate'] ) ) :
19
 
20
+ printf( $_f, __( 'Snippet <strong>activated</strong>.', 'code-snippets' ), 'updated' );
21
 
22
  elseif ( isset( $_REQUEST['activate-multi'] ) ) :
23
 
24
+ printf( $_f, __( 'Selected snippets <strong>activated</strong>.', 'code-snippets' ), 'updated' );
25
 
26
  elseif ( isset( $_REQUEST['deactivate'] ) ) :
27
 
28
+ printf( $_f, __( 'Snippet <strong>deactivated</strong>.', 'code-snippets' ), 'updated' );
29
 
30
  elseif ( isset( $_REQUEST['deactivate-multi'] ) ) :
31
 
32
+ printf( $_f, __( 'Selected snippets <strong>deactivated</strong>.', 'code-snippets' ), 'updated' );
33
 
34
  elseif ( isset( $_REQUEST['delete'] ) ) :
35
 
36
+ printf( $_f, __( 'Snippet <strong>deleted</strong>.', 'code-snippets' ), 'updated' );
37
 
38
  elseif ( isset( $_REQUEST['delete-multi'] ) ) :
39
 
40
+ printf( $_f, __( 'Selected snippets <strong>deleted</strong>.', 'code-snippets' ), 'updated' );
41
 
42
  endif;
includes/manage/admin.php CHANGED
@@ -18,17 +18,17 @@ global $code_snippets_list_table;
18
  <div class="wrap">
19
  <?php screen_icon(); ?>
20
  <h2><?php
21
- esc_html_e( 'Snippets', 'code-snippets' );
22
 
23
- if ( current_user_can( get_snippets_cap() ) ) {
24
 
25
- printf ( '<a href="%2$s" class="add-new-h2">%1$s</a>',
26
- esc_html_x( 'Add New', 'snippet', 'code-snippets' ),
27
- code_snippets_get_menu_url( 'add' )
28
- );
29
- }
30
 
31
- $code_snippets_list_table->search_notice();
32
  ?></h2>
33
 
34
  <?php $code_snippets_list_table->views(); ?>
18
  <div class="wrap">
19
  <?php screen_icon(); ?>
20
  <h2><?php
21
+ esc_html_e( 'Snippets', 'code-snippets' );
22
 
23
+ if ( current_user_can( get_snippets_cap() ) ) {
24
 
25
+ printf( '<a href="%2$s" class="add-new-h2">%1$s</a>',
26
+ esc_html_x( 'Add New', 'snippet', 'code-snippets' ),
27
+ code_snippets_get_menu_url( 'add' )
28
+ );
29
+ }
30
 
31
+ $code_snippets_list_table->search_notice();
32
  ?></h2>
33
 
34
  <?php $code_snippets_list_table->views(); ?>
includes/manage/class-list-table.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Contains the class for handling the snippets table
5
  *
6
- * @package Code_Snippets
7
  * @subpackage Administration
8
  */
9
 
@@ -36,12 +36,13 @@ class Code_Snippets_List_Table extends WP_List_Table {
36
 
37
  /* Determine the status */
38
  $status = 'all';
39
- if ( isset( $_REQUEST['status'] ) && in_array( $_REQUEST['status'], array( 'active', 'inactive', 'recently_activated' ) ) )
40
  $status = $_REQUEST['status'];
 
41
 
42
  /* Add the search query to the URL */
43
  if ( isset( $_REQUEST['s'] ) ) {
44
- $_SERVER['REQUEST_URI'] = add_query_arg( 's', stripslashes($_REQUEST['s'] ) );
45
  }
46
 
47
  /* Add a snippets per page screen option */
@@ -50,7 +51,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
50
  add_screen_option( 'per_page', array(
51
  'label' => __( 'Snippets per page', 'code-snippets' ),
52
  'default' => 10,
53
- 'option' => 'snippets_per_page'
54
  ) );
55
 
56
  /* Set the table columns hidden in Screen Options by default */
@@ -70,19 +71,19 @@ class Code_Snippets_List_Table extends WP_List_Table {
70
  parent::__construct( array(
71
  'singular' => 'snippet',
72
  'plural' => 'snippets',
73
- 'ajax' => true,
74
  ) );
75
  }
76
 
77
  /**
78
  * Define the output of all columns that have no callback function
79
- * @param object $snippet The snippet object used for the current row
80
  * @param string $column_name The name of the column being printed
81
- * @return string The content of the column to output
82
  */
83
  function column_default( $snippet, $column_name ) {
84
 
85
- switch( $column_name ) {
86
  case 'id':
87
  return $snippet->id;
88
  case 'description':
@@ -99,7 +100,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
99
  /**
100
  * Builds content of the snippet name column
101
  * @param object $snippet The snippet object being used for the current row
102
- * @return string The content of the column to output
103
  */
104
  function column_name( $snippet ) {
105
 
@@ -114,7 +115,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
114
  $screen->is_network ? __( 'Network Deactivate', 'code-snippets' ) : __( 'Deactivate', 'code-snippets' ),
115
  esc_url( add_query_arg( array(
116
  'action' => 'deactivate',
117
- 'id' => $snippet->id
118
  ) ) )
119
  );
120
  } else {
@@ -123,7 +124,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
123
  $screen->is_network ? __( 'Network Activate', 'code-snippets' ) : __( 'Activate', 'code-snippets' ),
124
  esc_url( add_query_arg( array(
125
  'action' => 'activate',
126
- 'id' => $snippet->id
127
  ) ) )
128
  );
129
  }
@@ -139,7 +140,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
139
  __( 'Export', 'code-snippets' ),
140
  esc_url( add_query_arg( array(
141
  'action' => 'export',
142
- 'id' => $snippet->id
143
  ) ) )
144
  );
145
 
@@ -148,7 +149,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
148
  __( 'Delete', 'code-snippets' ),
149
  esc_url( add_query_arg( array(
150
  'action' => 'delete',
151
- 'id' => $snippet->id
152
  ) ) ),
153
  esc_js( sprintf(
154
  'return confirm("%s");',
@@ -160,7 +161,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
160
  if ( ! empty( $snippet->name ) ) {
161
  $title = $snippet->name;
162
  } else {
163
- $title = sprintf ( __( 'Untitled #%d', 'code-snippets' ), $snippet->id );
164
  }
165
 
166
  $row_actions = $this->row_actions( $actions,
@@ -170,7 +171,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
170
  /* Return the name contents */
171
  return apply_filters(
172
  'code_snippets/list_table/column_name',
173
- sprintf ( '<a href="%2$s"><strong>%1$s</strong></a>', $title,
174
  get_snippet_edit_url( $snippet->id )
175
  ) . $row_actions,
176
  $snippet
@@ -180,49 +181,49 @@ class Code_Snippets_List_Table extends WP_List_Table {
180
  /**
181
  * Builds the checkbox column content
182
  * @param object $snippet The snippet object being used for the current row
183
- * @return string The column content to be printed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  */
185
- function column_cb( $snippet ) {
186
- return apply_filters(
187
- 'code_snippets/list_table/column_cb',
188
- sprintf( '<input type="checkbox" name="ids[]" value="%s" />', $snippet->id ),
189
- $snippet
190
- );
191
- }
192
-
193
- /**
194
- * Output the content of the tags column
195
- * This function is used once for each row
196
- * @since 2.0
197
- * @param object $snippet
198
- */
199
- function column_tags( $snippet ) {
200
-
201
- if ( ! empty( $snippet->tags ) ) {
202
-
203
- foreach ( $snippet->tags as $tag ) {
204
- $out[] = sprintf( '<a href="%s">%s</a>',
205
- esc_url( add_query_arg( 'tag', esc_attr( $tag ) ) ),
206
- esc_html( $tag )
207
- );
208
- }
209
- echo join( ', ', $out );
210
- } else {
211
- echo '&#8212;';
212
- }
213
- }
214
-
215
- /**
216
- * Define the column headers for the table
217
- * @return array The column headers, ID paired with label
218
- */
219
  function get_columns() {
220
  $columns = array(
221
- 'cb' => '<input type="checkbox" />',
222
- 'name' => __( 'Name', 'code-snippets' ),
223
- 'id' => __( 'ID', 'code-snippets' ),
224
  'description' => __( 'Description', 'code-snippets' ),
225
- 'tags' => __( 'Tags', 'code-snippets' ),
226
  );
227
  return apply_filters( 'code_snippets/list_table/columns', $columns );
228
  }
@@ -261,8 +262,8 @@ class Code_Snippets_List_Table extends WP_List_Table {
261
  $actions = array(
262
  'activate-selected' => $screen->is_network ? __( 'Network Activate', 'code-snippets' ) : __( 'Activate', 'code-snippets' ),
263
  'deactivate-selected' => $screen->is_network ? __( 'Network Deactivate', 'code-snippets' ) : __( 'Deactivate', 'code-snippets' ),
264
- 'export-selected' => __( 'Export', 'code-snippets' ),
265
- 'delete-selected' => __( 'Delete', 'code-snippets' ),
266
  'export-php-selected' => __( 'Export to PHP', 'code-snippets' ),
267
  );
268
  return apply_filters( 'code_snippets/list_table/bulk_actions', $actions );
@@ -313,7 +314,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
313
  break;
314
  }
315
 
316
- $status_links[$type] = sprintf( '<a href="%s"%s>%s</a>',
317
  esc_url( add_query_arg( 'status', $type ) ),
318
  ( $type === $status ) ? ' class="current"' : '',
319
  sprintf( $text, number_format_i18n( $count ) )
@@ -367,7 +368,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
367
  echo '<div class="alignleft actions">';
368
  echo '<select name="tag">';
369
 
370
- printf ( "<option %s value=''>%s</option>\n",
371
  selected( $query, '', false ),
372
  __( 'Show all tags', 'code-snippets' )
373
  );
@@ -390,8 +391,9 @@ class Code_Snippets_List_Table extends WP_List_Table {
390
 
391
  echo '<div class="alignleft actions">';
392
 
393
- if ( 'recently_activated' === $status )
394
  submit_button( __( 'Clear List', 'code-snippets' ), 'secondary', 'clear-recent-list', false );
 
395
 
396
  do_action( 'code_snippets/list_table/actions', $which );
397
 
@@ -419,7 +421,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
419
 
420
  foreach ( $vars as $var ) {
421
  if ( ! empty( $_REQUEST[ $var ] ) ) {
422
- printf ( '<input type="hidden" name="%s" value="%s" />', $var, $_REQUEST[ $var ] );
423
  print "\n";
424
  }
425
  }
@@ -473,7 +475,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
473
  export_snippets( $id, $network );
474
  }
475
  elseif ( 'export-php' === $action ) {
476
- export_snippets( $id, $network, 'php');
477
  }
478
 
479
  if ( ! in_array( $action, array( 'export', 'export-php' ) ) ) {
@@ -493,7 +495,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
493
 
494
  $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'activate', 'deactivate', 'delete', 'activate-multi', 'deactivate-multi', 'delete-multi' ) );
495
 
496
- switch( $this->current_action() ) {
497
 
498
  case 'activate-selected':
499
  foreach ( $ids as $id ) {
@@ -514,11 +516,11 @@ class Code_Snippets_List_Table extends WP_List_Table {
514
  break;
515
 
516
  case 'export-php-selected':
517
- export_snippets( $ids, $network, 'php');
518
  break;
519
 
520
  case 'delete-selected':
521
- foreach( $ids as $id ) {
522
  delete_snippet( $id, $network );
523
  }
524
  wp_redirect( esc_url_raw( add_query_arg( 'delete-multi', true ) ) );
@@ -587,11 +589,11 @@ class Code_Snippets_List_Table extends WP_List_Table {
587
  $recently_activated = get_option( 'recently_activated_snippets', array() );
588
  }
589
 
590
- $one_week = 7*24*60*60;
591
  foreach ( $recently_activated as $key => $time ) {
592
 
593
  if ( $time + $one_week < time() ) {
594
- unset( $recently_activated[$key] );
595
  }
596
  }
597
 
@@ -606,8 +608,10 @@ class Code_Snippets_List_Table extends WP_List_Table {
606
  if ( $snippet->active ) {
607
  $snippets['active'][] = $snippet;
608
  } else {
609
- if ( isset( $recently_activated[ $snippet->id ] ) ) // Was the snippet recently activated?
 
610
  $snippets['recently_activated'][] = $snippet;
 
611
  $snippets['inactive'][] = $snippet;
612
  }
613
  }
@@ -628,9 +632,9 @@ class Code_Snippets_List_Table extends WP_List_Table {
628
  * by getting the user's setting in the Screen Options
629
  * panel.
630
  */
631
- $sort_by = $screen->get_option( 'per_page', 'option' );
632
  $screen_option = $screen->get_option( 'per_page', 'option' );
633
- $per_page = get_user_meta( $user, $screen_option, true );
634
 
635
  if ( empty ( $per_page ) || $per_page < 1 ) {
636
  $per_page = $screen->get_option( 'per_page', 'default' );
@@ -640,26 +644,26 @@ class Code_Snippets_List_Table extends WP_List_Table {
640
 
641
  $this->_column_headers = $this->get_column_info();
642
 
643
- /**
644
- * This checks for sorting input and sorts the data in our array accordingly.
645
- *
646
- * @ignore
647
- */
648
- function usort_reorder( $a, $b ) {
649
 
650
  /* If no sort, default to ID */
651
- $orderby = (
652
- ! empty( $_REQUEST['orderby'] )
653
- ? $_REQUEST['orderby']
654
- : apply_filters( 'code_snippets/list_table/default_orderby', 'id' )
655
- );
656
 
657
  /* If no order, default to ascending */
658
- $order = (
659
- ! empty( $_REQUEST['order'] )
660
- ? $_REQUEST['order']
661
- : apply_filters( 'code_snippets/list_table/default_order', 'asc' )
662
- );
663
 
664
  /* Determine sort order */
665
  if ( 'id' === $orderby ) {
@@ -669,42 +673,42 @@ class Code_Snippets_List_Table extends WP_List_Table {
669
  }
670
 
671
  /* Send final sort direction to usort */
672
- return ( 'asc' === $order ) ? $result : -$result;
673
- }
674
-
675
- usort( $data, 'usort_reorder' );
676
-
677
- /*
678
- * Let's figure out what page the user is currently
679
- * looking at.
680
- */
681
- $current_page = $this->get_pagenum();
682
-
683
- /*
684
- * Let's check how many items are in our data array.
685
- */
686
- $total_items = count( $data );
687
-
688
- /*
689
- * The WP_List_Table class does not handle pagination for us, so we need
690
- * to ensure that the data is trimmed to only the current page.
691
- */
692
- $data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
693
-
694
- /*
695
- * Now we can add our *sorted* data to the items property, where
696
- * it can be used by the rest of the class.
697
- */
698
- $this->items = $data;
699
-
700
- /*
701
- * We also have to register our pagination options & calculations.
702
- */
703
- $this->set_pagination_args( array(
704
- 'total_items' => $total_items, // WE have to calculate the total number of items
705
- 'per_page' => $per_page, // WE have to determine how many items to show on a page
706
- 'total_pages' => ceil($total_items/$per_page) // WE have to calculate the total number of pages
707
- ) );
708
  }
709
 
710
  /**
@@ -761,16 +765,16 @@ class Code_Snippets_List_Table extends WP_List_Table {
761
  echo '<span class="subtitle">' . __( 'Search results', 'code-snippets' );
762
 
763
  if ( ! empty ( $_REQUEST['s'] ) ) {
764
- echo sprintf ( __( ' for &#8220;%s&#8221;', 'code-snippets' ), esc_html( $_REQUEST['s'] ) );
765
  }
766
 
767
  if ( ! empty( $_GET['tag'] ) ) {
768
- echo sprintf ( __(' in tag &#8220;%s&#8221;', 'code-snippets' ), $_GET['tag'] );
769
  }
770
 
771
  echo '</span>';
772
 
773
- printf (
774
  '&nbsp;<a class="button clear-filters" href="%s">' . __( 'Clear Filters', 'code-snippets' ) . '</a>',
775
  esc_url( remove_query_arg( array( 's', 'tag' ) ) )
776
  );
@@ -784,7 +788,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
784
  function single_row( $snippet ) {
785
  static $row_class = '';
786
  $row_class = ( $snippet->active ? 'active' : 'inactive' );
787
- printf ( '<tr class="%s">', $row_class );
788
  $this->single_row_columns( $snippet );
789
  echo '</tr>';
790
  }
3
  /**
4
  * Contains the class for handling the snippets table
5
  *
6
+ * @package Code_Snippets
7
  * @subpackage Administration
8
  */
9
 
36
 
37
  /* Determine the status */
38
  $status = 'all';
39
+ if ( isset( $_REQUEST['status'] ) && in_array( $_REQUEST['status'], array( 'active', 'inactive', 'recently_activated' ) ) ) {
40
  $status = $_REQUEST['status'];
41
+ }
42
 
43
  /* Add the search query to the URL */
44
  if ( isset( $_REQUEST['s'] ) ) {
45
+ $_SERVER['REQUEST_URI'] = add_query_arg( 's', stripslashes( $_REQUEST['s'] ) );
46
  }
47
 
48
  /* Add a snippets per page screen option */
51
  add_screen_option( 'per_page', array(
52
  'label' => __( 'Snippets per page', 'code-snippets' ),
53
  'default' => 10,
54
+ 'option' => 'snippets_per_page',
55
  ) );
56
 
57
  /* Set the table columns hidden in Screen Options by default */
71
  parent::__construct( array(
72
  'singular' => 'snippet',
73
  'plural' => 'snippets',
74
+ 'ajax' => true,
75
  ) );
76
  }
77
 
78
  /**
79
  * Define the output of all columns that have no callback function
80
+ * @param object $snippet The snippet object used for the current row
81
  * @param string $column_name The name of the column being printed
82
+ * @return string The content of the column to output
83
  */
84
  function column_default( $snippet, $column_name ) {
85
 
86
+ switch ( $column_name ) {
87
  case 'id':
88
  return $snippet->id;
89
  case 'description':
100
  /**
101
  * Builds content of the snippet name column
102
  * @param object $snippet The snippet object being used for the current row
103
+ * @return string The content of the column to output
104
  */
105
  function column_name( $snippet ) {
106
 
115
  $screen->is_network ? __( 'Network Deactivate', 'code-snippets' ) : __( 'Deactivate', 'code-snippets' ),
116
  esc_url( add_query_arg( array(
117
  'action' => 'deactivate',
118
+ 'id' => $snippet->id,
119
  ) ) )
120
  );
121
  } else {
124
  $screen->is_network ? __( 'Network Activate', 'code-snippets' ) : __( 'Activate', 'code-snippets' ),
125
  esc_url( add_query_arg( array(
126
  'action' => 'activate',
127
+ 'id' => $snippet->id,
128
  ) ) )
129
  );
130
  }
140
  __( 'Export', 'code-snippets' ),
141
  esc_url( add_query_arg( array(
142
  'action' => 'export',
143
+ 'id' => $snippet->id,
144
  ) ) )
145
  );
146
 
149
  __( 'Delete', 'code-snippets' ),
150
  esc_url( add_query_arg( array(
151
  'action' => 'delete',
152
+ 'id' => $snippet->id,
153
  ) ) ),
154
  esc_js( sprintf(
155
  'return confirm("%s");',
161
  if ( ! empty( $snippet->name ) ) {
162
  $title = $snippet->name;
163
  } else {
164
+ $title = sprintf( __( 'Untitled #%d', 'code-snippets' ), $snippet->id );
165
  }
166
 
167
  $row_actions = $this->row_actions( $actions,
171
  /* Return the name contents */
172
  return apply_filters(
173
  'code_snippets/list_table/column_name',
174
+ sprintf( '<a href="%2$s"><strong>%1$s</strong></a>', $title,
175
  get_snippet_edit_url( $snippet->id )
176
  ) . $row_actions,
177
  $snippet
181
  /**
182
  * Builds the checkbox column content
183
  * @param object $snippet The snippet object being used for the current row
184
+ * @return string The column content to be printed
185
+ */
186
+ function column_cb( $snippet ) {
187
+ return apply_filters(
188
+ 'code_snippets/list_table/column_cb',
189
+ sprintf( '<input type="checkbox" name="ids[]" value="%s" />', $snippet->id ),
190
+ $snippet
191
+ );
192
+ }
193
+
194
+ /**
195
+ * Output the content of the tags column
196
+ * This function is used once for each row
197
+ * @since 2.0
198
+ * @param object $snippet
199
+ */
200
+ function column_tags( $snippet ) {
201
+
202
+ if ( ! empty( $snippet->tags ) ) {
203
+
204
+ foreach ( $snippet->tags as $tag ) {
205
+ $out[] = sprintf( '<a href="%s">%s</a>',
206
+ esc_url( add_query_arg( 'tag', esc_attr( $tag ) ) ),
207
+ esc_html( $tag )
208
+ );
209
+ }
210
+ echo join( ', ', $out );
211
+ } else {
212
+ echo '&#8212;';
213
+ }
214
+ }
215
+
216
+ /**
217
+ * Define the column headers for the table
218
+ * @return array The column headers, ID paired with label
219
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  function get_columns() {
221
  $columns = array(
222
+ 'cb' => '<input type="checkbox" />',
223
+ 'name' => __( 'Name', 'code-snippets' ),
224
+ 'id' => __( 'ID', 'code-snippets' ),
225
  'description' => __( 'Description', 'code-snippets' ),
226
+ 'tags' => __( 'Tags', 'code-snippets' ),
227
  );
228
  return apply_filters( 'code_snippets/list_table/columns', $columns );
229
  }
262
  $actions = array(
263
  'activate-selected' => $screen->is_network ? __( 'Network Activate', 'code-snippets' ) : __( 'Activate', 'code-snippets' ),
264
  'deactivate-selected' => $screen->is_network ? __( 'Network Deactivate', 'code-snippets' ) : __( 'Deactivate', 'code-snippets' ),
265
+ 'export-selected' => __( 'Export', 'code-snippets' ),
266
+ 'delete-selected' => __( 'Delete', 'code-snippets' ),
267
  'export-php-selected' => __( 'Export to PHP', 'code-snippets' ),
268
  );
269
  return apply_filters( 'code_snippets/list_table/bulk_actions', $actions );
314
  break;
315
  }
316
 
317
+ $status_links[ $type ] = sprintf( '<a href="%s"%s>%s</a>',
318
  esc_url( add_query_arg( 'status', $type ) ),
319
  ( $type === $status ) ? ' class="current"' : '',
320
  sprintf( $text, number_format_i18n( $count ) )
368
  echo '<div class="alignleft actions">';
369
  echo '<select name="tag">';
370
 
371
+ printf( "<option %s value=''>%s</option>\n",
372
  selected( $query, '', false ),
373
  __( 'Show all tags', 'code-snippets' )
374
  );
391
 
392
  echo '<div class="alignleft actions">';
393
 
394
+ if ( 'recently_activated' === $status ) {
395
  submit_button( __( 'Clear List', 'code-snippets' ), 'secondary', 'clear-recent-list', false );
396
+ }
397
 
398
  do_action( 'code_snippets/list_table/actions', $which );
399
 
421
 
422
  foreach ( $vars as $var ) {
423
  if ( ! empty( $_REQUEST[ $var ] ) ) {
424
+ printf( '<input type="hidden" name="%s" value="%s" />', $var, $_REQUEST[ $var ] );
425
  print "\n";
426
  }
427
  }
475
  export_snippets( $id, $network );
476
  }
477
  elseif ( 'export-php' === $action ) {
478
+ export_snippets( $id, $network, 'php' );
479
  }
480
 
481
  if ( ! in_array( $action, array( 'export', 'export-php' ) ) ) {
495
 
496
  $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'activate', 'deactivate', 'delete', 'activate-multi', 'deactivate-multi', 'delete-multi' ) );
497
 
498
+ switch ( $this->current_action() ) {
499
 
500
  case 'activate-selected':
501
  foreach ( $ids as $id ) {
516
  break;
517
 
518
  case 'export-php-selected':
519
+ export_snippets( $ids, $network, 'php' );
520
  break;
521
 
522
  case 'delete-selected':
523
+ foreach ( $ids as $id ) {
524
  delete_snippet( $id, $network );
525
  }
526
  wp_redirect( esc_url_raw( add_query_arg( 'delete-multi', true ) ) );
589
  $recently_activated = get_option( 'recently_activated_snippets', array() );
590
  }
591
 
592
+ $one_week = 7 * 24 * 60 * 60;
593
  foreach ( $recently_activated as $key => $time ) {
594
 
595
  if ( $time + $one_week < time() ) {
596
+ unset( $recently_activated[ $key ] );
597
  }
598
  }
599
 
608
  if ( $snippet->active ) {
609
  $snippets['active'][] = $snippet;
610
  } else {
611
+ // Was the snippet recently activated?
612
+ if ( isset( $recently_activated[ $snippet->id ] ) ) {
613
  $snippets['recently_activated'][] = $snippet;
614
+ }
615
  $snippets['inactive'][] = $snippet;
616
  }
617
  }
632
  * by getting the user's setting in the Screen Options
633
  * panel.
634
  */
635
+ $sort_by = $screen->get_option( 'per_page', 'option' );
636
  $screen_option = $screen->get_option( 'per_page', 'option' );
637
+ $per_page = get_user_meta( $user, $screen_option, true );
638
 
639
  if ( empty ( $per_page ) || $per_page < 1 ) {
640
  $per_page = $screen->get_option( 'per_page', 'default' );
644
 
645
  $this->_column_headers = $this->get_column_info();
646
 
647
+ /**
648
+ * This checks for sorting input and sorts the data in our array accordingly.
649
+ *
650
+ * @ignore
651
+ */
652
+ function usort_reorder( $a, $b ) {
653
 
654
  /* If no sort, default to ID */
655
+ $orderby = (
656
+ ! empty( $_REQUEST['orderby'] )
657
+ ? $_REQUEST['orderby']
658
+ : apply_filters( 'code_snippets/list_table/default_orderby', 'id' )
659
+ );
660
 
661
  /* If no order, default to ascending */
662
+ $order = (
663
+ ! empty( $_REQUEST['order'] )
664
+ ? $_REQUEST['order']
665
+ : apply_filters( 'code_snippets/list_table/default_order', 'asc' )
666
+ );
667
 
668
  /* Determine sort order */
669
  if ( 'id' === $orderby ) {
673
  }
674
 
675
  /* Send final sort direction to usort */
676
+ return ( 'asc' === $order ) ? $result : -$result;
677
+ }
678
+
679
+ usort( $data, 'usort_reorder' );
680
+
681
+ /*
682
+ * Let's figure out what page the user is currently
683
+ * looking at.
684
+ */
685
+ $current_page = $this->get_pagenum();
686
+
687
+ /*
688
+ * Let's check how many items are in our data array.
689
+ */
690
+ $total_items = count( $data );
691
+
692
+ /*
693
+ * The WP_List_Table class does not handle pagination for us, so we need
694
+ * to ensure that the data is trimmed to only the current page.
695
+ */
696
+ $data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
697
+
698
+ /*
699
+ * Now we can add our *sorted* data to the items property, where
700
+ * it can be used by the rest of the class.
701
+ */
702
+ $this->items = $data;
703
+
704
+ /*
705
+ * We also have to register our pagination options & calculations.
706
+ */
707
+ $this->set_pagination_args( array(
708
+ 'total_items' => $total_items, // Calculate the total number of items
709
+ 'per_page' => $per_page, // Determine how many items to show on a page
710
+ 'total_pages' => ceil( $total_items / $per_page ), // Calculate the total number of pages
711
+ ) );
712
  }
713
 
714
  /**
765
  echo '<span class="subtitle">' . __( 'Search results', 'code-snippets' );
766
 
767
  if ( ! empty ( $_REQUEST['s'] ) ) {
768
+ echo sprintf( __( ' for &#8220;%s&#8221;', 'code-snippets' ), esc_html( $_REQUEST['s'] ) );
769
  }
770
 
771
  if ( ! empty( $_GET['tag'] ) ) {
772
+ echo sprintf( __( ' in tag &#8220;%s&#8221;', 'code-snippets' ), $_GET['tag'] );
773
  }
774
 
775
  echo '</span>';
776
 
777
+ printf(
778
  '&nbsp;<a class="button clear-filters" href="%s">' . __( 'Clear Filters', 'code-snippets' ) . '</a>',
779
  esc_url( remove_query_arg( array( 's', 'tag' ) ) )
780
  );
788
  function single_row( $snippet ) {
789
  static $row_class = '';
790
  $row_class = ( $snippet->active ? 'active' : 'inactive' );
791
+ printf( '<tr class="%s">', $row_class );
792
  $this->single_row_columns( $snippet );
793
  echo '</tr>';
794
  }
includes/manage/manage.php CHANGED
@@ -67,9 +67,6 @@ function code_snippets_load_manage_menu() {
67
  wp_die( __( 'You are not authorized to access this page.', 'code-snippets' ) );
68
  }
69
 
70
- /* Load stylesheet for this page */
71
- add_action( 'admin_enqueue_scripts', 'code_snippets_manage_menu_assets' );
72
-
73
  /* Create the snippet tables if they don't exist */
74
  create_code_snippets_tables();
75
 
@@ -83,28 +80,6 @@ function code_snippets_load_manage_menu() {
83
  $code_snippets_list_table->prepare_items();
84
  }
85
 
86
- /**
87
- * Enqueue the manage menu stylesheet
88
- *
89
- * @since 2.0
90
- * @uses wp_enqueue_style() To add the stylesheet to the queue
91
- * @param string $hook The current page hook, to be compared with the manage snippets page hook
92
- */
93
- function code_snippets_manage_menu_assets( $hook ) {
94
-
95
- /* Only load the stylesheet on the manage snippets page */
96
- if ( $hook !== code_snippets_get_menu_hook() ) {
97
- return;
98
- }
99
-
100
- wp_enqueue_style(
101
- 'code-snippets-manage',
102
- plugins_url( 'css/min/manage-snippets.css', CODE_SNIPPETS_FILE ),
103
- false,
104
- CODE_SNIPPETS_VERSION
105
- );
106
- }
107
-
108
  /**
109
  * Handles saving the user's snippets per page preference
110
  *
67
  wp_die( __( 'You are not authorized to access this page.', 'code-snippets' ) );
68
  }
69
 
 
 
 
70
  /* Create the snippet tables if they don't exist */
71
  create_code_snippets_tables();
72
 
80
  $code_snippets_list_table->prepare_items();
81
  }
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  /**
84
  * Handles saving the user's snippets per page preference
85
  *
includes/settings/admin.php CHANGED
@@ -35,7 +35,6 @@ add_action( 'admin_menu', 'code_snippets_add_settings_menu' );
35
  function code_snippets_render_settings_menu() {
36
  ?>
37
  <div class="wrap">
38
-
39
  <?php screen_icon(); ?>
40
  <h2><?php esc_html_e( 'Settings', 'code-snippets' ); ?></h2>
41
 
@@ -48,7 +47,6 @@ function code_snippets_render_settings_menu() {
48
  </table>
49
  <?php submit_button(); ?>
50
  </form>
51
-
52
  </div>
53
  <?php
54
  }
35
  function code_snippets_render_settings_menu() {
36
  ?>
37
  <div class="wrap">
 
38
  <?php screen_icon(); ?>
39
  <h2><?php esc_html_e( 'Settings', 'code-snippets' ); ?></h2>
40
 
47
  </table>
48
  <?php submit_button(); ?>
49
  </form>
 
50
  </div>
51
  <?php
52
  }
includes/settings/class-settings.php CHANGED
@@ -44,11 +44,19 @@ class Code_Snippets_Settings {
44
  self::$fields['general'] = array(
45
  array(
46
  'id' => 'activate_by_default',
47
- 'name' =>__( 'Activate by Default', 'code-snippets' ),
48
  'type' => 'checkbox',
49
  'label' => __( "Make the 'Save and Activate' button the default action when saving a snippet.", 'code-snippets' ),
50
  'default' => false,
51
- )
 
 
 
 
 
 
 
 
52
  );
53
 
54
  /* Description Editor settings section */
44
  self::$fields['general'] = array(
45
  array(
46
  'id' => 'activate_by_default',
47
+ 'name' => __( 'Activate by Default', 'code-snippets' ),
48
  'type' => 'checkbox',
49
  'label' => __( "Make the 'Save and Activate' button the default action when saving a snippet.", 'code-snippets' ),
50
  'default' => false,
51
+ ),
52
+
53
+ array(
54
+ 'id' => 'snippet_scope_enabled',
55
+ 'name' => __( 'Enable Scope Selector', 'code-snippets' ),
56
+ 'type' => 'checkbox',
57
+ 'label' => __( 'Enable the scope selector when editing a snippet', 'code-snippets' ),
58
+ 'default' => true,
59
+ ),
60
  );
61
 
62
  /* Description Editor settings section */
includes/settings/editor-preview.php CHANGED
@@ -20,12 +20,11 @@ function code_snippets_editor_settings_preview_assets( $hook ) {
20
 
21
  wp_enqueue_style(
22
  'code-snippets-codemirror-theme-' . $theme,
23
- plugins_url( "vendor/codemirror/theme/$theme.css", CODE_SNIPPETS_FILE ),
24
  array( 'code-snippets-codemirror' )
25
  );
26
  }
27
 
28
- /* Enqueue jQuery */
29
  wp_enqueue_script( 'jquery' );
30
  }
31
 
@@ -39,8 +38,7 @@ function code_snippets_codemirror_theme_select_field( $atts ) {
39
  $saved_value = code_snippets_get_setting( $atts['section'], $atts['id'] );
40
 
41
  echo '<select name="code_snippets_settings[editor][theme]">';
42
-
43
- echo '<option value="default"' . selected( 'default', $saved_value, false ) . '>default</option>';
44
 
45
  /* Fetch all theme CSS files */
46
  $themes_dir = plugin_dir_path( CODE_SNIPPETS_FILE ) . 'vendor/codemirror/theme/';
@@ -57,11 +55,11 @@ function code_snippets_codemirror_theme_select_field( $atts ) {
57
  if ( 'ambiance-mobile' === $theme ) {
58
  continue;
59
  }
60
-
61
- printf (
62
- '<option value="%1$s"%2$s>%1$s</option>',
63
  $theme,
64
- selected( $theme, $saved_value, false )
 
65
  );
66
  }
67
 
@@ -79,7 +77,7 @@ add_filter( 'admin_footer_text', 'example_custom_admin_footer_text' );";
79
 
80
  $atts = array(
81
  'mode' => 'text/x-php',
82
- 'value' => $example_content
83
  );
84
 
85
  ?>
@@ -110,41 +108,29 @@ add_filter( 'admin_footer_text', 'example_custom_admin_footer_text' );";
110
 
111
  switch ( $types[ $setting ] ) {
112
 
113
- case 'codemirror_theme_select':
114
- ?>
115
 
116
  $( 'select[name="code_snippets_settings[editor][<?php echo $setting; ?>]"]' ).change( function () {
117
  editor.setOption( '<?php echo $att_name; ?>', $(this).val() );
118
  } );
119
 
120
- <?php
121
- break;
122
-
123
- case 'checkbox':
124
- ?>
125
 
126
  $( 'input[name="code_snippets_settings[editor][<?php echo $setting; ?>]"]' ).change( function () {
127
  editor.setOption( '<?php echo $att_name; ?>', $(this).is(':checked') );
128
  } );
129
 
130
- <?php
131
- break;
132
-
133
-
134
- case 'number':
135
- ?>
136
 
137
  $( 'input[name="code_snippets_settings[editor][<?php echo $setting; ?>]"]' ).change( function () {
138
  editor.setOption( '<?php echo $att_name; ?>', $(this).val() );
139
  } );
140
 
141
- <?php
142
- break;
143
-
144
  }
145
-
146
  }
147
-
148
  ?>
149
 
150
  });
20
 
21
  wp_enqueue_style(
22
  'code-snippets-codemirror-theme-' . $theme,
23
+ plugins_url( "css/min/cmthemes/$theme.css", CODE_SNIPPETS_FILE ),
24
  array( 'code-snippets-codemirror' )
25
  );
26
  }
27
 
 
28
  wp_enqueue_script( 'jquery' );
29
  }
30
 
38
  $saved_value = code_snippets_get_setting( $atts['section'], $atts['id'] );
39
 
40
  echo '<select name="code_snippets_settings[editor][theme]">';
41
+ echo '<option value="default"' . selected( 'default', $saved_value, false ) . '>Default</option>';
 
42
 
43
  /* Fetch all theme CSS files */
44
  $themes_dir = plugin_dir_path( CODE_SNIPPETS_FILE ) . 'vendor/codemirror/theme/';
55
  if ( 'ambiance-mobile' === $theme ) {
56
  continue;
57
  }
58
+ printf(
59
+ '<option value="%s"%s>%s</option>',
 
60
  $theme,
61
+ selected( $theme, $saved_value, false ),
62
+ ucwords( str_replace( '-', ' ', $theme ) )
63
  );
64
  }
65
 
77
 
78
  $atts = array(
79
  'mode' => 'text/x-php',
80
+ 'value' => $example_content,
81
  );
82
 
83
  ?>
108
 
109
  switch ( $types[ $setting ] ) {
110
 
111
+ case 'codemirror_theme_select': ?>
 
112
 
113
  $( 'select[name="code_snippets_settings[editor][<?php echo $setting; ?>]"]' ).change( function () {
114
  editor.setOption( '<?php echo $att_name; ?>', $(this).val() );
115
  } );
116
 
117
+ <?php break;
118
+ case 'checkbox': ?>
 
 
 
119
 
120
  $( 'input[name="code_snippets_settings[editor][<?php echo $setting; ?>]"]' ).change( function () {
121
  editor.setOption( '<?php echo $att_name; ?>', $(this).is(':checked') );
122
  } );
123
 
124
+ <?php break;
125
+ case 'number': ?>
 
 
 
 
126
 
127
  $( 'input[name="code_snippets_settings[editor][<?php echo $setting; ?>]"]' ).change( function () {
128
  editor.setOption( '<?php echo $att_name; ?>', $(this).val() );
129
  } );
130
 
131
+ <?php break;
 
 
132
  }
 
133
  }
 
134
  ?>
135
 
136
  });
includes/settings/settings-fields.php CHANGED
@@ -13,7 +13,7 @@ function code_snippets_checkbox_field( $atts ) {
13
  $saved_value = code_snippets_get_setting( $atts['section'], $atts['id'] );
14
  $input_name = sprintf( 'code_snippets_settings[%s][%s]', $atts['section'], $atts['id'] );
15
 
16
- $output = sprintf (
17
  '<input type="checkbox" name="%s"%s>',
18
  $input_name,
19
  checked( $saved_value, true, false )
@@ -21,7 +21,7 @@ function code_snippets_checkbox_field( $atts ) {
21
 
22
  // Output the checkbox field, optionally with label
23
  if ( isset( $atts['label'] ) ) {
24
- printf ( '<label for="%s">%s %s</label>', $input_name, $output, $atts['label'] );
25
  } else {
26
  echo $output;
27
  }
@@ -38,7 +38,7 @@ function code_snippets_checkbox_field( $atts ) {
38
  */
39
  function code_snippets_number_field( $atts ) {
40
 
41
- printf (
42
  '<input type="number" name="code_snippets_settings[%s][%s]" value="%s">',
43
  $atts['section'],
44
  $atts['id'],
13
  $saved_value = code_snippets_get_setting( $atts['section'], $atts['id'] );
14
  $input_name = sprintf( 'code_snippets_settings[%s][%s]', $atts['section'], $atts['id'] );
15
 
16
+ $output = sprintf(
17
  '<input type="checkbox" name="%s"%s>',
18
  $input_name,
19
  checked( $saved_value, true, false )
21
 
22
  // Output the checkbox field, optionally with label
23
  if ( isset( $atts['label'] ) ) {
24
+ printf( '<label for="%s">%s %s</label>', $input_name, $output, $atts['label'] );
25
  } else {
26
  echo $output;
27
  }
38
  */
39
  function code_snippets_number_field( $atts ) {
40
 
41
+ printf(
42
  '<input type="number" name="code_snippets_settings[%s][%s]" value="%s">',
43
  $atts['section'],
44
  $atts['id'],
includes/settings/settings.php CHANGED
@@ -30,9 +30,9 @@ function code_snippets_get_settings_fields() {
30
  * @return array
31
  */
32
  function code_snippets_get_settings() {
33
- $saved = get_option( 'code_snippets_settings', array() );
34
- $default = code_snippets_get_default_settings();
35
- return wp_parse_args( $saved, $default );
36
  }
37
 
38
  /**
@@ -95,7 +95,6 @@ function code_snippets_register_settings() {
95
  array_merge( $field, array( 'section' => $section_id ) )
96
  );
97
  }
98
-
99
  }
100
 
101
  /* Add editor preview as a field */
@@ -126,21 +125,19 @@ function code_snippets_settings_validate( array $input ) {
126
  foreach ( $fields as $field ) {
127
  $field_id = $field['id'];
128
 
129
- // Checkbox field
130
- if ( 'checkbox' === $field['type'] ) {
131
 
132
- $settings[ $section_id ][ $field_id ] = (
133
- isset( $input[ $section_id ][ $field_id ] ) &&
134
- 'on' === $input[ $section_id ][ $field_id ]
135
- );
136
 
137
- // Number field
138
- } elseif ( 'number' == $field['type'] ) {
139
- $settings[ $section_id ][ $field_id ] = absint( $input[ $section_id ][ $field_id ] );
140
 
141
- // Other fields
142
- } else {
143
- $settings[ $section_id ][ $field_id ] = $input[ $section_id ][ $field_id ];
144
  }
145
  }
146
  }
30
  * @return array
31
  */
32
  function code_snippets_get_settings() {
33
+ $default = Code_Snippets_Settings::get_defaults();
34
+ $saved = get_option( 'code_snippets_settings', $default );
35
+ return array_merge( $default, $saved );
36
  }
37
 
38
  /**
95
  array_merge( $field, array( 'section' => $section_id ) )
96
  );
97
  }
 
98
  }
99
 
100
  /* Add editor preview as a field */
125
  foreach ( $fields as $field ) {
126
  $field_id = $field['id'];
127
 
128
+ switch ( $field['type'] ) {
 
129
 
130
+ case 'checkbox':
131
+ $settings[ $section_id ][ $field_id ] =
132
+ isset( $input[ $section_id ][ $field_id ] ) && 'on' === $input[ $section_id ][ $field_id ];
133
+ break;
134
 
135
+ case 'number':
136
+ $settings[ $section_id ][ $field_id ] = absint( $input[ $section_id ][ $field_id ] );
137
+ break;
138
 
139
+ default:
140
+ $settings[ $section_id ][ $field_id ] = $input[ $section_id ][ $field_id ];
 
141
  }
142
  }
143
  }
includes/snippet-ops.php CHANGED
@@ -23,18 +23,19 @@ function build_snippet_object( $data = null ) {
23
  $snippet->description = '';
24
  $snippet->code = '';
25
  $snippet->tags = array();
 
26
  $snippet->active = 0;
27
  $snippet = apply_filters( 'code_snippets/build_default_snippet', $snippet );
28
 
29
  if ( ! isset( $data ) ) {
30
  return $snippet;
31
- }
32
- elseif ( is_object( $data ) ) {
33
 
34
  /* If we already have a snippet object, merge it with the default */
35
  return (object) array_merge( (array) $snippet, (array) $data );
36
- }
37
- elseif ( is_array( $data ) ) {
38
 
39
  foreach ( $data as $field => $value ) {
40
 
@@ -380,7 +381,7 @@ function import_snippets( $file, $multisite = null ) {
380
  foreach ( $fields as $field_name ) {
381
 
382
  /* Fetch the field element from the document */
383
- $field = $snippet_xml->getElementsByTagName( $field_name )->item(0);
384
 
385
  /* If the field element exists, add it to the snippet object */
386
  if ( isset( $field->nodeValue ) ) {
@@ -472,10 +473,11 @@ function execute_active_snippets() {
472
  /* Check if the multisite snippets table exists */
473
  if ( is_multisite() && $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->ms_snippets'" ) === $wpdb->ms_snippets ) {
474
  $sql = ( isset( $sql ) ? $sql . "\nUNION ALL\n" : '' );
475
- $sql .= "SELECT code FROM {$wpdb->ms_snippets} WHERE active=1;";
476
  }
477
 
478
  if ( ! empty( $sql ) ) {
 
479
 
480
  /* Grab the active snippets from the database */
481
  $active_snippets = $wpdb->get_col( $sql );
23
  $snippet->description = '';
24
  $snippet->code = '';
25
  $snippet->tags = array();
26
+ $snippet->scope = 0;
27
  $snippet->active = 0;
28
  $snippet = apply_filters( 'code_snippets/build_default_snippet', $snippet );
29
 
30
  if ( ! isset( $data ) ) {
31
  return $snippet;
32
+
33
+ } elseif ( is_object( $data ) ) {
34
 
35
  /* If we already have a snippet object, merge it with the default */
36
  return (object) array_merge( (array) $snippet, (array) $data );
37
+
38
+ } elseif ( is_array( $data ) ) {
39
 
40
  foreach ( $data as $field => $value ) {
41
 
381
  foreach ( $fields as $field_name ) {
382
 
383
  /* Fetch the field element from the document */
384
+ $field = $snippet_xml->getElementsByTagName( $field_name )->item( 0 );
385
 
386
  /* If the field element exists, add it to the snippet object */
387
  if ( isset( $field->nodeValue ) ) {
473
  /* Check if the multisite snippets table exists */
474
  if ( is_multisite() && $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->ms_snippets'" ) === $wpdb->ms_snippets ) {
475
  $sql = ( isset( $sql ) ? $sql . "\nUNION ALL\n" : '' );
476
+ $sql .= "SELECT code FROM {$wpdb->ms_snippets} WHERE active=1";
477
  }
478
 
479
  if ( ! empty( $sql ) ) {
480
+ $sql .= sprintf( ' AND (scope=0 OR scope=%d)', is_admin() ? 1 : 2 );
481
 
482
  /* Grab the active snippets from the database */
483
  $active_snippets = $wpdb->get_col( $sql );
js/min/codemirror.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ !function(a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else{if("function"==typeof define&&define.amd)return define([],a);this.CodeMirror=a()}}(function(){"use strict";function a(c,d){if(!(this instanceof a))return new a(c,d);this.options=d=d?Fe(d):{},Fe(Tf,d,!1),n(d);var e=d.value;"string"==typeof e&&(e=new pg(e,d.mode)),this.doc=e;var f=new a.inputStyles[d.inputStyle](this),g=this.display=new b(c,e,f);g.wrapper.CodeMirror=this,j(this),h(this),d.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),d.autofocus&&!vf&&g.input.focus(),r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new xe,keySeq:null,specialChars:null};var i=this;lf&&11>mf&&setTimeout(function(){i.display.input.reset(!0)},20),Nb(this),Re(),rb(this),this.curOp.forceUpdate=!0,Sd(this,e),d.autofocus&&!vf||i.hasFocus()?setTimeout(Ge(lc,this),20):mc(this);for(var k in Uf)Uf.hasOwnProperty(k)&&Uf[k](this,d[k],Vf);w(this),d.finishInit&&d.finishInit(this);for(var l=0;l<Zf.length;++l)Zf[l](this);tb(this),nf&&d.lineWrapping&&"optimizelegibility"==getComputedStyle(g.lineDiv).textRendering&&(g.lineDiv.style.textRendering="auto")}function b(a,b,c){var d=this;this.input=c,d.scrollbarFiller=Ke("div",null,"CodeMirror-scrollbar-filler"),d.scrollbarFiller.setAttribute("cm-not-content","true"),d.gutterFiller=Ke("div",null,"CodeMirror-gutter-filler"),d.gutterFiller.setAttribute("cm-not-content","true"),d.lineDiv=Ke("div",null,"CodeMirror-code"),d.selectionDiv=Ke("div",null,null,"position: relative; z-index: 1"),d.cursorDiv=Ke("div",null,"CodeMirror-cursors"),d.measure=Ke("div",null,"CodeMirror-measure"),d.lineMeasure=Ke("div",null,"CodeMirror-measure"),d.lineSpace=Ke("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none"),d.mover=Ke("div",[Ke("div",[d.lineSpace],"CodeMirror-lines")],null,"position: relative"),d.sizer=Ke("div",[d.mover],"CodeMirror-sizer"),d.sizerWidth=null,d.heightForcer=Ke("div",null,null,"position: absolute; height: "+zg+"px; width: 1px;"),d.gutters=Ke("div",null,"CodeMirror-gutters"),d.lineGutter=null,d.scroller=Ke("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll"),d.scroller.setAttribute("tabIndex","-1"),d.wrapper=Ke("div",[d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror"),lf&&8>mf&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),nf||hf&&vf||(d.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(d.wrapper):a(d.wrapper)),d.viewFrom=d.viewTo=b.first,d.reportedViewFrom=d.reportedViewTo=b.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,c.init(d)}function c(b){b.doc.mode=a.getMode(b.options,b.doc.modeOption),d(b)}function d(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Ka(a,100),a.state.modeGen++,a.curOp&&Gb(a)}function e(a){a.options.lineWrapping?(Pg(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Og(a.display.wrapper,"CodeMirror-wrap"),m(a)),g(a),Gb(a),eb(a),setTimeout(function(){s(a)},100)}function f(a){var b=pb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/qb(a.display)-3);return function(e){if(qd(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g<e.widgets.length;g++)e.widgets[g].height&&(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function g(a){var b=a.doc,c=f(a);b.iter(function(a){var b=c(a);b!=a.height&&Wd(a,b)})}function h(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),eb(a)}function i(a){j(a),Gb(a),setTimeout(function(){v(a)},20)}function j(a){var b=a.display.gutters,c=a.options.gutters;Le(b);for(var d=0;d<c.length;++d){var e=c[d],f=b.appendChild(Ke("div",null,"CodeMirror-gutter "+e));"CodeMirror-linenumbers"==e&&(a.display.lineGutter=f,f.style.width=(a.display.lineNumWidth||1)+"px")}b.style.display=d?"":"none",k(a)}function k(a){var b=a.display.gutters.offsetWidth;a.display.sizer.style.marginLeft=b+"px"}function l(a){if(0==a.height)return 0;for(var b,c=a.text.length,d=a;b=jd(d);){var e=b.find(0,!0);d=e.from.line,c+=e.from.ch-e.to.ch}for(d=a;b=kd(d);){var e=b.find(0,!0);c-=d.text.length-e.from.ch,d=e.to.line,c+=d.text.length-e.to.ch}return c}function m(a){var b=a.display,c=a.doc;b.maxLine=Td(c,c.first),b.maxLineLength=l(b.maxLine),b.maxLineChanged=!0,c.iter(function(a){var c=l(a);c>b.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function n(a){var b=Be(a.gutters,"CodeMirror-linenumbers");-1==b&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function o(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Pa(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+Ra(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function p(a,b,c){this.cm=c;var d=this.vert=Ke("div",[Ke("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=Ke("div",[Ke("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d),a(e),vg(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,"vertical")}),vg(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")}),this.checkedOverlay=!1,lf&&8>mf&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function q(){}function r(b){b.display.scrollbars&&(b.display.scrollbars.clear(),b.display.scrollbars.addClass&&Og(b.display.wrapper,b.display.scrollbars.addClass)),b.display.scrollbars=new a.scrollbarModel[b.options.scrollbarStyle](function(a){b.display.wrapper.insertBefore(a,b.display.scrollbarFiller),vg(a,"mousedown",function(){b.state.focused&&setTimeout(function(){b.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,c){"horizontal"==c?_b(b,a):$b(b,a)},b),b.display.scrollbars.addClass&&Pg(b.display.wrapper,b.display.scrollbars.addClass)}function s(a,b){b||(b=o(a));var c=a.display.barWidth,d=a.display.barHeight;t(a,b);for(var e=0;4>e&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&F(a),t(a,o(a)),c=a.display.barWidth,d=a.display.barHeight}function t(a,b){var c=a.display,d=c.scrollbars.update(b);c.sizer.style.paddingRight=(c.barWidth=d.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px",d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="",d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function u(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-Oa(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=Yd(b,d),g=Yd(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;f>h?(f=h,g=Yd(b,Zd(Td(b,h))+a.wrapper.clientHeight)):Math.min(i,b.lastLine())>=g&&(f=Yd(b,Zd(Td(b,i))-a.wrapper.clientHeight),g=i)}return{from:f,to:Math.max(g,f+1)}}function v(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=y(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g<c.length;g++)if(!c[g].hidden){a.options.fixedGutter&&c[g].gutter&&(c[g].gutter.style.left=f);var h=c[g].alignable;if(h)for(var i=0;i<h.length;i++)h[i].style.left=f}a.options.fixedGutter&&(b.gutters.style.left=d+e+"px")}}function w(a){if(!a.options.lineNumbers)return!1;var b=a.doc,c=x(a.options,b.first+b.size-1),d=a.display;if(c.length!=d.lineNumChars){var e=d.measure.appendChild(Ke("div",[Ke("div",c)],"CodeMirror-linenumber CodeMirror-gutter-elt")),f=e.firstChild.offsetWidth,g=e.offsetWidth-f;return d.lineGutter.style.width="",d.lineNumInnerWidth=Math.max(f,d.lineGutter.offsetWidth-g)+1,d.lineNumWidth=d.lineNumInnerWidth+g,d.lineNumChars=d.lineNumInnerWidth?c.length:-1,d.lineGutter.style.width=d.lineNumWidth+"px",k(a),!0}return!1}function x(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function y(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function z(a,b,c){var d=a.display;this.viewport=b,this.visible=u(d,a.doc,b),this.editorIsHidden=!d.wrapper.offsetWidth,this.wrapperHeight=d.wrapper.clientHeight,this.wrapperWidth=d.wrapper.clientWidth,this.oldDisplayWidth=Sa(a),this.force=c,this.dims=H(a),this.events=[]}function A(a){var b=a.display;!b.scrollbarsClipped&&b.scroller.offsetWidth&&(b.nativeBarWidth=b.scroller.offsetWidth-b.scroller.clientWidth,b.heightForcer.style.height=Ra(a)+"px",b.sizer.style.marginBottom=-b.nativeBarWidth+"px",b.sizer.style.borderRightWidth=Ra(a)+"px",b.scrollbarsClipped=!0)}function B(a,b){var c=a.display,d=a.doc;if(b.editorIsHidden)return Ib(a),!1;if(!b.force&&b.visible.from>=c.viewFrom&&b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&0==Mb(a))return!1;w(a)&&(Ib(a),b.dims=H(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFrom<f&&f-c.viewFrom<20&&(f=Math.max(d.first,c.viewFrom)),c.viewTo>g&&c.viewTo-g<20&&(g=Math.min(e,c.viewTo)),Cf&&(f=od(a.doc,f),g=pd(a.doc,g));var h=f!=c.viewFrom||g!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||c.lastWrapWidth!=b.wrapperWidth;Lb(a,f,g),c.viewOffset=Zd(Td(a.doc,c.viewFrom)),a.display.mover.style.top=c.viewOffset+"px";var i=Mb(a);if(!h&&0==i&&!b.force&&c.renderedView==c.view&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo))return!1;var j=Ne();return i>4&&(c.lineDiv.style.display="none"),I(a,c.updateLineNumbers,b.dims),i>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,j&&Ne()!=j&&j.offsetHeight&&j.focus(),Le(c.cursorDiv),Le(c.selectionDiv),c.gutters.style.height=0,h&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=b.wrapperWidth,Ka(a,400)),c.updateLineNumbers=null,!0}function C(a,b){for(var c=b.force,d=b.viewport,e=!0;;e=!1){if(e&&a.options.lineWrapping&&b.oldDisplayWidth!=Sa(a))c=!0;else if(c=!1,d&&null!=d.top&&(d={top:Math.min(a.doc.height+Pa(a.display)-Ta(a),d.top)}),b.visible=u(a.display,a.doc,d),b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)break;if(!B(a,b))break;F(a);var f=o(a);Fa(a),E(a,f),s(a,f)}b.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function D(a,b){var c=new z(a,b);if(B(a,c)){F(a),C(a,c);var d=o(a);Fa(a),E(a,d),s(a,d),c.finish()}}function E(a,b){a.display.sizer.style.minHeight=b.docHeight+"px";var c=b.docHeight+a.display.barHeight;a.display.heightForcer.style.top=c+"px",a.display.gutters.style.height=Math.max(c+Ra(a),b.clientHeight)+"px"}function F(a){for(var b=a.display,c=b.lineDiv.offsetTop,d=0;d<b.view.length;d++){var e,f=b.view[d];if(!f.hidden){if(lf&&8>mf){var g=f.node.offsetTop+f.node.offsetHeight;e=g-c,c=g}else{var h=f.node.getBoundingClientRect();e=h.bottom-h.top}var i=f.line.height-e;if(2>e&&(e=pb(b)),(i>.001||-.001>i)&&(Wd(f.line,e),G(f.line),f.rest))for(var j=0;j<f.rest.length;j++)G(f.rest[j])}}}function G(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].height=a.widgets[b].node.offsetHeight}function H(a){for(var b=a.display,c={},d={},e=b.gutters.clientLeft,f=b.gutters.firstChild,g=0;f;f=f.nextSibling,++g)c[a.options.gutters[g]]=f.offsetLeft+f.clientLeft+e,d[a.options.gutters[g]]=f.clientWidth;return{fixedPos:y(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function I(a,b,c){function d(b){var c=b.nextSibling;return nf&&wf&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b),c}for(var e=a.display,f=a.options.lineNumbers,g=e.lineDiv,h=g.firstChild,i=e.view,j=e.viewFrom,k=0;k<i.length;k++){var l=i[k];if(l.hidden);else if(l.node&&l.node.parentNode==g){for(;h!=l.node;)h=d(h);var m=f&&null!=b&&j>=b&&l.lineNumber;l.changes&&(Be(l.changes,"gutter")>-1&&(m=!1),J(a,l,j,c)),m&&(Le(l.lineNumber),l.lineNumber.appendChild(document.createTextNode(x(a.options,j)))),h=l.node.nextSibling}else{var n=R(a,l,j,c);g.insertBefore(n,h)}j+=l.size}for(;h;)h=d(h)}function J(a,b,c,d){for(var e=0;e<b.changes.length;e++){var f=b.changes[e];"text"==f?N(a,b):"gutter"==f?P(a,b,c,d):"class"==f?O(b):"widget"==f&&Q(a,b,d)}b.changes=null}function K(a){return a.node==a.text&&(a.node=Ke("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),lf&&8>mf&&(a.node.style.zIndex=2)),a.node}function L(a){var b=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),a.background)b?a.background.className=b:(a.background.parentNode.removeChild(a.background),a.background=null);else if(b){var c=K(a);a.background=c.insertBefore(Ke("div",null,b),c.firstChild)}}function M(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):Gd(a,b)}function N(a,b){var c=b.text.className,d=M(a,b);b.text==b.node&&(b.node=d.pre),b.text.parentNode.replaceChild(d.pre,b.text),b.text=d.pre,d.bgClass!=b.bgClass||d.textClass!=b.textClass?(b.bgClass=d.bgClass,b.textClass=d.textClass,O(b)):c&&(b.text.className=c)}function O(a){L(a),a.line.wrapClass?K(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var b=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=b||""}function P(a,b,c,d){b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null);var e=b.line.gutterMarkers;if(a.options.lineNumbers||e){var f=K(b),g=b.gutter=Ke("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px");if(a.display.input.setUneditable(g),f.insertBefore(g,b.text),b.line.gutterClass&&(g.className+=" "+b.line.gutterClass),!a.options.lineNumbers||e&&e["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(Ke("div",x(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),e)for(var h=0;h<a.options.gutters.length;++h){var i=a.options.gutters[h],j=e.hasOwnProperty(i)&&e[i];j&&g.appendChild(Ke("div",[j],"CodeMirror-gutter-elt","left: "+d.gutterLeft[i]+"px; width: "+d.gutterWidth[i]+"px"))}}}function Q(a,b,c){b.alignable&&(b.alignable=null);for(var d,e=b.node.firstChild;e;e=d){var d=e.nextSibling;"CodeMirror-linewidget"==e.className&&b.node.removeChild(e)}S(a,b,c)}function R(a,b,c,d){var e=M(a,b);return b.text=b.node=e.pre,e.bgClass&&(b.bgClass=e.bgClass),e.textClass&&(b.textClass=e.textClass),O(b),P(a,b,c,d),S(a,b,d),b.node}function S(a,b,c){if(T(a,b.line,b,c,!0),b.rest)for(var d=0;d<b.rest.length;d++)T(a,b.rest[d],b,c,!1)}function T(a,b,c,d,e){if(b.widgets)for(var f=K(c),g=0,h=b.widgets;g<h.length;++g){var i=h[g],j=Ke("div",[i.node],"CodeMirror-linewidget");i.handleMouseEvents||j.setAttribute("cm-ignore-events","true"),U(i,j,c,d),a.display.input.setUneditable(j),e&&i.above?f.insertBefore(j,c.gutter||c.text):f.appendChild(j),re(i,"redraw")}}function U(a,b,c,d){if(a.noHScroll){(c.alignable||(c.alignable=[])).push(b);var e=d.wrapperWidth;b.style.left=d.fixedPos+"px",a.coverGutter||(e-=d.gutterTotalWidth,b.style.paddingLeft=d.gutterTotalWidth+"px"),b.style.width=e+"px"}a.coverGutter&&(b.style.zIndex=5,b.style.position="relative",a.noHScroll||(b.style.marginLeft=-d.gutterTotalWidth+"px"))}function V(a){return Df(a.line,a.ch)}function W(a,b){return Ef(a,b)<0?b:a}function X(a,b){return Ef(a,b)<0?a:b}function Y(a){a.state.focused||(a.display.input.focus(),lc(a))}function Z(a){return a.options.readOnly||a.doc.cantEdit}function $(a,b,c,d,e){var f=a.doc;a.display.shift=!1,d||(d=f.sel);var g=Sg(b),h=null;a.state.pasteIncoming&&d.ranges.length>1&&(Ff&&Ff.join("\n")==b?h=d.ranges.length%Ff.length==0&&Ce(Ff,Sg):g.length==d.ranges.length&&(h=Ce(g,function(a){return[a]})));for(var i=d.ranges.length-1;i>=0;i--){var j=d.ranges[i],k=j.from(),l=j.to();j.empty()&&(c&&c>0?k=Df(k.line,k.ch-c):a.state.overwrite&&!a.state.pasteIncoming&&(l=Df(l.line,Math.min(Td(f,l.line).text.length,l.ch+Ae(g).length))));var m=a.curOp.updateInput,n={from:k,to:l,text:h?h[i%h.length]:g,origin:e||(a.state.pasteIncoming?"paste":a.state.cutIncoming?"cut":"+input")};if(uc(a.doc,n),re(a,"inputRead",a,n),b&&!a.state.pasteIncoming&&a.options.electricChars&&a.options.smartIndent&&j.head.ch<100&&(!i||d.ranges[i-1].head.line!=j.head.line)){var o=a.getModeAt(j.head),p=Sf(n),q=!1;if(o.electricChars){for(var r=0;r<o.electricChars.length;r++)if(b.indexOf(o.electricChars.charAt(r))>-1){q=Ic(a,p.line,"smart");break}}else o.electricInput&&o.electricInput.test(Td(f,p.line).text.slice(0,p.ch))&&(q=Ic(a,p.line,"smart"));q&&re(a,"electricInput",a,p.line)}}Gc(a),a.curOp.updateInput=m,a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=!1}function _(a){for(var b=[],c=[],d=0;d<a.doc.sel.ranges.length;d++){var e=a.doc.sel.ranges[d].head.line,f={anchor:Df(e,0),head:Df(e+1,0)};c.push(f),b.push(a.getRange(f.anchor,f.head))}return{text:b,ranges:c}}function aa(a){a.setAttribute("autocorrect","off"),a.setAttribute("autocapitalize","off"),a.setAttribute("spellcheck","false")}function ba(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new xe,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function ca(){var a=Ke("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),b=Ke("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return nf?a.style.width="1000px":a.setAttribute("wrap","off"),uf&&(a.style.border="1px solid black"),aa(a),b}function da(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new xe,this.gracePeriod=!1}function ea(a,b){var c=Ya(a,b.line);if(!c||c.hidden)return null;var d=Td(a.doc,b.line),e=Va(c,d,b.line),f=$d(d),g="left";if(f){var h=df(f,b.ch);g=h%2?"right":"left"}var i=_a(e.map,b.ch,"left");return i.offset="right"==i.collapse?i.end:i.start,i}function fa(a,b){return b&&(a.bad=!0),a}function ga(a,b,c){var d;if(b==a.display.lineDiv){if(d=a.display.lineDiv.childNodes[c],!d)return fa(a.clipPos(Df(a.display.viewTo-1)),!0);b=null,c=0}else for(d=b;;d=d.parentNode){if(!d||d==a.display.lineDiv)return null;if(d.parentNode&&d.parentNode==a.display.lineDiv)break}for(var e=0;e<a.display.view.length;e++){var f=a.display.view[e];if(f.node==d)return ha(f,b,c)}}function ha(a,b,c){function d(b,c,d){for(var e=-1;e<(k?k.length:0);e++)for(var f=0>e?j.map:k[e],g=0;g<f.length;g+=3){var h=f[g+2];if(h==b||h==c){var i=Xd(0>e?a.line:a.rest[e]),l=f[g]+d;return(0>d||h!=b)&&(l=f[g+(d?1:0)]),Df(i,l)}}}var e=a.text.firstChild,f=!1;if(!b||!Lg(e,b))return fa(Df(Xd(a.line),0),!0);if(b==e&&(f=!0,b=e.childNodes[c],c=0,!b)){var g=a.rest?Ae(a.rest):a.line;return fa(Df(Xd(g),g.text.length),f)}var h=3==b.nodeType?b:null,i=b;for(h||1!=b.childNodes.length||3!=b.firstChild.nodeType||(h=b.firstChild,c&&(c=h.nodeValue.length));i.parentNode!=e;)i=i.parentNode;var j=a.measure,k=j.maps,l=d(h,i,c);if(l)return fa(l,f);for(var m=i.nextSibling,n=h?h.nodeValue.length-c:0;m;m=m.nextSibling){if(l=d(m,m.firstChild,0))return fa(Df(l.line,l.ch-n),f);n+=m.textContent.length}for(var o=i.previousSibling,n=c;o;o=o.previousSibling){if(l=d(o,o.firstChild,-1))return fa(Df(l.line,l.ch+n),f);n+=m.textContent.length}}function ia(a,b,c,d,e){function f(a){return function(b){return b.id==a}}function g(b){if(1==b.nodeType){var c=b.getAttribute("cm-text");if(null!=c)return""==c&&(c=b.textContent.replace(/\u200b/g,"")),void(h+=c);var j,k=b.getAttribute("cm-marker");if(k){var l=a.findMarks(Df(d,0),Df(e+1,0),f(+k));return void(l.length&&(j=l[0].find())&&(h+=Ud(a.doc,j.from,j.to).join("\n")))}if("false"==b.getAttribute("contenteditable"))return;for(var m=0;m<b.childNodes.length;m++)g(b.childNodes[m]);/^(pre|div|p)$/i.test(b.nodeName)&&(i=!0)}else if(3==b.nodeType){var n=b.nodeValue;if(!n)return;i&&(h+="\n",i=!1),h+=n}}for(var h="",i=!1;g(b),b!=c;)b=b.nextSibling;return h}function ja(a,b){this.ranges=a,this.primIndex=b}function ka(a,b){this.anchor=a,this.head=b}function la(a,b){var c=a[b];a.sort(function(a,b){return Ef(a.from(),b.from())}),b=Be(a,c);for(var d=1;d<a.length;d++){var e=a[d],f=a[d-1];if(Ef(f.to(),e.from())>=0){var g=X(f.from(),e.from()),h=W(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;b>=d&&--b,a.splice(--d,2,new ka(i?h:g,i?g:h))}}return new ja(a,b)}function ma(a,b){return new ja([new ka(a,b||a)],0)}function na(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function oa(a,b){if(b.line<a.first)return Df(a.first,0);var c=a.first+a.size-1;return b.line>c?Df(c,Td(a,c).text.length):pa(b,Td(a,b.line).text.length)}function pa(a,b){var c=a.ch;return null==c||c>b?Df(a.line,b):0>c?Df(a.line,0):a}function qa(a,b){return b>=a.first&&b<a.first+a.size}function ra(a,b){for(var c=[],d=0;d<b.length;d++)c[d]=oa(a,b[d]);return c}function sa(a,b,c,d){if(a.cm&&a.cm.display.shift||a.extend){var e=b.anchor;if(d){var f=Ef(c,e)<0;f!=Ef(d,e)<0?(e=c,c=d):f!=Ef(c,d)<0&&(c=d)}return new ka(e,c)}return new ka(d||c,c)}function ta(a,b,c,d){za(a,new ja([sa(a,a.sel.primary(),b,c)],0),d)}function ua(a,b,c){for(var d=[],e=0;e<a.sel.ranges.length;e++)d[e]=sa(a,a.sel.ranges[e],b[e],null);var f=la(d,a.sel.primIndex);za(a,f,c)}function va(a,b,c,d){var e=a.sel.ranges.slice(0);e[b]=c,za(a,la(e,a.sel.primIndex),d)}function wa(a,b,c,d){za(a,ma(b,c),d)}function xa(a,b){var c={ranges:b.ranges,update:function(b){this.ranges=[];for(var c=0;c<b.length;c++)this.ranges[c]=new ka(oa(a,b[c].anchor),oa(a,b[c].head))}};return xg(a,"beforeSelectionChange",a,c),a.cm&&xg(a.cm,"beforeSelectionChange",a.cm,c),c.ranges!=b.ranges?la(c.ranges,c.ranges.length-1):b}function ya(a,b,c){var d=a.history.done,e=Ae(d);e&&e.ranges?(d[d.length-1]=b,Aa(a,b,c)):za(a,b,c)}function za(a,b,c){Aa(a,b,c),fe(a,a.sel,a.cm?a.cm.curOp.id:NaN,c)}function Aa(a,b,c){(ve(a,"beforeSelectionChange")||a.cm&&ve(a.cm,"beforeSelectionChange"))&&(b=xa(a,b));var d=c&&c.bias||(Ef(b.primary().head,a.sel.primary().head)<0?-1:1);Ba(a,Da(a,b,d,!0)),c&&c.scroll===!1||!a.cm||Gc(a.cm)}function Ba(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0,ue(a.cm)),re(a,"cursorActivity",a))}function Ca(a){Ba(a,Da(a,a.sel,null,!1),Bg)}function Da(a,b,c,d){for(var e,f=0;f<b.ranges.length;f++){var g=b.ranges[f],h=Ea(a,g.anchor,c,d),i=Ea(a,g.head,c,d);(e||h!=g.anchor||i!=g.head)&&(e||(e=b.ranges.slice(0,f)),e[f]=new ka(h,i))}return e?la(e,b.primIndex):b}function Ea(a,b,c,d){var e=!1,f=b,g=c||1;a.cantEdit=!1;a:for(;;){var h=Td(a,f.line);if(h.markedSpans)for(var i=0;i<h.markedSpans.length;++i){var j=h.markedSpans[i],k=j.marker;if((null==j.from||(k.inclusiveLeft?j.from<=f.ch:j.from<f.ch))&&(null==j.to||(k.inclusiveRight?j.to>=f.ch:j.to>f.ch))){if(d&&(xg(k,"beforeCursorEnter"),k.explicitlyCleared)){if(h.markedSpans){--i;continue}break}if(!k.atomic)continue;var l=k.find(0>g?-1:1);if(0==Ef(l,f)&&(l.ch+=g,l.ch<0?l=l.line>a.first?oa(a,Df(l.line-1)):null:l.ch>h.text.length&&(l=l.line<a.first+a.size-1?Df(l.line+1,0):null),!l)){if(e)return d?(a.cantEdit=!0,Df(a.first,0)):Ea(a,b,c,!0);e=!0,l=b,g=-g}f=l;continue a}}return f}}function Fa(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ga(a,b){for(var c=a.doc,d={},e=d.cursors=document.createDocumentFragment(),f=d.selection=document.createDocumentFragment(),g=0;g<c.sel.ranges.length;g++)if(b!==!1||g!=c.sel.primIndex){var h=c.sel.ranges[g],i=h.empty();(i||a.options.showCursorWhenSelecting)&&Ha(a,h,e),i||Ia(a,h,f)}return d}function Ha(a,b,c){var d=kb(a,b.head,"div",null,null,!a.options.singleCursorHeightPerLine),e=c.appendChild(Ke("div"," ","CodeMirror-cursor"));if(e.style.left=d.left+"px",e.style.top=d.top+"px",e.style.height=Math.max(0,d.bottom-d.top)*a.options.cursorHeight+"px",d.other){var f=c.appendChild(Ke("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));f.style.display="",f.style.left=d.other.left+"px",f.style.top=d.other.top+"px",f.style.height=.85*(d.other.bottom-d.other.top)+"px"}}function Ia(a,b,c){function d(a,b,c,d){0>b&&(b=0),b=Math.round(b),d=Math.round(d),h.appendChild(Ke("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?k-a:c)+"px; height: "+(d-b)+"px"))}function e(b,c,e){function f(c,d){return jb(a,Df(b,c),"div",l,d)}var h,i,l=Td(g,b),m=l.text.length;return We($d(l),c||0,null==e?m:e,function(a,b,g){var l,n,o,p=f(a,"left");if(a==b)l=p,n=o=p.left;else{if(l=f(b-1,"right"),"rtl"==g){var q=p;p=l,l=q}n=p.left,o=l.right}null==c&&0==a&&(n=j),l.top-p.top>3&&(d(n,p.top,null,p.bottom),n=j,p.bottom<l.top&&d(n,p.bottom,null,l.top)),null==e&&b==m&&(o=k),(!h||p.top<h.top||p.top==h.top&&p.left<h.left)&&(h=p),(!i||l.bottom>i.bottom||l.bottom==i.bottom&&l.right>i.right)&&(i=l),j+1>n&&(n=j),d(n,l.top,o-n,l.bottom)}),{start:h,end:i}}var f=a.display,g=a.doc,h=document.createDocumentFragment(),i=Qa(a.display),j=i.left,k=Math.max(f.sizerWidth,Sa(a)-f.sizer.offsetLeft)-i.right,l=b.from(),m=b.to();if(l.line==m.line)e(l.line,l.ch,m.ch);else{var n=Td(g,l.line),o=Td(g,m.line),p=md(n)==md(o),q=e(l.line,l.ch,p?n.text.length+1:null).end,r=e(m.line,p?0:null,m.ch).start;p&&(q.top<r.top-2?(d(q.right,q.top,null,q.bottom),d(j,r.top,r.left,r.bottom)):d(q.right,q.top,r.left-q.right,q.bottom)),q.bottom<r.top&&d(j,q.bottom,null,r.top)}c.appendChild(h)}function Ja(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Ka(a,b){a.doc.mode.startState&&a.doc.frontier<a.display.viewTo&&a.state.highlight.set(b,Ge(La,a))}function La(a){var b=a.doc;if(b.frontier<b.first&&(b.frontier=b.first),!(b.frontier>=a.display.viewTo)){var c=+new Date+a.options.workTime,d=_f(b.mode,Na(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=Cd(a,f,d,!0);f.styles=h.styles;var i=f.styleClasses,j=h.classes;j?f.styleClasses=j:i&&(f.styleClasses=null);for(var k=!g||g.length!=f.styles.length||i!=j&&(!i||!j||i.bgClass!=j.bgClass||i.textClass!=j.textClass),l=0;!k&&l<g.length;++l)k=g[l]!=f.styles[l];k&&e.push(b.frontier),f.stateAfter=_f(b.mode,d)}else Ed(a,f.text,d),f.stateAfter=b.frontier%5==0?_f(b.mode,d):null;return++b.frontier,+new Date>c?(Ka(a,a.options.workDelay),!0):void 0}),e.length&&Ab(a,function(){for(var b=0;b<e.length;b++)Hb(a,e[b],"text")})}}function Ma(a,b,c){for(var d,e,f=a.doc,g=c?-1:b-(a.doc.mode.innerMode?1e3:100),h=b;h>g;--h){if(h<=f.first)return f.first;var i=Td(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=Eg(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Na(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Ma(a,b,c),g=f>d.first&&Td(d,f-1).stateAfter;return g=g?_f(d.mode,g):ag(d.mode),d.iter(f,b,function(c){Ed(a,c.text,g);var h=f==b-1||f%5==0||f>=e.viewFrom&&f<e.viewTo;c.stateAfter=h?_f(d.mode,g):null,++f}),c&&(d.frontier=f),g}function Oa(a){return a.lineSpace.offsetTop}function Pa(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Qa(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=Me(a.measure,Ke("pre","x")),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d={left:parseInt(c.paddingLeft),right:parseInt(c.paddingRight)};return isNaN(d.left)||isNaN(d.right)||(a.cachedPaddingH=d),d}function Ra(a){return zg-a.display.nativeBarWidth}function Sa(a){return a.display.scroller.clientWidth-Ra(a)-a.display.barWidth}function Ta(a){return a.display.scroller.clientHeight-Ra(a)-a.display.barHeight}function Ua(a,b,c){var d=a.options.lineWrapping,e=d&&Sa(a);if(!b.measure.heights||d&&b.measure.width!=e){var f=b.measure.heights=[];if(d){b.measure.width=e;for(var g=b.text.firstChild.getClientRects(),h=0;h<g.length-1;h++){var i=g[h],j=g[h+1];Math.abs(i.bottom-j.bottom)>2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function Va(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;d<a.rest.length;d++)if(a.rest[d]==b)return{map:a.measure.maps[d],cache:a.measure.caches[d]};for(var d=0;d<a.rest.length;d++)if(Xd(a.rest[d])>c)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function Wa(a,b){b=md(b);var c=Xd(b),d=a.display.externalMeasured=new Eb(a.doc,b,c);d.lineN=c;var e=d.built=Gd(a,d);return d.text=e.pre,Me(a.display.lineMeasure,e.pre),d}function Xa(a,b,c,d){return $a(a,Za(a,b),c,d)}function Ya(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[Jb(a,b)];var c=a.display.externalMeasured;return c&&b>=c.lineN&&b<c.lineN+c.size?c:void 0}function Za(a,b){var c=Xd(b),d=Ya(a,c);d&&!d.text?d=null:d&&d.changes&&J(a,d,c,H(a)),d||(d=Wa(a,b));var e=Va(d,b,c);return{line:b,view:d,rect:null,map:e.map,cache:e.cache,before:e.before,hasHeights:!1}}function $a(a,b,c,d,e){b.before&&(c=-1);var f,g=c+(d||"");return b.cache.hasOwnProperty(g)?f=b.cache[g]:(b.rect||(b.rect=b.view.text.getBoundingClientRect()),b.hasHeights||(Ua(a,b.view,b.rect),b.hasHeights=!0),f=ab(a,b,c,d),f.bogus||(b.cache[g]=f)),{left:f.left,right:f.right,top:e?f.rtop:f.top,bottom:e?f.rbottom:f.bottom}}function _a(a,b,c){for(var d,e,f,g,h=0;h<a.length;h+=3){var i=a[h],j=a[h+1];if(i>b?(e=0,f=1,g="left"):j>b?(e=b-i,f=e+1):(h==a.length-3||b==j&&a[h+3]>b)&&(f=j-i,e=f-1,b>=j&&(g="right")),null!=e){if(d=a[h+2],i==j&&c==(d.insertLeft?"left":"right")&&(g=c),"left"==c&&0==e)for(;h&&a[h-2]==a[h-3]&&a[h-1].insertLeft;)d=a[(h-=3)+2],g="left";if("right"==c&&e==j-i)for(;h<a.length-3&&a[h+3]==a[h+4]&&!a[h+5].insertLeft;)d=a[(h+=3)+2],g="right";break}}return{node:d,start:e,end:f,collapse:g,coverStart:i,coverEnd:j}}function ab(a,b,c,d){var e,f=_a(b.map,c,d),g=f.node,h=f.start,i=f.end,j=f.collapse;if(3==g.nodeType){for(var k=0;4>k;k++){for(;h&&Je(b.line.text.charAt(f.coverStart+h));)--h;for(;f.coverStart+i<f.coverEnd&&Je(b.line.text.charAt(f.coverStart+i));)++i;if(lf&&9>mf&&0==h&&i==f.coverEnd-f.coverStart)e=g.parentNode.getBoundingClientRect();else if(lf&&a.options.lineWrapping){var l=Hg(g,h,i).getClientRects();e=l.length?l["right"==d?l.length-1:0]:Jf}else e=Hg(g,h,i).getBoundingClientRect()||Jf;if(e.left||e.right||0==h)break;i=h,h-=1,j="right"}lf&&11>mf&&(e=bb(a.display.measure,e))}else{h>0&&(j=d="right");var l;e=a.options.lineWrapping&&(l=g.getClientRects()).length>1?l["right"==d?l.length-1:0]:g.getBoundingClientRect()}if(lf&&9>mf&&!h&&(!e||!e.left&&!e.right)){var m=g.parentNode.getClientRects()[0];e=m?{left:m.left,right:m.left+qb(a.display),top:m.top,bottom:m.bottom}:Jf}for(var n=e.top-b.rect.top,o=e.bottom-b.rect.top,p=(n+o)/2,q=b.view.measure.heights,k=0;k<q.length-1&&!(p<q[k]);k++);var r=k?q[k-1]:0,s=q[k],t={left:("right"==j?e.right:e.left)-b.rect.left,
2
+ right:("left"==j?e.left:e.right)-b.rect.left,top:r,bottom:s};return e.left||e.right||(t.bogus=!0),a.options.singleCursorHeightPerLine||(t.rtop=n,t.rbottom=o),t}function bb(a,b){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ve(a))return b;var c=screen.logicalXDPI/screen.deviceXDPI,d=screen.logicalYDPI/screen.deviceYDPI;return{left:b.left*c,right:b.right*c,top:b.top*d,bottom:b.bottom*d}}function cb(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function db(a){a.display.externalMeasure=null,Le(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)cb(a.display.view[b])}function eb(a){db(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function fb(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function gb(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function hb(a,b,c,d){if(b.widgets)for(var e=0;e<b.widgets.length;++e)if(b.widgets[e].above){var f=td(b.widgets[e]);c.top+=f,c.bottom+=f}if("line"==d)return c;d||(d="local");var g=Zd(b);if("local"==d?g+=Oa(a.display):g-=a.display.viewOffset,"page"==d||"window"==d){var h=a.display.lineSpace.getBoundingClientRect();g+=h.top+("window"==d?0:gb());var i=h.left+("window"==d?0:fb());c.left+=i,c.right+=i}return c.top+=g,c.bottom+=g,c}function ib(a,b,c){if("div"==c)return b;var d=b.left,e=b.top;if("page"==c)d-=fb(),e-=gb();else if("local"==c||!c){var f=a.display.sizer.getBoundingClientRect();d+=f.left,e+=f.top}var g=a.display.lineSpace.getBoundingClientRect();return{left:d-g.left,top:e-g.top}}function jb(a,b,c,d,e){return d||(d=Td(a.doc,b.line)),hb(a,d,Xa(a,d,b.ch,e),c)}function kb(a,b,c,d,e,f){function g(b,g){var h=$a(a,e,b,g?"right":"left",f);return g?h.left=h.right:h.right=h.left,hb(a,d,h,c)}function h(a,b){var c=i[b],d=c.level%2;return a==Xe(c)&&b&&c.level<i[b-1].level?(c=i[--b],a=Ye(c)-(c.level%2?0:1),d=!0):a==Ye(c)&&b<i.length-1&&c.level<i[b+1].level&&(c=i[++b],a=Xe(c)-c.level%2,d=!1),d&&a==c.to&&a>c.from?g(a-1):g(a,d)}d=d||Td(a.doc,b.line),e||(e=Za(a,d));var i=$d(d),j=b.ch;if(!i)return g(j);var k=df(i,j),l=h(j,k);return null!=Xg&&(l.other=h(j,Xg)),l}function lb(a,b){var c=0,b=oa(a.doc,b);a.options.lineWrapping||(c=qb(a.display)*b.ch);var d=Td(a.doc,b.line),e=Zd(d)+Oa(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function mb(a,b,c,d){var e=Df(a,b);return e.xRel=d,c&&(e.outside=!0),e}function nb(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,0>c)return mb(d.first,0,!0,-1);var e=Yd(d,c),f=d.first+d.size-1;if(e>f)return mb(d.first+d.size-1,Td(d,f).text.length,!0,1);0>b&&(b=0);for(var g=Td(d,e);;){var h=ob(a,g,e,b,c),i=kd(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=Xd(g=j.to.line)}}function ob(a,b,c,d,e){function f(d){var e=kb(a,Df(c,d),"line",b,j);return h=!0,g>e.bottom?e.left-i:g<e.top?e.left+i:(h=!1,e.left)}var g=e-Zd(b),h=!1,i=2*a.display.wrapper.clientWidth,j=Za(a,b),k=$d(b),l=b.text.length,m=Ze(b),n=$e(b),o=f(m),p=h,q=f(n),r=h;if(d>q)return mb(c,n,r,1);for(;;){if(k?n==m||n==ff(b,m,1):1>=n-m){for(var s=o>d||q-d>=d-o?m:n,t=d-(s==m?o:q);Je(b.text.charAt(s));)++s;var u=mb(c,s,s==m?p:r,-1>t?-1:t>1?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;v>x;++x)w=ff(b,w,1)}var y=f(w);y>d?(n=w,q=y,(r=h)&&(q+=1e3),l=v):(m=w,o=y,p=h,l-=v)}}function pb(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==Gf){Gf=Ke("pre");for(var b=0;49>b;++b)Gf.appendChild(document.createTextNode("x")),Gf.appendChild(Ke("br"));Gf.appendChild(document.createTextNode("x"))}Me(a.measure,Gf);var c=Gf.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),Le(a.measure),c||1}function qb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=Ke("span","xxxxxxxxxx"),c=Ke("pre",[b]);Me(a.measure,c);var d=b.getBoundingClientRect(),e=(d.right-d.left)/10;return e>2&&(a.cachedCharWidth=e),e||10}function rb(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Lf},Kf?Kf.ops.push(a.curOp):a.curOp.ownsGroup=Kf={ops:[a.curOp],delayedCallbacks:[]}}function sb(a){var b=a.delayedCallbacks,c=0;do{for(;c<b.length;c++)b[c]();for(var d=0;d<a.ops.length;d++){var e=a.ops[d];if(e.cursorActivityHandlers)for(;e.cursorActivityCalled<e.cursorActivityHandlers.length;)e.cursorActivityHandlers[e.cursorActivityCalled++](e.cm)}}while(c<b.length)}function tb(a){var b=a.curOp,c=b.ownsGroup;if(c)try{sb(c)}finally{Kf=null;for(var d=0;d<c.ops.length;d++)c.ops[d].cm.curOp=null;ub(c)}}function ub(a){for(var b=a.ops,c=0;c<b.length;c++)vb(b[c]);for(var c=0;c<b.length;c++)wb(b[c]);for(var c=0;c<b.length;c++)xb(b[c]);for(var c=0;c<b.length;c++)yb(b[c]);for(var c=0;c<b.length;c++)zb(b[c])}function vb(a){var b=a.cm,c=b.display;A(b),a.updateMaxLine&&m(b),a.mustUpdate=a.viewChanged||a.forceUpdate||null!=a.scrollTop||a.scrollToPos&&(a.scrollToPos.from.line<c.viewFrom||a.scrollToPos.to.line>=c.viewTo)||c.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new z(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function wb(a){a.updatedDisplay=a.mustUpdate&&B(a.cm,a.update)}function xb(a){var b=a.cm,c=b.display;a.updatedDisplay&&F(b),a.barMeasure=o(b),c.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=Xa(b,c.maxLine,c.maxLine.text.length).left+3,b.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+a.adjustWidthTo+Ra(b)+b.display.barWidth),a.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+a.adjustWidthTo-Sa(b))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=c.input.prepareSelection())}function yb(a){var b=a.cm;null!=a.adjustWidthTo&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<b.doc.scrollLeft&&_b(b,Math.min(b.display.scroller.scrollLeft,a.maxScrollLeft),!0),b.display.maxLineChanged=!1),a.preparedSelection&&b.display.input.showSelection(a.preparedSelection),a.updatedDisplay&&E(b,a.barMeasure),(a.updatedDisplay||a.startHeight!=b.doc.height)&&s(b,a.barMeasure),a.selectionChanged&&Ja(b),b.state.focused&&a.updateInput&&b.display.input.reset(a.typing),a.focus&&a.focus==Ne()&&Y(a.cm)}function zb(a){var b=a.cm,c=b.display,d=b.doc;if(a.updatedDisplay&&C(b,a.update),null==c.wheelStartX||null==a.scrollTop&&null==a.scrollLeft&&!a.scrollToPos||(c.wheelStartX=c.wheelStartY=null),null==a.scrollTop||c.scroller.scrollTop==a.scrollTop&&!a.forceScroll||(d.scrollTop=Math.max(0,Math.min(c.scroller.scrollHeight-c.scroller.clientHeight,a.scrollTop)),c.scrollbars.setScrollTop(d.scrollTop),c.scroller.scrollTop=d.scrollTop),null==a.scrollLeft||c.scroller.scrollLeft==a.scrollLeft&&!a.forceScroll||(d.scrollLeft=Math.max(0,Math.min(c.scroller.scrollWidth-Sa(b),a.scrollLeft)),c.scrollbars.setScrollLeft(d.scrollLeft),c.scroller.scrollLeft=d.scrollLeft,v(b)),a.scrollToPos){var e=Cc(b,oa(d,a.scrollToPos.from),oa(d,a.scrollToPos.to),a.scrollToPos.margin);a.scrollToPos.isCursor&&b.state.focused&&Bc(b,e)}var f=a.maybeHiddenMarkers,g=a.maybeUnhiddenMarkers;if(f)for(var h=0;h<f.length;++h)f[h].lines.length||xg(f[h],"hide");if(g)for(var h=0;h<g.length;++h)g[h].lines.length&&xg(g[h],"unhide");c.wrapper.offsetHeight&&(d.scrollTop=b.display.scroller.scrollTop),a.changeObjs&&xg(b,"changes",b,a.changeObjs),a.update&&a.update.finish()}function Ab(a,b){if(a.curOp)return b();rb(a);try{return b()}finally{tb(a)}}function Bb(a,b){return function(){if(a.curOp)return b.apply(a,arguments);rb(a);try{return b.apply(a,arguments)}finally{tb(a)}}}function Cb(a){return function(){if(this.curOp)return a.apply(this,arguments);rb(this);try{return a.apply(this,arguments)}finally{tb(this)}}}function Db(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,arguments);rb(b);try{return a.apply(this,arguments)}finally{tb(b)}}}function Eb(a,b,c){this.line=b,this.rest=nd(b),this.size=this.rest?Xd(Ae(this.rest))-c+1:1,this.node=this.text=null,this.hidden=qd(a,b)}function Fb(a,b,c){for(var d,e=[],f=b;c>f;f=d){var g=new Eb(a.doc,Td(a.doc,f),f);d=f+g.size,e.push(g)}return e}function Gb(a,b,c,d){null==b&&(b=a.doc.first),null==c&&(c=a.doc.first+a.doc.size),d||(d=0);var e=a.display;if(d&&c<e.viewTo&&(null==e.updateLineNumbers||e.updateLineNumbers>b)&&(e.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=e.viewTo)Cf&&od(a.doc,b)<e.viewTo&&Ib(a);else if(c<=e.viewFrom)Cf&&pd(a.doc,c+d)>e.viewFrom?Ib(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Ib(a);else if(b<=e.viewFrom){var f=Kb(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Ib(a)}else if(c>=e.viewTo){var f=Kb(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Ib(a)}else{var g=Kb(a,b,b,-1),h=Kb(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Fb(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Ib(a)}var i=e.externalMeasured;i&&(c<i.lineN?i.lineN+=d:b<i.lineN+i.size&&(e.externalMeasured=null))}function Hb(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;if(e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null),!(b<d.viewFrom||b>=d.viewTo)){var f=d.view[Jb(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);-1==Be(g,c)&&g.push(c)}}}function Ib(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Jb(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,0>b)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,0>b)return d}function Kb(a,b,c,d){var e,f=Jb(a,b),g=a.display.view;if(!Cf||c==a.doc.first+a.doc.size)return{index:f,lineN:c};for(var h=0,i=a.display.viewFrom;f>h;h++)i+=g[h].size;if(i!=b){if(d>0){if(f==g.length-1)return null;e=i+g[f].size-b,f++}else e=i-b;b+=e,c+=e}for(;od(a.doc,c)!=c;){if(f==(0>d?0:g.length-1))return null;c+=d*g[f-(0>d?1:0)].size,f+=d}return{index:f,lineN:c}}function Lb(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Fb(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Fb(a,b,d.viewFrom).concat(d.view):d.viewFrom<b&&(d.view=d.view.slice(Jb(a,b))),d.viewFrom=b,d.viewTo<c?d.view=d.view.concat(Fb(a,d.viewTo,c)):d.viewTo>c&&(d.view=d.view.slice(0,Jb(a,c)))),d.viewTo=c}function Mb(a){for(var b=a.display.view,c=0,d=0;d<b.length;d++){var e=b[d];e.hidden||e.node&&!e.changes||++c}return c}function Nb(a){function b(){e.activeTouch&&(f=setTimeout(function(){e.activeTouch=null},1e3),g=e.activeTouch,g.end=+new Date)}function c(a){if(1!=a.touches.length)return!1;var b=a.touches[0];return b.radiusX<=1&&b.radiusY<=1}function d(a,b){if(null==b.left)return!0;var c=b.left-a.left,d=b.top-a.top;return c*c+d*d>400}var e=a.display;vg(e.scroller,"mousedown",Bb(a,Sb)),lf&&11>mf?vg(e.scroller,"dblclick",Bb(a,function(b){if(!te(a,b)){var c=Rb(a,b);if(c&&!Xb(a,b)&&!Qb(a.display,b)){sg(b);var d=a.findWordAt(c);ta(a.doc,d.anchor,d.head)}}})):vg(e.scroller,"dblclick",function(b){te(a,b)||sg(b)}),Af||vg(e.scroller,"contextmenu",function(b){nc(a,b)});var f,g={end:0};vg(e.scroller,"touchstart",function(a){if(!c(a)){clearTimeout(f);var b=+new Date;e.activeTouch={start:b,moved:!1,prev:b-g.end<=300?g:null},1==a.touches.length&&(e.activeTouch.left=a.touches[0].pageX,e.activeTouch.top=a.touches[0].pageY)}}),vg(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),vg(e.scroller,"touchend",function(c){var f=e.activeTouch;if(f&&!Qb(e,c)&&null!=f.left&&!f.moved&&new Date-f.start<300){var g,h=a.coordsChar(e.activeTouch,"page");g=!f.prev||d(f,f.prev)?new ka(h,h):!f.prev.prev||d(f,f.prev.prev)?a.findWordAt(h):new ka(Df(h.line,0),oa(a.doc,Df(h.line+1,0))),a.setSelection(g.anchor,g.head),a.focus(),sg(c)}b()}),vg(e.scroller,"touchcancel",b),vg(e.scroller,"scroll",function(){e.scroller.clientHeight&&($b(a,e.scroller.scrollTop),_b(a,e.scroller.scrollLeft,!0),xg(a,"scroll",a))}),vg(e.scroller,"mousewheel",function(b){ac(a,b)}),vg(e.scroller,"DOMMouseScroll",function(b){ac(a,b)}),vg(e.wrapper,"scroll",function(){e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={simple:function(b){te(a,b)||ug(b)},start:function(b){Zb(a,b)},drop:Bb(a,Yb)};var h=e.input.getField();vg(h,"keyup",function(b){ic.call(a,b)}),vg(h,"keydown",Bb(a,gc)),vg(h,"keypress",Bb(a,jc)),vg(h,"focus",Ge(lc,a)),vg(h,"blur",Ge(mc,a))}function Ob(b,c,d){var e=d&&d!=a.Init;if(!c!=!e){var f=b.display.dragFunctions,g=c?vg:wg;g(b.display.scroller,"dragstart",f.start),g(b.display.scroller,"dragenter",f.simple),g(b.display.scroller,"dragover",f.simple),g(b.display.scroller,"drop",f.drop)}}function Pb(a){var b=a.display;(b.lastWrapHeight!=b.wrapper.clientHeight||b.lastWrapWidth!=b.wrapper.clientWidth)&&(b.cachedCharWidth=b.cachedTextHeight=b.cachedPaddingH=null,b.scrollbarsClipped=!1,a.setSize())}function Qb(a,b){for(var c=pe(b);c!=a.wrapper;c=c.parentNode)if(!c||1==c.nodeType&&"true"==c.getAttribute("cm-ignore-events")||c.parentNode==a.sizer&&c!=a.mover)return!0}function Rb(a,b,c,d){var e=a.display;if(!c&&"true"==pe(b).getAttribute("cm-not-content"))return null;var f,g,h=e.lineSpace.getBoundingClientRect();try{f=b.clientX-h.left,g=b.clientY-h.top}catch(b){return null}var i,j=nb(a,f,g);if(d&&1==j.xRel&&(i=Td(a.doc,j.line).text).length==j.ch){var k=Eg(i,i.length,a.options.tabSize)-i.length;j=Df(j.line,Math.max(0,Math.round((f-Qa(a.display).left)/qb(a.display))-k))}return j}function Sb(a){var b=this,c=b.display;if(!(c.activeTouch&&c.input.supportsTouch()||te(b,a))){if(c.shift=a.shiftKey,Qb(c,a))return void(nf||(c.scroller.draggable=!1,setTimeout(function(){c.scroller.draggable=!0},100)));if(!Xb(b,a)){var d=Rb(b,a);switch(window.focus(),qe(a)){case 1:d?Tb(b,a,d):pe(a)==c.scroller&&sg(a);break;case 2:nf&&(b.state.lastMiddleDown=+new Date),d&&ta(b.doc,d),setTimeout(function(){c.input.focus()},20),sg(a);break;case 3:Af?nc(b,a):kc(b)}}}}function Tb(a,b,c){lf?setTimeout(Ge(Y,a),0):a.curOp.focus=Ne();var d,e=+new Date;If&&If.time>e-400&&0==Ef(If.pos,c)?d="triple":Hf&&Hf.time>e-400&&0==Ef(Hf.pos,c)?(d="double",If={time:e,pos:c}):(d="single",Hf={time:e,pos:c});var f,g=a.doc.sel,h=wf?b.metaKey:b.ctrlKey;a.options.dragDrop&&Rg&&!Z(a)&&"single"==d&&(f=g.contains(c))>-1&&!g.ranges[f].empty()?Ub(a,b,c,h):Vb(a,b,c,d,h)}function Ub(a,b,c,d){var e=a.display,f=+new Date,g=Bb(a,function(h){nf&&(e.scroller.draggable=!1),a.state.draggingText=!1,wg(document,"mouseup",g),wg(e.scroller,"drop",g),Math.abs(b.clientX-h.clientX)+Math.abs(b.clientY-h.clientY)<10&&(sg(h),!d&&+new Date-200<f&&ta(a.doc,c),nf||lf&&9==mf?setTimeout(function(){document.body.focus(),e.input.focus()},20):e.input.focus())});nf&&(e.scroller.draggable=!0),a.state.draggingText=g,e.scroller.dragDrop&&e.scroller.dragDrop(),vg(document,"mouseup",g),vg(e.scroller,"drop",g)}function Vb(a,b,c,d,e){function f(b){if(0!=Ef(q,b))if(q=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=Eg(Td(j,c.line).text,c.ch,f),h=Eg(Td(j,b.line).text,b.ch,f),i=Math.min(g,h),n=Math.max(g,h),o=Math.min(c.line,b.line),p=Math.min(a.lastLine(),Math.max(c.line,b.line));p>=o;o++){var r=Td(j,o).text,s=ye(r,i,f);i==n?e.push(new ka(Df(o,s),Df(o,s))):r.length>s&&e.push(new ka(Df(o,s),Df(o,ye(r,n,f))))}e.length||e.push(new ka(c,c)),za(j,la(m.ranges.slice(0,l).concat(e),l),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=k,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new ka(Df(b.line,0),oa(j,Df(b.line+1,0)));Ef(w.anchor,u)>0?(v=w.head,u=X(t.from(),w.anchor)):(v=w.anchor,u=W(t.to(),w.head))}var e=m.ranges.slice(0);e[l]=new ka(oa(j,u),v),za(j,la(e,l),Cg)}}function g(b){var c=++s,e=Rb(a,b,!0,"rect"==d);if(e)if(0!=Ef(e,q)){a.curOp.focus=Ne(),f(e);var h=u(i,j);(e.line>=h.to||e.line<h.from)&&setTimeout(Bb(a,function(){s==c&&g(b)}),150)}else{var k=b.clientY<r.top?-20:b.clientY>r.bottom?20:0;k&&setTimeout(Bb(a,function(){s==c&&(i.scroller.scrollTop+=k,g(b))}),50)}}function h(a){s=1/0,sg(a),i.input.focus(),wg(document,"mousemove",t),wg(document,"mouseup",v),j.history.lastSelOrigin=null}var i=a.display,j=a.doc;sg(b);var k,l,m=j.sel,n=m.ranges;if(e&&!b.shiftKey?(l=j.sel.contains(c),k=l>-1?n[l]:new ka(c,c)):(k=j.sel.primary(),l=j.sel.primIndex),b.altKey)d="rect",e||(k=new ka(c,c)),c=Rb(a,b,!0,!0),l=-1;else if("double"==d){var o=a.findWordAt(c);k=a.display.shift||j.extend?sa(j,k,o.anchor,o.head):o}else if("triple"==d){var p=new ka(Df(c.line,0),oa(j,Df(c.line+1,0)));k=a.display.shift||j.extend?sa(j,k,p.anchor,p.head):p}else k=sa(j,k,c);e?-1==l?(l=n.length,za(j,la(n.concat([k]),l),{scroll:!1,origin:"*mouse"})):n.length>1&&n[l].empty()&&"single"==d&&!b.shiftKey?(za(j,la(n.slice(0,l).concat(n.slice(l+1)),0)),m=j.sel):va(j,l,k,Cg):(l=0,za(j,new ja([k],0),Cg),m=j.sel);var q=c,r=i.wrapper.getBoundingClientRect(),s=0,t=Bb(a,function(a){qe(a)?g(a):h(a)}),v=Bb(a,h);vg(document,"mousemove",t),vg(document,"mouseup",v)}function Wb(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&sg(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!ve(a,c))return oe(b);g-=i.top-h.viewOffset;for(var j=0;j<a.options.gutters.length;++j){var k=h.gutters.childNodes[j];if(k&&k.getBoundingClientRect().right>=f){var l=Yd(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),oe(b)}}}function Xb(a,b){return Wb(a,b,"gutterClick",!0,re)}function Yb(a){var b=this;if(!te(b,a)&&!Qb(b.display,a)){sg(a),lf&&(Mf=+new Date);var c=Rb(b,a,!0),d=a.dataTransfer.files;if(c&&!Z(b))if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,f=Array(e),g=0,h=function(a,d){var h=new FileReader;h.onload=Bb(b,function(){if(f[d]=h.result,++g==e){c=oa(b.doc,c);var a={from:c,to:c,text:Sg(f.join("\n")),origin:"paste"};uc(b.doc,a),ya(b.doc,ma(c,Sf(a)))}}),h.readAsText(a)},i=0;e>i;++i)h(d[i],i);else{if(b.state.draggingText&&b.doc.sel.contains(c)>-1)return b.state.draggingText(a),void setTimeout(function(){b.display.input.focus()},20);try{var f=a.dataTransfer.getData("Text");if(f){if(b.state.draggingText&&!(wf?a.altKey:a.ctrlKey))var j=b.listSelections();if(Aa(b.doc,ma(c,c)),j)for(var i=0;i<j.length;++i)Ac(b.doc,"",j[i].anchor,j[i].head,"drag");b.replaceSelection(f,"around","paste"),b.display.input.focus()}}catch(a){}}}}function Zb(a,b){if(lf&&(!a.state.draggingText||+new Date-Mf<100))return void ug(b);if(!te(a,b)&&!Qb(a.display,b)&&(b.dataTransfer.setData("Text",a.getSelection()),b.dataTransfer.setDragImage&&!rf)){var c=Ke("img",null,null,"position: fixed; left: 0; top: 0;");c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",qf&&(c.width=c.height=1,a.display.wrapper.appendChild(c),c._top=c.offsetTop),b.dataTransfer.setDragImage(c,0,0),qf&&c.parentNode.removeChild(c)}}function $b(a,b){Math.abs(a.doc.scrollTop-b)<2||(a.doc.scrollTop=b,hf||D(a,{top:b}),a.display.scroller.scrollTop!=b&&(a.display.scroller.scrollTop=b),a.display.scrollbars.setScrollTop(b),hf&&D(a),Ka(a,100))}function _b(a,b,c){(c?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,v(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbars.setScrollLeft(b))}function ac(a,b){var c=Pf(b),d=c.x,e=c.y,f=a.display,g=f.scroller;if(d&&g.scrollWidth>g.clientWidth||e&&g.scrollHeight>g.clientHeight){if(e&&wf&&nf)a:for(var h=b.target,i=f.view;h!=g;h=h.parentNode)for(var j=0;j<i.length;j++)if(i[j].node==h){a.display.currentWheelTarget=h;break a}if(d&&!hf&&!qf&&null!=Of)return e&&$b(a,Math.max(0,Math.min(g.scrollTop+e*Of,g.scrollHeight-g.clientHeight))),_b(a,Math.max(0,Math.min(g.scrollLeft+d*Of,g.scrollWidth-g.clientWidth))),sg(b),void(f.wheelStartX=null);if(e&&null!=Of){var k=e*Of,l=a.doc.scrollTop,m=l+f.wrapper.clientHeight;0>k?l=Math.max(0,l+k-50):m=Math.min(a.doc.height,m+k+50),D(a,{top:l,bottom:m})}20>Nf&&(null==f.wheelStartX?(f.wheelStartX=g.scrollLeft,f.wheelStartY=g.scrollTop,f.wheelDX=d,f.wheelDY=e,setTimeout(function(){if(null!=f.wheelStartX){var a=g.scrollLeft-f.wheelStartX,b=g.scrollTop-f.wheelStartY,c=b&&f.wheelDY&&b/f.wheelDY||a&&f.wheelDX&&a/f.wheelDX;f.wheelStartX=f.wheelStartY=null,c&&(Of=(Of*Nf+c)/(Nf+1),++Nf)}},200)):(f.wheelDX+=d,f.wheelDY+=e))}}function bc(a,b,c){if("string"==typeof b&&(b=bg[b],!b))return!1;a.display.input.ensurePolled();var d=a.display.shift,e=!1;try{Z(a)&&(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=Ag}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function cc(a,b,c){for(var d=0;d<a.state.keyMaps.length;d++){var e=dg(b,a.state.keyMaps[d],c,a);if(e)return e}return a.options.extraKeys&&dg(b,a.options.extraKeys,c,a)||dg(b,a.options.keyMap,c,a)}function dc(a,b,c,d){var e=a.state.keySeq;if(e){if(eg(b))return"handled";Qf.set(50,function(){a.state.keySeq==e&&(a.state.keySeq=null,a.display.input.reset())}),b=e+" "+b}var f=cc(a,b,d);return"multi"==f&&(a.state.keySeq=b),"handled"==f&&re(a,"keyHandled",a,b,c),("handled"==f||"multi"==f)&&(sg(c),Ja(a)),e&&!f&&/\'$/.test(b)?(sg(c),!0):!!f}function ec(a,b){var c=fg(b,!0);return c?b.shiftKey&&!a.state.keySeq?dc(a,"Shift-"+c,b,function(b){return bc(a,b,!0)})||dc(a,c,b,function(b){return("string"==typeof b?/^go[A-Z]/.test(b):b.motion)?bc(a,b):void 0}):dc(a,c,b,function(b){return bc(a,b)}):!1}function fc(a,b,c){return dc(a,"'"+c+"'",b,function(b){return bc(a,b,!0)})}function gc(a){var b=this;if(b.curOp.focus=Ne(),!te(b,a)){lf&&11>mf&&27==a.keyCode&&(a.returnValue=!1);var c=a.keyCode;b.display.shift=16==c||a.shiftKey;var d=ec(b,a);qf&&(Rf=d?c:null,!d&&88==c&&!Ug&&(wf?a.metaKey:a.ctrlKey)&&b.replaceSelection("",null,"cut")),18!=c||/\bCodeMirror-crosshair\b/.test(b.display.lineDiv.className)||hc(b)}}function hc(a){function b(a){18!=a.keyCode&&a.altKey||(Og(c,"CodeMirror-crosshair"),wg(document,"keyup",b),wg(document,"mouseover",b))}var c=a.display.lineDiv;Pg(c,"CodeMirror-crosshair"),vg(document,"keyup",b),vg(document,"mouseover",b)}function ic(a){16==a.keyCode&&(this.doc.sel.shift=!1),te(this,a)}function jc(a){var b=this;if(!(Qb(b.display,a)||te(b,a)||a.ctrlKey&&!a.altKey||wf&&a.metaKey)){var c=a.keyCode,d=a.charCode;if(qf&&c==Rf)return Rf=null,void sg(a);if(!qf||a.which&&!(a.which<10)||!ec(b,a)){var e=String.fromCharCode(null==d?c:d);fc(b,a,e)||b.display.input.onKeyPress(a)}}}function kc(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,mc(a))},100)}function lc(a){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),"nocursor"!=a.options.readOnly&&(a.state.focused||(xg(a,"focus",a),a.state.focused=!0,Pg(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||(a.display.input.reset(),nf&&setTimeout(function(){a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Ja(a))}function mc(a){a.state.delayingBlurEvent||(a.state.focused&&(xg(a,"blur",a),a.state.focused=!1,Og(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function nc(a,b){Qb(a.display,b)||oc(a,b)||a.display.input.onContextMenu(b)}function oc(a,b){return ve(a,"gutterContextMenu")?Wb(a,b,"gutterContextMenu",!1,xg):!1}function pc(a,b){if(Ef(a,b.from)<0)return a;if(Ef(a,b.to)<=0)return Sf(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;return a.line==b.to.line&&(d+=Sf(b).ch-b.to.ch),Df(c,d)}function qc(a,b){for(var c=[],d=0;d<a.sel.ranges.length;d++){var e=a.sel.ranges[d];c.push(new ka(pc(e.anchor,b),pc(e.head,b)))}return la(c,a.sel.primIndex)}function rc(a,b,c){return a.line==b.line?Df(c.line,a.ch-b.ch+c.ch):Df(c.line+(a.line-b.line),a.ch)}function sc(a,b,c){for(var d=[],e=Df(a.first,0),f=e,g=0;g<b.length;g++){var h=b[g],i=rc(h.from,e,f),j=rc(Sf(h),e,f);if(e=h.to,f=j,"around"==c){var k=a.sel.ranges[g],l=Ef(k.head,k.anchor)<0;d[g]=new ka(l?j:i,l?i:j)}else d[g]=new ka(i,i)}return new ja(d,a.sel.primIndex)}function tc(a,b,c){var d={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};return c&&(d.update=function(b,c,d,e){b&&(this.from=oa(a,b)),c&&(this.to=oa(a,c)),d&&(this.text=d),void 0!==e&&(this.origin=e)}),xg(a,"beforeChange",a,d),a.cm&&xg(a.cm,"beforeChange",a.cm,d),d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function uc(a,b,c){if(a.cm){if(!a.cm.curOp)return Bb(a.cm,uc)(a,b,c);if(a.cm.state.suppressEdits)return}if(!(ve(a,"beforeChange")||a.cm&&ve(a.cm,"beforeChange"))||(b=tc(a,b,!0))){var d=Bf&&!c&&cd(a,b.from,b.to);if(d)for(var e=d.length-1;e>=0;--e)vc(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else vc(a,b)}}function vc(a,b){if(1!=b.text.length||""!=b.text[0]||0!=Ef(b.from,b.to)){var c=qc(a,b);de(a,b,c,a.cm?a.cm.curOp.id:NaN),yc(a,b,c,_c(a,b));var d=[];Rd(a,function(a,c){c||-1!=Be(d,a.history)||(ne(a.history,b),d.push(a.history)),yc(a,b,null,_c(a,b))})}}function wc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i<g.length&&(d=g[i],c?!d.ranges||d.equals(a.sel):d.ranges);i++);if(i!=g.length){for(e.lastOrigin=e.lastSelOrigin=null;d=g.pop(),d.ranges;){if(ge(d,h),c&&!d.equals(a.sel))return void za(a,d,{clearRedo:!1});f=d}var j=[];ge(f,h),h.push({changes:j,generation:e.generation}),e.generation=d.generation||++e.maxGeneration;for(var k=ve(a,"beforeChange")||a.cm&&ve(a.cm,"beforeChange"),i=d.changes.length-1;i>=0;--i){var l=d.changes[i];if(l.origin=b,k&&!tc(a,l,!1))return void(g.length=0);j.push(ae(a,l));var m=i?qc(a,l):Ae(g);yc(a,l,m,bd(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Sf(l)});var n=[];Rd(a,function(a,b){b||-1!=Be(n,a.history)||(ne(a.history,l),n.push(a.history)),yc(a,l,null,bd(a,l))})}}}}function xc(a,b){if(0!=b&&(a.first+=b,a.sel=new ja(Ce(a.sel.ranges,function(a){return new ka(Df(a.anchor.line+b,a.anchor.ch),Df(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Gb(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;d<c.viewTo;d++)Hb(a.cm,d,"gutter")}}function yc(a,b,c,d){if(a.cm&&!a.cm.curOp)return Bb(a.cm,yc)(a,b,c,d);if(b.to.line<a.first)return void xc(a,b.text.length-1-(b.to.line-b.from.line));if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);xc(a,e),b={from:Df(a.first,0),to:Df(b.to.line+e,b.to.ch),text:[Ae(b.text)],origin:b.origin}}var f=a.lastLine();b.to.line>f&&(b={from:b.from,to:Df(f,Td(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Ud(a,b.from,b.to),c||(c=qc(a,b)),a.cm?zc(a.cm,b,d):Od(a,b,d),Aa(a,c,Bg)}}function zc(a,b,c){var d=a.doc,e=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=Xd(md(Td(d,g.line))),d.iter(j,h.line+1,function(a){return a==e.maxLine?(i=!0,!0):void 0})),d.sel.contains(b.from,b.to)>-1&&ue(a),Od(d,b,c,f(a)),a.options.lineWrapping||(d.iter(j,g.line+b.text.length,function(a){var b=l(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,g.line),Ka(a,400);var k=b.text.length-(h.line-g.line)-1;b.full?Gb(a):g.line!=h.line||1!=b.text.length||Nd(a.doc,b)?Gb(a,g.line,h.line+1,k):Hb(a,g.line,"text");var m=ve(a,"changes"),n=ve(a,"change");if(n||m){var o={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};n&&re(a,"change",a,o),m&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(o)}a.display.selForContextMenu=null}function Ac(a,b,c,d,e){if(d||(d=c),Ef(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=Sg(b)),uc(a,{from:c,to:d,text:b,origin:e})}function Bc(a,b){if(!te(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!tf){var f=Ke("div","​",null,"position: absolute; top: "+(b.top-c.viewOffset-Oa(a.display))+"px; height: "+(b.bottom-b.top+Ra(a)+c.barHeight)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}}function Cc(a,b,c,d){null==d&&(d=0);for(var e=0;5>e;e++){var f=!1,g=kb(a,b),h=c&&c!=b?kb(a,c):g,i=Ec(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&($b(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(_b(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)break}return g}function Dc(a,b,c,d,e){var f=Ec(a,b,c,d,e);null!=f.scrollTop&&$b(a,f.scrollTop),null!=f.scrollLeft&&_b(a,f.scrollLeft)}function Ec(a,b,c,d,e){var f=a.display,g=pb(a.display);0>c&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=Ta(a),j={};e-c>i&&(e=c+i);var k=a.doc.height+Pa(f),l=g>c,m=e>k-g;if(h>c)j.scrollTop=l?0:c;else if(e>h+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=Sa(a)-(a.options.fixedGutter?f.gutters.offsetWidth:0),q=d-b>p;return q&&(d=b+p),10>b?j.scrollLeft=0:o>b?j.scrollLeft=Math.max(0,b-(q?0:10)):d>p+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function Fc(a,b,c){(null!=b||null!=c)&&Hc(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function Gc(a){Hc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?Df(b.line,b.ch-1):b,d=Df(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function Hc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=lb(a,b.from),d=lb(a,b.to),e=Ec(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function Ic(a,b,c,d){var e,f=a.doc;null==c&&(c="add"),"smart"==c&&(f.mode.indent?e=Na(a,b):c="prev");var g=a.options.tabSize,h=Td(f,b),i=Eg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var j,k=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(j=f.mode.indent(e,h.text.slice(k.length),h.text),j==Ag||j>150)){if(!d)return;c="prev"}}else j=0,c="not";"prev"==c?j=b>f.first?Eg(Td(f,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c?j=i-a.options.indentUnit:"number"==typeof c&&(j=i+c),j=Math.max(0,j);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(j/g);n;--n)m+=g,l+=" ";if(j>m&&(l+=ze(j-m)),l!=k)return Ac(f,l,Df(b,0),Df(b,k.length),"+input"),h.stateAfter=null,!0;for(var n=0;n<f.sel.ranges.length;n++){var o=f.sel.ranges[n];if(o.head.line==b&&o.head.ch<k.length){var m=Df(b,k.length);va(f,n,new ka(m,m));break}}}function Jc(a,b,c,d){var e=b,f=b;return"number"==typeof b?f=Td(a,na(a,b)):e=Xd(b),null==e?null:(d(f,e)&&a.cm&&Hb(a.cm,e,c),f)}function Kc(a,b){for(var c=a.doc.sel.ranges,d=[],e=0;e<c.length;e++){for(var f=b(c[e]);d.length&&Ef(f.from,Ae(d).to)<=0;){var g=d.pop();if(Ef(g.from,f.from)<0){f.from=g.from;break}}d.push(f)}Ab(a,function(){for(var b=d.length-1;b>=0;b--)Ac(a.doc,"",d[b].from,d[b].to,"+delete");Gc(a)})}function Lc(a,b,c,d,e){function f(){var b=h+c;return b<a.first||b>=a.first+a.size?l=!1:(h=b,k=Td(a,b))}function g(a){var b=(e?ff:gf)(k,i,c,!0);if(null==b){if(a||!f())return l=!1;i=e?(0>c?$e:Ze)(k):0>c?k.text.length:0}else i=b;return!0}var h=b.line,i=b.ch,j=c,k=Td(a,h),l=!0;if("char"==d)g();else if("column"==d)g(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=a.cm&&a.cm.getHelper(b,"wordChars"),p=!0;!(0>c)||g(!p);p=!1){var q=k.text.charAt(i)||"\n",r=He(q,o)?"w":n&&"\n"==q?"n":!n||/\s/.test(q)?null:"p";if(!n||p||r||(r="s"),m&&m!=r){0>c&&(c=1,g());break}if(r&&(m=r),c>0&&!g(!p))break}var s=Ea(a,Df(h,i),j,!0);return l||(s.hitSide=!0),s}function Mc(a,b,c,d){var e,f=a.doc,g=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);
3
+ e=b.top+c*(h-(0>c?1.5:.5)*pb(a.display))}else"line"==d&&(e=c>0?b.bottom+3:b.top-3);for(;;){var i=nb(a,g,e);if(!i.outside)break;if(0>c?0>=e:e>=f.height){i.hitSide=!0;break}e+=5*c}return i}function Nc(b,c,d,e){a.defaults[b]=c,d&&(Uf[b]=e?function(a,b,c){c!=Vf&&d(a,b,c)}:d)}function Oc(a){for(var b,c,d,e,f=a.split(/-(?!$)/),a=f[f.length-1],g=0;g<f.length-1;g++){var h=f[g];if(/^(cmd|meta|m)$/i.test(h))e=!0;else if(/^a(lt)?$/i.test(h))b=!0;else if(/^(c|ctrl|control)$/i.test(h))c=!0;else{if(!/^s(hift)$/i.test(h))throw new Error("Unrecognized modifier name: "+h);d=!0}}return b&&(a="Alt-"+a),c&&(a="Ctrl-"+a),e&&(a="Cmd-"+a),d&&(a="Shift-"+a),a}function Pc(a){return"string"==typeof a?cg[a]:a}function Qc(a,b,c,d,e){if(d&&d.shared)return Rc(a,b,c,d,e);if(a.cm&&!a.cm.curOp)return Bb(a.cm,Qc)(a,b,c,d,e);var f=new ig(a,e),g=Ef(b,c);if(d&&Fe(d,f,!1),g>0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Ke("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(ld(a,b.line,b,c,f)||b.line!=c.line&&ld(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Cf=!0}f.addToHistory&&de(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var h,i=b.line,j=a.cm;if(a.iter(i,c.line+1,function(a){j&&f.collapsed&&!j.options.lineWrapping&&md(a)==j.display.maxLine&&(h=!0),f.collapsed&&i!=b.line&&Wd(a,0),Yc(a,new Vc(f,i==b.line?b.ch:null,i==c.line?c.ch:null)),++i}),f.collapsed&&a.iter(b.line,c.line+1,function(b){qd(a,b)&&Wd(b,0)}),f.clearOnEnter&&vg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(Bf=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++hg,f.atomic=!0),j){if(h&&(j.curOp.updateMaxLine=!0),f.collapsed)Gb(j,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(var k=b.line;k<=c.line;k++)Hb(j,k,"text");f.atomic&&Ca(j.doc),re(j,"markerAdded",j,f)}return f}function Rc(a,b,c,d,e){d=Fe(d),d.shared=!1;var f=[Qc(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Rd(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Qc(a,oa(a,b),oa(a,c),d,e));for(var i=0;i<a.linked.length;++i)if(a.linked[i].isParent)return;g=Ae(f)}),new jg(f,g)}function Sc(a){return a.findMarks(Df(a.first,0),a.clipPos(Df(a.lastLine())),function(a){return a.parent})}function Tc(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=d.find(),f=a.clipPos(e.from),g=a.clipPos(e.to);if(Ef(f,g)){var h=Qc(a,f,g,d.primary,d.primary.type);d.markers.push(h),h.parent=d}}}function Uc(a){for(var b=0;b<a.length;b++){var c=a[b],d=[c.primary.doc];Rd(c.primary.doc,function(a){d.push(a)});for(var e=0;e<c.markers.length;e++){var f=c.markers[e];-1==Be(d,f.doc)&&(f.parent=null,c.markers.splice(e--,1))}}}function Vc(a,b,c){this.marker=a,this.from=b,this.to=c}function Wc(a,b){if(a)for(var c=0;c<a.length;++c){var d=a[c];if(d.marker==b)return d}}function Xc(a,b){for(var c,d=0;d<a.length;++d)a[d]!=b&&(c||(c=[])).push(a[d]);return c}function Yc(a,b){a.markedSpans=a.markedSpans?a.markedSpans.concat([b]):[b],b.marker.attachLine(a)}function Zc(a,b,c){if(a)for(var d,e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);if(h||f.from==b&&"bookmark"==g.type&&(!c||!f.marker.insertLeft)){var i=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);(d||(d=[])).push(new Vc(g,f.from,i?null:f.to))}}return d}function $c(a,b,c){if(a)for(var d,e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);(d||(d=[])).push(new Vc(g,i?null:f.from-b,null==f.to?null:f.to-b))}}return d}function _c(a,b){if(b.full)return null;var c=qa(a,b.from.line)&&Td(a,b.from.line).markedSpans,d=qa(a,b.to.line)&&Td(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,f=b.to.ch,g=0==Ef(b.from,b.to),h=Zc(c,e,g),i=$c(d,f,g),j=1==b.text.length,k=Ae(b.text).length+(j?e:0);if(h)for(var l=0;l<h.length;++l){var m=h[l];if(null==m.to){var n=Wc(i,m.marker);n?j&&(m.to=null==n.to?null:n.to+k):m.to=e}}if(i)for(var l=0;l<i.length;++l){var m=i[l];if(null!=m.to&&(m.to+=k),null==m.from){var n=Wc(h,m.marker);n||(m.from=k,j&&(h||(h=[])).push(m))}else m.from+=k,j&&(h||(h=[])).push(m)}h&&(h=ad(h)),i&&i!=h&&(i=ad(i));var o=[h];if(!j){var p,q=b.text.length-2;if(q>0&&h)for(var l=0;l<h.length;++l)null==h[l].to&&(p||(p=[])).push(new Vc(h[l].marker,null,null));for(var l=0;q>l;++l)o.push(p);o.push(i)}return o}function ad(a){for(var b=0;b<a.length;++b){var c=a[b];null!=c.from&&c.from==c.to&&c.marker.clearWhenEmpty!==!1&&a.splice(b--,1)}return a.length?a:null}function bd(a,b){var c=je(a,b),d=_c(a,b);if(!c)return d;if(!d)return c;for(var e=0;e<c.length;++e){var f=c[e],g=d[e];if(f&&g)a:for(var h=0;h<g.length;++h){for(var i=g[h],j=0;j<f.length;++j)if(f[j].marker==i.marker)continue a;f.push(i)}else g&&(c[e]=g)}return c}function cd(a,b,c){var d=null;if(a.iter(b.line,c.line+1,function(a){if(a.markedSpans)for(var b=0;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&-1!=Be(d,c)||(d||(d=[])).push(c)}}),!d)return null;for(var e=[{from:b,to:c}],f=0;f<d.length;++f)for(var g=d[f],h=g.find(0),i=0;i<e.length;++i){var j=e[i];if(!(Ef(j.to,h.from)<0||Ef(j.from,h.to)>0)){var k=[i,1],l=Ef(j.from,h.from),m=Ef(j.to,h.to);(0>l||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function dd(a){var b=a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function ed(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function fd(a){return a.inclusiveLeft?-1:0}function gd(a){return a.inclusiveRight?1:0}function hd(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;var d=a.find(),e=b.find(),f=Ef(d.from,e.from)||fd(a)-fd(b);if(f)return-f;var g=Ef(d.to,e.to)||gd(a)-gd(b);return g?g:b.id-a.id}function id(a,b){var c,d=Cf&&a.markedSpans;if(d)for(var e,f=0;f<d.length;++f)e=d[f],e.marker.collapsed&&null==(b?e.from:e.to)&&(!c||hd(c,e.marker)<0)&&(c=e.marker);return c}function jd(a){return id(a,!0)}function kd(a){return id(a,!1)}function ld(a,b,c,d,e){var f=Td(a,b),g=Cf&&f.markedSpans;if(g)for(var h=0;h<g.length;++h){var i=g[h];if(i.marker.collapsed){var j=i.marker.find(0),k=Ef(j.from,c)||fd(i.marker)-fd(e),l=Ef(j.to,d)||gd(i.marker)-gd(e);if(!(k>=0&&0>=l||0>=k&&l>=0)&&(0>=k&&(Ef(j.to,c)>0||i.marker.inclusiveRight&&e.inclusiveLeft)||k>=0&&(Ef(j.from,d)<0||i.marker.inclusiveLeft&&e.inclusiveRight)))return!0}}}function md(a){for(var b;b=jd(a);)a=b.find(-1,!0).line;return a}function nd(a){for(var b,c;b=kd(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function od(a,b){var c=Td(a,b),d=md(c);return c==d?b:Xd(d)}function pd(a,b){if(b>a.lastLine())return b;var c,d=Td(a,b);if(!qd(a,d))return b;for(;c=kd(d);)d=c.find(1,!0).line;return Xd(d)+1}function qd(a,b){var c=Cf&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed){if(null==d.from)return!0;if(!d.marker.widgetNode&&0==d.from&&d.marker.inclusiveLeft&&rd(a,b,d))return!0}}function rd(a,b,c){if(null==c.to){var d=c.marker.find(1,!0);return rd(a,d.line,Wc(d.line.markedSpans,c.marker))}if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var e,f=0;f<b.markedSpans.length;++f)if(e=b.markedSpans[f],e.marker.collapsed&&!e.marker.widgetNode&&e.from==c.to&&(null==e.to||e.to!=c.from)&&(e.marker.inclusiveLeft||c.marker.inclusiveRight)&&rd(a,b,e))return!0}function sd(a,b,c){Zd(b)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Fc(a,null,c)}function td(a){if(null!=a.height)return a.height;var b=a.doc.cm;if(!b)return 0;if(!Lg(document.body,a.node)){var c="position: relative;";a.coverGutter&&(c+="margin-left: -"+b.display.gutters.offsetWidth+"px;"),a.noHScroll&&(c+="width: "+b.display.wrapper.clientWidth+"px;"),Me(b.display.measure,Ke("div",[a.node],null,c))}return a.height=a.node.offsetHeight}function ud(a,b,c,d){var e=new kg(a,c,d),f=a.cm;return f&&e.noHScroll&&(f.display.alignWidgets=!0),Jc(a,b,"widget",function(b){var c=b.widgets||(b.widgets=[]);if(null==e.insertAt?c.push(e):c.splice(Math.min(c.length-1,Math.max(0,e.insertAt)),0,e),e.line=b,f&&!qd(a,b)){var d=Zd(b)<a.scrollTop;Wd(b,b.height+td(e)),d&&Fc(f,null,e.height),f.curOp.forceUpdate=!0}return!0}),e}function vd(a,b,c,d){a.text=b,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),null!=a.order&&(a.order=null),dd(a),ed(a,c);var e=d?d(a):1;e!=a.height&&Wd(a,e)}function wd(a){a.parent=null,dd(a)}function xd(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?b[d]=c[2]:new RegExp("(?:^|s)"+c[2]+"(?:$|s)").test(b[d])||(b[d]+=" "+c[2])}return a}function yd(b,c){if(b.blankLine)return b.blankLine(c);if(b.innerMode){var d=a.innerMode(b,c);return d.mode.blankLine?d.mode.blankLine(d.state):void 0}}function zd(b,c,d,e){for(var f=0;10>f;f++){e&&(e[0]=a.innerMode(b,d).mode);var g=b.token(c,d);if(c.pos>c.start)return g}throw new Error("Mode "+b.name+" failed to advance stream.")}function Ad(a,b,c,d){function e(a){return{start:l.start,end:l.pos,string:l.current(),type:f||null,state:a?_f(g.mode,k):k}}var f,g=a.doc,h=g.mode;b=oa(g,b);var i,j=Td(g,b.line),k=Na(a,b.line,c),l=new gg(j.text,a.options.tabSize);for(d&&(i=[]);(d||l.pos<b.ch)&&!l.eol();)l.start=l.pos,f=zd(h,l,k),d&&i.push(e(!0));return d?i:e()}function Bd(a,b,c,d,e,f,g){var h=c.flattenSpans;null==h&&(h=a.options.flattenSpans);var i,j=0,k=null,l=new gg(b,a.options.tabSize),m=a.options.addModeClass&&[null];for(""==b&&xd(yd(c,d),f);!l.eol();){if(l.pos>a.options.maxHighlightLength?(h=!1,g&&Ed(a,b,d,l.pos),l.pos=b.length,i=null):i=xd(zd(c,l,d,m),f),m){var n=m[0].name;n&&(i="m-"+(i?n+" "+i:n))}if(!h||k!=i){for(;j<l.start;)j=Math.min(l.start,j+5e4),e(j,k);k=i}l.start=l.pos}for(;j<l.pos;){var o=Math.min(l.pos,j+5e4);e(o,k),j=o}}function Cd(a,b,c,d){var e=[a.state.modeGen],f={};Bd(a,b.text,a.doc.mode,c,function(a,b){e.push(a,b)},f,d);for(var g=0;g<a.state.overlays.length;++g){var h=a.state.overlays[g],i=1,j=0;Bd(a,b.text,h.mode,!0,function(a,b){for(var c=i;a>j;){var d=e[i];d>a&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;i>c;c+=2){var f=e[c+1];e[c+1]=(f?f+" ":"")+"cm-overlay "+b}},f)}return{styles:e,classes:f.bgClass||f.textClass?f:null}}function Dd(a,b,c){if(!b.styles||b.styles[0]!=a.state.modeGen){var d=Cd(a,b,b.stateAfter=Na(a,Xd(b)));b.styles=d.styles,d.classes?b.styleClasses=d.classes:b.styleClasses&&(b.styleClasses=null),c===a.doc.frontier&&a.doc.frontier++}return b.styles}function Ed(a,b,c,d){var e=a.doc.mode,f=new gg(b,a.options.tabSize);for(f.start=f.pos=d||0,""==b&&yd(e,c);!f.eol()&&f.pos<=a.options.maxHighlightLength;)zd(e,f,c),f.start=f.pos}function Fd(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?ng:mg;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function Gd(a,b){var c=Ke("span",null,null,nf?"padding-right: .1px":null),d={pre:Ke("pre",[c]),content:c,col:0,pos:0,cm:a,splitSpaces:(lf||nf)&&a.getOption("lineWrapping")};b.measure={};for(var e=0;e<=(b.rest?b.rest.length:0);e++){var f,g=e?b.rest[e-1]:b.line;d.pos=0,d.addToken=Id,Ue(a.display.measure)&&(f=$d(g))&&(d.addToken=Kd(d.addToken,f)),d.map=[];var h=b!=a.display.externalMeasured&&Xd(g);Md(g,d,Dd(a,g,h)),g.styleClasses&&(g.styleClasses.bgClass&&(d.bgClass=Pe(g.styleClasses.bgClass,d.bgClass||"")),g.styleClasses.textClass&&(d.textClass=Pe(g.styleClasses.textClass,d.textClass||""))),0==d.map.length&&d.map.push(0,0,d.content.appendChild(Te(a.display.measure))),0==e?(b.measure.map=d.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(d.map),(b.measure.caches||(b.measure.caches=[])).push({}))}return nf&&/\bcm-tab\b/.test(d.content.lastChild.className)&&(d.content.className="cm-tab-wrap-hack"),xg(a,"renderLine",a,b.line,d.pre),d.pre.className&&(d.textClass=Pe(d.pre.className,d.textClass||"")),d}function Hd(a){var b=Ke("span","•","cm-invalidchar");return b.title="\\u"+a.charCodeAt(0).toString(16),b.setAttribute("aria-label",b.title),b}function Id(a,b,c,d,e,f,g){if(b){var h=a.splitSpaces?b.replace(/ {3,}/g,Jd):b,i=a.cm.state.specialChars,j=!1;if(i.test(b))for(var k=document.createDocumentFragment(),l=0;;){i.lastIndex=l;var m=i.exec(b),n=m?m.index-l:b.length-l;if(n){var o=document.createTextNode(h.slice(l,l+n));k.appendChild(lf&&9>mf?Ke("span",[o]):o),a.map.push(a.pos,a.pos+n,o),a.col+=n,a.pos+=n}if(!m)break;if(l+=n+1," "==m[0]){var p=a.cm.options.tabSize,q=p-a.col%p,o=k.appendChild(Ke("span",ze(q),"cm-tab"));o.setAttribute("role","presentation"),o.setAttribute("cm-text"," "),a.col+=q}else{var o=a.cm.options.specialCharPlaceholder(m[0]);o.setAttribute("cm-text",m[0]),k.appendChild(lf&&9>mf?Ke("span",[o]):o),a.col+=1}a.map.push(a.pos,a.pos+1,o),a.pos++}else{a.col+=b.length;var k=document.createTextNode(h);a.map.push(a.pos,a.pos+b.length,k),lf&&9>mf&&(j=!0),a.pos+=b.length}if(c||d||e||j||g){var r=c||"";d&&(r+=d),e&&(r+=e);var s=Ke("span",[k],r,g);return f&&(s.title=f),a.content.appendChild(s)}a.content.appendChild(k)}}function Jd(a){for(var b=" ",c=0;c<a.length-2;++c)b+=c%2?" ":" ";return b+=" "}function Kd(a,b){return function(c,d,e,f,g,h,i){e=e?e+" cm-force-border":"cm-force-border";for(var j=c.pos,k=j+d.length;;){for(var l=0;l<b.length;l++){var m=b[l];if(m.to>j&&m.from<=j)break}if(m.to>=k)return a(c,d,e,f,g,h,i);a(c,d.slice(0,m.to-j),e,f,null,h,i),f=null,d=d.slice(m.to-j),j=m.to}}}function Ld(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e),!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id)),e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e)),a.pos+=b}function Md(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var g,h,i,j,k,l,m,n=e.length,o=0,p=1,q="",r=0;;){if(r==o){i=j=k=l=h="",m=null,r=1/0;for(var s=[],t=0;t<d.length;++t){var u=d[t],v=u.marker;"bookmark"==v.type&&u.from==o&&v.widgetNode?s.push(v):u.from<=o&&(null==u.to||u.to>o||v.collapsed&&u.to==o&&u.from==o)?(null!=u.to&&u.to!=o&&r>u.to&&(r=u.to,j=""),v.className&&(i+=" "+v.className),v.css&&(h=v.css),v.startStyle&&u.from==o&&(k+=" "+v.startStyle),v.endStyle&&u.to==r&&(j+=" "+v.endStyle),v.title&&!l&&(l=v.title),v.collapsed&&(!m||hd(m.marker,v)<0)&&(m=u)):u.from>o&&r>u.from&&(r=u.from)}if(m&&(m.from||0)==o){if(Ld(b,(null==m.to?n+1:m.to)-o,m.marker,null==m.from),null==m.to)return;m.to==o&&(m=!1)}if(!m&&s.length)for(var t=0;t<s.length;++t)Ld(b,0,s[t])}if(o>=n)break;for(var w=Math.min(n,r);;){if(q){var x=o+q.length;if(!m){var y=x>w?q.slice(0,w-o):q;b.addToken(b,y,g?g+i:i,k,o+y.length==r?j:"",l,h)}if(x>=w){q=q.slice(w-o),o=w;break}o=x,k=""}q=e.slice(f,f=c[p++]),g=Fd(c[p++],b.cm.options)}}else for(var p=1;p<c.length;p+=2)b.addToken(b,e.slice(f,f=c[p]),Fd(c[p+1],b.cm.options))}function Nd(a,b){return 0==b.from.ch&&0==b.to.ch&&""==Ae(b.text)&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function Od(a,b,c,d){function e(a){return c?c[a]:null}function f(a,c,e){vd(a,c,e,d),re(a,"change",a,b)}function g(a,b){for(var c=a,f=[];b>c;++c)f.push(new lg(j[c],e(c),d));return f}var h=b.from,i=b.to,j=b.text,k=Td(a,h.line),l=Td(a,i.line),m=Ae(j),n=e(j.length-1),o=i.line-h.line;if(b.full)a.insert(0,g(0,j.length)),a.remove(j.length,a.size-j.length);else if(Nd(a,b)){var p=g(0,j.length-1);f(l,l.text,n),o&&a.remove(h.line,o),p.length&&a.insert(h.line,p)}else if(k==l)if(1==j.length)f(k,k.text.slice(0,h.ch)+m+k.text.slice(i.ch),n);else{var p=g(1,j.length-1);p.push(new lg(m+k.text.slice(i.ch),n,d)),f(k,k.text.slice(0,h.ch)+j[0],e(0)),a.insert(h.line+1,p)}else if(1==j.length)f(k,k.text.slice(0,h.ch)+j[0]+l.text.slice(i.ch),e(0)),a.remove(h.line+1,o);else{f(k,k.text.slice(0,h.ch)+j[0],e(0)),f(l,m+l.text.slice(i.ch),n);var p=g(1,j.length-1);o>1&&a.remove(h.line+1,o-1),a.insert(h.line+1,p)}re(a,"change",a,b)}function Pd(a){this.lines=a,this.parent=null;for(var b=0,c=0;b<a.length;++b)a[b].parent=this,c+=a[b].height;this.height=c}function Qd(a){this.children=a;for(var b=0,c=0,d=0;d<a.length;++d){var e=a[d];b+=e.chunkSize(),c+=e.height,e.parent=this}this.size=b,this.height=c,this.parent=null}function Rd(a,b,c){function d(a,e,f){if(a.linked)for(var g=0;g<a.linked.length;++g){var h=a.linked[g];if(h.doc!=e){var i=f&&h.sharedHist;(!c||i)&&(b(h.doc,i),d(h.doc,a,i))}}}d(a,null,!0)}function Sd(a,b){if(b.cm)throw new Error("This document is already in use.");a.doc=b,b.cm=a,g(a),c(a),a.options.lineWrapping||m(a),a.options.mode=b.modeOption,Gb(a)}function Td(a,b){if(b-=a.first,0>b||b>=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(f>b){c=e;break}b-=f}return c.lines[b]}function Ud(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function Vd(a,b,c){var d=[];return a.iter(b,c,function(a){d.push(a.text)}),d}function Wd(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function Xd(a){if(null==a.parent)return null;for(var b=a.parent,c=Be(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function Yd(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],f=e.height;if(f>b){a=e;continue a}b-=f,c+=e.chunkSize()}return c}while(!a.lines);for(var d=0;d<a.lines.length;++d){var g=a.lines[d],h=g.height;if(h>b)break;b-=h}return c+d}function Zd(a){a=md(a);for(var b=0,c=a.parent,d=0;d<c.lines.length;++d){var e=c.lines[d];if(e==a)break;b+=e.height}for(var f=c.parent;f;c=f,f=c.parent)for(var d=0;d<f.children.length;++d){var g=f.children[d];if(g==c)break;b+=g.height}return b}function $d(a){var b=a.order;return null==b&&(b=a.order=Yg(a.text)),b}function _d(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ae(a,b){var c={from:V(b.from),to:Sf(b),text:Ud(a,b.from,b.to)};return he(a,c,b.from.line,b.to.line+1),Rd(a,function(a){he(a,c,b.from.line,b.to.line+1)},!0),c}function be(a){for(;a.length;){var b=Ae(a);if(!b.ranges)break;a.pop()}}function ce(a,b){return b?(be(a.done),Ae(a.done)):a.done.length&&!Ae(a.done).ranges?Ae(a.done):a.done.length>1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Ae(a.done)):void 0}function de(a,b,c,d){var e=a.history;e.undone.length=0;var f,g=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>g-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(f=ce(e,e.lastOp==d))){var h=Ae(f.changes);0==Ef(b.from,b.to)&&0==Ef(b.from,h.to)?h.to=Sf(b):f.changes.push(ae(a,b))}else{var i=Ae(e.done);for(i&&i.ranges||ge(a.sel,e.done),f={changes:[ae(a,b)],generation:e.generation},e.done.push(f);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=g,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||xg(a,"historyAdded")}function ee(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function fe(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||ee(a,f,Ae(e.done),b))?e.done[e.done.length-1]=b:ge(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&be(e.undone)}function ge(a,b){var c=Ae(b);c&&c.ranges&&c.equals(a)||b.push(a)}function he(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function ie(a){if(!a)return null;for(var b,c=0;c<a.length;++c)a[c].marker.explicitlyCleared?b||(b=a.slice(0,c)):b&&b.push(a[c]);return b?b.length?b:null:a}function je(a,b){var c=b["spans_"+a.id];if(!c)return null;for(var d=0,e=[];d<b.text.length;++d)e.push(ie(c[d]));return e}function ke(a,b,c){for(var d=0,e=[];d<a.length;++d){var f=a[d];if(f.ranges)e.push(c?ja.prototype.deepCopy.call(f):f);else{var g=f.changes,h=[];e.push({changes:h});for(var i=0;i<g.length;++i){var j,k=g[i];if(h.push({from:k.from,to:k.to,text:k.text}),b)for(var l in k)(j=l.match(/^spans_(\d+)$/))&&Be(b,Number(j[1]))>-1&&(Ae(h)[l]=k[l],delete k[l])}}}return e}function le(a,b,c,d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function me(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e],g=!0;if(f.ranges){f.copied||(f=a[e]=f.deepCopy(),f.copied=!0);for(var h=0;h<f.ranges.length;h++)le(f.ranges[h].anchor,b,c,d),le(f.ranges[h].head,b,c,d)}else{for(var h=0;h<f.changes.length;++h){var i=f.changes[h];if(c<i.from.line)i.from=Df(i.from.line+d,i.from.ch),i.to=Df(i.to.line+d,i.to.ch);else if(b<=i.to.line){g=!1;break}}g||(a.splice(0,e+1),e=0)}}}function ne(a,b){var c=b.from.line,d=b.to.line,e=b.text.length-(d-c)-1;me(a.done,c,d,e),me(a.undone,c,d,e)}function oe(a){return null!=a.defaultPrevented?a.defaultPrevented:0==a.returnValue}function pe(a){return a.target||a.srcElement}function qe(a){var b=a.which;return null==b&&(1&a.button?b=1:2&a.button?b=3:4&a.button&&(b=2)),wf&&a.ctrlKey&&1==b&&(b=3),b}function re(a,b){function c(a){return function(){a.apply(null,f)}}var d=a._handlers&&a._handlers[b];if(d){var e,f=Array.prototype.slice.call(arguments,2);Kf?e=Kf.delayedCallbacks:yg?e=yg:(e=yg=[],setTimeout(se,0));for(var g=0;g<d.length;++g)e.push(c(d[g]))}}function se(){var a=yg;yg=null;for(var b=0;b<a.length;++b)a[b]()}function te(a,b,c){return"string"==typeof b&&(b={type:b,preventDefault:function(){this.defaultPrevented=!0}}),xg(a,c||b.type,a,b),oe(b)||b.codemirrorIgnore}function ue(a){var b=a._handlers&&a._handlers.cursorActivity;if(b)for(var c=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),d=0;d<b.length;++d)-1==Be(c,b[d])&&c.push(b[d])}function ve(a,b){var c=a._handlers&&a._handlers[b];return c&&c.length>0}function we(a){a.prototype.on=function(a,b){vg(this,a,b)},a.prototype.off=function(a,b){wg(this,a,b)}}function xe(){this.id=null}function ye(a,b,c){for(var d=0,e=0;;){var f=a.indexOf(" ",d);-1==f&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function ze(a){for(;Fg.length<=a;)Fg.push(Ae(Fg)+" ");return Fg[a]}function Ae(a){return a[a.length-1]}function Be(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function Ce(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function De(){}function Ee(a,b){var c;return Object.create?c=Object.create(a):(De.prototype=a,c=new De),b&&Fe(b,c),c}function Fe(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||c===!1&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function Ge(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function He(a,b){return b?b.source.indexOf("\\w")>-1&&Jg(a)?!0:b.test(a):Jg(a)}function Ie(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Je(a){return a.charCodeAt(0)>=768&&Kg.test(a)}function Ke(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function Le(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild);return a}function Me(a,b){return Le(a).appendChild(b)}function Ne(){return document.activeElement}function Oe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function Pe(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!Oe(c[d]).test(b)&&(b+=" "+c[d]);return b}function Qe(a){if(document.body.getElementsByClassName)for(var b=document.body.getElementsByClassName("CodeMirror"),c=0;c<b.length;c++){var d=b[c].CodeMirror;d&&a(d)}}function Re(){Qg||(Se(),Qg=!0)}function Se(){var a;vg(window,"resize",function(){null==a&&(a=setTimeout(function(){a=null,Qe(Pb)},100))}),vg(window,"blur",function(){Qe(mc)})}function Te(a){if(null==Mg){var b=Ke("span","​");Me(a,Ke("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(Mg=b.offsetWidth<=1&&b.offsetHeight>2&&!(lf&&8>mf))}var c=Mg?Ke("span","​"):Ke("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}function Ue(a){if(null!=Ng)return Ng;var b=Me(a,document.createTextNode("AخA")),c=Hg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Hg(b,1,2).getBoundingClientRect();return Ng=d.right-c.right<3}function Ve(a){if(null!=Vg)return Vg;var b=Me(a,Ke("span","x")),c=b.getBoundingClientRect(),d=Hg(b,0,1).getBoundingClientRect();return Vg=Math.abs(c.left-d.left)>1}function We(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;f<a.length;++f){var g=a[f];(g.from<c&&g.to>b||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function Xe(a){return a.level%2?a.to:a.from}function Ye(a){return a.level%2?a.from:a.to}function Ze(a){var b=$d(a);return b?Xe(b[0]):0}function $e(a){var b=$d(a);return b?Ye(Ae(b)):a.text.length}function _e(a,b){var c=Td(a.doc,b),d=md(c);d!=c&&(b=Xd(d));var e=$d(d),f=e?e[0].level%2?$e(d):Ze(d):0;return Df(b,f)}function af(a,b){for(var c,d=Td(a.doc,b);c=kd(d);)d=c.find(1,!0).line,b=null;var e=$d(d),f=e?e[0].level%2?Ze(d):$e(d):d.text.length;return Df(null==b?Xd(d):b,f)}function bf(a,b){var c=_e(a,b.line),d=Td(a.doc,c.line),e=$d(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return Df(c.line,g?0:f)}return c}function cf(a,b,c){var d=a[0].level;return b==d?!0:c==d?!1:c>b}function df(a,b){Xg=null;for(var c,d=0;d<a.length;++d){var e=a[d];if(e.from<b&&e.to>b)return d;if(e.from==b||e.to==b){if(null!=c)return cf(a,e.level,a[c].level)?(e.from!=e.to&&(Xg=c),d):(e.from!=e.to&&(Xg=d),c);c=d}}return c}function ef(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Je(a.text.charAt(b)));return b}function ff(a,b,c,d){var e=$d(a);if(!e)return gf(a,b,c,d);for(var f=df(e,b),g=e[f],h=ef(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h<g.to)return h;if(h==g.from||h==g.to)return df(e,h)==f?h:(g=e[f+=c],c>0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?ef(a,g.to,-1,d):ef(a,g.from,1,d)}}function gf(a,b,c,d){var e=b+c;if(d)for(;e>0&&Je(a.text.charAt(e));)e+=c;return 0>e||e>a.text.length?null:e}var hf=/gecko\/\d/i.test(navigator.userAgent),jf=/MSIE \d/.test(navigator.userAgent),kf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),lf=jf||kf,mf=lf&&(jf?document.documentMode||6:kf[1]),nf=/WebKit\//.test(navigator.userAgent),of=nf&&/Qt\/\d+\.\d+/.test(navigator.userAgent),pf=/Chrome\//.test(navigator.userAgent),qf=/Opera\//.test(navigator.userAgent),rf=/Apple Computer/.test(navigator.vendor),sf=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),tf=/PhantomJS/.test(navigator.userAgent),uf=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),vf=uf||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),wf=uf||/Mac/.test(navigator.platform),xf=/win/i.test(navigator.platform),yf=qf&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);yf&&(yf=Number(yf[1])),yf&&yf>=15&&(qf=!1,nf=!0);var zf=wf&&(of||qf&&(null==yf||12.11>yf)),Af=hf||lf&&mf>=9,Bf=!1,Cf=!1;p.prototype=Fe({update:function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px";var f=a.viewWidth-a.barLeft-(c?d:0);this.horiz.firstChild.style.width=a.scrollWidth-a.clientWidth+f+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&a.clientHeight>0&&(0==d&&this.overlayHack(),this.checkedOverlay=!0),{right:c?d:0,bottom:b?d:0}},setScrollLeft:function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a)},setScrollTop:function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a)},overlayHack:function(){var a=wf&&!sf?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=a;var b=this,c=function(a){pe(a)!=b.vert&&pe(a)!=b.horiz&&Bb(b.cm,Sb)(a)};vg(this.vert,"mousedown",c),vg(this.horiz,"mousedown",c)},clear:function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)}},p.prototype),q.prototype=Fe({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},q.prototype),a.scrollbarModel={"native":p,"null":q},z.prototype.signal=function(a,b){ve(a,b)&&this.events.push(arguments)},z.prototype.finish=function(){for(var a=0;a<this.events.length;a++)xg.apply(null,this.events[a])};var Df=a.Pos=function(a,b){return this instanceof Df?(this.line=a,void(this.ch=b)):new Df(a,b)},Ef=a.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch},Ff=null;ba.prototype=Fe({init:function(a){function b(a){if(d.somethingSelected())Ff=d.getSelections(),c.inaccurateSelection&&(c.prevInput="",c.inaccurateSelection=!1,f.value=Ff.join("\n"),Gg(f));else{if(!d.options.lineWiseCopyCut)return;var b=_(d);Ff=b.text,"cut"==a.type?d.setSelections(b.ranges,null,Bg):(c.prevInput="",f.value=b.text.join("\n"),Gg(f))}"cut"==a.type&&(d.state.cutIncoming=!0)}var c=this,d=this.cm,e=this.wrapper=ca(),f=this.textarea=e.firstChild;a.wrapper.insertBefore(e,a.wrapper.firstChild),uf&&(f.style.width="0px"),vg(f,"input",function(){lf&&mf>=9&&c.hasSelection&&(c.hasSelection=null),c.poll()}),vg(f,"paste",function(){if(nf&&!d.state.fakedLastChar&&!(new Date-d.state.lastMiddleDown<200)){var a=f.selectionStart,b=f.selectionEnd;f.value+="$",f.selectionEnd=b,f.selectionStart=a,d.state.fakedLastChar=!0}d.state.pasteIncoming=!0,c.fastPoll()}),vg(f,"cut",b),vg(f,"copy",b),vg(a.scroller,"paste",function(b){Qb(a,b)||(d.state.pasteIncoming=!0,c.focus())}),vg(a.lineSpace,"selectstart",function(b){Qb(a,b)||sg(b)}),vg(f,"compositionstart",function(){var a=d.getCursor("from");c.composing={start:a,range:d.markText(a,d.getCursor("to"),{className:"CodeMirror-composing"})}}),vg(f,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},prepareSelection:function(){var a=this.cm,b=a.display,c=a.doc,d=Ga(a);if(a.options.moveInputWithCursor){var e=kb(a,c.sel.primary().head,"div"),f=b.wrapper.getBoundingClientRect(),g=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,e.top+g.top-f.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,e.left+g.left-f.left))}return d},showSelection:function(a){var b=this.cm,c=b.display;Me(c.cursorDiv,a.cursors),Me(c.selectionDiv,a.selection),null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},reset:function(a){if(!this.contextMenuPending){var b,c,d=this.cm,e=d.doc;if(d.somethingSelected()){this.prevInput="";var f=e.sel.primary();b=Ug&&(f.to().line-f.from().line>100||(c=d.getSelection()).length>1e3);var g=b?"-":c||d.getSelection();this.textarea.value=g,d.state.focused&&Gg(this.textarea),lf&&mf>=9&&(this.hasSelection=g)}else a||(this.prevInput=this.textarea.value="",lf&&mf>=9&&(this.hasSelection=null));this.inaccurateSelection=b}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!vf||Ne()!=this.textarea))try{this.textarea.focus()}catch(a){}},blur:function(){this.textarea.blur()},resetPosition:function(){
4
+ this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var a=this;a.pollingFast||a.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},fastPoll:function(){function a(){var d=c.poll();d||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0,c.polling.set(20,a)},poll:function(){var a=this.cm,b=this.textarea,c=this.prevInput;if(!a.state.focused||Tg(b)&&!c||Z(a)||a.options.disableInput||a.state.keySeq)return!1;a.state.pasteIncoming&&a.state.fakedLastChar&&(b.value=b.value.substring(0,b.value.length-1),a.state.fakedLastChar=!1);var d=b.value;if(d==c&&!a.somethingSelected())return!1;if(lf&&mf>=9&&this.hasSelection===d||wf&&/[\uf700-\uf7ff]/.test(d))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var e=d.charCodeAt(0);if(8203!=e||c||(c="​"),8666==e)return this.reset(),this.cm.execCommand("undo")}for(var f=0,g=Math.min(c.length,d.length);g>f&&c.charCodeAt(f)==d.charCodeAt(f);)++f;var h=this;return Ab(a,function(){$(a,d.slice(f),c.length-f,null,h.composing?"*compose":null),d.length>1e3||d.indexOf("\n")>-1?b.value=h.prevInput="":h.prevInput=d,h.composing&&(h.composing.range.clear(),h.composing.range=a.markText(h.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){lf&&mf>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="​"+(a?g.value:"");g.value="⇚",g.value=b,d.prevInput=a?"":"​",g.selectionStart=1,g.selectionEnd=b.length,f.selForContextMenu=e.doc.sel}}function c(){if(d.contextMenuPending=!1,d.wrapper.style.position="relative",g.style.cssText=k,lf&&9>mf&&f.scrollbars.setScrollTop(f.scroller.scrollTop=i),null!=g.selectionStart){(!lf||lf&&9>mf)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&g.selectionEnd>0&&"​"==d.prevInput?Bb(e,bg.selectAll)(e):a++<10?f.detectingSelectAll=setTimeout(c,500):f.input.reset()};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=Rb(e,a),i=f.scroller.scrollTop;if(h&&!qf){var j=e.options.resetSelectionOnContextMenu;j&&-1==e.doc.sel.contains(h)&&Bb(e,za)(e.doc,ma(h),Bg);var k=g.style.cssText;if(d.wrapper.style.position="absolute",g.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(a.clientY-5)+"px; left: "+(a.clientX-5)+"px; z-index: 1000; background: "+(lf?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",nf)var l=window.scrollY;if(f.input.focus(),nf&&window.scrollTo(null,l),f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPending=!0,f.selForContextMenu=e.doc.sel,clearTimeout(f.detectingSelectAll),lf&&mf>=9&&b(),Af){ug(a);var m=function(){wg(window,"mouseup",m),setTimeout(c,20)};vg(window,"mouseup",m)}else setTimeout(c,50)}},setUneditable:De,needsContentAttribute:!1},ba.prototype),da.prototype=Fe({init:function(a){function b(a){if(d.somethingSelected())Ff=d.getSelections(),"cut"==a.type&&d.replaceSelection("",null,"cut");else{if(!d.options.lineWiseCopyCut)return;var b=_(d);Ff=b.text,"cut"==a.type&&d.operation(function(){d.setSelections(b.ranges,0,Bg),d.replaceSelection("",null,"cut")})}if(a.clipboardData&&!uf)a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData("text/plain",Ff.join("\n"));else{var c=ca(),e=c.firstChild;d.display.lineSpace.insertBefore(c,d.display.lineSpace.firstChild),e.value=Ff.join("\n");var f=document.activeElement;Gg(e),setTimeout(function(){d.display.lineSpace.removeChild(c),f.focus()},50)}}var c=this,d=c.cm,e=c.div=a.lineDiv;e.contentEditable="true",aa(e),vg(e,"paste",function(a){var b=a.clipboardData&&a.clipboardData.getData("text/plain");b&&(a.preventDefault(),d.replaceSelection(b,null,"paste"))}),vg(e,"compositionstart",function(a){var b=a.data;if(c.composing={sel:d.doc.sel,data:b,startData:b},b){var e=d.doc.sel.primary(),f=d.getLine(e.head.line),g=f.indexOf(b,Math.max(0,e.head.ch-b.length));g>-1&&g<=e.head.ch&&(c.composing.sel=ma(Df(e.head.line,g),Df(e.head.line,g+b.length)))}}),vg(e,"compositionupdate",function(a){c.composing.data=a.data}),vg(e,"compositionend",function(a){var b=c.composing;b&&(a.data==b.startData||/\u200b/.test(a.data)||(b.data=a.data),setTimeout(function(){b.handled||c.applyComposition(b),c.composing==b&&(c.composing=null)},50))}),vg(e,"touchstart",function(){c.forceCompositionEnd()}),vg(e,"input",function(){c.composing||c.pollContent()||Ab(c.cm,function(){Gb(d)})}),vg(e,"copy",b),vg(e,"cut",b)},prepareSelection:function(){var a=Ga(this.cm,!1);return a.focus=this.cm.state.focused,a},showSelection:function(a){a&&this.cm.display.view.length&&(a.focus&&this.showPrimarySelection(),this.showMultipleSelections(a))},showPrimarySelection:function(){var a=window.getSelection(),b=this.cm.doc.sel.primary(),c=ga(this.cm,a.anchorNode,a.anchorOffset),d=ga(this.cm,a.focusNode,a.focusOffset);if(!c||c.bad||!d||d.bad||0!=Ef(X(c,d),b.from())||0!=Ef(W(c,d),b.to())){var e=ea(this.cm,b.from()),f=ea(this.cm,b.to());if(e||f){var g=this.cm.display.view,h=a.rangeCount&&a.getRangeAt(0);if(e){if(!f){var i=g[g.length-1].measure,j=i.maps?i.maps[i.maps.length-1]:i.map;f={node:j[j.length-1],offset:j[j.length-2]-j[j.length-3]}}}else e={node:g[0].measure.map[2],offset:0};try{var k=Hg(e.node,e.offset,f.offset,f.node)}catch(l){}k&&(a.removeAllRanges(),a.addRange(k),h&&null==a.anchorNode?a.addRange(h):hf&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){a.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(a){Me(this.cm.display.cursorDiv,a.cursors),Me(this.cm.display.selectionDiv,a.selection)},rememberSelection:function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},selectionInEditor:function(){var a=window.getSelection();if(!a.rangeCount)return!1;var b=a.getRangeAt(0).commonAncestorContainer;return Lg(this.div,b)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():Ab(this.cm,function(){b.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,a)},selectionChanged:function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var a=window.getSelection(),b=this.cm;this.rememberSelection();var c=ga(b,a.anchorNode,a.anchorOffset),d=ga(b,a.focusNode,a.focusOffset);c&&d&&Ab(b,function(){za(b.doc,ma(c,d),Bg),(c.bad||d.bad)&&(b.curOp.selectionChanged=!0)})}},pollContent:function(){var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),e=c.to();if(d.line<b.viewFrom||e.line>b.viewTo-1)return!1;var f;if(d.line==b.viewFrom||0==(f=Jb(a,d.line)))var g=Xd(b.view[0].line),h=b.view[0].node;else var g=Xd(b.view[f].line),h=b.view[f-1].node.nextSibling;var i=Jb(a,e.line);if(i==b.view.length-1)var j=b.viewTo-1,k=b.view[i].node;else var j=Xd(b.view[i+1].line)-1,k=b.view[i+1].node.previousSibling;for(var l=Sg(ia(a,h,k,g,j)),m=Ud(a.doc,Df(g,0),Df(j,Td(a.doc,j).text.length));l.length>1&&m.length>1;)if(Ae(l)==Ae(m))l.pop(),m.pop(),j--;else{if(l[0]!=m[0])break;l.shift(),m.shift(),g++}for(var n=0,o=0,p=l[0],q=m[0],r=Math.min(p.length,q.length);r>n&&p.charCodeAt(n)==q.charCodeAt(n);)++n;for(var s=Ae(l),t=Ae(m),u=Math.min(s.length-(1==l.length?n:0),t.length-(1==m.length?n:0));u>o&&s.charCodeAt(s.length-o-1)==t.charCodeAt(t.length-o-1);)++o;l[l.length-1]=s.slice(0,s.length-o),l[0]=l[0].slice(n);var v=Df(g,n),w=Df(j,m.length?Ae(m).length-o:0);return l.length>1||l[0]||Ef(v,w)?(Ac(a.doc,l,v,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(a){a.data&&a.data!=a.startData&&Bb(this.cm,$)(this.cm,a.data,0,a.sel)},setUneditable:function(a){a.setAttribute("contenteditable","false")},onKeyPress:function(a){a.preventDefault(),Bb(this.cm,$)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0)},onContextMenu:De,resetPosition:De,needsContentAttribute:!0},da.prototype),a.inputStyles={textarea:ba,contenteditable:da},ja.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var c=this.ranges[b],d=a.ranges[b];if(0!=Ef(c.anchor,d.anchor)||0!=Ef(c.head,d.head))return!1}return!0},deepCopy:function(){for(var a=[],b=0;b<this.ranges.length;b++)a[b]=new ka(V(this.ranges[b].anchor),V(this.ranges[b].head));return new ja(a,this.primIndex)},somethingSelected:function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},contains:function(a,b){b||(b=a);for(var c=0;c<this.ranges.length;c++){var d=this.ranges[c];if(Ef(b,d.from())>=0&&Ef(a,d.to())<=0)return c}return-1}},ka.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return W(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Gf,Hf,If,Jf={left:0,right:0,top:0,bottom:0},Kf=null,Lf=0,Mf=0,Nf=0,Of=null;lf?Of=-.53:hf?Of=15:pf?Of=-.7:rf&&(Of=-1/3);var Pf=function(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;return null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail),null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta),{x:b,y:c}};a.wheelEventPixels=function(a){var b=Pf(a);return b.x*=Of,b.y*=Of,b};var Qf=new xe,Rf=null,Sf=a.changeEnd=function(a){return a.text?Df(a.from.line+a.text.length-1,Ae(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,b){var c=this.options,d=c[a];(c[a]!=b||"mode"==a)&&(c[a]=b,Uf.hasOwnProperty(a)&&Bb(this,Uf[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](Pc(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(b[c]==a||b[c].name==a)return b.splice(c,1),!0},addOverlay:Cb(function(b,c){var d=b.token?b:a.getMode(this.options,b);if(d.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:d,modeSpec:b,opaque:c&&c.opaque}),this.state.modeGen++,Gb(this)}),removeOverlay:Cb(function(a){for(var b=this.state.overlays,c=0;c<b.length;++c){var d=b[c].modeSpec;if(d==a||"string"==typeof a&&d.name==a)return b.splice(c,1),this.state.modeGen++,void Gb(this)}}),indentLine:Cb(function(a,b,c){"string"!=typeof b&&"number"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract"),qa(this.doc,a)&&Ic(this,a,b,c)}),indentSelection:Cb(function(a){for(var b=this.doc.sel.ranges,c=-1,d=0;d<b.length;d++){var e=b[d];if(e.empty())e.head.line>c&&(Ic(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&Gc(this));else{var f=e.from(),g=e.to(),h=Math.max(c,f.line);c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var i=h;c>i;++i)Ic(this,i,a);var j=this.doc.sel.ranges;0==f.ch&&b.length==j.length&&j[d].from().ch>0&&va(this.doc,d,new ka(f,j[d].to()),Bg)}}}),getTokenAt:function(a,b){return Ad(this,a,b)},getLineTokens:function(a,b){return Ad(this,Df(a),b,!0)},getTokenTypeAt:function(a){a=oa(this.doc,a);var b,c=Dd(this,Td(this.doc,a.line)),d=0,e=(c.length-1)/2,f=a.ch;if(0==f)b=c[2];else for(;;){var g=d+e>>1;if((g?c[2*g-1]:0)>=f)e=g;else{if(!(c[2*g+1]<f)){b=c[2*g+2];break}d=g+1}}var h=b?b.indexOf("cm-overlay "):-1;return 0>h?b:0==h?null:b.slice(0,h-1)},getModeAt:function(b){var c=this.doc.mode;return c.innerMode?a.innerMode(c,this.getTokenAt(b).state).mode:c},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,b){var c=[];if(!$f.hasOwnProperty(b))return c;var d=$f[b],e=this.getModeAt(a);if("string"==typeof e[b])d[e[b]]&&c.push(d[e[b]]);else if(e[b])for(var f=0;f<e[b].length;f++){var g=d[e[b][f]];g&&c.push(g)}else e.helperType&&d[e.helperType]?c.push(d[e.helperType]):d[e.name]&&c.push(d[e.name]);for(var f=0;f<d._global.length;f++){var h=d._global[f];h.pred(e,this)&&-1==Be(c,h.val)&&c.push(h.val)}return c},getStateAfter:function(a,b){var c=this.doc;return a=na(c,null==a?c.first+c.size-1:a),Na(this,a+1,b)},cursorCoords:function(a,b){var c,d=this.doc.sel.primary();return c=null==a?d.head:"object"==typeof a?oa(this.doc,a):a?d.from():d.to(),kb(this,c,b||"page")},charCoords:function(a,b){return jb(this,oa(this.doc,a),b||"page")},coordsChar:function(a,b){return a=ib(this,a,b||"page"),nb(this,a.left,a.top)},lineAtHeight:function(a,b){return a=ib(this,{top:a,left:0},b||"page").top,Yd(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,b){var c,d=!1;if("number"==typeof a){var e=this.doc.first+this.doc.size-1;a<this.doc.first?a=this.doc.first:a>e&&(a=e,d=!0),c=Td(this.doc,a)}else c=a;return hb(this,c,{top:0,left:0},b||"page").top+(d?this.doc.height-Zd(c):0)},defaultTextHeight:function(){return pb(this.display)},defaultCharWidth:function(){return qb(this.display)},setGutterMarker:Cb(function(a,b,c){return Jc(this.doc,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Ie(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Cb(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Hb(b,d,"gutter"),Ie(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),lineInfo:function(a){if("number"==typeof a){if(!qa(this.doc,a))return null;var b=a;if(a=Td(this.doc,a),!a)return null}else{var b=Xd(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=kb(this,oa(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",b.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(b),f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Dc(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Cb(gc),triggerOnKeyPress:Cb(jc),triggerOnKeyUp:ic,execCommand:function(a){return bg.hasOwnProperty(a)?bg[a](this):void 0},findPosH:function(a,b,c,d){var e=1;0>b&&(e=-1,b=-b);for(var f=0,g=oa(this.doc,a);b>f&&(g=Lc(this.doc,g,e,c,d),!g.hitSide);++f);return g},moveH:Cb(function(a,b){var c=this;c.extendSelectionsBy(function(d){return c.display.shift||c.doc.extend||d.empty()?Lc(c.doc,d.head,a,b,c.options.rtlMoveVisually):0>a?d.from():d.to()},Dg)}),deleteH:Cb(function(a,b){var c=this.doc.sel,d=this.doc;c.somethingSelected()?d.replaceSelection("",null,"+delete"):Kc(this,function(c){var e=Lc(d,c.head,a,b,!1);return 0>a?{from:e,to:c.head}:{from:c.head,to:e}})}),findPosV:function(a,b,c,d){var e=1,f=d;0>b&&(e=-1,b=-b);for(var g=0,h=oa(this.doc,a);b>g;++g){var i=kb(this,h,"div");if(null==f?f=i.left:i.left=f,h=Mc(this,i,e,c),h.hitSide)break}return h},moveV:Cb(function(a,b){var c=this,d=this.doc,e=[],f=!c.display.shift&&!d.extend&&d.sel.somethingSelected();if(d.extendSelectionsBy(function(g){if(f)return 0>a?g.from():g.to();var h=kb(c,g.head,"div");null!=g.goalColumn&&(h.left=g.goalColumn),e.push(h.left);var i=Mc(c,h,a,b);return"page"==b&&g==d.sel.primary()&&Fc(c,null,jb(c,i,"div").top-h.top),i},Dg),e.length)for(var g=0;g<d.sel.ranges.length;g++)d.sel.ranges[g].goalColumn=e[g]}),findWordAt:function(a){var b=this.doc,c=Td(b,a.line).text,d=a.ch,e=a.ch;if(c){var f=this.getHelper(a,"wordChars");(a.xRel<0||e==c.length)&&d?--d:++e;for(var g=c.charAt(d),h=He(g,f)?function(a){return He(a,f)}:/\s/.test(g)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!He(a)};d>0&&h(c.charAt(d-1));)--d;for(;e<c.length&&h(c.charAt(e));)++e}return new ka(Df(a.line,d),Df(a.line,e))},toggleOverwrite:function(a){(null==a||a!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?Pg(this.display.cursorDiv,"CodeMirror-overwrite"):Og(this.display.cursorDiv,"CodeMirror-overwrite"),xg(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ne()},scrollTo:Cb(function(a,b){(null!=a||null!=b)&&Hc(this),null!=a&&(this.curOp.scrollLeft=a),null!=b&&(this.curOp.scrollTop=b)}),getScrollInfo:function(){var a=this.display.scroller;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-Ra(this)-this.display.barHeight,width:a.scrollWidth-Ra(this)-this.display.barWidth,clientHeight:Ta(this),clientWidth:Sa(this)}},scrollIntoView:Cb(function(a,b){if(null==a?(a={from:this.doc.sel.primary().head,to:null},null==b&&(b=this.options.cursorScrollMargin)):"number"==typeof a?a={from:Df(a,0),to:null}:null==a.from&&(a={from:a,to:null}),a.to||(a.to=a.from),a.margin=b||0,null!=a.from.line)Hc(this),this.curOp.scrollToPos=a;else{var c=Ec(this,Math.min(a.from.left,a.to.left),Math.min(a.from.top,a.to.top)-a.margin,Math.max(a.from.right,a.to.right),Math.max(a.from.bottom,a.to.bottom)+a.margin);this.scrollTo(c.scrollLeft,c.scrollTop)}}),setSize:Cb(function(a,b){function c(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a}var d=this;null!=a&&(d.display.wrapper.style.width=c(a)),null!=b&&(d.display.wrapper.style.height=c(b)),d.options.lineWrapping&&db(this);var e=d.display.viewFrom;d.doc.iter(e,d.display.viewTo,function(a){if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(a.widgets[b].noHScroll){Hb(d,e,"widget");break}++e}),d.curOp.forceUpdate=!0,xg(d,"refresh",this)}),operation:function(a){return Ab(this,a)},refresh:Cb(function(){var a=this.display.cachedTextHeight;Gb(this),this.curOp.forceUpdate=!0,eb(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),k(this),(null==a||Math.abs(a-pb(this.display))>.5)&&g(this),xg(this,"refresh",this)}),swapDoc:Cb(function(a){var b=this.doc;return b.cm=null,Sd(this,a),eb(this),this.display.input.reset(),this.scrollTo(a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,re(this,"swapDoc",this,b),b}),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(a);var Tf=a.defaults={},Uf=a.optionHandlers={},Vf=a.Init={toString:function(){return"CodeMirror.Init"}};Nc("value","",function(a,b){a.setValue(b)},!0),Nc("mode",null,function(a,b){a.doc.modeOption=b,c(a)},!0),Nc("indentUnit",2,c,!0),Nc("indentWithTabs",!1),Nc("smartIndent",!0),Nc("tabSize",4,function(a){d(a),eb(a),Gb(a)},!0),Nc("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(b,c,d){b.state.specialChars=new RegExp(c.source+(c.test(" ")?"":"| "),"g"),d!=a.Init&&b.refresh()}),Nc("specialCharPlaceholder",Hd,function(a){a.refresh()},!0),Nc("electricChars",!0),Nc("inputStyle",vf?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Nc("rtlMoveVisually",!xf),Nc("wholeLineUpdateBefore",!0),Nc("theme","default",function(a){h(a),i(a)},!0),Nc("keyMap","default",function(b,c,d){var e=Pc(c),f=d!=a.Init&&Pc(d);f&&f.detach&&f.detach(b,e),e.attach&&e.attach(b,f||null)}),Nc("extraKeys",null),Nc("lineWrapping",!1,e,!0),Nc("gutters",[],function(a){n(a.options),i(a)},!0),Nc("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?y(a.display)+"px":"0",a.refresh()},!0),Nc("coverGutterNextToScrollbar",!1,function(a){s(a)},!0),Nc("scrollbarStyle","native",function(a){r(a),s(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),Nc("lineNumbers",!1,function(a){n(a.options),i(a)},!0),Nc("firstLineNumber",1,i,!0),Nc("lineNumberFormatter",function(a){return a},i,!0),Nc("showCursorWhenSelecting",!1,Fa,!0),Nc("resetSelectionOnContextMenu",!0),Nc("lineWiseCopyCut",!0),Nc("readOnly",!1,function(a,b){"nocursor"==b?(mc(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||a.display.input.reset())}),Nc("disableInput",!1,function(a,b){b||a.display.input.reset()},!0),Nc("dragDrop",!0,Ob),Nc("cursorBlinkRate",530),Nc("cursorScrollMargin",0),Nc("cursorHeight",1,Fa,!0),Nc("singleCursorHeightPerLine",!0,Fa,!0),Nc("workTime",100),Nc("workDelay",100),Nc("flattenSpans",!0,d,!0),Nc("addModeClass",!1,d,!0),Nc("pollInterval",100),Nc("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),Nc("historyEventDelay",1250),Nc("viewportMargin",10,function(a){a.refresh()},!0),Nc("maxHighlightLength",1e4,d,!0),Nc("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()}),Nc("tabindex",null,function(a,b){a.display.input.getField().tabIndex=b||""}),Nc("autofocus",null);var Wf=a.modes={},Xf=a.mimeModes={};a.defineMode=function(b,c){a.defaults.mode||"null"==b||(a.defaults.mode=b),arguments.length>2&&(c.dependencies=Array.prototype.slice.call(arguments,2)),Wf[b]=c},a.defineMIME=function(a,b){Xf[a]=b},a.resolveMode=function(b){if("string"==typeof b&&Xf.hasOwnProperty(b))b=Xf[b];else if(b&&"string"==typeof b.name&&Xf.hasOwnProperty(b.name)){var c=Xf[b.name];"string"==typeof c&&(c={name:c}),b=Ee(c,b),b.name=c.name}else if("string"==typeof b&&/^[\w\-]+\/[\w\-]+\+xml$/.test(b))return a.resolveMode("application/xml");return"string"==typeof b?{name:b}:b||{name:"null"}},a.getMode=function(b,c){var c=a.resolveMode(c),d=Wf[c.name];if(!d)return a.getMode(b,"text/plain");var e=d(b,c);if(Yf.hasOwnProperty(c.name)){var f=Yf[c.name];for(var g in f)f.hasOwnProperty(g)&&(e.hasOwnProperty(g)&&(e["_"+g]=e[g]),e[g]=f[g])}if(e.name=c.name,c.helperType&&(e.helperType=c.helperType),c.modeProps)for(var g in c.modeProps)e[g]=c.modeProps[g];return e},a.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),a.defineMIME("text/plain","null");var Yf=a.modeExtensions={};a.extendMode=function(a,b){var c=Yf.hasOwnProperty(a)?Yf[a]:Yf[a]={};Fe(b,c)},a.defineExtension=function(b,c){a.prototype[b]=c},a.defineDocExtension=function(a,b){pg.prototype[a]=b},a.defineOption=Nc;var Zf=[];a.defineInitHook=function(a){Zf.push(a)};var $f=a.helpers={};a.registerHelper=function(b,c,d){$f.hasOwnProperty(b)||($f[b]=a[b]={_global:[]}),$f[b][c]=d},a.registerGlobalHelper=function(b,c,d,e){a.registerHelper(b,c,e),$f[b]._global.push({pred:d,val:e})};var _f=a.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},ag=a.startState=function(a,b,c){return a.startState?a.startState(b,c):!0};a.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var bg=a.commands={selectAll:function(a){a.setSelection(Df(a.firstLine(),0),Df(a.lastLine()),Bg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Bg)},killLine:function(a){Kc(a,function(b){if(b.empty()){var c=Td(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:Df(b.head.line+1,0)}:{from:b.head,to:Df(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){Kc(a,function(b){return{from:Df(b.from().line,0),to:oa(a.doc,Df(b.to().line+1,0))}})},delLineLeft:function(a){Kc(a,function(a){return{from:Df(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(a){Kc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return{from:d,to:b.from()}})},delWrappedLineRight:function(a){Kc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div");return{from:b.from(),to:d}})},undo:function(a){a.undo()},redo:function(a){a.redo()},undoSelection:function(a){a.undoSelection()},redoSelection:function(a){a.redoSelection()},goDocStart:function(a){a.extendSelection(Df(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(Df(a.lastLine()))},goLineStart:function(a){a.extendSelectionsBy(function(b){return _e(a,b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){a.extendSelectionsBy(function(b){return bf(a,b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){a.extendSelectionsBy(function(b){return af(a,b.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div")},Dg)},goLineLeft:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:c},"div")},Dg)},goLineLeftSmart:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return d.ch<a.getLine(d.line).search(/\S/)?bf(a,b.head):d},Dg)},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,"char")},goColumnLeft:function(a){a.moveH(-1,"column")},goColumnRight:function(a){a.moveH(1,"column")},goWordLeft:function(a){a.moveH(-1,"word")},goGroupRight:function(a){a.moveH(1,"group")},goGroupLeft:function(a){a.moveH(-1,"group")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},delGroupBefore:function(a){a.deleteH(-1,"group")},delGroupAfter:function(a){a.deleteH(1,"group")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection(" ")},insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var f=c[e].from(),g=Eg(a.getLine(f.line),f.ch,d);b.push(new Array(d-g%d+1).join(" "))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){Ab(a,function(){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d].head,f=Td(a.doc,e.line).text;if(f)if(e.ch==f.length&&(e=new Df(e.line,e.ch-1)),e.ch>0)e=new Df(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),Df(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=Td(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+"\n"+g.charAt(g.length-1),Df(e.line-1,g.length-1),Df(e.line,1),"+transpose")}c.push(new ka(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){Ab(a,function(){for(var b=a.listSelections().length,c=0;b>c;c++){var d=a.listSelections()[c];a.replaceRange("\n",d.anchor,d.head,"+input"),a.indentLine(d.from().line+1,null,!0),Gc(a)}})},toggleOverwrite:function(a){a.toggleOverwrite()}},cg=a.keyMap={};cg.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"},cg.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"},cg.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},cg.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"]},cg["default"]=wf?cg.macDefault:cg.pcDefault,a.normalizeKeyMap=function(a){var b={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];if(/^(name|fallthrough|(de|at)tach)$/.test(c))continue;if("..."==d){delete a[c];continue}for(var e=Ce(c.split(" "),Oc),f=0;f<e.length;f++){var g,h;f==e.length-1?(h=c,g=d):(h=e.slice(0,f+1).join(" "),g="...");var i=b[h];if(i){if(i!=g)throw new Error("Inconsistent bindings for "+h)}else b[h]=g}delete a[c]}for(var j in b)a[j]=b[j];return a};var dg=a.lookupKey=function(a,b,c,d){b=Pc(b);var e=b.call?b.call(a,d):b[a];if(e===!1)return"nothing";if("..."===e)return"multi";if(null!=e&&c(e))return"handled";if(b.fallthrough){if("[object Array]"!=Object.prototype.toString.call(b.fallthrough))return dg(a,b.fallthrough,c,d);for(var f=0;f<b.fallthrough.length;f++){var g=dg(a,b.fallthrough[f],c,d);if(g)return g}}},eg=a.isModifierKey=function(a){var b="string"==typeof a?a:Wg[a.keyCode];return"Ctrl"==b||"Alt"==b||"Shift"==b||"Mod"==b},fg=a.keyName=function(a,b){if(qf&&34==a.keyCode&&a["char"])return!1;var c=Wg[a.keyCode],d=c;return null==d||a.altGraphKey?!1:(a.altKey&&"Alt"!=c&&(d="Alt-"+d),(zf?a.metaKey:a.ctrlKey)&&"Ctrl"!=c&&(d="Ctrl-"+d),(zf?a.ctrlKey:a.metaKey)&&"Cmd"!=c&&(d="Cmd-"+d),!b&&a.shiftKey&&"Shift"!=c&&(d="Shift-"+d),d)};a.fromTextArea=function(b,c){function d(){b.value=j.getValue()}if(c=c?Fe(c):{},c.value=b.value,!c.tabindex&&b.tabIndex&&(c.tabindex=b.tabIndex),!c.placeholder&&b.placeholder&&(c.placeholder=b.placeholder),null==c.autofocus){var e=Ne();c.autofocus=e==b||null!=b.getAttribute("autofocus")&&e==document.body;
5
+ }if(b.form&&(vg(b.form,"submit",d),!c.leaveSubmitMethodAlone)){var f=b.form,g=f.submit;try{var h=f.submit=function(){d(),f.submit=g,f.submit(),f.submit=h}}catch(i){}}c.finishInit=function(a){a.save=d,a.getTextArea=function(){return b},a.toTextArea=function(){a.toTextArea=isNaN,d(),b.parentNode.removeChild(a.getWrapperElement()),b.style.display="",b.form&&(wg(b.form,"submit",d),"function"==typeof b.form.submit&&(b.form.submit=g))}},b.style.display="none";var j=a(function(a){b.parentNode.insertBefore(a,b.nextSibling)},c);return j};var gg=a.StringStream=function(a,b){this.pos=this.start=0,this.string=a,this.tabSize=b||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};gg.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a)var c=b==a;else var c=b&&(a.test?a.test(b):a(b));return c?(++this.pos,b):void 0},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);return b>-1?(this.pos=b,!0):void 0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Eg(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Eg(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Eg(this.string,null,this.tabSize)-(this.lineStart?Eg(this.string,this.lineStart,this.tabSize):0)},match:function(a,b,c){if("string"!=typeof a){var d=this.string.slice(this.pos).match(a);return d&&d.index>0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a},f=this.string.substr(this.pos,a.length);return e(f)==e(a)?(b!==!1&&(this.pos+=a.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var hg=0,ig=a.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a,this.id=++hg};we(ig),ig.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&rb(a),ve(this,"clear")){var c=this.find();c&&re(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;f<this.lines.length;++f){var g=this.lines[f],h=Wc(g.markedSpans,this);a&&!this.collapsed?Hb(a,Xd(g),"text"):a&&(null!=h.to&&(e=Xd(g)),null!=h.from&&(d=Xd(g))),g.markedSpans=Xc(g.markedSpans,h),null==h.from&&this.collapsed&&!qd(this.doc,g)&&a&&Wd(g,pb(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var f=0;f<this.lines.length;++f){var i=md(this.lines[f]),j=l(i);j>a.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Gb(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ca(a.doc)),a&&re(a,"markerCleared",a,this),b&&tb(a),this.parent&&this.parent.clear()}},ig.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e<this.lines.length;++e){var f=this.lines[e],g=Wc(f.markedSpans,this);if(null!=g.from&&(c=Df(b?f:Xd(f),g.from),-1==a))return c;if(null!=g.to&&(d=Df(b?f:Xd(f),g.to),1==a))return d}return c&&{from:c,to:d}},ig.prototype.changed=function(){var a=this.find(-1,!0),b=this,c=this.doc.cm;a&&c&&Ab(c,function(){var d=a.line,e=Xd(a.line),f=Ya(c,e);if(f&&(cb(f),c.curOp.selectionChanged=c.curOp.forceUpdate=!0),c.curOp.updateMaxLine=!0,!qd(b.doc,d)&&null!=b.height){var g=b.height;b.height=null;var h=td(b)-g;h&&Wd(d,d.height+h)}})},ig.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&-1!=Be(b.maybeHiddenMarkers,this)||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},ig.prototype.detachLine=function(a){if(this.lines.splice(Be(this.lines,a),1),!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;(b.maybeHiddenMarkers||(b.maybeHiddenMarkers=[])).push(this)}};var hg=0,jg=a.SharedTextMarker=function(a,b){this.markers=a,this.primary=b;for(var c=0;c<a.length;++c)a[c].parent=this};we(jg),jg.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();re(this,"clear")}},jg.prototype.find=function(a,b){return this.primary.find(a,b)};var kg=a.LineWidget=function(a,b,c){if(c)for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.doc=a,this.node=b};we(kg),kg.prototype.clear=function(){var a=this.doc.cm,b=this.line.widgets,c=this.line,d=Xd(c);if(null!=d&&b){for(var e=0;e<b.length;++e)b[e]==this&&b.splice(e--,1);b.length||(c.widgets=null);var f=td(this);Wd(c,Math.max(0,c.height-f)),a&&Ab(a,function(){sd(a,c,-f),Hb(a,d,"widget")})}},kg.prototype.changed=function(){var a=this.height,b=this.doc.cm,c=this.line;this.height=null;var d=td(this)-a;d&&(Wd(c,c.height+d),b&&Ab(b,function(){b.curOp.forceUpdate=!0,sd(b,c,d)}))};var lg=a.Line=function(a,b,c){this.text=a,ed(this,b),this.height=c?c(this):1};we(lg),lg.prototype.lineNo=function(){return Xd(this)};var mg={},ng={};Pd.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c=a,d=a+b;d>c;++c){var e=this.lines[c];this.height-=e.height,wd(e),re(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0;d<b.length;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;d>a;++a)if(c(this.lines[a]))return!0}},Qd.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(e>a){var f=Math.min(b,e-a),g=d.height;if(d.removeInner(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null),0==(b-=f))break;a=0}else a-=e}if(this.size-b<25&&(this.children.length>1||!(this.children[0]instanceof Pd))){var h=[];this.collapse(h),this.children=[new Pd(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(f>=a){if(e.insertInner(a,b,c),e.lines&&e.lines.length>50){for(;e.lines.length>50;){var g=e.lines.splice(e.lines.length-25,25),h=new Pd(g);e.height-=h.height,this.children.splice(d+1,0,h),h.parent=this}this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new Qd(b);if(a.parent){a.size-=c.size,a.height-=c.height;var d=Be(a.parent.children,a);a.parent.children.splice(d+1,0,c)}else{var e=new Qd(a.children);e.parent=a,a.children=[e,c],a=e}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(f>a){var g=Math.min(b,f-a);if(e.iterN(a,g,c))return!0;if(0==(b-=g))break;a=0}else a-=f}}};var og=0,pg=a.Doc=function(a,b,c){if(!(this instanceof pg))return new pg(a,b,c);null==c&&(c=0),Qd.call(this,[new Pd([new lg("",null)])]),this.first=c,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=c;var d=Df(c,0);this.sel=ma(d),this.history=new _d(null),this.id=++og,this.modeOption=b,"string"==typeof a&&(a=Sg(a)),Od(this,{from:d,to:d,text:a}),za(this,ma(d),Bg)};pg.prototype=Ee(Qd.prototype,{constructor:pg,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0;d<b.length;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a){var b=Vd(this,this.first,this.first+this.size);return a===!1?b:b.join(a||"\n")},setValue:Db(function(a){var b=Df(this.first,0),c=this.first+this.size-1;uc(this,{from:b,to:Df(c,Td(this,c).text.length),text:Sg(a),origin:"setValue",full:!0},!0),za(this,ma(b))}),replaceRange:function(a,b,c,d){b=oa(this,b),c=c?oa(this,c):b,Ac(this,a,b,c,d)},getRange:function(a,b,c){var d=Ud(this,oa(this,a),oa(this,b));return c===!1?d:d.join(c||"\n")},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},getLineHandle:function(a){return qa(this,a)?Td(this,a):void 0},getLineNumber:function(a){return Xd(a)},getLineHandleVisualStart:function(a){return"number"==typeof a&&(a=Td(this,a)),md(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return oa(this,a)},getCursor:function(a){var b,c=this.sel.primary();return b=null==a||"head"==a?c.head:"anchor"==a?c.anchor:"end"==a||"to"==a||a===!1?c.to():c.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Db(function(a,b,c){wa(this,oa(this,"number"==typeof a?Df(a,b||0):a),null,c)}),setSelection:Db(function(a,b,c){wa(this,oa(this,a),oa(this,b||a),c)}),extendSelection:Db(function(a,b,c){ta(this,oa(this,a),b&&oa(this,b),c)}),extendSelections:Db(function(a,b){ua(this,ra(this,a,b))}),extendSelectionsBy:Db(function(a,b){ua(this,Ce(this.sel.ranges,a),b)}),setSelections:Db(function(a,b,c){if(a.length){for(var d=0,e=[];d<a.length;d++)e[d]=new ka(oa(this,a[d].anchor),oa(this,a[d].head));null==b&&(b=Math.min(a.length-1,this.sel.primIndex)),za(this,la(e,b),c)}}),addSelection:Db(function(a,b,c){var d=this.sel.ranges.slice(0);d.push(new ka(oa(this,a),oa(this,b||a))),za(this,la(d,d.length-1),c)}),getSelection:function(a){for(var b,c=this.sel.ranges,d=0;d<c.length;d++){var e=Ud(this,c[d].from(),c[d].to());b=b?b.concat(e):e}return a===!1?b:b.join(a||"\n")},getSelections:function(a){for(var b=[],c=this.sel.ranges,d=0;d<c.length;d++){var e=Ud(this,c[d].from(),c[d].to());a!==!1&&(e=e.join(a||"\n")),b[d]=e}return b},replaceSelection:function(a,b,c){for(var d=[],e=0;e<this.sel.ranges.length;e++)d[e]=a;this.replaceSelections(d,b,c||"+input")},replaceSelections:Db(function(a,b,c){for(var d=[],e=this.sel,f=0;f<e.ranges.length;f++){var g=e.ranges[f];d[f]={from:g.from(),to:g.to(),text:Sg(a[f]),origin:c}}for(var h=b&&"end"!=b&&sc(this,d,b),f=d.length-1;f>=0;f--)uc(this,d[f]);h?ya(this,h):this.cm&&Gc(this.cm)}),undo:Db(function(){wc(this,"undo")}),redo:Db(function(){wc(this,"redo")}),undoSelection:Db(function(){wc(this,"undo",!0)}),redoSelection:Db(function(){wc(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d<a.done.length;d++)a.done[d].ranges||++b;for(var d=0;d<a.undone.length;d++)a.undone[d].ranges||++c;return{undo:b,redo:c}},clearHistory:function(){this.history=new _d(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:ke(this.history.done),undone:ke(this.history.undone)}},setHistory:function(a){var b=this.history=new _d(this.history.maxGeneration);b.done=ke(a.done.slice(0),null,!0),b.undone=ke(a.undone.slice(0),null,!0)},addLineClass:Db(function(a,b,c){return Jc(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass";if(a[d]){if(Oe(c).test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:Db(function(a,b,c){return Jc(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass",e=a[d];if(!e)return!1;if(null==c)a[d]=null;else{var f=e.match(Oe(c));if(!f)return!1;var g=f.index+f[0].length;a[d]=e.slice(0,f.index)+(f.index&&g!=e.length?" ":"")+e.slice(g)||null}return!0})}),addLineWidget:Db(function(a,b,c){return ud(this,a,b,c)}),removeLineWidget:function(a){a.clear()},markText:function(a,b,c){return Qc(this,oa(this,a),oa(this,b),c,"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared,handleMouseEvents:b&&b.handleMouseEvents};return a=oa(this,a),Qc(this,a,a,c,"bookmark")},findMarksAt:function(a){a=oa(this,a);var b=[],c=Td(this,a.line).markedSpans;if(c)for(var d=0;d<c.length;++d){var e=c[d];(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=oa(this,a),b=oa(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;h<g.length;h++){var i=g[h];e==a.line&&a.ch>i.to||null==i.from&&e!=a.line||e==b.line&&i.from>b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;d<c.length;++d)null!=c[d].from&&a.push(c[d].marker)}),a},posFromIndex:function(a){var b,c=this.first;return this.iter(function(d){var e=d.text.length+1;return e>a?(b=a,!0):(a-=e,void++c)}),oa(this,Df(c,b))},indexFromPos:function(a){a=oa(this,a);var b=a.ch;return a.line<this.first||a.ch<0?0:(this.iter(this.first,a.line,function(a){b+=a.text.length+1}),b)},copy:function(a){var b=new pg(Vd(this,this.first,this.first+this.size),this.modeOption,this.first);return b.scrollTop=this.scrollTop,b.scrollLeft=this.scrollLeft,b.sel=this.sel,b.extend=!1,a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory())),b},linkedDoc:function(a){a||(a={});var b=this.first,c=this.first+this.size;null!=a.from&&a.from>b&&(b=a.from),null!=a.to&&a.to<c&&(c=a.to);var d=new pg(Vd(this,b,c),a.mode||this.modeOption,b);return a.sharedHist&&(d.history=this.history),(this.linked||(this.linked=[])).push({doc:d,sharedHist:a.sharedHist}),d.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],Tc(d,Sc(this)),d},unlinkDoc:function(b){if(b instanceof a&&(b=b.doc),this.linked)for(var c=0;c<this.linked.length;++c){var d=this.linked[c];if(d.doc==b){this.linked.splice(c,1),b.unlinkDoc(this),Uc(Sc(this));break}}if(b.history==this.history){var e=[b.id];Rd(b,function(a){e.push(a.id)},!0),b.history=new _d(null),b.history.done=ke(this.history.done,e),b.history.undone=ke(this.history.undone,e)}},iterLinkedDocs:function(a){Rd(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),pg.prototype.eachLine=pg.prototype.iter;var qg="iter insert remove copy getEditor".split(" ");for(var rg in pg.prototype)pg.prototype.hasOwnProperty(rg)&&Be(qg,rg)<0&&(a.prototype[rg]=function(a){return function(){return a.apply(this.doc,arguments)}}(pg.prototype[rg]));we(pg);var sg=a.e_preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},tg=a.e_stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},ug=a.e_stop=function(a){sg(a),tg(a)},vg=a.on=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a._handlers||(a._handlers={}),e=d[b]||(d[b]=[]);e.push(c)}},wg=a.off=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=a._handlers&&a._handlers[b];if(!d)return;for(var e=0;e<d.length;++e)if(d[e]==c){d.splice(e,1);break}}},xg=a.signal=function(a,b){var c=a._handlers&&a._handlers[b];if(c)for(var d=Array.prototype.slice.call(arguments,2),e=0;e<c.length;++e)c[e].apply(null,d)},yg=null,zg=30,Ag=a.Pass={toString:function(){return"CodeMirror.Pass"}},Bg={scroll:!1},Cg={origin:"*mouse"},Dg={origin:"+move"};xe.prototype.set=function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)};var Eg=a.countColumn=function(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));for(var f=d||0,g=e||0;;){var h=a.indexOf(" ",f);if(0>h||h>=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Fg=[""],Gg=function(a){a.select()};uf?Gg=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:lf&&(Gg=function(a){try{a.select()}catch(b){}});var Hg,Ig=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Jg=a.isWordChar=function(a){return/\w/.test(a)||a>"€"&&(a.toUpperCase()!=a.toLowerCase()||Ig.test(a))},Kg=/[\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]/;Hg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var Lg=a.contains=function(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};lf&&11>mf&&(Ne=function(){try{return document.activeElement}catch(a){return document.body}});var Mg,Ng,Og=a.rmClass=function(a,b){var c=a.className,d=Oe(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},Pg=a.addClass=function(a,b){var c=a.className;Oe(b).test(c)||(a.className+=(c?" ":"")+b)},Qg=!1,Rg=function(){if(lf&&9>mf)return!1;var a=Ke("div");return"draggable"in a||"dragDrop"in a}(),Sg=a.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;d>=b;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},Tg=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},Ug=function(){var a=Ke("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),Vg=null,Wg={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};a.keyNames=Wg,function(){for(var a=0;10>a;a++)Wg[a+48]=Wg[a+96]=String(a);for(var a=65;90>=a;a++)Wg[a]=String.fromCharCode(a);for(var a=1;12>=a;a++)Wg[a+111]=Wg[a+63235]="F"+a}();var Xg,Yg=function(){function a(a){return 247>=a?c.charAt(a):a>=1424&&1524>=a?"R":a>=1536&&1773>=a?d.charAt(a-1536):a>=1774&&2220>=a?"r":a>=8192&&8203>=a?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/,j="L";return function(c){if(!e.test(c))return!1;for(var d,k=c.length,l=[],m=0;k>m;++m)l.push(d=a(c.charCodeAt(m)));for(var m=0,n=j;k>m;++m){var d=l[m];"m"==d?l[m]=n:n=d}for(var m=0,o=j;k>m;++m){var d=l[m];"1"==d&&"r"==o?l[m]="n":g.test(d)&&(o=d,"r"==d&&(l[m]="R"))}for(var m=1,n=l[0];k-1>m;++m){var d=l[m];"+"==d&&"1"==n&&"1"==l[m+1]?l[m]="1":","!=d||n!=l[m+1]||"1"!=n&&"n"!=n||(l[m]=n),n=d}for(var m=0;k>m;++m){var d=l[m];if(","==d)l[m]="N";else if("%"==d){for(var p=m+1;k>p&&"%"==l[p];++p);for(var q=m&&"!"==l[m-1]||k>p&&"1"==l[p]?"1":"N",r=m;p>r;++r)l[r]=q;m=p-1}}for(var m=0,o=j;k>m;++m){var d=l[m];"L"==o&&"1"==d?l[m]="L":g.test(d)&&(o=d)}for(var m=0;k>m;++m)if(f.test(l[m])){for(var p=m+1;k>p&&f.test(l[p]);++p);for(var s="L"==(m?l[m-1]:j),t="L"==(k>p?l[p]:j),q=s||t?"L":"R",r=m;p>r;++r)l[r]=q;m=p-1}for(var u,v=[],m=0;k>m;)if(h.test(l[m])){var w=m;for(++m;k>m&&h.test(l[m]);++m);v.push(new b(0,w,m))}else{var x=m,y=v.length;for(++m;k>m&&"L"!=l[m];++m);for(var r=x;m>r;)if(i.test(l[r])){r>x&&v.splice(y,0,new b(1,x,r));var z=r;for(++r;m>r&&i.test(l[r]);++r);v.splice(y,0,new b(2,z,r)),x=r}else++r;m>x&&v.splice(y,0,new b(1,x,m))}return 1==v[0].level&&(u=c.match(/^\s+/))&&(v[0].from=u[0].length,v.unshift(new b(0,0,u[0].length))),1==Ae(v).level&&(u=c.match(/\s+$/))&&(Ae(v).to-=u[0].length,v.push(new b(0,k-u[0].length,k))),2==v[0].level&&v.unshift(new b(1,v[0].to,v[0].to)),v[0].level!=Ae(v).level&&v.push(new b(v[0].level,k,k)),v}}();return a.version="5.2.0",a}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=a.split(" "),d=0;d<c.length;++d)b[c[d]]=!0;return b}function c(a,b){if(!b.startOfLine)return!1;for(;;){if(!a.skipTo("\\")){a.skipToEnd(),b.tokenize=null;break}if(a.next(),a.eol()){b.tokenize=c;break}}return"meta"}function d(a,b){if(a.backUp(1),a.match(/(R|u8R|uR|UR|LR)/)){var c=a.match(/"([^\s\\()]{0,16})\(/);return c?(b.cpp11RawStringDelim=c[1],b.tokenize=f,f(a,b)):!1}return a.match(/(u8|u|U|L)/)?a.match(/["']/,!1)?"string":!1:(a.next(),!1)}function e(a,b){for(var c;null!=(c=a.next());)if('"'==c&&!a.eat('"')){b.tokenize=null;break}return"string"}function f(a,b){var c=b.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),d=a.match(new RegExp(".*?\\)"+c+'"'));return d?b.tokenize=null:a.skipToEnd(),"string"}function g(b,c){function d(a){if(a)for(var b in a)a.hasOwnProperty(b)&&e.push(b)}"string"==typeof b&&(b=[b]);var e=[];d(c.keywords),d(c.builtin),d(c.atoms),e.length&&(c.helperType=b[0],a.registerHelper("hintWords",b[0],e));for(var f=0;f<b.length;++f)a.defineMIME(b[f],c)}function h(a,b){for(var c=!1;!a.eol();){if(!c&&a.match('"""')){b.tokenize=null;break}c="\\"==a.next()&&!c}return"string"}a.defineMode("clike",function(b,c){function d(a,b){var c=a.next();if(r[c]){var d=r[c](a,b);if(d!==!1)return d}if('"'==c||"'"==c)return b.tokenize=e(c),b.tokenize(a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return j=c,null;if(/\d/.test(c))return a.eatWhile(/[\w\.]/),"number";if("/"==c){if(a.eat("*"))return b.tokenize=f,f(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(u.test(c))return a.eatWhile(u),"operator";a.eatWhile(/[\w\$_\xa1-\uffff]/);var g=a.current();return n.propertyIsEnumerable(g)?(p.propertyIsEnumerable(g)&&(j="newstatement"),"keyword"):o.propertyIsEnumerable(g)?(p.propertyIsEnumerable(g)&&(j="newstatement"),"builtin"):q.propertyIsEnumerable(g)?"atom":"variable"}function e(a){return function(b,c){for(var d,e=!1,f=!1;null!=(d=b.next());){if(d==a&&!e){f=!0;break}e=!e&&"\\"==d}return(f||!e&&!s)&&(c.tokenize=null),"string"}}function f(a,b){for(var c,d=!1;c=a.next();){if("/"==c&&d){b.tokenize=null;break}d="*"==c}return"comment"}function g(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function h(a,b,c){var d=a.indented;return a.context&&"statement"==a.context.type&&(d=a.context.indented),a.context=new g(d,b,c,null,a.context)}function i(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var j,k=b.indentUnit,l=c.statementIndentUnit||k,m=c.dontAlignCalls,n=c.keywords||{},o=c.builtin||{},p=c.blockKeywords||{},q=c.atoms||{},r=c.hooks||{},s=c.multiLineStrings,t=c.indentStatements!==!1,u=/[+\-*&%=<>!?|\/]/;return{startState:function(a){return{tokenize:null,context:new g((a||0)-k,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;j=null;var e=(b.tokenize||d)(a,b);if("comment"==e||"meta"==e)return e;if(null==c.align&&(c.align=!0),";"!=j&&":"!=j&&","!=j||"statement"!=c.type)if("{"==j)h(b,a.column(),"}");else if("["==j)h(b,a.column(),"]");else if("("==j)h(b,a.column(),")");else if("}"==j){for(;"statement"==c.type;)c=i(b);for("}"==c.type&&(c=i(b));"statement"==c.type;)c=i(b)}else j==c.type?i(b):t&&(("}"==c.type||"top"==c.type)&&";"!=j||"statement"==c.type&&"newstatement"==j)&&h(b,a.column(),"statement");else i(b);return b.startOfLine=!1,e},indent:function(b,c){if(b.tokenize!=d&&null!=b.tokenize)return a.Pass;var e=b.context,f=c&&c.charAt(0);"statement"==e.type&&"}"==f&&(e=e.prev);var g=f==e.type;return"statement"==e.type?e.indented+("{"==f?0:l):!e.align||m&&")"==e.type?")"!=e.type||g?e.indented+(g?0:k):e.indented+l:e.column+(g?0:1)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var i="auto if break int case long char register continue return default short do sizeof double static else struct switch extern typedef float union for unsigned goto while enum void const signed volatile";g(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:b(i),blockKeywords:b("case do else for if switch while struct"),atoms:b("null"),hooks:{"#":c},modeProps:{fold:["brace","include"]}}),g(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:b(i+" asm dynamic_cast namespace reinterpret_cast try bool explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected wchar_t alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),blockKeywords:b("catch class do else finally for if struct switch try while"),atoms:b("true false null"),hooks:{"#":c,u:d,U:d,L:d,R:d},modeProps:{fold:["brace","include"]}}),g("text/x-java",{name:"clike",keywords:b("abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while"),blockKeywords:b("catch class do else finally for if switch try while"),atoms:b("true false null"),hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"}},modeProps:{fold:["brace","import"]}}),g("text/x-csharp",{name:"clike",keywords:b("abstract as base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),blockKeywords:b("catch class do else finally for foreach if struct switch try while"),builtin:b("Boolean Byte Char DateTime DateTimeOffset Decimal Double Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),atoms:b("true false null"),hooks:{"@":function(a,b){return a.eat('"')?(b.tokenize=e,e(a,b)):(a.eatWhile(/[\w\$_]/),"meta")}}}),g("text/x-scala",{name:"clike",keywords:b("abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try trye type val var while with yield _ : = => <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:b("catch class do else finally for forSome if match switch try while"),atoms:b("true false null"),indentStatements:!1,hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"},'"':function(a,b){return a.match('""')?(b.tokenize=h,b.tokenize(a,b)):!1},"'":function(a){return a.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"}},modeProps:{closeBrackets:{triples:'"'}}}),g(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:b("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4 sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),blockKeywords:b("for while do if else struct"),builtin:b("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),
6
+ atoms:b("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),hooks:{"#":c},modeProps:{fold:["brace","include"]}}),g("text/x-nesc",{name:"clike",keywords:b(i+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),blockKeywords:b("case do else for if switch while struct"),atoms:b("null"),hooks:{"#":c},modeProps:{fold:["brace","include"]}}),g("text/x-objectivec",{name:"clike",keywords:b(i+"inline restrict _Bool _Complex _Imaginery BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),atoms:b("YES NO NULL NILL ON OFF"),hooks:{"@":function(a){return a.eatWhile(/[\w\$]/),"keyword"},"#":c},modeProps:{fold:"brace"}})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=a.split(" "),d=0;d<c.length;++d)b[c[d]]=!0;return b}function c(a,b){return 0==a.length?d(b):function(e,f){for(var g=a[0],h=0;h<g.length;h++)if(e.match(g[h][0]))return f.tokenize=c(a.slice(1),b),g[h][1];return f.tokenize=d(b),"string"}}function d(a){return function(b,c){return e(b,c,a)}}function e(a,b,d){if(a.match("${",!1)||a.match("{$",!1))return b.tokenize=null,"string";if(a.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return a.match("[",!1)&&(b.tokenize=c([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],d)),a.match(/\-\>\w/,!1)&&(b.tokenize=c([[["->",null]],[[/[\w]+/,"variable"]]],d)),"variable-2";for(var e=!1;!a.eol()&&(e||!a.match("{$",!1)&&!a.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!e&&a.match(d)){b.tokenize=null,b.tokStack.pop(),b.tokStack.pop();break}e="\\"==a.next()&&!e}return"string"}var f="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",g="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";a.registerHelper("hintWords","php",[f,g,h].join(" ").split(" ")),a.registerHelper("wordChars","php",/[\w$]/);var i={name:"clike",helperType:"php",keywords:b(f),blockKeywords:b("catch do else elseif for foreach if switch try while finally"),atoms:b(g),builtin:b(h),multiLineStrings:!0,hooks:{$:function(a){return a.eatWhile(/[\w\$_]/),"variable-2"},"<":function(a,b){if(a.match(/<</)){a.eatWhile(/[\w\.]/);var c=a.current().slice(3);if(c)return(b.tokStack||(b.tokStack=[])).push(c,0),b.tokenize=d(c),"string"}return!1},"#":function(a){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"},"/":function(a){if(a.eat("/")){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"}return!1},'"':function(a,b){return(b.tokStack||(b.tokStack=[])).push('"',0),b.tokenize=d('"'),"string"},"{":function(a,b){return b.tokStack&&b.tokStack.length&&b.tokStack[b.tokStack.length-1]++,!1},"}":function(a,b){return b.tokStack&&b.tokStack.length>0&&!--b.tokStack[b.tokStack.length-1]&&(b.tokenize=d(b.tokStack[b.tokStack.length-2])),!1}}};a.defineMode("php",function(b,c){function d(a,b){var c=b.curMode==f;if(a.sol()&&b.pending&&'"'!=b.pending&&"'"!=b.pending&&(b.pending=null),c)return c&&null==b.php.tokenize&&a.match("?>")?(b.curMode=e,b.curState=b.html,"meta"):f.token(a,b.curState);if(a.match(/^<\?\w*/))return b.curMode=f,b.curState=b.php,"meta";if('"'==b.pending||"'"==b.pending){for(;!a.eol()&&a.next()!=b.pending;);var d="string"}else if(b.pending&&a.pos<b.pending.end){a.pos=b.pending.end;var d=b.pending.style}else var d=e.token(a,b.curState);b.pending&&(b.pending=null);var g,h=a.current(),i=h.search(/<\?/);return-1!=i&&("string"==d&&(g=h.match(/[\'\"]$/))&&!/\?>/.test(h)?b.pending=g[0]:b.pending={end:a.pos,style:d},a.backUp(h.length-i)),d}var e=a.getMode(b,"text/html"),f=a.getMode(b,i);return{startState:function(){var b=a.startState(e),d=a.startState(f);return{html:b,php:d,curMode:c.startOpen?f:e,curState:c.startOpen?d:b,pending:null}},copyState:function(b){var c,d=b.html,g=a.copyState(e,d),h=b.php,i=a.copyState(f,h);return c=b.curMode==e?g:i,{html:g,php:i,curMode:b.curMode,curState:c,pending:b.pending}},token:d,indent:function(a,b){return a.curMode!=f&&/^\s*<\//.test(b)||a.curMode==f&&/^\?>/.test(b)?e.indent(a.html,b):a.curMode.indent(a.curState,b)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(a){return{state:a.curState,mode:a.curMode}}}},"htmlmixed","clike"),a.defineMIME("application/x-httpd-php","php"),a.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),a.defineMIME("text/x-php",i)}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,e,f){if(this.atOccurrence=!1,this.doc=a,null==f&&"string"==typeof b&&(f=!1),e=e?a.clipPos(e):d(0,0),this.pos={from:e,to:e},"string"!=typeof b)b.global||(b=new RegExp(b.source,b.ignoreCase?"ig":"g")),this.matches=function(c,e){if(c){b.lastIndex=0;for(var f,g,h=a.getLine(e.line).slice(0,e.ch),i=0;;){b.lastIndex=i;var j=b.exec(h);if(!j)break;if(f=j,g=f.index,i=f.index+(f[0].length||1),i==h.length)break}var k=f&&f[0].length||0;k||(0==g&&0==h.length?f=void 0:g!=a.getLine(e.line).length&&k++)}else{b.lastIndex=e.ch;var h=a.getLine(e.line),f=b.exec(h),k=f&&f[0].length||0,g=f&&f.index;g+k==h.length||k||(k=1)}return f&&k?{from:d(e.line,g),to:d(e.line,g+k),match:f}:void 0};else{var g=b;f&&(b=b.toLowerCase());var h=f?function(a){return a.toLowerCase()}:function(a){return a},i=b.split("\n");if(1==i.length)b.length?this.matches=function(e,f){if(e){var i=a.getLine(f.line).slice(0,f.ch),j=h(i),k=j.lastIndexOf(b);if(k>-1)return k=c(i,j,k),{from:d(f.line,k),to:d(f.line,k+g.length)}}else{var i=a.getLine(f.line).slice(f.ch),j=h(i),k=j.indexOf(b);if(k>-1)return k=c(i,j,k)+f.ch,{from:d(f.line,k),to:d(f.line,k+g.length)}}}:this.matches=function(){};else{var j=g.split("\n");this.matches=function(b,c){var e=i.length-1;if(b){if(c.line-(i.length-1)<a.firstLine())return;if(h(a.getLine(c.line).slice(0,j[e].length))!=i[i.length-1])return;for(var f=d(c.line,j[e].length),g=c.line-1,k=e-1;k>=1;--k,--g)if(i[k]!=h(a.getLine(g)))return;var l=a.getLine(g),m=l.length-j[0].length;if(h(l.slice(m))!=i[0])return;return{from:d(g,m),to:f}}if(!(c.line+(i.length-1)>a.lastLine())){var l=a.getLine(c.line),m=l.length-j[0].length;if(h(l.slice(m))==i[0]){for(var n=d(c.line,m),g=c.line+1,k=1;e>k;++k,++g)if(i[k]!=h(a.getLine(g)))return;if(h(a.getLine(g).slice(0,j[e].length))==i[e])return{from:n,to:d(g,j[e].length)}}}}}}}function c(a,b,c){if(a.length==b.length)return c;for(var d=Math.min(c,a.length);;){var e=a.slice(0,d).toLowerCase().length;if(c>e)++d;else{if(!(e>c))return d;--d}}}var d=a.Pos;b.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(a){function b(a){var b=d(a,0);return c.pos={from:b,to:b},c.atOccurrence=!1,!1}for(var c=this,e=this.doc.clipPos(a?this.pos.from:this.pos.to);;){if(this.pos=this.matches(a,e))return this.atOccurrence=!0,this.pos.match||!0;if(a){if(!e.line)return b(0);e=d(e.line-1,this.doc.getLine(e.line-1).length)}else{var f=this.doc.lineCount();if(e.line==f-1)return b(f);e=d(e.line+1,0)}}},from:function(){return this.atOccurrence?this.pos.from:void 0},to:function(){return this.atOccurrence?this.pos.to:void 0},replace:function(b,c){if(this.atOccurrence){var e=a.splitLines(b);this.doc.replaceRange(e,this.pos.from,this.pos.to,c),this.pos.to=d(this.pos.from.line+e.length-1,e[e.length-1].length+(1==e.length?this.pos.from.ch:0))}}},a.defineExtension("getSearchCursor",function(a,c,d){return new b(this.doc,a,c,d)}),a.defineDocExtension("getSearchCursor",function(a,c,d){return new b(this,a,c,d)}),a.defineExtension("selectMatches",function(b,c){for(var d,e=[],f=this.getSearchCursor(b,this.getCursor("from"),c);(d=f.findNext())&&!(a.cmpPos(f.to(),this.getCursor("to"))>0);)e.push({anchor:f.from(),head:f.to()});e.length&&this.setSelections(e,0)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){return"string"==typeof a?a=new RegExp(a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),b?"gi":"g"):a.global||(a=new RegExp(a.source,a.ignoreCase?"gi":"g")),{token:function(b){a.lastIndex=b.pos;var c=a.exec(b.string);return c&&c.index==b.pos?(b.pos+=c[0].length,"searching"):void(c?b.pos=c.index:b.skipToEnd())}}}function c(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function d(a){return a.state.search||(a.state.search=new c)}function e(a){return"string"==typeof a&&a==a.toLowerCase()}function f(a,b,c){return a.getSearchCursor(b,c,e(b))}function g(a,b,c,d,e){a.openDialog?a.openDialog(b,e,{value:d,selectValueOnOpen:!0}):e(prompt(c,d))}function h(a,b,c,d){a.openConfirm?a.openConfirm(b,d):confirm(c)&&d[0]()}function i(a){var b=a.match(/^\/(.*)\/([a-z]*)$/);if(b)try{a=new RegExp(b[1],-1==b[2].indexOf("i")?"":"i")}catch(c){}return("string"==typeof a?""==a:a.test(""))&&(a=/x^/),a}function j(a,c){var f=d(a);if(f.query)return k(a,c);var h=a.getSelection()||f.lastQuery;g(a,n,"Search for:",h,function(d){a.operation(function(){d&&!f.query&&(f.query=i(d),a.removeOverlay(f.overlay,e(f.query)),f.overlay=b(f.query,e(f.query)),a.addOverlay(f.overlay),a.showMatchesOnScrollbar&&(f.annotate&&(f.annotate.clear(),f.annotate=null),f.annotate=a.showMatchesOnScrollbar(f.query,e(f.query))),f.posFrom=f.posTo=a.getCursor(),k(a,c))})})}function k(b,c){b.operation(function(){var e=d(b),g=f(b,e.query,c?e.posFrom:e.posTo);(g.find(c)||(g=f(b,e.query,c?a.Pos(b.lastLine()):a.Pos(b.firstLine(),0)),g.find(c)))&&(b.setSelection(g.from(),g.to()),b.scrollIntoView({from:g.from(),to:g.to()}),e.posFrom=g.from(),e.posTo=g.to())})}function l(a){a.operation(function(){var b=d(a);b.lastQuery=b.query,b.query&&(b.query=null,a.removeOverlay(b.overlay),b.annotate&&(b.annotate.clear(),b.annotate=null))})}function m(a,b){if(!a.getOption("readOnly")){var c=a.getSelection()||d().lastQuery;g(a,o,"Replace:",c,function(c){c&&(c=i(c),g(a,p,"Replace with:","",function(d){if(b)a.operation(function(){for(var b=f(a,c);b.findNext();)if("string"!=typeof c){var e=a.getRange(b.from(),b.to()).match(c);b.replace(d.replace(/\$(\d)/g,function(a,b){return e[b]}))}else b.replace(d)});else{l(a);var e=f(a,c,a.getCursor()),g=function(){var b,d=e.from();!(b=e.findNext())&&(e=f(a,c),!(b=e.findNext())||d&&e.from().line==d.line&&e.from().ch==d.ch)||(a.setSelection(e.from(),e.to()),a.scrollIntoView({from:e.from(),to:e.to()}),h(a,q,"Replace?",[function(){i(b)},g]))},i=function(a){e.replace("string"==typeof c?d:d.replace(/\$(\d)/g,function(b,c){return a[c]})),g()};g()}}))})}}var n='Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',o='Replace: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',p='With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',q="Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";a.commands.find=function(a){l(a),j(a)},a.commands.findNext=j,a.commands.findPrev=function(a){j(a,!0)},a.commands.clearSearch=l,a.commands.replace=m,a.commands.replaceAll=function(a){m(a,!0)}}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,d,e){var f=a.getLineHandle(b.line),i=b.ch-1,j=i>=0&&h[f.text.charAt(i)]||h[f.text.charAt(++i)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(d&&k>0!=(i==b.ch))return null;var l=a.getTokenTypeAt(g(b.line,i+1)),m=c(a,g(b.line,i+(k>0?1:0)),k,l||null,e);return null==m?null:{from:g(b.line,i),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function c(a,b,c,d,e){for(var f=e&&e.maxScanLineLength||1e4,i=e&&e.maxScanLines||1e3,j=[],k=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,l=c>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=c){var n=a.getLine(m);if(n){var o=c>0?0:n.length-1,p=c>0?n.length:-1;if(!(n.length>f))for(m==b.line&&(o=b.ch-(0>c?1:0));o!=p;o+=c){var q=n.charAt(o);if(k.test(q)&&(void 0===d||a.getTokenTypeAt(g(m,o+1))==d)){var r=h[q];if(">"==r.charAt(1)==c>0)j.push(q);else{if(!j.length)return{pos:g(m,o),ch:q};j.pop()}}}}}return m-c==(c>0?a.lastLine():a.firstLine())?!1:null}function d(a,c,d){for(var e=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j<i.length;j++){var k=i[j].empty()&&b(a,i[j].head,!1,d);if(k&&a.getLine(k.from.line).length<=e){var l=k.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(a.markText(k.from,g(k.from.line,k.from.ch+1),{className:l})),k.to&&a.getLine(k.to.line).length<=e&&h.push(a.markText(k.to,g(k.to.line,k.to.ch+1),{className:l}))}}if(h.length){f&&a.state.focused&&a.focus();var m=function(){a.operation(function(){for(var a=0;a<h.length;a++)h[a].clear()})};if(!c)return m;setTimeout(m,800)}}function e(a){a.operation(function(){i&&(i(),i=null),i=d(a,!1,a.state.matchBrackets)})}var f=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),g=a.Pos,h={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},i=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&b.off("cursorActivity",e),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",e))}),a.defineExtension("matchBrackets",function(){d(this,!0)}),a.defineExtension("findMatchingBracket",function(a,c,d){return b(this,a,c,d)}),a.defineExtension("scanForBracket",function(a,b,d,e){return c(this,a,b,d,e)})});
js/min/tag-it.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){a.widget("ui.tagit",{options:{allowDuplicates:!1,caseSensitive:!0,fieldName:"tags",placeholderText:null,readOnly:!1,removeConfirmation:!1,tagLimit:null,availableTags:[],autocomplete:{},showAutocompleteOnFocus:!1,allowSpaces:!1,singleField:!1,singleFieldDelimiter:",",singleFieldNode:null,animate:!0,tabIndex:null,beforeTagAdded:null,afterTagAdded:null,beforeTagRemoved:null,afterTagRemoved:null,onTagClicked:null,onTagLimitExceeded:null,onTagAdded:null,onTagRemoved:null,tagSource:null},_create:function(){var b=this;this.element.is("input")?(this.tagList=a("<ul></ul>").insertAfter(this.element),this.options.singleField=!0,this.options.singleFieldNode=this.element,this.element.addClass("tagit-hidden-field")):this.tagList=this.element.find("ul, ol").andSelf().last(),this.tagInput=a('<input type="text" />').addClass("ui-widget-content"),this.options.readOnly&&this.tagInput.attr("disabled","disabled"),this.options.tabIndex&&this.tagInput.attr("tabindex",this.options.tabIndex),this.options.placeholderText&&this.tagInput.attr("placeholder",this.options.placeholderText),this.options.autocomplete.source||(this.options.autocomplete.source=function(b,c){var d=b.term.toLowerCase(),e=a.grep(this.options.availableTags,function(a){return 0===a.toLowerCase().indexOf(d)});this.options.allowDuplicates||(e=this._subtractArray(e,this.assignedTags())),c(e)}),this.options.showAutocompleteOnFocus&&(this.tagInput.focus(function(a,c){b._showAutocomplete()}),"undefined"==typeof this.options.autocomplete.minLength&&(this.options.autocomplete.minLength=0)),a.isFunction(this.options.autocomplete.source)&&(this.options.autocomplete.source=a.proxy(this.options.autocomplete.source,this)),a.isFunction(this.options.tagSource)&&(this.options.tagSource=a.proxy(this.options.tagSource,this)),this.tagList.addClass("tagit").addClass("ui-widget ui-widget-content ui-corner-all").append(a('<li class="tagit-new"></li>').append(this.tagInput)).click(function(c){var d=a(c.target);if(d.hasClass("tagit-label")){var e=d.closest(".tagit-choice");e.hasClass("removed")||b._trigger("onTagClicked",c,{tag:e,tagLabel:b.tagLabel(e)})}else b.tagInput.focus()});var c=!1;if(this.options.singleField)if(this.options.singleFieldNode){var d=a(this.options.singleFieldNode),e=d.val().split(this.options.singleFieldDelimiter);d.val(""),a.each(e,function(a,d){b.createTag(d,null,!0),c=!0})}else this.options.singleFieldNode=a('<input type="hidden" style="display:none;" value="" name="'+this.options.fieldName+'" />'),this.tagList.after(this.options.singleFieldNode);if(c||this.tagList.children("li").each(function(){a(this).hasClass("tagit-new")||(b.createTag(a(this).text(),a(this).attr("class"),!0),a(this).remove())}),this.tagInput.keydown(function(c){if(c.which==a.ui.keyCode.BACKSPACE&&""===b.tagInput.val()){var d=b._lastTag();!b.options.removeConfirmation||d.hasClass("remove")?b.removeTag(d):b.options.removeConfirmation&&d.addClass("remove ui-state-highlight")}else b.options.removeConfirmation&&b._lastTag().removeClass("remove ui-state-highlight");(c.which===a.ui.keyCode.COMMA&&c.shiftKey===!1||c.which===a.ui.keyCode.ENTER||c.which==a.ui.keyCode.TAB&&""!==b.tagInput.val()||c.which==a.ui.keyCode.SPACE&&b.options.allowSpaces!==!0&&('"'!=a.trim(b.tagInput.val()).replace(/^s*/,"").charAt(0)||'"'==a.trim(b.tagInput.val()).charAt(0)&&'"'==a.trim(b.tagInput.val()).charAt(a.trim(b.tagInput.val()).length-1)&&a.trim(b.tagInput.val()).length-1!==0))&&((c.which!==a.ui.keyCode.ENTER||""!==b.tagInput.val())&&c.preventDefault(),b.options.autocomplete.autoFocus&&b.tagInput.data("autocomplete-open")||(b.tagInput.autocomplete("close"),b.createTag(b._cleanedInput())))}).blur(function(a){b.tagInput.data("autocomplete-open")||b.createTag(b._cleanedInput())}),this.options.availableTags||this.options.tagSource||this.options.autocomplete.source){var f={select:function(a,c){return b.createTag(c.item.value),!1}};a.extend(f,this.options.autocomplete),f.source=this.options.tagSource||f.source,this.tagInput.autocomplete(f).bind("autocompleteopen.tagit",function(a,c){b.tagInput.data("autocomplete-open",!0)}).bind("autocompleteclose.tagit",function(a,c){b.tagInput.data("autocomplete-open",!1)}),this.tagInput.autocomplete("widget").addClass("tagit-autocomplete")}},destroy:function(){return a.Widget.prototype.destroy.call(this),this.element.unbind(".tagit"),this.tagList.unbind(".tagit"),this.tagInput.removeData("autocomplete-open"),this.tagList.removeClass(["tagit","ui-widget","ui-widget-content","ui-corner-all","tagit-hidden-field"].join(" ")),this.element.is("input")?(this.element.removeClass("tagit-hidden-field"),this.tagList.remove()):(this.element.children("li").each(function(){a(this).hasClass("tagit-new")?a(this).remove():(a(this).removeClass(["tagit-choice","ui-widget-content","ui-state-default","ui-state-highlight","ui-corner-all","remove","tagit-choice-editable","tagit-choice-read-only"].join(" ")),a(this).text(a(this).children(".tagit-label").text()))}),this.singleFieldNode&&this.singleFieldNode.remove()),this},_cleanedInput:function(){return a.trim(this.tagInput.val().replace(/^"(.*)"$/,"$1"))},_lastTag:function(){return this.tagList.find(".tagit-choice:last:not(.removed)")},_tags:function(){return this.tagList.find(".tagit-choice:not(.removed)")},assignedTags:function(){var b=this,c=[];return this.options.singleField?(c=a(this.options.singleFieldNode).val().split(this.options.singleFieldDelimiter),""===c[0]&&(c=[])):this._tags().each(function(){c.push(b.tagLabel(this))}),c},_updateSingleTagsField:function(b){a(this.options.singleFieldNode).val(b.join(this.options.singleFieldDelimiter)).trigger("change")},_subtractArray:function(b,c){for(var d=[],e=0;e<b.length;e++)-1==a.inArray(b[e],c)&&d.push(b[e]);return d},tagLabel:function(b){return this.options.singleField?a(b).find(".tagit-label:first").text():a(b).find("input:first").val()},_showAutocomplete:function(){this.tagInput.autocomplete("search","")},_findTagByLabel:function(b){var c=this,d=null;return this._tags().each(function(e){return c._formatStr(b)==c._formatStr(c.tagLabel(this))?(d=a(this),!1):void 0}),d},_isNew:function(a){return!this._findTagByLabel(a)},_formatStr:function(b){return this.options.caseSensitive?b:a.trim(b.toLowerCase())},_effectExists:function(b){return Boolean(a.effects&&(a.effects[b]||a.effects.effect&&a.effects.effect[b]))},createTag:function(b,c,d){var e=this;if(b=a.trim(b),this.options.preprocessTag&&(b=this.options.preprocessTag(b)),""===b)return!1;if(!this.options.allowDuplicates&&!this._isNew(b)){var f=this._findTagByLabel(b);return this._trigger("onTagExists",null,{existingTag:f,duringInitialization:d})!==!1&&this._effectExists("highlight")&&f.effect("highlight"),!1}if(this.options.tagLimit&&this._tags().length>=this.options.tagLimit)return this._trigger("onTagLimitExceeded",null,{duringInitialization:d}),!1;var g=a(this.options.onTagClicked?'<a class="tagit-label"></a>':'<span class="tagit-label"></span>').text(b),h=a("<li></li>").addClass("tagit-choice ui-widget-content ui-state-default ui-corner-all").addClass(c).append(g);if(this.options.readOnly)h.addClass("tagit-choice-read-only");else{h.addClass("tagit-choice-editable");var i=a("<span></span>").addClass("ui-icon ui-icon-close"),j=a('<a><span class="text-icon">×</span></a>').addClass("tagit-close").append(i).click(function(a){e.removeTag(h)});h.append(j)}if(!this.options.singleField){var k=g.html();h.append('<input type="hidden" value="'+k+'" name="'+this.options.fieldName+'" class="tagit-hidden-field" />')}if(this._trigger("beforeTagAdded",null,{tag:h,tagLabel:this.tagLabel(h),duringInitialization:d})!==!1){if(this.options.singleField){var l=this.assignedTags();l.push(b),this._updateSingleTagsField(l)}this._trigger("onTagAdded",null,h),this.tagInput.val(""),this.tagInput.parent().before(h),this._trigger("afterTagAdded",null,{tag:h,tagLabel:this.tagLabel(h),duringInitialization:d}),this.options.showAutocompleteOnFocus&&!d&&setTimeout(function(){e._showAutocomplete()},0)}},removeTag:function(b,c){if(c="undefined"==typeof c?this.options.animate:c,b=a(b),this._trigger("onTagRemoved",null,b),this._trigger("beforeTagRemoved",null,{tag:b,tagLabel:this.tagLabel(b)})!==!1){if(this.options.singleField){var d=this.assignedTags(),e=this.tagLabel(b);d=a.grep(d,function(a){return a!=e}),this._updateSingleTagsField(d)}if(c){b.addClass("removed");var f=this._effectExists("blind")?["blind",{direction:"horizontal"},"fast"]:["fast"],g=this;f.push(function(){b.remove(),g._trigger("afterTagRemoved",null,{tag:b,tagLabel:g.tagLabel(b)})}),b.fadeOut("fast").hide.apply(b,f).dequeue()}else b.remove(),this._trigger("afterTagRemoved",null,{tag:b,tagLabel:this.tagLabel(b)})}},removeTagByLabel:function(a,b){var c=this._findTagByLabel(a);if(!c)throw"No such tag exists with the name '"+a+"'";this.removeTag(c,b)},removeAll:function(){var a=this;this._tags().each(function(b,c){a.removeTag(c,!1)})}})}(jQuery);
languages/code-snippets.pot CHANGED
@@ -8,7 +8,7 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: code-snippets 2.1.0\n"
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2015-05-09 16:34+1000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -23,92 +23,92 @@ msgstr ""
23
  msgid "Snippets"
24
  msgstr ""
25
 
26
- #: includes/admin.php:120
27
  msgid "Manage your existing snippets"
28
  msgstr ""
29
 
30
- #: includes/admin.php:121 includes/manage/manage.php:34
31
  msgid "Manage"
32
  msgstr ""
33
 
34
- #: includes/admin.php:150
35
  msgid "Visit the WordPress.org plugin page"
36
  msgstr ""
37
 
38
- #: includes/admin.php:151
39
  msgid "About"
40
  msgstr ""
41
 
42
- #: includes/admin.php:155
43
  msgid "Visit the support forums"
44
  msgstr ""
45
 
46
- #: includes/admin.php:156
47
  msgid "Support"
48
  msgstr ""
49
 
50
- #: includes/admin.php:160
51
  msgid "Support this plugin's development"
52
  msgstr ""
53
 
54
- #: includes/admin.php:161
55
  msgid "Donate"
56
  msgstr ""
57
 
58
- #: includes/admin.php:194
59
  msgid ""
60
  "<strong>Have feedback on Code Snippets?</strong> Please take the time to "
61
  "answer a short survey on how you use this plugin and what you'd like to see "
62
  "changed or added in the future."
63
  msgstr ""
64
 
65
- #: includes/admin.php:197
66
  msgid "Take the survey now"
67
  msgstr ""
68
 
69
- #: includes/class-export.php:104
70
  msgid ""
71
  "This is a code snippets export file generated by the Code Snippets WordPress "
72
  "plugin."
73
  msgstr ""
74
 
75
- #: includes/class-export.php:105
76
  msgid "http://wordpress.org/plugins/code-snippets"
77
  msgstr ""
78
 
79
- #: includes/class-export.php:106
80
  msgid "To import these snippets a WordPress site follow these steps:"
81
  msgstr ""
82
 
83
- #: includes/class-export.php:107
84
  msgid "1. Log in to that site as an administrator."
85
  msgstr ""
86
 
87
- #: includes/class-export.php:108
88
  msgid ""
89
  "2. Install the Code Snippets plugin using the directions provided at the "
90
  "above link."
91
  msgstr ""
92
 
93
- #: includes/class-export.php:109
94
  msgid "3. Go to 'Tools: Import' in the WordPress admin panel."
95
  msgstr ""
96
 
97
- #: includes/class-export.php:110
98
  msgid "4. Click on the \"Code Snippets\" importer in the list"
99
  msgstr ""
100
 
101
- #: includes/class-export.php:111
102
  msgid "5. Upload this file using the form provided on that page."
103
  msgstr ""
104
 
105
- #: includes/class-export.php:112
106
  msgid ""
107
  "6. Code Snippets will then import all of the snippets and associated "
108
  "information contained in this file into your site."
109
  msgstr ""
110
 
111
- #: includes/class-export.php:113
112
  msgid ""
113
  "7. You will then have to visit the 'Snippets: Manage' admin menu and "
114
  "activate desired snippets."
@@ -221,8 +221,8 @@ msgstr ""
221
  msgid "Snippet <strong>added</strong>."
222
  msgstr ""
223
 
224
- #: includes/edit/admin.php:26 includes/edit/edit.php:46
225
- #: includes/edit/edit.php:47
226
  msgid "Edit Snippet"
227
  msgstr ""
228
 
@@ -243,27 +243,27 @@ msgstr ""
243
  msgid "Code"
244
  msgstr ""
245
 
246
- #: includes/edit/admin.php:79 includes/edit/admin.php:93
247
  msgid "Save Changes and Activate"
248
  msgstr ""
249
 
250
- #: includes/edit/admin.php:99
251
  msgid "Save Changes and Deactivate"
252
  msgstr ""
253
 
254
- #: includes/edit/admin.php:109 includes/manage/class-list-table.php:139
255
- #: includes/manage/class-list-table.php:264
256
  msgid "Export"
257
  msgstr ""
258
 
259
- #: includes/edit/admin.php:116
260
  msgid ""
261
  "You are about to permanently delete this snippet.\n"
262
  "'Cancel' to stop, 'OK' to delete."
263
  msgstr ""
264
 
265
- #: includes/edit/admin.php:121 includes/manage/class-list-table.php:148
266
- #: includes/manage/class-list-table.php:265
267
  msgid "Delete"
268
  msgstr ""
269
 
@@ -271,11 +271,27 @@ msgstr ""
271
  msgid "You are not authorized to access this page."
272
  msgstr ""
273
 
274
- #: includes/edit/edit.php:177 includes/manage/class-list-table.php:224
275
  msgid "Description"
276
  msgstr ""
277
 
278
- #: includes/edit/edit.php:206 includes/manage/class-list-table.php:225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  msgid "Tags"
280
  msgstr ""
281
 
@@ -473,111 +489,111 @@ msgstr ""
473
  msgid "Search Installed Snippets"
474
  msgstr ""
475
 
476
- #: includes/manage/class-list-table.php:51
477
  msgid "Snippets per page"
478
  msgstr ""
479
 
480
- #: includes/manage/class-list-table.php:114
481
- #: includes/manage/class-list-table.php:263
482
  msgid "Network Deactivate"
483
  msgstr ""
484
 
485
- #: includes/manage/class-list-table.php:114
486
- #: includes/manage/class-list-table.php:263
487
  msgid "Deactivate"
488
  msgstr ""
489
 
490
- #: includes/manage/class-list-table.php:123
491
- #: includes/manage/class-list-table.php:262
492
  msgid "Network Activate"
493
  msgstr ""
494
 
495
- #: includes/manage/class-list-table.php:123
496
- #: includes/manage/class-list-table.php:262
497
  msgid "Activate"
498
  msgstr ""
499
 
500
- #: includes/manage/class-list-table.php:133
501
  msgid "Edit"
502
  msgstr ""
503
 
504
- #: includes/manage/class-list-table.php:155
505
  msgid ""
506
  "You are about to permanently delete the selected item.\n"
507
  "\t\t\t\t'Cancel' to stop, 'OK' to delete."
508
  msgstr ""
509
 
510
- #: includes/manage/class-list-table.php:163
511
  #, php-format
512
  msgid "Untitled #%d"
513
  msgstr ""
514
 
515
- #: includes/manage/class-list-table.php:222
516
  msgid "Name"
517
  msgstr ""
518
 
519
- #: includes/manage/class-list-table.php:223
520
  msgid "ID"
521
  msgstr ""
522
 
523
- #: includes/manage/class-list-table.php:266
524
  msgid "Export to PHP"
525
  msgstr ""
526
 
527
- #: includes/manage/class-list-table.php:303
528
  #, php-format
529
  msgid "All <span class=\"count\">(%s)</span>"
530
  msgstr ""
531
 
532
- #: includes/manage/class-list-table.php:306
533
  #, php-format
534
  msgid "Active <span class=\"count\">(%s)</span>"
535
  msgstr ""
536
 
537
- #: includes/manage/class-list-table.php:309
538
  #, php-format
539
  msgid "Recently Active <span class=\"count\">(%s)</span>"
540
  msgstr ""
541
 
542
- #: includes/manage/class-list-table.php:312
543
  #, php-format
544
  msgid "Inactive <span class=\"count\">(%s)</span>"
545
  msgstr ""
546
 
547
- #: includes/manage/class-list-table.php:372
548
  msgid "Show all tags"
549
  msgstr ""
550
 
551
- #: includes/manage/class-list-table.php:386
552
  msgid "Filter"
553
  msgstr ""
554
 
555
- #: includes/manage/class-list-table.php:394
556
  msgid "Clear List"
557
  msgstr ""
558
 
559
- #: includes/manage/class-list-table.php:542
560
  #, php-format
561
  msgid ""
562
  "You do not appear to have any snippets available at this time. <a href=\"%s"
563
  "\">Add New&rarr;</a>"
564
  msgstr ""
565
 
566
- #: includes/manage/class-list-table.php:761
567
  msgid "Search results"
568
  msgstr ""
569
 
570
- #: includes/manage/class-list-table.php:764
571
  #, php-format
572
  msgid " for &#8220;%s&#8221;"
573
  msgstr ""
574
 
575
- #: includes/manage/class-list-table.php:768
576
  #, php-format
577
  msgid " in tag &#8220;%s&#8221;"
578
  msgstr ""
579
 
580
- #: includes/manage/class-list-table.php:774
581
  msgid "Clear Filters"
582
  msgstr ""
583
 
@@ -585,7 +601,7 @@ msgstr ""
585
  msgid "Snippets Settings"
586
  msgstr ""
587
 
588
- #: includes/settings/admin.php:21 includes/settings/admin.php:40
589
  msgid "Settings"
590
  msgstr ""
591
 
@@ -598,63 +614,71 @@ msgid ""
598
  "Make the 'Save and Activate' button the default action when saving a snippet."
599
  msgstr ""
600
 
601
- #: includes/settings/class-settings.php:87
602
- msgid "Theme"
 
 
 
 
603
  msgstr ""
604
 
605
  #: includes/settings/class-settings.php:95
 
 
 
 
606
  msgid "Indent With Tabs"
607
  msgstr ""
608
 
609
- #: includes/settings/class-settings.php:97
610
  msgid "Use hard tabs (not spaces) for indentation."
611
  msgstr ""
612
 
613
- #: includes/settings/class-settings.php:104
614
  msgid "Tab Size"
615
  msgstr ""
616
 
617
- #: includes/settings/class-settings.php:106
618
  msgid "The width of a tab character."
619
  msgstr ""
620
 
621
- #: includes/settings/class-settings.php:113
622
  msgid "Indent Unit"
623
  msgstr ""
624
 
625
- #: includes/settings/class-settings.php:115
626
  msgid "How many spaces a block should be indented."
627
  msgstr ""
628
 
629
- #: includes/settings/class-settings.php:122
630
  msgid "Wrap Lines"
631
  msgstr ""
632
 
633
- #: includes/settings/class-settings.php:124
634
  msgid "Whether the editor should scroll or wrap for long lines."
635
  msgstr ""
636
 
637
- #: includes/settings/class-settings.php:131
638
  msgid "Line Numbers"
639
  msgstr ""
640
 
641
- #: includes/settings/class-settings.php:133
642
  msgid "Show line numbers to the left of the editor."
643
  msgstr ""
644
 
645
- #: includes/settings/class-settings.php:140
646
  msgid "Auto Close Brackets"
647
  msgstr ""
648
 
649
- #: includes/settings/class-settings.php:142
650
  msgid "Auto-close brackets and quotes when typed."
651
  msgstr ""
652
 
653
- #: includes/settings/class-settings.php:149
654
  msgid "Highlight Selection Matches"
655
  msgstr ""
656
 
657
- #: includes/settings/class-settings.php:150
658
  msgid "Highlight all instances of a currently selected word."
659
  msgstr ""
660
 
@@ -670,10 +694,10 @@ msgstr ""
670
  msgid "Code Editor"
671
  msgstr ""
672
 
673
- #: includes/settings/settings.php:104
674
  msgid "Editor Preview"
675
  msgstr ""
676
 
677
- #: includes/settings/settings.php:152
678
  msgid "Settings saved."
679
  msgstr ""
8
  msgstr ""
9
  "Project-Id-Version: code-snippets 2.1.0\n"
10
  "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2015-05-10 22:22+1000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
23
  msgid "Snippets"
24
  msgstr ""
25
 
26
+ #: includes/admin.php:152
27
  msgid "Manage your existing snippets"
28
  msgstr ""
29
 
30
+ #: includes/admin.php:153 includes/manage/manage.php:34
31
  msgid "Manage"
32
  msgstr ""
33
 
34
+ #: includes/admin.php:182
35
  msgid "Visit the WordPress.org plugin page"
36
  msgstr ""
37
 
38
+ #: includes/admin.php:183
39
  msgid "About"
40
  msgstr ""
41
 
42
+ #: includes/admin.php:187
43
  msgid "Visit the support forums"
44
  msgstr ""
45
 
46
+ #: includes/admin.php:188
47
  msgid "Support"
48
  msgstr ""
49
 
50
+ #: includes/admin.php:192
51
  msgid "Support this plugin's development"
52
  msgstr ""
53
 
54
+ #: includes/admin.php:193
55
  msgid "Donate"
56
  msgstr ""
57
 
58
+ #: includes/admin.php:226
59
  msgid ""
60
  "<strong>Have feedback on Code Snippets?</strong> Please take the time to "
61
  "answer a short survey on how you use this plugin and what you'd like to see "
62
  "changed or added in the future."
63
  msgstr ""
64
 
65
+ #: includes/admin.php:229
66
  msgid "Take the survey now"
67
  msgstr ""
68
 
69
+ #: includes/class-export.php:102
70
  msgid ""
71
  "This is a code snippets export file generated by the Code Snippets WordPress "
72
  "plugin."
73
  msgstr ""
74
 
75
+ #: includes/class-export.php:103
76
  msgid "http://wordpress.org/plugins/code-snippets"
77
  msgstr ""
78
 
79
+ #: includes/class-export.php:104
80
  msgid "To import these snippets a WordPress site follow these steps:"
81
  msgstr ""
82
 
83
+ #: includes/class-export.php:105
84
  msgid "1. Log in to that site as an administrator."
85
  msgstr ""
86
 
87
+ #: includes/class-export.php:106
88
  msgid ""
89
  "2. Install the Code Snippets plugin using the directions provided at the "
90
  "above link."
91
  msgstr ""
92
 
93
+ #: includes/class-export.php:107
94
  msgid "3. Go to 'Tools: Import' in the WordPress admin panel."
95
  msgstr ""
96
 
97
+ #: includes/class-export.php:108
98
  msgid "4. Click on the \"Code Snippets\" importer in the list"
99
  msgstr ""
100
 
101
+ #: includes/class-export.php:109
102
  msgid "5. Upload this file using the form provided on that page."
103
  msgstr ""
104
 
105
+ #: includes/class-export.php:110
106
  msgid ""
107
  "6. Code Snippets will then import all of the snippets and associated "
108
  "information contained in this file into your site."
109
  msgstr ""
110
 
111
+ #: includes/class-export.php:111
112
  msgid ""
113
  "7. You will then have to visit the 'Snippets: Manage' admin menu and "
114
  "activate desired snippets."
221
  msgid "Snippet <strong>added</strong>."
222
  msgstr ""
223
 
224
+ #: includes/edit/admin.php:26 includes/edit/edit.php:48
225
+ #: includes/edit/edit.php:49
226
  msgid "Edit Snippet"
227
  msgstr ""
228
 
243
  msgid "Code"
244
  msgstr ""
245
 
246
+ #: includes/edit/admin.php:78 includes/edit/admin.php:92
247
  msgid "Save Changes and Activate"
248
  msgstr ""
249
 
250
+ #: includes/edit/admin.php:98
251
  msgid "Save Changes and Deactivate"
252
  msgstr ""
253
 
254
+ #: includes/edit/admin.php:108 includes/manage/class-list-table.php:140
255
+ #: includes/manage/class-list-table.php:265
256
  msgid "Export"
257
  msgstr ""
258
 
259
+ #: includes/edit/admin.php:115
260
  msgid ""
261
  "You are about to permanently delete this snippet.\n"
262
  "'Cancel' to stop, 'OK' to delete."
263
  msgstr ""
264
 
265
+ #: includes/edit/admin.php:120 includes/manage/class-list-table.php:149
266
+ #: includes/manage/class-list-table.php:266
267
  msgid "Delete"
268
  msgstr ""
269
 
271
  msgid "You are not authorized to access this page."
272
  msgstr ""
273
 
274
+ #: includes/edit/edit.php:177 includes/manage/class-list-table.php:225
275
  msgid "Description"
276
  msgstr ""
277
 
278
+ #: includes/edit/edit.php:204
279
+ msgid "Run snippet everywhere"
280
+ msgstr ""
281
+
282
+ #: includes/edit/edit.php:205
283
+ msgid "Only run in adminstration area"
284
+ msgstr ""
285
+
286
+ #: includes/edit/edit.php:206
287
+ msgid "Only run on site front-end"
288
+ msgstr ""
289
+
290
+ #: includes/edit/edit.php:210
291
+ msgid "Scope"
292
+ msgstr ""
293
+
294
+ #: includes/edit/edit.php:231 includes/manage/class-list-table.php:226
295
  msgid "Tags"
296
  msgstr ""
297
 
489
  msgid "Search Installed Snippets"
490
  msgstr ""
491
 
492
+ #: includes/manage/class-list-table.php:52
493
  msgid "Snippets per page"
494
  msgstr ""
495
 
496
+ #: includes/manage/class-list-table.php:115
497
+ #: includes/manage/class-list-table.php:264
498
  msgid "Network Deactivate"
499
  msgstr ""
500
 
501
+ #: includes/manage/class-list-table.php:115
502
+ #: includes/manage/class-list-table.php:264
503
  msgid "Deactivate"
504
  msgstr ""
505
 
506
+ #: includes/manage/class-list-table.php:124
507
+ #: includes/manage/class-list-table.php:263
508
  msgid "Network Activate"
509
  msgstr ""
510
 
511
+ #: includes/manage/class-list-table.php:124
512
+ #: includes/manage/class-list-table.php:263
513
  msgid "Activate"
514
  msgstr ""
515
 
516
+ #: includes/manage/class-list-table.php:134
517
  msgid "Edit"
518
  msgstr ""
519
 
520
+ #: includes/manage/class-list-table.php:156
521
  msgid ""
522
  "You are about to permanently delete the selected item.\n"
523
  "\t\t\t\t'Cancel' to stop, 'OK' to delete."
524
  msgstr ""
525
 
526
+ #: includes/manage/class-list-table.php:164
527
  #, php-format
528
  msgid "Untitled #%d"
529
  msgstr ""
530
 
531
+ #: includes/manage/class-list-table.php:223
532
  msgid "Name"
533
  msgstr ""
534
 
535
+ #: includes/manage/class-list-table.php:224
536
  msgid "ID"
537
  msgstr ""
538
 
539
+ #: includes/manage/class-list-table.php:267
540
  msgid "Export to PHP"
541
  msgstr ""
542
 
543
+ #: includes/manage/class-list-table.php:304
544
  #, php-format
545
  msgid "All <span class=\"count\">(%s)</span>"
546
  msgstr ""
547
 
548
+ #: includes/manage/class-list-table.php:307
549
  #, php-format
550
  msgid "Active <span class=\"count\">(%s)</span>"
551
  msgstr ""
552
 
553
+ #: includes/manage/class-list-table.php:310
554
  #, php-format
555
  msgid "Recently Active <span class=\"count\">(%s)</span>"
556
  msgstr ""
557
 
558
+ #: includes/manage/class-list-table.php:313
559
  #, php-format
560
  msgid "Inactive <span class=\"count\">(%s)</span>"
561
  msgstr ""
562
 
563
+ #: includes/manage/class-list-table.php:373
564
  msgid "Show all tags"
565
  msgstr ""
566
 
567
+ #: includes/manage/class-list-table.php:387
568
  msgid "Filter"
569
  msgstr ""
570
 
571
+ #: includes/manage/class-list-table.php:395
572
  msgid "Clear List"
573
  msgstr ""
574
 
575
+ #: includes/manage/class-list-table.php:544
576
  #, php-format
577
  msgid ""
578
  "You do not appear to have any snippets available at this time. <a href=\"%s"
579
  "\">Add New&rarr;</a>"
580
  msgstr ""
581
 
582
+ #: includes/manage/class-list-table.php:765
583
  msgid "Search results"
584
  msgstr ""
585
 
586
+ #: includes/manage/class-list-table.php:768
587
  #, php-format
588
  msgid " for &#8220;%s&#8221;"
589
  msgstr ""
590
 
591
+ #: includes/manage/class-list-table.php:772
592
  #, php-format
593
  msgid " in tag &#8220;%s&#8221;"
594
  msgstr ""
595
 
596
+ #: includes/manage/class-list-table.php:778
597
  msgid "Clear Filters"
598
  msgstr ""
599
 
601
  msgid "Snippets Settings"
602
  msgstr ""
603
 
604
+ #: includes/settings/admin.php:21 includes/settings/admin.php:39
605
  msgid "Settings"
606
  msgstr ""
607
 
614
  "Make the 'Save and Activate' button the default action when saving a snippet."
615
  msgstr ""
616
 
617
+ #: includes/settings/class-settings.php:55
618
+ msgid "Enable Scope Selector"
619
+ msgstr ""
620
+
621
+ #: includes/settings/class-settings.php:57
622
+ msgid "Enable the scope selector when editing a snippet"
623
  msgstr ""
624
 
625
  #: includes/settings/class-settings.php:95
626
+ msgid "Theme"
627
+ msgstr ""
628
+
629
+ #: includes/settings/class-settings.php:103
630
  msgid "Indent With Tabs"
631
  msgstr ""
632
 
633
+ #: includes/settings/class-settings.php:105
634
  msgid "Use hard tabs (not spaces) for indentation."
635
  msgstr ""
636
 
637
+ #: includes/settings/class-settings.php:112
638
  msgid "Tab Size"
639
  msgstr ""
640
 
641
+ #: includes/settings/class-settings.php:114
642
  msgid "The width of a tab character."
643
  msgstr ""
644
 
645
+ #: includes/settings/class-settings.php:121
646
  msgid "Indent Unit"
647
  msgstr ""
648
 
649
+ #: includes/settings/class-settings.php:123
650
  msgid "How many spaces a block should be indented."
651
  msgstr ""
652
 
653
+ #: includes/settings/class-settings.php:130
654
  msgid "Wrap Lines"
655
  msgstr ""
656
 
657
+ #: includes/settings/class-settings.php:132
658
  msgid "Whether the editor should scroll or wrap for long lines."
659
  msgstr ""
660
 
661
+ #: includes/settings/class-settings.php:139
662
  msgid "Line Numbers"
663
  msgstr ""
664
 
665
+ #: includes/settings/class-settings.php:141
666
  msgid "Show line numbers to the left of the editor."
667
  msgstr ""
668
 
669
+ #: includes/settings/class-settings.php:148
670
  msgid "Auto Close Brackets"
671
  msgstr ""
672
 
673
+ #: includes/settings/class-settings.php:150
674
  msgid "Auto-close brackets and quotes when typed."
675
  msgstr ""
676
 
677
+ #: includes/settings/class-settings.php:157
678
  msgid "Highlight Selection Matches"
679
  msgstr ""
680
 
681
+ #: includes/settings/class-settings.php:158
682
  msgid "Highlight all instances of a currently selected word."
683
  msgstr ""
684
 
694
  msgid "Code Editor"
695
  msgstr ""
696
 
697
+ #: includes/settings/settings.php:103
698
  msgid "Editor Preview"
699
  msgstr ""
700
 
701
+ #: includes/settings/settings.php:149
702
  msgid "Settings saved."
703
  msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://bungeshea.com/donate/
4
  Tags: code-snippets, snippets, code, php, network, multisite
5
  Requires at least: 3.3
6
  Tested up to: 4.2.2
7
- Stable tag: 2.1.0
8
  License: MIT
9
  License URI: license.txt
10
 
@@ -116,6 +116,14 @@ That's fantastic! Fork the [repository on GitHub](http://github.com/sheabunge/co
116
 
117
  == Changelog ==
118
 
 
 
 
 
 
 
 
 
119
  = 2.1.0 =
120
  * Added additional setting descriptions
121
  * Added settings for code and description editor height
@@ -313,6 +321,9 @@ __Fixed__
313
 
314
  == Upgrade Notice ==
315
 
 
 
 
316
  = 2.1.0 =
317
  Minor improvements to settings component; added description editor settings; minor security fixes
318
 
4
  Tags: code-snippets, snippets, code, php, network, multisite
5
  Requires at least: 3.3
6
  Tested up to: 4.2.2
7
+ Stable tag: 2.2.0
8
  License: MIT
9
  License URI: license.txt
10
 
116
 
117
  == Changelog ==
118
 
119
+ = 2.2.0 =
120
+ * Introduced CodeSniffer testing on code
121
+ * Fixed description heading disappearing when media buttons enabled
122
+ * Added snippet scope selector
123
+ * Minified all CSS and JS in plugin
124
+ * Made CodeMirror theme names more readable
125
+ * Fixed bug causing translations to not be loaded
126
+
127
  = 2.1.0 =
128
  * Added additional setting descriptions
129
  * Added settings for code and description editor height
321
 
322
  == Upgrade Notice ==
323
 
324
+ = 2.2.0 =
325
+ New snippet scope feature; fixed bug with translations not loading; minified all css and js
326
+
327
  = 2.1.0 =
328
  Minor improvements to settings component; added description editor settings; minor security fixes
329
 
uninstall.php CHANGED
@@ -8,7 +8,7 @@
8
 
9
  /* Ensure this plugin is actually being uninstalled */
10
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
11
- exit();
12
  }
13
 
14
  /**
@@ -24,7 +24,7 @@ function code_snippets_uninstall_site() {
24
  /* Remove saved options */
25
  delete_option( 'code_snippets_version' );
26
  delete_option( 'recently_activated_snippets' );
27
- delete_option( 'code_snippets_settings' );
28
 
29
  /* Deregister capabilities */
30
  $role = get_role( apply_filters( 'code_snippets_role', 'administrator' ) );
@@ -69,7 +69,6 @@ if ( is_multisite() ) {
69
  $user = new WP_User( 0, $admin );
70
  $user->remove_cap( $network_cap );
71
  }
72
-
73
  } else {
74
  code_snippets_uninstall_site();
75
  }
8
 
9
  /* Ensure this plugin is actually being uninstalled */
10
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
11
+ exit();
12
  }
13
 
14
  /**
24
  /* Remove saved options */
25
  delete_option( 'code_snippets_version' );
26
  delete_option( 'recently_activated_snippets' );
27
+ delete_option( 'code_snippets_settings' );
28
 
29
  /* Deregister capabilities */
30
  $role = get_role( apply_filters( 'code_snippets_role', 'administrator' ) );
69
  $user = new WP_User( 0, $admin );
70
  $user->remove_cap( $network_cap );
71
  }
 
72
  } else {
73
  code_snippets_uninstall_site();
74
  }