Custom Login - Version 3.0.8.1

Version Description

Download this release

Release Info

Developer austyfrosty
Plugin Icon 128x128 Custom Login
Version 3.0.8.1
Comparing to
See all releases

Code changes from version 2.4 to 3.0.8.1

Files changed (81) hide show
  1. README.md +203 -0
  2. assets/css/admin.css +0 -263
  3. assets/css/genericons.css +0 -197
  4. assets/css/jquery-ui-classic.css +0 -575
  5. assets/css/jquery-ui-fresh.css +0 -575
  6. assets/fonts/genericons-regular-webfont.eot +0 -0
  7. assets/fonts/genericons-regular-webfont.svg +0 -135
  8. assets/fonts/genericons-regular-webfont.ttf +0 -0
  9. assets/fonts/genericons-regular-webfont.woff +0 -0
  10. assets/images/chosen-sprite.png +0 -0
  11. assets/images/chosen-sprite@2x.png +0 -0
  12. assets/images/extensions/custom-login-page-template-300x200.jpg +0 -0
  13. assets/images/extensions/custom-login-redirects-300x200.jpg +0 -0
  14. assets/images/extensions/custom-login-stealth-login-300x200.jpg +0 -0
  15. assets/js/admin.js +0 -90
  16. assets/js/chosen.jquery.min.js +0 -2
  17. assets/js/functions.js +0 -3
  18. classes/changelog.txt +0 -41
  19. classes/class.settings-api.php +0 -1126
  20. classes/welcome.php +0 -193
  21. css/_notes/dwsync.xml +1 -0
  22. css/admin.css +322 -0
  23. css/chosen/_notes/dwsync.xml +1 -0
  24. css/chosen/chosen-sprite.png +0 -0
  25. css/chosen/chosen-sprite@2x.png +0 -0
  26. {assets/css → css/chosen}/chosen.css +32 -30
  27. css/chosen/chosen.min.css +3 -0
  28. css/login/_notes/dwsync.xml +1 -0
  29. css/login/login-rtl.css +263 -0
  30. css/login/login.css +273 -0
  31. custom-login.php +219 -868
  32. extensions.json +1 -1
  33. functions/install.php +0 -60
  34. functions/post-types.php +0 -52
  35. functions/upgrades/upgrade-functions.php +0 -149
  36. functions/upgrades/upgrades.php +0 -61
  37. includes/_notes/dwsync.xml +1 -0
  38. includes/admin/_notes/dwsync.xml +1 -0
  39. includes/admin/import-export.php +108 -0
  40. includes/admin/plugins.php +53 -0
  41. includes/admin/tracking.php +281 -0
  42. includes/class-cl-common.php +169 -0
  43. includes/class-cl-cron.php +89 -0
  44. includes/class-cl-extensions.php +277 -0
  45. classes/scripts-styles.php → includes/class-cl-scripts-styles.php +17 -49
  46. includes/class-cl-settings-api.php +872 -0
  47. includes/class-cl-settings-upgrades.php +372 -0
  48. classes/templates.php → includes/class-cl-templates.php +112 -112
  49. includes/class-cl-wp-login.php +267 -0
  50. includes/default-settings.php +527 -0
  51. includes/functions.php +33 -0
  52. includes/libraries/_notes/dwsync.xml +1 -0
  53. {classes → includes/libraries}/edd-remote-install-client/EDD_Remote_Install_Client.php +9 -10
  54. includes/libraries/edd-remote-install-client/_notes/dwsync.xml +1 -0
  55. includes/libraries/edd-remote-install-client/css/_notes/dwsync.xml +1 -0
  56. {classes → includes/libraries}/edd-remote-install-client/css/edd-remote-install-admin.css +6 -6
  57. includes/libraries/edd-remote-install-client/js/_notes/dwsync.xml +1 -0
  58. {classes → includes/libraries}/edd-remote-install-client/js/edd-remote-install-admin.js +3 -1
  59. js/_notes/dwsync.xml +1 -0
  60. js/ace/src-min-noconflict/ace.js +11 -0
  61. js/ace/src-min-noconflict/ext-beautify.js +5 -0
  62. js/ace/src-min-noconflict/ext-chromevox.js +5 -0
  63. js/ace/src-min-noconflict/ext-elastic_tabstops_lite.js +5 -0
  64. js/ace/src-min-noconflict/ext-emmet.js +5 -0
  65. js/ace/src-min-noconflict/ext-error_marker.js +5 -0
  66. js/ace/src-min-noconflict/ext-keybinding_menu.js +5 -0
  67. js/ace/src-min-noconflict/ext-language_tools.js +5 -0
  68. js/ace/src-min-noconflict/ext-linking.js +5 -0
  69. js/ace/src-min-noconflict/ext-modelist.js +5 -0
  70. js/ace/src-min-noconflict/ext-old_ie.js +5 -0
  71. js/ace/src-min-noconflict/ext-searchbox.js +5 -0
  72. js/ace/src-min-noconflict/ext-settings_menu.js +5 -0
  73. js/ace/src-min-noconflict/ext-spellcheck.js +5 -0
  74. js/ace/src-min-noconflict/ext-split.js +5 -0
  75. js/ace/src-min-noconflict/ext-static_highlight.js +5 -0
  76. js/ace/src-min-noconflict/ext-statusbar.js +5 -0
  77. js/ace/src-min-noconflict/ext-textarea.js +5 -0
  78. js/ace/src-min-noconflict/ext-themelist.js +5 -0
  79. js/ace/src-min-noconflict/ext-whitespace.js +5 -0
  80. js/ace/src-min-noconflict/keybinding-emacs.js +1 -0
  81. js/ace/src-min-noconflict/keybinding-vim.js +1 -0
README.md ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Custom Login #
2
+ **Contributors:** austyfrosty, frostymedia
3
+ **Donate link:** https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7431290
4
+ **Tags:** admin, branding, customization, custom login, login, logo, error, login error, custom login pro
5
+ **Requires at least:** 4.0
6
+ **Tested up to:** 4.1
7
+ **Stable tag:** trunk
8
+ **License:** GPLv2 or later
9
+ **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Custin Login allows you to easily customize your admin login page, works great for client sites!
12
+
13
+ ## Description ##
14
+
15
+ Custom Login 2.0 was 140% faster than version 1.0, and version 3.0 is now even better! *Minimum WordPress version is 4.0*
16
+
17
+ For more information visit the official [Custom Login](https://frosty.media/plugins/custom-login/) page.
18
+
19
+ > <strong>Support</strong><br>
20
+ > [Austin](https://austin.passy.co) and the [Frosty Media](https://frosty.media/) team will always try our best to support the Custom Login plugin on the WordPress.org forum, but please note that we can not guarantee a response in a timely manner. If you have an issue we would appriciate you using GitHub or purchasing priority support on our site.
21
+ >
22
+ > Any extensions purchased on [Frosty Media](https://frosty.media/) (not hosted on WordPress.org) will not be supported on the WordPress.org forum. You can always browse our *small* but growing [documentation](https://frosty.media/docs) for further assistance. You need a valid license key to make support submissions *on our site*. We thank you in advance.
23
+
24
+ > <strong>Bug Reports</strong><br>
25
+ > Bug reports for Custom Login are [welcomed on GitHub](https://github.com/thefrosty/custom-login).
26
+
27
+ ### Video ###
28
+
29
+ http://www.youtube.com/watch?v=hZkc-t36xYQ
30
+
31
+ ### Extensions ###
32
+
33
+ There are currently 4 premium extensions available, with more coming (suggestions welcome - and *will be offered for free to said user*).
34
+
35
+ **Extensions available now**
36
+
37
+ * <a href="https://frosty.media/plugins/custom-login-stealth-login/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=readme.txt" title="Custom Login Stealth Login">Stealth Login</a> - obscure your login URL.
38
+ * <a href="https://frosty.media/plugins/custom-login-page-template/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=readme.txt" title="Custom Login Page Template">Page Template</a> - add a login form to any WordPress page.
39
+ * <a href="https://frosty.media/plugins/custom-login-redirects/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=readme.txt" title="Custom Login Redirects">Login Redirects</a> - Manage login redirects.
40
+ * <a href="https://frosty.media/plugins/custom-login-no-password-login/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=readme.txt" title="Custom Login No Password logins">No Password</a> - allow users to login without a password.
41
+
42
+ **Extensions in development/extension ideas**
43
+
44
+ * Email Logins for usernames.
45
+ * 2-step Authentication.
46
+ * "Super User" only access for client sites.
47
+ * **Added in core as of version 3.0** Remove default WordPress login CSS.
48
+ * Submit button styles!
49
+ * Custom Login pre made settings templates.
50
+
51
+ ### More info ###
52
+
53
+ Activate the plugin and customize your WordPress login screen. It's as easy as modifying a few settings, there is no need to understand CSS at all. Custom Login even has a HTML, CSS &amp; jQuery textarea for more advanced customizations.
54
+
55
+ 1. Works great for client site installs.
56
+ 2. Read more about [Custom Login](http://wp.me/pzgsJ-HY) 2.0
57
+
58
+ **For those looking to showoff your login screen, check out the [Flickr group](http://flickr.com/groups/custom-login/)! Share you designs with the community!**
59
+
60
+ ### links ###
61
+
62
+ * Premium Plugins: [https://frosty.media/plugins](https://frosty.media/plugins/ "Premium WordPress Plugins by Frosty")
63
+ * Austins Blog: [https:/austin.passy.co/](https://austin.passy.co/ "Austin Passy's blog")
64
+ * Austin on Twitter: @[TheFrosty](https:/twitter.com/TheFrosty "Austin TheFrosty' Passy on Twitter")
65
+ * Frosty Media on Twitter: @[FrostyMediaWP](https:/twitter.com/FrostyMediaWP "Extendd on Twitter")
66
+ * **Development welcomed on [GitHub](https://github.com/thefrosty/custom-login)**
67
+
68
+ ### Hooks and Filters ###
69
+
70
+ Coming Soon.
71
+
72
+ ## Installation ##
73
+
74
+ Follow the steps below to install the plugin.
75
+
76
+ 1. Upload the `custom-login` directory to the /wp-content/plugins/ directory.
77
+ 2. Activate the plugin through the 'plugins' menu in WordPress.
78
+ 3. Go to Settings/custom-login to edit your settings.
79
+ 4. Design away.
80
+ 5. Activate the settings by checking "Enable" in the "General Settings" tab.
81
+
82
+ ## Frequently Asked Questions ##
83
+
84
+ ### What are extensions? ###
85
+ They are additional plugins that add/extend functionality to the Custom Login plugin. You can find all Custom Login extensions on [Frosty.Media](http://frosty.media).
86
+
87
+ ### My new settings aren't showing up ###
88
+ This plugin caches all settings in a transient, try clicking the new 'Update stylesheet' button to delete and refresh the cache. *This applys to versions < 3.0*.
89
+
90
+ ### Is there a PRO version? ###
91
+ Well, yes and no. Since version 3.0 of Custom Login the [PRO](http://frosty.media/plugins/custom-login-pro/) version is a completely different plugin. Instead of settings to manage your login design there is a new post type where you can create unlimited "designs" and activate each one as needed. Since version 3.0 all Custom Login extensions no longer work with Custom Login Pro, but will be merged into it in the future.
92
+
93
+ ### Why create this plugin? ###
94
+ I created this plugin to allow for custom login of any WordPress login screen. See working example on: [Frosty.Media/login](http://frosty.media/wp-login.php).
95
+
96
+ ### Where can I upload and share my cool login screen? ###
97
+ Check out the [Flickr group](http://flickr.com/groups/custom-login/)! Upload and add it to our pool!
98
+
99
+ ### I think i want to uninstall ###
100
+ Just deactive it. Sad panda is sad.
101
+
102
+ ## Screenshots ##
103
+
104
+ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-login/).
105
+
106
+ ###1. Custom Login v3 Design Settings part 1.
107
+ ###
108
+ ![Custom Login v3 Design Settings part 1.
109
+ ](https://ps.w.org/custom-login/assets/screenshot-1.png)
110
+
111
+
112
+ ###2. Custom Login v3 Design Settings part 2.
113
+ ###
114
+ ![Custom Login v3 Design Settings part 2.
115
+ ](https://ps.w.org/custom-login/assets/screenshot-2.png)
116
+
117
+
118
+ ###3. Custom Login v3 General Settings.
119
+ ###
120
+ ![Custom Login v3 General Settings.
121
+ ](https://ps.w.org/custom-login/assets/screenshot-3.png)
122
+
123
+
124
+ ###4. Custom Login Extensions Installer (an active license key is required).
125
+ ###
126
+ ![Custom Login Extensions Installer (an active license key is required).
127
+ ](https://ps.w.org/custom-login/assets/screenshot-4.png)
128
+
129
+
130
+ ## Changelog ##
131
+
132
+ ### Version 3.0.8 (01/14/15) ###
133
+
134
+ * Add: Auth timout setting when remember me is checked and not.
135
+ * Add: filter to wp_remote_get timeout. Use: `cl_wp_remote_get_timeout` to return (int) value, defaults to 15.
136
+ * Update: `auth_cookie_expiration` function.
137
+ * Update: Removed `post_password_expires` setting in favor of `auth_timeout` &amp; `auth_timeout_remember`.
138
+ * Fix: Possible white screen issue, for users who updated to 3.0.7 before a file was uploaded. (version bump).
139
+
140
+ ### Version 3.0.7 (01/13/15) ###
141
+
142
+ * Update: ace.js to build `20.12.14`.
143
+ * Update: admin.css.
144
+ * Update: Extenstions HTML and settings page location.
145
+ * Update: Sanatize the `auth_cookie_expiration` setting with a positive integer.
146
+ * Tweak: Remove false positive files from malware scanners; ace editor php.js [forum](https://wordpress.org/support/topic/wordfence-alerta?).
147
+ * Tweak: Make sure `auth_cookie_expiration` is greater than 0.
148
+
149
+ ### Version 3.0.6 (01/13/15) ###
150
+
151
+ * Bug: Misspelled variable returned on `auth_cookie_expiration` caused instant user logout.
152
+
153
+ ### Version 3.0.5 (01/13/15) ###
154
+
155
+ * Add: Update uninstall.php with all options to delete.
156
+ * Add: Disable lost password reset function option.
157
+ * Update: Settings prefix with global definition.
158
+ * Update: Add missing auth expiration function for setting.
159
+ * Fix: Hide tracking notice globaly if admin notices are turned off.
160
+ * Tweak: Update the hide_wp_logo description since Custom Login removes the WP logo by default.
161
+ * Tweak: Better output of update notification on settings page.
162
+ * Tweak: Update input fields that are integers to a 'number' input type.
163
+ * Tweak: Update readme dates to 2015. :)
164
+
165
+ ### Version 3.0.4 (01/12/15) ###
166
+
167
+ * Tweak: Add manual update link on settings page if new settings are empty and old settings exist.
168
+ * Fix: Make sure tracking is set to "on" before sending.
169
+
170
+ ### Version 3.0.3 (01/12/15) ###
171
+
172
+ * Fix: Add missing "Remove WP Logo" setting.
173
+ * Fix: When "activate" isn't checked disable settings output.
174
+ * Fix: foreach error. When `get_editable_roles` fails to return an array. [forum](https://wordpress.org/support/topic/invalid-argument-supplied-for-foreach-error-line-in-wp-dashboard?replies=2#post-6427631)
175
+ * Fix: On Logo "insert" getting called on background image insert.
176
+ * Tweak: Update chosen JS to version 1.3.0.
177
+
178
+ ### Version 3.0.2 (01/12/15) ###
179
+
180
+ * Fix: Logo background size width &amp; height settings not transfering over in upgrade process.
181
+ * Fix: Checking "Remove lost password text" removes the text instead of the other way around. [forum](https://wordpress.org/support/topic/lost-your-password-1)
182
+
183
+ ### Version 3.0.1 (01/11/15) ###
184
+
185
+ * New: Add force width option to force width on h1 logo wrapper.
186
+ * Bug: Change sanitization of all integer fields to 'int' vs 'absint' to allow empty or no value.
187
+ * Bug: Remove is_int function on Logo width and height style output.
188
+ * Tweak: On Logo upload and "insert" update the width and height input settings fields for logo with the image size.
189
+ * Tweak: Change CSS rule(s) from `#login h1 a` to `.login h1 a`.
190
+
191
+ ### Version 3.0.0 (12/01/14) ###
192
+
193
+ _REQUIRES WordPress 3.9 or later_
194
+
195
+ * New: Complete rewrite.
196
+ * New: Settings page UI update, now matches your WordPress admin color scheme.
197
+ * New: Extensions installer moved to sparate settings page (hidden).
198
+ * New: Removed version [2.x changelog](http://plugins.svn.wordpress.org/custom-login/tags/2.4/readme.txt).
199
+
200
+ ## Upgrade Notice ##
201
+
202
+ ### 3.0.5 ###
203
+ Complete rewrite of Custom Login, be sure to run the update script to keep your old settings.
assets/css/admin.css DELETED
@@ -1,263 +0,0 @@
1
- .wp-admin select {
2
- min-width: 150px;
3
- }
4
-
5
- ul.social li {
6
- -webkit-transition: margin 0.25s linear;
7
- -moz-transition: margin 0.25s linear;
8
- -o-transition: margin 0.25s linear;
9
- transition: margin 0.25s linear;
10
- display: block;
11
- }
12
- ul.social li:hover {
13
- margin-left: 10px;
14
- }
15
-
16
- /**
17
- * Genericons
18
- */
19
-
20
- /* Social icons */
21
- ul.social .genericon-wordpress:before {
22
- color: #21759b;
23
- }
24
- ul.social .genericon-flickr:before {
25
- color: #0063DC;
26
- }
27
- ul.social .genericon-github:before {
28
- color: #101010;
29
- }
30
- .genericon-facebook:before, .genericon-facebook-alt:before {
31
- color: #3B5998;
32
- }
33
- ul.social .genericon-twitter:before {
34
- color: #00ACED;
35
- }
36
- ul.social .genericon-googleplus:before {
37
- color: #DB4A38;
38
- }
39
-
40
- /* General icons */
41
- ul.social .genericon-star:before {
42
- color: #FFD300;
43
- text-shadow: 1px 1px 0 #FFFFFF;
44
- }
45
- ul.social .genericon-mail:before {
46
- color: #7D7D7D;
47
- text-shadow: 0 1px 0 #FFFFFF;
48
- }
49
-
50
- /**
51
- * Checkboxes and Radios
52
- * @ref http://codepen.io/Jackreichert/pen/xjyer
53
- */
54
- .section input[type="checkbox"],
55
- .section input[type="radio"] {
56
- visibility: hidden;
57
- }
58
- .section .checkbox-wrap,
59
- .section .checkbox-wrap > ul li,
60
- .section .radio-wrap,
61
- .section .radio-wrap > ul li {
62
- float: left;
63
- margin: 0 35px 0 -10px;
64
- position: relative;
65
- width: 20px;
66
- }
67
- .section .checkbox-wrap > ul,
68
- .section .radio-wrap > ul {
69
- margin: 0;
70
- padding: 0;
71
- }
72
- .section .checkbox-wrap li,
73
- .section .radio-wrap li {
74
- line-height: 2.4em;
75
- margin-left: 0 !important;
76
- }
77
- .section .checkbox-wrap label,
78
- .section .radio-wrap label {
79
- -moz-border-bottom-colors: none;
80
- -moz-border-left-colors: none;
81
- -moz-border-right-colors: none;
82
- -moz-border-top-colors: none;
83
- background: #f5f5f5; /* Old browsers */
84
- background: -moz-linear-gradient(top, #ffffff 0%, #e6e6e6 100%); /* FF3.6+ */
85
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e6e6e6)); /* Chrome,Safari4+ */
86
- background: -webkit-linear-gradient(top, #ffffff 0%,#e6e6e6 100%); /* Chrome10+,Safari5.1+ */
87
- background: -o-linear-gradient(top, #ffffff 0%,#e6e6e6 100%); /* Opera 11.10+ */
88
- background: -ms-linear-gradient(top, #ffffff 0%,#e6e6e6 100%); /* IE10+ */
89
- background: linear-gradient(to bottom, #ffffff 0%,#e6e6e6 100%); /* W3C */
90
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e6e6e6',GradientType=0 ); /* IE6-9 */
91
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) #A2A2A2;
92
- border-image: none;
93
- -webkit-border-radius: 4px;
94
- -moz-border-radius: 4px;
95
- border-radius: 4px;
96
- border-style: solid;
97
- border-width: 1px;
98
- -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
99
- -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
100
- box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
101
- cursor: pointer;
102
- height: 20px;
103
- position: absolute;
104
- top: 0;
105
- width: 20px;
106
- text-indent: 37px;
107
- }
108
- .section .radio-wrap label {
109
- -webkit-border-radius: 20px;
110
- -moz-border-radius: 20px;
111
- border-radius: 20px;
112
- }
113
- .section .checkbox-wrap label:after,
114
- .section .radio-wrap label:after {
115
- content: attr(title);
116
- visibility: hidden;
117
- }
118
- .section .checkbox-wrap label:before,
119
- .section .radio-wrap label:before {
120
- -moz-border-bottom-colors: none;
121
- -moz-border-left-colors: none;
122
- -moz-border-right-colors: none;
123
- -moz-border-top-colors: none;
124
- background: none repeat scroll 0 0 transparent;
125
- border-color: -moz-use-text-color -moz-use-text-color #333333 #333333;
126
- border-image: none;
127
- border-style: none none solid solid;
128
- border-width: medium medium 3px 3px;
129
- content: "";
130
- height: 5px;
131
- left: 4px;
132
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
133
- filter: alpha(opacity=0);
134
- opacity: 0;
135
- position: absolute;
136
- top: 4px;
137
- -webkit-transform: rotate(-45deg);
138
- -moz-transform: rotate(-45deg);
139
- -ms-transform: rotate(-45deg);
140
- -o-transform: rotate(-45deg);
141
- transform: rotate(-45deg);
142
- width: 9px;
143
- }
144
- .section .checkbox-wrap label:hover:before,
145
- .section .radio-wrap label:hover:before {
146
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
147
- filter: alpha(opacity=50);
148
- opacity: 0.5;
149
- }
150
- .section .checkbox-wrap input[type="checkbox"]:checked + label:before,
151
- .section .radio-wrap input[type="radio"]:checked + label:before {
152
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
153
- filter: alpha(opacity=100);
154
- opacity: 1;
155
- }
156
-
157
- /**
158
- * Input fields
159
- */
160
- .section input.regular-text {
161
- width: auto;
162
- }
163
- .section textarea {
164
- width: auto;
165
- }
166
- .section code {
167
- display: inline-block;
168
- }
169
- .section .description {
170
- width: 100%;
171
- }
172
-
173
- /**
174
- * File uploads
175
- */
176
- div.img {
177
- background: none repeat scroll 0 0 #FFFFFF;
178
- border: 1px solid #F5F5F5;
179
- box-shadow: 5px 5px 0 #EFEFEF, 10px 10px 1px #DEDEDE;
180
- padding: 25px;
181
- max-width: 460px;
182
- }
183
- div.img img {
184
- max-width: 100%;
185
- width: auto;
186
- height: auto;
187
- }
188
-
189
- /**
190
- * MISC
191
- */
192
-
193
- .section .wp-picker-container,
194
- .section .wp-picker-container:active {
195
- float: left !important;
196
- }
197
-
198
- /**
199
- * http://www.responsivegridsystem.com/
200
- */
201
-
202
- /* SECTIONS */
203
- .section {
204
- clear: both;
205
- padding: 0px;
206
- margin: 0px;
207
- }
208
-
209
- .section * {
210
- -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
211
- -moz-box-sizing: border-box; /* Firefox, other Gecko */
212
- box-sizing: border-box; /* Opera/IE 8+ */
213
- }
214
-
215
- /* COLUMN SETUP */
216
- .col {
217
- display: block;
218
- float: left;
219
- margin: 1% 0 1% 1.6%;
220
- }
221
- .col:first-child { margin-left: 0; }
222
-
223
-
224
- /* GROUPING */
225
- .col-group:before,
226
- .col-group:after {
227
- content:"";
228
- display:table;
229
- }
230
- .col-group:after {
231
- clear:both;
232
- }
233
-
234
- /* GRID OF THREE */
235
- .span_3_of_3 {
236
- width: 100%;
237
- }
238
- .span_2_of_3 {
239
- width: 66.1%;
240
- }
241
- .span_1_of_3 {
242
- width: 32.2%;
243
- }
244
-
245
- /* GO FULL WIDTH AT LESS THAN 480 PIXELS */
246
-
247
- @media only screen and (max-width: 762px) {
248
- .col {
249
- margin: 1% 0 1% 0%;
250
- }
251
- }
252
-
253
- @media only screen and (max-width: 762px) {
254
- .span_3_of_3 {
255
- width: 100%;
256
- }
257
- .span_2_of_3 {
258
- width: 100%;
259
- }
260
- .span_1_of_3 {
261
- width: 100%;
262
- }
263
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/genericons.css DELETED
@@ -1,197 +0,0 @@
1
- /**
2
-
3
- Genericons Helper CSS
4
-
5
- */
6
-
7
-
8
- /**
9
- * The font was graciously generated by Font Squirrel (http://www.fontsquirrel.com). We love those guys.
10
- */
11
-
12
- @font-face {
13
- font-family: 'Genericons';
14
- src: url('../fonts/genericons-regular-webfont.eot');
15
- }
16
-
17
- @font-face {
18
- font-family: 'Genericons';
19
- src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAENIABEAAAAAatQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABgAAAABwAAAAcaii0EkdERUYAAAGcAAAAHQAAACAArQAET1MvMgAAAbwAAABCAAAAYJdbaIVjbWFwAAACAAAAAJgAAAGyqWnWY2N2dCAAAAKYAAAADgAAAA4BYgHJZnBnbQAAAqgAAAGxAAACZVO0L6dnYXNwAAAEXAAAAAgAAAAIAAAAEGdseWYAAARkAAA5fgAAWkD4H3YjaGVhZAAAPeQAAAArAAAANgUfUT9oaGVhAAA+EAAAABwAAAAkEAMH3WhtdHgAAD4sAAAAiAAAAQpVkUB7bG9jYQAAPrQAAAECAAABAoDMauhtYXhwAAA/uAAAACAAAAAgAagCQm5hbWUAAD/YAAABYgAAAthC114IcG9zdAAAQTwAAAHUAAAFCuMEJONwcmVwAABDEAAAAC4AAAAusPIrFHdlYmYAAENAAAAABgAAAAbRQFLPAAAAAQAAAADMPaLPAAAAAM71j4QAAAAAzvWBvnjaY2BkYGDgA2IJBhBgYmAEwnogZgHzGAAJvwCyAAAAeNpjYGb/zDiBgZWBhdWY5QwDA8NMCM10hsEIzAdKYQeh3uF+DA6qf74ys6X9S2Ng4GBg0AAKMyIpUWBgBACOigvWAAB42mNgYGBmgGAZBkYGEFgD5DGC+SwME4C0AhCyMDCo/vnI+Ynzk+Qn1c8cXzi/SH7R/GL5xfNL5JfMLyVfmf//B6tg+MTwSeCTwmeGLwxfBL4ofDH44vAl4EvCl4KvDP//32LnZ+Hj4+PgY+LV4DHk0eZR5ZHnkeQR5uHlYeeugdqOFzCyMcCVMTIBCSZ0BQzDHgAA5FwqMwAAAQkARQBBAGYAfwC3AAB42l1Ru05bQRDdDQ8DgcTYIDnaFLOZkMZ7oQUJxNWNYmQ7heUIaTdykYtxAR9AgUQN2q8ZoKGkSJsGIRdIfEI+IRIza4iiNDs7s3POmTNLypGqd+lrz1PnJJDC3QbNNv1OSLWzAPek6+uNjLSDB1psZvTKdfv+Cwab0ZQ7agDlPW8pDxlNO4FatKf+0fwKhvv8H/M7GLQ00/TUOgnpIQTmm3FLg+8ZzbrLD/qC1eFiMDCkmKbiLj+mUv63NOdqy7C1kdG8gzMR+ck0QFNrbQSa/tQh1fNxFEuQy6axNpiYsv4kE8GFyXRVU7XM+NrBXbKz6GCDKs2BB9jDVnkMHg4PJhTStyTKLA0R9mKrxAgRkxwKOeXcyf6kQPlIEsa8SUo744a1BsaR18CgNk+z/zybTW1vHcL4WRzBd78ZSzr4yIbaGBFiO2IpgAlEQkZV+YYaz70sBuRS+89AlIDl8Y9/nQi07thEPJe1dQ4xVgh6ftvc8suKu1a5zotCd2+qaqjSKc37Xs6+xwOeHgvDQWPBm8/7/kqB+jwsrjRoDgRDejd6/6K16oirvBc+sifTv7FaAAAAAAEAAf//AA942q18C3xU1bnvWnvveSaZmT3PZJKZzHtCJpkJ88hkIIQhCAECCAQCCCooggTkjS9q3Vqpioo9tqJVK2hbsdpj90xA2mJrjtVaW0fLFbmt1h6xp1ptPcfe9rSKmc39vrVnQhBsz/39bmBm7732npm1vvU9/t9jLaIh8Ef/yj1DeKIlBlJLzIRMFP1i2Mbb/DXUZeNdIv2r0vPEE166+An4u/MJ7pnyBZeS0+R0+XVymi6HE+X4aaoQSsb9TSREyxEOvlQjwXfrSA18s424yJVEJgmZlmQhIVtSsqYki0lZn5DtKdlQkh1JuTYh15WoXJ+QhRNFoq9NJpOyrlTUCcbYcF7HG/C9xhCTdZaCncZkV6lgsiaTRbsL79sthlihgcZIx0Sa8TvO9+KgO2Xo7GnCSWVJIGWJk07DNUckiY57KZUj4Sjc1cE/GION9BLZmJDNJdkGHYR+2mEwJ6DHcp2lIEJ/dKWCg8YKYp1oHRYMRj7kypGCzQxXVKsjcNUxkVisIZ9gtXCCL0TszmRnOhKg5BW6mj5KV7/yirJfuUTZT5P7ju/bd5xPjG985RXuIWzdhyQWiEQlnaSVGHVdxE+uZ7SFvvkSciMQMyHzpWEj79DH5JqSrIfeBlhva0tyraVQD731lGSPpWCFM22pEIR+11LRWtAbczm5XpS5nOyBUfAOM/RbtoqyBsbS6IOxaKm1FtscYoHT5GBMNuAYv00jIoVtdpJKkkyaBAPEle70OR12rS8iAYHZ/0+ArHmq+8EPqVY59cMfKJ9IR6nx6FHlb0epxCPNTxNpVBJ8B1aV34a7Y0/uPnp09y3PPIPj5oh+PF9Nx3EX9LWpFDKWIYm8BYxVl6SyJSGTE7KQBErIvKWgp4wU2qRcY4GxxoBYOGsEB+AXaeWVghfQVoHuKHCEA0fwUn1XiHprVALRwSYtzgEHFyJcCvABDTAV3sNTCfimjqQJlU2sK9AvTWnYoCEwKcYS8pKhVDAD5Y1EtALFCxoDHPkccnCFdjpRI8bh207SnpN3bz1Ntt6tkfafPLn/C8+3lP8gcfe3PM94FH5JS4iROMhKImsTspgCZpStSeSJGkaZWiCIk/WCUUP9/aKRR8kxakGmgEI1QBRTSTZZZAdyUNFhwrsOEeTKpcoVEMdOgmKyM+M/cwryIynHjw/t46onQDSQr+PKcUr2DY07JRzSjNGlgaTIPoKiDnMSS8he4NA065++VNQT/GG9AN3SWwpu6Fa8VIy7sTE+ERrjlkIdNDpKxToHNtZBF2WHpRCFRn+pGPVjYzQE/c4Add164GtjfS5XqIsD/9a4PDHg30LUAc3e1hzwdawGJVYMTWQySsV0Z9ahdYgonxkxHc14KVwAH+MdmBY412XwTiSAT7kcMENkaDC/5cCW/OAQ42aCfD3WxI1QafX+8H25JYq0YMuWBVRakrsvvH+1IgFjcxqKh91K5RHKHlHUR0DWgbvIiA5pZiVB0kZkf0K2pXCKgMFrU0wThRJy/QmQ6EIY5qkgWICNGmAkDcBGKX+S9Tjop2IwEKFZPw5KbYsB2x5YJZBVBw6sUvJKXlp1gEfN8vivsEVS8sjR7Ca8K3k6ckBZJf3qcSqdaSGEp1U50EAPfWRmRctT7Kj+BOoks6XghKlpKhUCMB9mmI9ho9VWj1rEKRYafDgHFGTgsNZgdjibKrMAHabhznQ06+VRElw9NB2BC+qwm6gOf5TJZaa/f4V7gscyOXNR34UX9q1Ydnl8YBJPkNE+hVd///H+FY1TZsyNzr+z86K+o7882rdi+Qc3L33srslo/uCV1oNGIevIBiJfkZAvKcmtqEGofCXjxs6S3GkpNFKU2MJ66H0n9LPYP29BDvRko/i0xuLovmDJZUzVX3IFcJTlMrjRKuZrjDYPaWlL52cPXooD1VgPBULhjiQbnJi2klAqKRCrw0I02kgm3ZlJR3sEfOMi0Tg1cbpIVKuL82aqdWkddi/v0upMNE6jcSHaSk3U6fIKLq+uM2tHNRENkUepje765TG6i1ofVa5TfhEK0BnzrpMGs+u1Rr3ZJtSlui/PXr1nz9XZy3oSRuOkjvXZQem6uZnapqnLlvo4gyfQ6RFqGwyimzd43IE6ytdZm0OdUxbFaSCk/EK5TiC/pF+AL39U+U9l9zGlUP7jOl1zg/D8wpsnG5pnDT217ZGt5pZZl06knGCdGPZznD88UdRy3D03bN+/7amhWT594qI6E+3KCnXBxnpOV+O2wtiau/y83t3Q3OAEXZS8Vqj3addxTrRxOnxjc2MmjYzzJ5E+soDsIMU6QmJypITao7kkd6nztZDZNwuIhaVwIcxXbxLV6yKYsgtBHvJ1mto6wdnUHGppz0yexearPgLtRgOxtfZMzfcumIvT1Cwe0tMmz2Q877IW/YkLcmjj6ilMmA/mywJqHkw3b7e6Okk2Eq2l0awzlOWiWkKd/mSW47XE5rT1CNlIKBjQUi/n6hRcXNTE2bwUPmPNhr6FM0UfgpftW99SPlR2K2vg9WFox8Yb6Hffs+SVd5Wtf/c9R/+6567h55Q/U/FXdNbho/7v/Va57W9rf649MO+O9RO+qBz5gU+iC5yeqPYJOvd695f7nv77YtOkFZ6HXq5X/sQnz/3+b8HvcrMPKq9eW6Kd8zqkwWT9V5yz4tT9tyXK0U8fGFlA2+gtc5RjmvWPKY9xk3w9vaEv3mMpb/GkFtf6tY3UM5y7dEh5tPF+5ef3baSLR+JMfiTaBjjkN6DNYdgpXxY41JlKwmEKsGicZtJZp+BC/k4lXZ1ZrQ5fyLImXgj6pI4WSn52zTOhqDeRvPHxBUvnLkvuoXveMf7q/gMbpfWt11y1dvYm2rPz6XeUX39LeZUe03yDu3uzrs7981s0MT756CVXLH7iFzXR9vv/9w731Fv66to3L9D59Nd//MEv7l+KfSOAkXQSiZILCKpIUJYBMG9JWUzIvpTsLMlulXVaAHeeQDAKMNRgAVwpuwBLpQoTgHlcgOZkd47BhPHaVPTb/FNQv7qykWDAxHloEMFDICLtG9KQoX37hpR3qalWeTfW+5h2/vpL7lnWpijltqF9iBHw9qfwzr1IhZHa7iz9P8bsJTsv+JMyWs4hwAOLTyTNe9D3BjKf6VMHs+K2ZJFQNG7EBRYPUIVetexupv+5JHZdTBZd9fiMy2GIFesZNq4nYAsbKzY8JaZ7uFTS2Ux54FAP5+fRmHPSb9Nrn7wqO+R26/5tborONikvKCP8SzRBufl7NuW1PK+8m59helU5NnqEn01A21fpawbcsRiQx1qyl8h1CXlpSW5OFMJpwGSNpcKEOKD4RSqh142T0W6Q0QuT8ppSsXsN9rG7H4a0xlJYBe0guFcC7btRcA0ouDbnkuUXM6FtXorCTPUGYrcFsn0rL161BmW1UTzkjM3qR0UsL7IWWjpQaq0WaydIrROkVgtSG0GppVpbKtk5lXY6tTqtjtp40LadLqfa5qVqYw+XSaOuNSDjulCSBYpsHYnytNMKWho4WCft/YjOpRvp3I/27v1IOaR8TTn0UfpUSblx5u50eGMw4LCZ7G0TaUS+YYndbLfvvjCyIRi02KjZEptIgwvrATnU2zmbxqKt1eh5fv4k4ybl/QdfVR6iF27ZsedmgfuY3nrkjcs1U/g5n/kVOOO4Pym71gieh6hJw/G0OcBruNH7OJEu03EBHzVio63ByUHrw7T2wtxKf3x5JiB4jY019SanaDfmBukVm58/9XV/XKvhDpb3DtHtb7463NJ66wOqfzE2tzPIcnIFeYjISxNyS0qeXUK+AxA5HRyNlGwvFafbcfqme2H6GoAX16pzjJ4bOmpg8WV3Ug6Btk4WAyF8NNAF3LgO5lcHHscwb5q5AmctIOaNmhrvhFhv/+LB1WyuZ8NcF0lsJqjgAm+Cc128C+3udPEItfiDockrL2Pm1Cbi5KCZpK6ANhjgM6qkeqhfDIp+hwrrUWrBzIJ51cP9LDtNZf0BLd9DXWBPNS6cVZBgW6TTBd/k1AJrSDeUvB6fu9lrnW07cp8q2uCknGaqDyCtotFcfDcfNIdsHlHUx+ceumjgwK3lR278/YzcG9LiObbBULfHo9PR8qElt01z3L3ruh85HdKuG16i79Lf38hPyfm7wx4qaKehRlD9H/zqUfiVJufdT23g3LVNYqO93mFMz5x815GtRzr2Xnbqm0vWU9pQN7lhYmBigyds0V8hdD7ya0H4/TcPjAjCL4mKycCAap8Br94CunkWQ9owB3wCcEwVaasT5IEJ8pYYUtYBtinUmYDCHrEghhCWhepF6yGLua09rqIyu3MyBQAZp6A6bKA3gMLpbA9NJREjw3mcA2Wo0WX8XmrhAKVdsZBbvJauGRhYZ6NzlKcBls2usQ9OnTTXT2fn1t2+KNSbSvh9jhrlCIU/rTj7sstm969aferb/L+P+rkJnY3JmZNWzyj/J9e15bsbsjW2xsZgk3iX+23lPeU/Lz6LT5sAe2bJDUwDARL2x0DtdDBn0Oc7IcqdKdkG/pdFdsP4u9j4wQO2MCfYy/wG2a9yawwcEkuhTVVDOSCL18NMgOwXC/UuIE7AKmdyckwsdHQiiXxwu9CSUV3h8SYC0PbnkosRixkOoNWYyUCbQMnCaXT6ALegd/oiC9WBF/x1qtdbZqR2U/3B25MLuwIW5ePxRmSfcO2kCy+c1D1v/qdH+IbR9+jRdltL17CyjL74vafr2yINW4AZngRAtQCw1DTyXVJ0In4yJ+QJJaSQFgjSywiSKckZS6EJRg52MmAptDOXuTAdDp3uH/bUfDSHOGJGk9wAVBwp2OkncmRk2GqP2GJFePft8e0JakFMc+SQ1d7gjsTxj447l/NuWmjKgCC7clNQkANiUevswLN2a8E8AanZMQF9NNLco0o2mCoEyk6rw84J4L9EOVDQ0UjWpmIKJ3MGtKi+rSzqYOIcdhBeHaLlaIR7su/eYzT2lEwTL+94QvnZi5d/LzDbErj4Xp3n0Za71g4sC08xua67YucPLlc++PiOD7+xbMCq01kMuqDzxi8Jf7rqN688fOl1Lymf3vk35eqTF+eV3+Z2fbXz4C5OXnjNHUc3LErd81zu8q98n058+gQ1XX7wzWu/usbhrp/SUm8xpKgaXhvDsINkNymakO4AO2Yn5C60kcwmLmWkD5fksKWQAkrPLclzLYWZcDa5JE9W3V/wPZYBI85NAW1iiYHFqC9nikdMGltz1zTLArycbC04pyIBnSb0QhYDTWeDF2IwEps7PCE1eeqCz3geiGSDgWhnFoCpSj4mu+BrOV3OTmDSbGckClRmWAHJDNTPomEErgVVC/ABpsJ1tuOh+gZfvXuOZ1bT3gWPlvdc8tjf9971f75zfW5ondUjcBZeozFd0CeNbH3p5IJ9lyy63FYz0ds3fdF2i96w1VavBbT61Fl+hnIJvP7z0dYd66g703+ETv3ZtuPfvGzeTY8NL9/zWqveZDPkDTanOP/61cVbF7751Nf+fu/OBfGHr27tXXr/1thCm00JD6zecy0dZX70AW6VbpXmAChGM2khTBeyOIlJDRZRNUJjKRiA4nXV4JDV4vR1WiI+oXI88Fe67K9/VR7n7qycCN9VHv9r5ZwdK7iY6G4EF8ZPMgRjnPUl2ZqQTSwOh9E28D7ADZa1GFsrEo0FZcBkHa5r8vhUxncBdzdSaypJic0aDvFwCUyNxi3CowxopcXX2Vcu/MrGb5TpJrq61qL8Sbnjlhn52yz6LVu7Znfb0xOPLZdv1Fy+cbFysvwX5ST93/QnlKcr9LXKgOf+lbJMzRfSWTRh09+/lTD6VGOKZvDjrYRimJMgWsNgKzlXuYUNVDq5XyAYjxqFd45FfdD1xhYF35vRSUd60F8RSdsCejoAnpxsSMC3UjmYkJtOYLTSmSyEkCQWjH/VoZlJiXZmgsGsd2ZFGHUUeVFEoBpEiAYg7Vc/dbtvufTiGzatWHbtl2+f290mivQJZfC02N4xe84G4dHyHdf1Ttvma3bau6h7WaihPf4AfZk20BfuWH7xlHzwLNsRJDEymdzMbAdYCW9CjpbkhoQcSMkJFp4SSrJgAaGlcneFKAhhfcAoquCCp4ADabRgpExOMddzCkhs2AcjCuTkCeKw19PGvMpGjM2QQkMUZLnRF27BtoRYCE04nwEB9z7FAjZ+EEEwcOBP+UMVTgyrxgWckEiMgkieZUWk/oyGZPqVjyzKcWWZctyifERZFPGk8hzX3J+RMv3s7SxDMoSNPOntwXhd2/Ge3mbluZP4oerT/RlQZ4AtKGALhdiJCzzzZqBeFOgXB9+cyglGHowfWjAYL3sZ9GuB9zFz0gF0aXDA6J31Tcjsckg8pNUgnnOhHRgOhFvbEP6xSFyWdiZdFOmho8gGNDKVRm1UDPOusMi7snAe1YiarIG6MpR4uB+LLSL3Y4+n3CvarbZyr+eWb387w2mUd957j3oPvv/BB72c5j3lHep9r/wpvffbvJO+1lxPX6upUdrrm5V2n1Npq6mhx50PbdqkPK48TtPP0q4HnqWp8rMPPfRQOUCXPfgs1/TsA3RZ+dlNvzmLhzJkKXmGPMZ4yF6SexLy90rynETV9fnRONcHsYUaWLoHzq4pydeoxAKm+TGGmNqAaZbm5HvEQ88sX9d7AOlyjbVYJ1yNWqJBzNtqNXZvoCPZ3TNn3qVbbv/6Y/9aHGaAuccOtjUyaTIC5jnguD5N9RZv97zvY7xTswjudSRTuc/xjIRUMoSgOM5FUfJAxwjRSCgasWY7Q1lA1wLHJFLIwjSgYz+V70RD4oqwpwSdltPg/U40G3E0wFoA1U5mR1B44RJvZ+PgUEbQvOCVDo033AS74vJyzGTjBWWP4ldgMIFMwbhXJMSU3nl8rp436bVv/Ynetnby0n0vbd8hRztnb9usPH3wceWDvjl1S5fR9iLn/6Vy8Gf3iY994Vrq2zV31r3lr93Dm+hl1PrQN6n3slDgSuU3+7+hvH7VVWuoqH/gqk3/PnmKs3/mmxcusTtSyZUrF0TSejGVXjwwOVerjTW3JOKz6jiTweGcMbfPFo9Y+2KxFf45Wm5wd+8FV3jqw+9s3taVjQQ/uOlL3+e1Swfv2HbtwIqfUIdxw+K1yl+v2jHlc1y6t5Tb3vz7y7fdvPPYQ0P2jueuu0956tpdWzyNv93/EL3q6w/+L6/W8rZy74dfOz27z5xzfE2598R+GMU26c5duegX79Xqdm7eoPz6+mue9/oHLl7xzpx59u6eSy9bvLjeNdHVN2FZ3yyNtjs7EJ5qcWhoV4z3zvF4/UIsMHdRNKs3NDRfcMW0DQmr5ao752xYF4tt33nddXe6bG/cvnf79tZgU4A6fsJteLZnnn1yz/oNpOoj6gnw/nxyJbmR3EFvIrImIa8tyVJCvjUl31SSdyeL0k3o8kl7DLHiTRKe3vQlcBRvssjXIyoHxBlNyJtSciuIyJ0JOXFCXl8avnB9Qh+TSQkDHxeW5PWWQp6l+2SXRc6W5GwCTgo7oMlXGr7ct0PNcfkshT3QdHNSvr0k35Is3r4Hf+32W+GH99yOp3skcDvvUrGsYevIsIplZ1nkmSOFQe4TednID4UdIy1qc59FnjFSWMp/Ii8fKcyaqYeG4Zl9M2yxQt8MPXxouG/WTFtMHrQMLx1cBq2Dy/TyUsvwsqXLbTFyZMbMvlmDS5ctj1f+6DktDArn14NIZjSbUKxdYnHl2utRcH07QDeK7ihahsKeGtAFE0C0pbXQSgDRoTa4SSw6XUzKo9dDszuxfoeKGuxeQGs94P/GhQSNc2mQPowqxwX0dH0gYBhKBqNqN6G3zLlMvM7EZ9M9fLYHmsEHdoDdAQ+44tMBGNSZABXGeZphTrQDHWopf90LX9j5i39Zl6zzeTpD/iU2m6ve5gq3dfvqLc3eeL39nvuURuXjb8ye55u+8ouzbV16quUESo2NJtuUOXfuSiVnt1hfDcSmheqDA7Paa4O2VM+0UHPt0986+rurU00r4l2XX5B0TbampzRNWjO9w8EfZYAKnGP6y95rLu1KDm6VprfMmNKebfb0mm2xjoTT6Yn09ixPxuZPhQvLkpvyBxd3bbikr1XDiYJZZ6ox69xtcVuDoHPGfJ7++X2WxMKOVrOhRtTxfCiebU2mvFvvOiAc2pQPtuZWbt+R3jrZ5rHmLtq6qXzqjF+uYvovg87vAr6/CP3qvgTLrq5A9V5IA3cBgzYni+ksslw6AbyetSAUAJtQWAnKPU1hzi9cMohznhULgb4cWjorThTv5ZupVwMk16CWFE1qyB/OvBygIL/YAfoT9GtcGw12MBBkovgRXZy/qaZv+syDBwuP3L9rpbuhtuWqi6/ItsQ2br5285VLp4lWytWIvpap4fSmxTNsVv8F07sstGvaK7vWu7jg1EUrVg7k7bbeX+/NtTQ28GJjvcFwUueaNEH45iM/XTl/22QfZ2pqMBo0tllLvvLo725YfvtA1qapq9NplT/ytYFAe7SlzsY1eGvraH0gZgq188Xyu3W+lfO/PffmFXPa/WY95Sw3JKe1r1owb1JbTe1LBt/6TYg37wI6bgc6+sm14JUi3mopFRtakHANDiDchoR8eUlekmApwSXVlCCVr0vI3hPyCnBRS8WAl0WU1oGUewN46iXwyRWWQpyB+GK8jmUNe0D0rwfqB7wgTr5cIb4CjKPgaGjRz9uJAlUnymYQspYGuA1Sd/kGkCpzPMDuLRGH67ykE0/1iNiZV0oxnl1xTHVOHXOPoiA6oQh4SFlw/NH4MfSKmZ3I+H9wH6PhzuoTldvBAE6pw67ewH/wzRXkW71/15dO7r7rmhn9T9Kud3bbUvRLJ2/ZtfHCuU8qP3tntzid3tmZXnrNkX1bN3dPDgSnTFoyb9PyxqDfLwKoXLm6LebzOhoSmUCgoX5SbtHg5js2bsjlsumVl37x4ik5v79n2vr57QlXo9PR5IulgyHNfbtPfqm/dvc7ys+eXLVkaDNcTTJ9+R3a9eTgwI7yX/rnz01MjccXL1m3bEpPJNrYUG/XG6xml90TD4R8vp4OmzMUXJlMtLc3uFuic2avXnvBtJYWN4CyZm8yP6HN6fQF0hNdbr+f+QcgY1rMcSbJCiK3If4uRttYGrcOpzyVkHUnZLFUFHXYKLZiLYjYwN697D0IHKATWaEIBrvTWIihg9l0wLRGEVARllQE7QgThMoOE4laM0Wwbdfqxt5iNOlk2Bu8YSqNTNy0Ok91tW6rf/lMi15PD2T6OyJO+N+fySMeVvLTdvRd1ErB97nkkY9v14jt/qbFDyxaciAc6c9M6K3zR9kbPDrU39LRwsIBJbpXl9JtJxPJJDKbLCJryEayg9xAryaYe5xaki9LyMtLxeWXwWjI8kHg55Usgr4hJc8rFdPrrsG6mK6E/IUUxmEBYTsS8paSvEP1qr6YkNtPyN2l4WR3+5gVTZbkbkuhH2RiQUleYCmshbOhkjxkYcGdSEnehtbYVhq+LjJdj8Gwwo2VoM9P/rJLtYg6i6wfKbiFT+SGkR/++eC/PYLNBXeDHsNB9SOFWrhTN0Ke1ulr6+ob3FXL95lrZve620VrIZEGDdgvDvOaLiZbC6zF1oGlqBbXisNT+5azUP6QdXjCiktYAnW6mDdYHE3eq7Zs3/kFbIhYC6FrMOKxaDlMb3dOnicejrQnQpOnq8m7w+A4kZ3X4QUvFjVNffjdDmtB2wh2c8cW6ILNynyuSnLKBrLq0qBkO5kRjIZ5p0uNMamsgUAZhDdOs3Z4HMMgTrsTYTOGkjFH4GQhKbs2YE+D18KEGy6ZEIfSnexOtegHv5qFUkpXD6zpPvL7lRqr1UFz9QMdc9avn9O3VqOcmvfb73WvG9jZFTe9oDylbFP+9QVLW2ZtS2KJp23CpIVP0OB3n6TBJ55Q3nryu8pb26bFE9N6V3pbzV13/0uXudVrHvzB0UH6L9MugVba0Z5vb8/TgY5YbkK78JWBqwdWG+hLzppazawJE9d/bf3qvm7li7WrBq8eyK5oTE689d3du39/a7KzcXkm0dTfE8q9cuLpoaHDGzbC+ycre3tX9t4f85q7uszemHlw8H3Wwl+PP9Fe/vGUec0dLZMI1qVwGIOWiAd8wzuI3JiQ21KytlTUNqKYaikwdgtj3tpS1XE8U6pTX5Lr1cismKyk7QJqhUer6kLqeZj1RlasVJNjir1Q247soG0EC9sQCrPpFp82mC31zT4/skGtVTbm1PIwtbajh/qcLocummGlHDyLcYUzriy7PYX6WfUS+Lu6xAUJzYvU+aLmG+vhlNKX7tr7Er9w/TfwQveS8h8/4xcee8WfSPjpe7f96NnbNrR3rAzE4wGlec9zP73tf3XEj+O9Xx2746c/qdbr6DCvHSJTmL/oLMkeFm1ATzHMKCGWZFEtPACvMALjbRQxOF+LI/Q4mRVTS1Uq4QKsKOOI3UWzzmTWRTuRt3QGGgnoME0hgHtfLSSjJEKHhPDesIYOhed0ZsLKG8qb4Y0hLPZgeUvpGJab0dX01qGIsk/I5wU6FBmaA8/RSDiMGAhzf8+C39vL6rDU6j5iM2htGZeBZh2UN2glehVnU+4u/5kz063lD4WH6Ta67eHyR5Sz043lPyt3062cWfka/ygNKt9XXuYP0OXKy8qRcnb7OppSSuu2Kz/hfkxnKW8pB/kXaFo5qPwG7QTWwmCtk5U4yLgCGFuiEqSi4rklL5Xxw8iwxgXLk6oDHdqHNSz70P5wwKlarPMLsnyroYR1VMCOHHx7bQLrjUjBgHVaOrU4xQVYmAdQjaZLgi8pS5KU50dOA9ODZwRoUSpX6ge12F+B1JJ6ghWOWBkDU25EZi+YWKcN1C/SM+WAGEIrY+3KEFgNHi4VuBQyeNU/Vm/D+KeZhMnFjIMcjIOQfSIs0KCyDwaogiU5OBZeAPkp+ICRhusEuwf9i4agaD1c69A0hcIsguBxwDVmV/3hasHiWYECK3gNYELTcS5gophLxlKczT+iGvDnNT/avPlHyqfKO8qnPxJXPPj6B68/uEI90G9LtPUivvCZh+CMM5x5Cg7KQ/QNZYVyYgVRa8W0qD+A7MTLZkUoYe4ea0StCbkGa4sKts9MO6koWo6c3E/J/pNlwoopEWBgWPI04fepZZRn6FhDGkkbuapaQRnDqpJirBmVVCwKSqo+AVxQ0BiSrJRQl6RyOxNRtZaSA8qqcWMMAoZKxQmY5CQTPPDJkKWgZYSXDRbsKYa/4tVSukzKwV4irQb5QGb9oIeEdOdkqrJwIJIBFkYuAoABQ/iU9Gd4FogbZcG7iFtyRyLpCFhVCYQS/j6FZ/E+x566KB2JuBUCz7jH1WpVxtxJ7quOOZOQ0ykspjl3rNnzjvWcYXVV8ELDR19CYCCn4yY5NVJo03wit4+QYlt7CtHAMBzTYzhAqwFma4pEWya0MubLmEG+Erl/Sp2UfzLnpS4Pb9eBzo6CQbb9YyKBKaK8089zkrbd7W7SbXzq8+nF+VwcRzmNEcjWpIPnaYHUnkW3asQzQVIkSyaTqWQ6OVKlZFOiEOpIpVgx3kSgoi9RbEl3p6DFD6yRmYLYrS1R6MpDS3upkJsG1+cS/YJxRG8CmeV8cK+5VBACeLRguLzQ0gbn0VKhFQssohZmFNNdcJ4qFTon4ZEVWRS0eTifWiroe/E4NmEz/ikf2qCVh1f1+Hnnn0d56Tx/5yc7Kk+qas1zirDHtzP/mw7SQd31uusBVxDaw2WxAis5lWKlINVFAmaqtbt0UQrqabDW3tVB7/jd4fCGyOFI5DDXfDg8FDkcDh/+nbLzghV0sD29UL0fPhwZCh8un8Sn8JF34H6SjKv/tsGvzWcWx4VzzDStl2laNdbtVvVrM9abYmxbI5gsCDkMiE5IwYUlmaac3CQOU1JjUFVruodLejnw8iiLbcep1YLV0xaCzFxRiZvpf0mK+PXv73z9wfCZwmmhv6I1d37/64oo0f/avOJBjlf2Ysk02FlWOsef1Xc/WVvtvZdVzVXGEDh3DMHKGA7jGLy+84zCKw4TR00Dq5ezygYcVpG67Syy/I9GxWMd/j8e2a2c9M8Gp6iMcPb4JpDhceMLM10WTBa9TIt7W8A5bGaRgmY/qOXK2FvHjb0Fo4koTnIgWYyyGEQ0DJ9qieJpCxa3RMcoFEPpAwrJQk6OikVXE0vfua0FDdZO/P8j1ljE7Z8RrRoe+x+Q7qxYlgAS1KYn2uOkjtVYxpBLahKytYTJuWjFFrIFGUAvcMs9J8YlvMBLbMcclwd4pUbk670sgzNBPGQUrM0BptGjCC90JkeTH9c/YM2Ex4cDFymiCgCLCCqiPOCCZGcW0Cr4VDrO0ulzWrQ+axUQnbqC1tA2WrOGfqpor1D+Wzmu/PeaP9Jt81741fNz6U7lroff3vhCv1DJbu1nsEkg9NS67dvXKhpFs24bYMpTyl3zBwbm0R10+yOL5pc/VB8+yVVhFWDaKi0QzzYCLVIkzzxyoIBBpUA6gXUypNDcCi6GpUnMsenOG4nO7HJ7wpF2LO+VBWtRa7XlquME51LHBkZdZuqiUcr8TRqxZbFsAdUXkiEYsFEni76y8e77t2/fvW4LDEu586PbwhdpyEWj7Sf3t3UqbSY33sCB//k2ei0jyL5/u5QeN8FtddSX3h1fNB8/9yZ+rjyw/6RJaessH7k7juP/863KbUgTehk93tm2/yRR6w05ieHUGkIMHGbTDBS8B06ieWUE3mheUkbYmzLCk7Ov2TNErbdktQ416AvQsS+R+PzoCLzxeWl0hL2NjgDIPeuaPYMyLVUwXw1orHZyC8EqCUR5rmSyaGbCbDaBWIqOBjSkrNC8YAwzm8pkOg4uQbXm3AI8aivJtupqIcwa1LNEbSEBfGsBtFHkAkEMo7vsWMMzQV37YgDGbcPFMJwhx9zFcAVcahyIeMf/U7O0RDWczGwi0OzPUAQeZJRUrB5aOGxAJIJY7DRxoxlkWVWpTLiRcn78C9oFcxpxHbN3hHrB57kXcDAxgGtFeaqpwdbfHKFv0jeP0N+UDx8+JNyoPF1+n85VDnEuOodyrvL7aL9Uv0aCqTWSVpaf0QGVQMQ11fovdLaFEq6IKegxYEYxHm3gdLggBiuWJOQNaRTr7UF1CPCFoEUUcFHU8v8xPx+1iQFXwhgoWwpE0ZHhySm4AyOEMeJ6mnKeB3IoqL8FNtcj2hH4nJ7VqeFnhSzNoozgSwJHbWQUGQ01VvsqbmCVMg/f4ZMjvKTkR+EbMCmg3ivX4XvFR4Rvhm/1MVTGw4gNTNeDx2VE+eWJqEZyKVv0gz0m6kBxSRgu1ygzl64ssSGOszU6tsahF6tHCqbGFKsf0TN30YZpX7bogZ4o6G3AkipSNldX1bDCqka2BgIoPBYIEtkyAH+aC8EpAE03dfgtHAlRsuXAFvivVtacJuC+HztG99KFtOmnm06TXyjfUSKchT2CU6OW3hyjq18Bv4ls+qnyH8r3lG3HqEDfoEt/gWMgYHt1f9Q9xWhdX/FG7Uy7m6HjDQk0b5iLiGRpD3W6qBM9aFvKVu3q/G3LuI9zDz44ifv7sm0HP/kjd0NqOK38helbSl7eK7x+8fTpF38a2/uyhi2tGz1c1a38WG2JlURInFxKEHg0lIoNGLMnDU4wryDoTSU5jnHI1lJloaAZhbpo1uBD5loMBCcScssJuU0NAbW1YJi+IaBhtqapGUQ22qaWUfhR7zpd6AlGWcESVwnJsaVLWlZKlq36ihLt7KdTnrv5/WXhOUORHQ/sP3nl3KHw1of2nwQu/3m/8pPnbv7Dcko5NiGgY8l3j69ZHh6aG9l2cr+yZmhOeDs6lthI6TY2I6SyPoytdYpiVWIEC+2wUNtaKlrZUiYr5jhgCnxqBfpY9KuJrU1DBXZGbemZI88K0s1NoLY07gjaHrtYqG3G5CFYnAYW8NKLhRq2nqbWigqM5tSot2h3+s6sWGKxr1TFvawsaQKu5ghbjgfdB80jwQGvlE8QPvB5VPK4TIlTlyepLuXzSjdecQTvlCW2ZI/VEgFH3qNFeTERJ8w3Lj1D7ewaVwRhV7EUKOSC3YJDEmpzLBdWAUV2LYavquVXVKogoOULlPXK+gUHKwsHxxDPB68tUIbovgW0pPztKN5U7doqtGuat1E9oWJx0SC3SnqbjqB7IfikEY6sKiN/wqTqsb/qukLvuJWqmoqAj4WBcF3VmQWDevIxUV+0srL0zPs4/0EkIfAfqsE9ISkbS0UjW+ZmBHsma6BBNU6+khxKFut9rGy/CW5Zkyz8x9YI8rmCrx6OQXWNoDUb9YtRTOpaXWIkxFGxGSQ3k+aiolPAikmdi5JrN/yOk/4wa8GvDx5SfvM4L9le71sI5zT0ONwRyIPUteF3ZekPfT+4UlY+jCmnvCfojPJRDp/74TqZ2mJU1/y68sOjDyrvb/idmqvhgaYCrsF0VOmEQS0hUdCMLROkkoDqG4lAqnYIJwHp21KN5ejUaJhepQmWWOE3oJY2jH1RmNkgAQwQLrvE4NooOptobQa4vJ5o/h2+0cbQ680Ew0IupjyaWG6kOYlrHUHu/EkMP9eqS+W04wv9zpQqqTIXUIFtuFqkVCtaMeVeCCBaaPI2I48WeBfc0Zsd9erSg2GDyd6gJuCBwxCwd6Z7aNJL7SYaiFRxrKFyb4Du3KL8N/2qNDL41ae+OohvrVsf3rr1Yfpo9Q6f5/b3KM1gMcn6yiODgzSHD21VpLF7Z9klXKGcJEhTdYWykfEtx9Yp47pkdSlyQUMA7uiNcCZUlAPFhXb+RnpG0aMx5NlS1zL5yxkdz401KtLZGt6g4rbKOmnVk6hGRu5ns13L1mm5U3IOy/2wii6Qkqew7FU+Ibem5GklOcJW5iRY700p6Dqu5+1UNcf4gAgMZpgTm0IhVxJtiA8DIXBmwRhUoRujHZNLwwZzTy8+MFldK6oGPAqTu2DgWAOlclcF1zEuCzr8maC1Gj38zNE6DuHZxq8qPwvtAbbBSEaEQbdx/y8ah/suomxhMb4wFoIQ8FNQRYAGRx9jj9PIWYc32GF0XDBErS8FzIXx6kaSIGhVeLY4iGeGhTdgRpQ3ob1sYhoXjUgJK/3RvGN0sbIiiyW7wPtMVXKe0r4hne7o7i9fkji6bf9Jl6tSGcjtO77PE9x9dNUVu07u7+lVF6Gjjsc8hqBG/4GHopH0VLVcz26mJhoFRwKj4y/SOXPe7z8+h3rhOOdYv5KjByg5cBoRpQ/vHu9/f84c5Z3+1/rfn83NUnL8L0+TA8xBpYggNeia6VAn69g4eVVlVMp1q7qiast5Nd5bjfKqueXXNB9q/hVUtHtsbaohoSJBXHYqa9SkELosUabelO8spR8qtqV0Ka5KXzqo2BTbIF0K9sRGX9NK7LuA6bPUD5+KQuOHS5XvoH6iS5fyI+xZ/BjLK+S12H/0LtEjghbAlGB/yiMCAOE8O2PPoZ3K43OAvQ3sgxz4V3klzxMuXwYva0TJj9WU89BJsNciKcIFTDOgUYGRATxOXl2gTkFDQzc/5zmQeVTQ6lL2qp+gkdi2DVZWG43+ri6ByAP9ARa6YQj5U+gjR9RSX2RGC15oJC05a6+H80VJv4/UL1p8HSm2Wr8o+iei4AqJoj2UxjbAeo5wBtv0iWJ9Sxe2GQAkTshhW22i2NTGIql1paKnHSOpFJUHOVEU1L0i+FJRazSxM+b9Fe31TXhlKxWdbi87YzmRYkhVGcFSMYLR0yRmSABQFtNd3UkWQC12TuqBs8K0yn4SZ4Kenw2C/k+uOSL94z9OOnsDijL5f7tmLMGxXBPLC6EOnsryQiD5jVgXUN2zomlc+bJYjeGDFkX470Gbh1Ere+6cTFoggstXqgaCw3X9akoNa43VXTVUG0HUVBuuYNpHh3gyOj5vpfZPC7IcIV8i2JlACZExgqEIA0N6QDwqpGCl2MU6G1vgb0ZdFlXXkyN2kuuSiJSM6qYFLFeMdcahBAbyCj4jrivTaDm1ulgWwGQTIxN0meKlXIdYSo1+G2gGADLYAL8jmDl7yKExe6hu/wC+Jg5VGj/4SpoOvQK4f5qwPSKYaIyRYX/VDWLxDbXOBXNaDVg/ZgSPIIUOokNdx2ms5u60NZhrKWq0SAANNcSKWg3Lm2OBE4AXK9xvKFVXdfrtBD32CMFpwxH4K0c0Mspbb50mbylvsTlib4L0nvJIu/IXWtdOL6XrKAtFoE1Sj5X1AES1Mc0wW4tJMYKrV7zgtqWq1sb7WWsDM+Q/ARPBZiHkB1tbE0G85I0AePL5Q+ih8GKxkQVd/qEpwlL/gIYdKNBbq/2MVcK9OBRpiA5RhrsBFIG29/nG2yi1YBDe1PGcsZkBXA/sYwPxgngki16Gtr1sIF6E4z6LOkRco6AuTfD6YDAuwvpfoM5/2ntM6TJ7em7PWXcRvimqZf1sr1VOw/xnJXZjAI18NbNcGuaR4HYemAUt1rLitloLkt42tsXI+OScheHaosWMD1rAg0a3i+XdipzRipEvtuYC49UCNurVRtwKRhZVAdHhJGRFA9o6DEVjtyT0cDAIFFEugpPyG5yKfShj/ze5MJ4/Vn6D8dFYHlcgRtJVHYdRtcM1n+l2JRKFPZQ56JVRI46JKmXOgOhHg0PBcPEqHZHB4Uri1LUm3JiMiaAFZxIMIjhwmTRKlzY1TguCX6BlmsRWGjZqcVeWehYNMTKoVDCCp1VwNuTOKEMxGNDiogsH6IZORISRdBYjflhfwKrB8qPq0gsebMfoKxlVGX6KGkJCLZC9J8vWIZEDulW6VeAXd+K8Rlh5VqcahckCxDkhd5TkDgurJnWzzGqhg8e0vEZfO6EddVpaHLaE6tjSEbf1sOiob2oOshhIEgTtsIf4Qy24x4ncKQ5TTT1uqCGbrYe1xjqLzaX6KVmsZIpmNZ1ZPusCzJZ18U5X2IV1TjqXLqzV2XRYzhjVRW2RqKaq9w/8Qa//wyQ6MdHtuOOl6ZbpL93p7ErRiZNYs/Jq21QnNBv001+6w9GVUl7lIgyFcX+sNnYnzvcwfony6qTKd0M7Z6yAN/6s/ZfYbKo7MLnHrNnYnkYudQcmnDkXOG2HcQcm0c6o4jYj9bQ6YnWcswsT27EoS7U22skWEJ6zG1OSth2/9QvlGbPK3NFZyvHjt52zL1PyuHJ8Fnf0izRVnrHrtuO07Zx+byIon+D9mJn3Y8QobKW+pIJHm5jmr2Wrprlk0cjKHI2o6o0WNAg65vagodYn2Rh16MKZbKCQRLFgBqll7ipu08SwLC41dWDyyFLBxdUCNNQvAsjvKGK/is0+zA5azLOi/yKQU79gJqu/arjOyDBivCZS9dnVgJWgUv6Mz872E2ABY9XJQcj4qRqPIWNxAO/ZsYPq15XGBRFQflSPX40zs32OJLZfGa5P01U+VMGo+AmbGsmFIai/qwLWcZ/lznyWRw0w9lnKdoFSd9ZSt3Eqs2+o7PNExu/zRKr7PPGUbVSir2KuaZW9Sf7/oS46DnWdKWQaZeuEkTAV+IHICm+cUmGXhpzKjIu9Vvqo4q4bSLEJ+/j/iLx045DX58CuELDkIU6jFZqZ1J0XcdmqiMtf+Xd+xFXdb0tSR3n6rJFzn4VcZdx4ipkBtbDr1HjUdbYsukgH0yF2dY+PsRmqT7C949REkA7tvFkEg5T7nD3b+JQYPHfftiLrV2xk5LMqgn+PdWYU+nlWf8xj/bGx/piYZR/fH5Or2p/a8/VnfHj+3P58+0zs5rM9EpLj4zfj+4R5zytZnxIlrLv2sB2R1OwnatumUrGJ7UHSZMNUugWjkyj+uIFAE+CGw7yxtq6NmamI+LRBMLfGO1JqbVmqOpbW847Fxcriseod/3loCivlqxX0wYD1c8fJrfzymkiju74+c0Gj+2XROmMgHF685KuHas87dP74oT6L2Bhsagy0trdNywU8dkd7ZtKkhZunTTuTsmBreNWcBagrm8jyWgA5VKEDXvPRt1mC6O1znsWkEjwrsN0GcZdB+rbiUz/B8l7VfBnm5KzECTKJ1HawiJcJdD83tilbTRJj5hgXRtWQsvltNGhLRYM2dp6iPJzDbw/SxYMgBo4TMWmkcgmC8Ue41LCYdBmVAOKlsYtKXlHViaCy3Jir7bRGQmYajQgfW7Zwt3G3bbH8XHltyyOPbFFe09yhPD9UfpC7Yoh2/0kc+vrXh0Tmz5C19KTuAW0zKHgD7h9po1nepmbvMPlrW0s7Xj927HW66WNKPqb3vE4TyrHXfykQJbeX5mhu7+iyHoH0jD6+l75IX9yrvFipSQBtVcknNpAw2U5QNtwsWNhUwhC6L1XZqC6IMUJW82hEzizogkkgYBMjoAYVGior/GiTutGFP6lmhDGn35zAckhAB00YDMWwaDAMZzyXY1un0TBLYxrO4wenRBUL+3m2V4dWrdYcq2XK9Et0rNBCzXxKSiXxiVJXfaqfZir7iJw+z7g96B2q4/aoK8e9bJRw7VYLg21qvVGjG/dt1KGf5XZVh2LyIMQ38Ll/NpjM5w+CZUP/Yfel8/S7mZB/8HsYYYt+3i9upBb6/EXKvsP/8FdnKB/RF/AptjdeRe40oNu9LP6vHxfx1luBCryWVGoxUIR5MD1J4hCjcRrEXY9YGQOmawC37ZvzzJrTiDlYXQP+Q/yg4KaGyvF9c+YqUiWeWJUbN8uhYozdlMBELylwtZWlJoazfoee5yfO/tpxuSIeaJgmiIlslV1SixqhGgVgOsFXRT5+/E2NwPYnqSAgMclWt/ApdEDjPG7pwAr0grlUz8a+mZv7+zfPRI5Tz/o29qRyiB5OEQzvY5AaX+Wxs7G9ZHCvUZE4SD/zqNT6aFoqaulYUIIf22NSrSwQ1FwOAPOCoAPDoDfWmK02dT2GbMqNA4tZrMhvpv5ohDn80J3TmObhydYtZbJlK88qCFiUCcgGfw9vhT/+YUrO8vccIDPziGrRCzXOJMv56FXBEU7IzlJRcGJnBeysU/UYakrFGrZFVg0AHSZOLmdVnCpoDNwCH/HQ8ZhMXS+AzEvb6OO0jVU8Eqw15TD8TBm/SjDdMMWV4o9+PsOwCcbpOMLipXWsx0sYDjaxPVvVdQCc2mWgo4m5CyZ1m1bAXm7MjmtUsddYWTE6KThMIq5rkJ0iXMqeSjhbZAubdGyVUzCcQssZo5nKEbswtC83sPbobmVkBFO4I2oxCoLbfUNLZ0UfumT3UUwBS8waYn2Q2ucapHANm38OQ7cFXp9Sly2o2VGsAZ7i/NP7rAaYi8v6uMxZCgbtJ7iTJ6/9hB/meL2hUgGMFM6mbMGsXxfkUzpOapE+klroCDtwhEXRykSq1gVJDPtj5Kx3XDU4VavBAZnUlHBr10oG0QYkqqFqjZ5GLBhMqB9FARFIbS43lluMUp6r4grE+5iJUfIjFVTNPACJy4+UV1EfPYMNNGx/D+Q5DUNxDsD+VlLdv7gpUUm12ERXVufCGIorymQzG3VlRcqyttID7z7wAALWBx54l66FkcIRrh94AFrQMuMlrsiAw+i7WHOjEPUTgsSeY/VWGN8fOW98P4V1VyP4bzSv5gzgUs80JuBvbGW3Vewi5FndFsfqtli7nozm4S4V8pWaLg7zHaIAjfj6WCL/F8P1u2sAAHjaY2BkYGBgZjjy6Mpmh3h+m68M8hwMIHDua+N+ZJqDgQNCMYEoAHf+C1gAeNpjYGRg4GD4fwNEMjD8/w8kgSIogBUAY/wD9XjaNU+7FcJADJNNCvq87MMOvEdNxRyq0mWH1GEWegZhACz54nvnj+yTzvGDLQ8gKr8iEQDBRDKqgmqZMMq7/y5kd/UdCLFiC+ITZiivaz6fR0er6d054SksUgzmU3qFEXdFzV2Ez8Ywlc/m5Pilsr2VWitP/bGJ4wvDWi96P3Not+n2B3lgIYIAAAAmACYAJgAuAJIA3gFaAaABrgHkAjoC1AMkA4IEUAUiBXAFzgYgBw4H7ghiCPYJsgp4Cq4LCAs2C4AMHAyiDiAPnBBAEUYRvBMwE7wUHhRaFIYUshTcFVAVgBX6FpYXXBeSF/AYYBkCGYgaBhooGkoa1BryGyQbQBtsG5Yb+Bw2HLAdLh1yHYYdsh4cHjYeYB7iHyYf3iAgIFIgdCCaILIgxiDcIPAhBiEkIegiOCK6IxAjeCPQJDQkbCS8JVIlriYWJjomWCZ2JpQmoib0J3QnvCgGKJAopii8KQApIilMKcgqJCpiKpwqyCsUK2QrvCwWLFYsnizgLPYtBC0SLSAAAAABAAAAgAC9ABAAAAAAAAIAAQACABYAAAEAAYEAAAAAeNqNkr1OAkEUhc8CmmBhRSysNtFCTfiXqFBZiIkaQzRqZ7KaBYz8CStg4/PpC1j6EJZWfjMMwSCFmczOuWfOPffOzEpa0avi8hJJSZ/MCfaUIprgmFb15XBcZW+qSWjTKzu8pLF36/Ay/IfDSa173w6/aS2WcvhdudiOjlXTmXwNFaqvgR7UVYe4wOzC+AqIX1hboMiq/qpHoEhNUN0yESjUWPd8e0RT3RaaiNFTWVnGyI6MGuw+s5qKDfgWGSa3Q42QmYXtwabxD/SE0vi0YTZUdRWP/tTb5nTGw/Rq/LrW74K4QTVznr6KeOUYRVV0pVPd6By0KC89l7lI489prufu6Xe1mi5hJtGMbaKMnN+Q/bzdy2iPb4UTB3rE02jqsOae7nirjEp27uNR0MG/+j+BD21Xh+y24Qf2tjvcQYjr7CUnPVStm09eYLPycKb/Em9Zoq755u2fk2Pd/QGe+3ARAAB42m3S1XIUURRG4VmDBHd3d5k+Z5/uBIdAcHd3CRI0OBRPyCshmRWu6Kqp/6brm9qrutVujTy/frZS63/Pjz8/Wm3ajGEs4xhPDxOYyCQmM4WpTGM6M5jJLGYzh7nMYz4LWMgiFrOEpSxjOStYySpWs4a1rGM9G9jIJjazha1sYzsdKhKZoFDT0EsfO9jJLnazh73sYz8H6OcghxjgMEc4yjGOc4KTnOI0ZzjLOc5zgYtc4jJXuMo1rnODm9ziNne4yz3u84CHPOIxTxjkKc94zguGeMkrXvOGt7xjmPd84COf+MwXvvKN7z3DQ4OpDPT/3YGq03ErN7nZDbe4tdu4vW7fyCa9pJf0kl7SS3pJL+klvTTqVXqVXqVX6VV6lV6lV+lVepVe0kt6SS/pJb3U9bL3ZO/J3pO9J3tP7oy+X7uN2/3/0Amd0Amd0Amd0Amd+Od07wi7hF3CLmGXsEvYJewSdgm7hF3CLmGXsEvYJewSdomkl/SSXtLLelkv62W9rJf1sl7Wy3pZL/RCL/RCL/RCL/RCL/RCr+gVvaJX9Ipe0St6Ra/oFb1ar9ar9Wq9Wq/Wq/VqvVqv1mv0Gr1Gr9Frul7xuyp+V8XvqnTyb1UoNRm4Af+FsAGNAEuwCFBYsQEBjlmxRgYrWCGwEFlLsBRSWCGwgFkdsAYrXFhZsBQrAAAAAVLP0T8AAA==) format('woff'),
20
- url('../fonts/genericons-regular-webfont.ttf') format('truetype'),
21
- url('../fonts/genericons-regular-webfont.svg#genericonsregular') format('svg');
22
- font-weight: normal;
23
- font-style: normal;
24
- }
25
-
26
-
27
- /**
28
- * All Genericons
29
- */
30
-
31
- .genericon {
32
- display: inline-block;
33
- width: 16px;
34
- height: 16px;
35
- -webkit-font-smoothing: antialiased;
36
- -moz-osx-font-smoothing: grayscale;
37
- font-size: 16px;
38
- line-height: 1;
39
- font-family: 'Genericons';
40
- text-decoration: inherit;
41
- font-weight: normal;
42
- font-style: normal;
43
- vertical-align: top;
44
- }
45
-
46
- /**
47
- * IE7 and IE6 hacks
48
- */
49
-
50
- .genericon {
51
- *overflow: auto;
52
- *zoom: 1;
53
- *display: inline;
54
- }
55
-
56
- /**
57
- * Individual icons
58
- */
59
-
60
- /* Post formats */
61
- .genericon-standard:before { content: '\f100'; }
62
- .genericon-aside:before { content: '\f101'; }
63
- .genericon-image:before { content: '\f102'; }
64
- .genericon-gallery:before { content: '\f103'; }
65
- .genericon-video:before { content: '\f104'; }
66
- .genericon-status:before { content: '\f105'; }
67
- .genericon-quote:before { content: '\f106'; }
68
- .genericon-link:before { content: '\f107'; }
69
- .genericon-chat:before { content: '\f108'; }
70
- .genericon-audio:before { content: '\f109'; }
71
-
72
- /* Social icons */
73
- .genericon-github:before { content: '\f200'; }
74
- .genericon-dribbble:before { content: '\f201'; }
75
- .genericon-twitter:before { content: '\f202'; }
76
- .genericon-facebook:before { content: '\f203'; }
77
- .genericon-facebook-alt:before { content: '\f204'; }
78
- .genericon-wordpress:before { content: '\f205'; }
79
- .genericon-googleplus:before { content: '\f206'; }
80
- .genericon-linkedin:before { content: '\f207'; }
81
- .genericon-linkedin-alt:before { content: '\f208'; }
82
- .genericon-pinterest:before { content: '\f209'; }
83
- .genericon-pinterest-alt:before { content: '\f210'; }
84
- .genericon-flickr:before { content: '\f211'; }
85
- .genericon-vimeo:before { content: '\f212'; }
86
- .genericon-youtube:before { content: '\f213'; }
87
- .genericon-tumblr:before { content: '\f214'; }
88
- .genericon-instagram:before { content: '\f215'; }
89
- .genericon-codepen:before { content: '\f216'; }
90
- .genericon-polldaddy:before { content: '\f217'; }
91
- .genericon-googleplus-alt:before { content: '\f218'; }
92
- .genericon-path:before { content: '\f219'; }
93
- .genericon-skype:before { content: '\f220'; }
94
- .genericon-digg:before { content: '\f221'; }
95
- .genericon-reddit:before { content: '\f222'; }
96
- .genericon-stumbleupon:before { content: '\f223'; }
97
- .genericon-pocket:before { content: '\f224'; }
98
- .genericon-dropbox:before { content: '\f225'; }
99
-
100
- /* Meta icons */
101
- .genericon-comment:before { content: '\f300'; }
102
- .genericon-category:before { content: '\f301'; }
103
- .genericon-tag:before { content: '\f302'; }
104
- .genericon-time:before { content: '\f303'; }
105
- .genericon-user:before { content: '\f304'; }
106
- .genericon-day:before { content: '\f305'; }
107
- .genericon-week:before { content: '\f306'; }
108
- .genericon-month:before { content: '\f307'; }
109
- .genericon-pinned:before { content: '\f308'; }
110
-
111
- /* Other icons */
112
- .genericon-search:before { content: '\f400'; }
113
- .genericon-unzoom:before { content: '\f401'; }
114
- .genericon-zoom:before { content: '\f402'; }
115
- .genericon-show:before { content: '\f403'; }
116
- .genericon-hide:before { content: '\f404'; }
117
- .genericon-close:before { content: '\f405'; }
118
- .genericon-close-alt:before { content: '\f406'; }
119
- .genericon-trash:before { content: '\f407'; }
120
- .genericon-star:before { content: '\f408'; }
121
- .genericon-home:before { content: '\f409'; }
122
- .genericon-mail:before { content: '\f410'; }
123
- .genericon-edit:before { content: '\f411'; }
124
- .genericon-reply:before { content: '\f412'; }
125
- .genericon-feed:before { content: '\f413'; }
126
- .genericon-warning:before { content: '\f414'; }
127
- .genericon-share:before { content: '\f415'; }
128
- .genericon-attachment:before { content: '\f416'; }
129
- .genericon-location:before { content: '\f417'; }
130
- .genericon-checkmark:before { content: '\f418'; }
131
- .genericon-menu:before { content: '\f419'; }
132
- .genericon-refresh:before { content: '\f420'; }
133
- .genericon-minimize:before { content: '\f421'; }
134
- .genericon-maximize:before { content: '\f422'; }
135
- .genericon-404:before { content: '\f423'; }
136
- .genericon-spam:before { content: '\f424'; }
137
- .genericon-summary:before { content: '\f425'; }
138
- .genericon-cloud:before { content: '\f426'; }
139
- .genericon-key:before { content: '\f427'; }
140
- .genericon-dot:before { content: '\f428'; }
141
- .genericon-next:before { content: '\f429'; }
142
- .genericon-previous:before { content: '\f430'; }
143
- .genericon-expand:before { content: '\f431'; }
144
- .genericon-collapse:before { content: '\f432'; }
145
- .genericon-dropdown:before { content: '\f433'; }
146
- .genericon-dropdown-left:before { content: '\f434'; }
147
- .genericon-top:before { content: '\f435'; }
148
- .genericon-draggable:before { content: '\f436'; }
149
- .genericon-phone:before { content: '\f437'; }
150
- .genericon-send-to-phone:before { content: '\f438'; }
151
- .genericon-plugin:before { content: '\f439'; }
152
- .genericon-cloud-download:before { content: '\f440'; }
153
- .genericon-cloud-upload:before { content: '\f441'; }
154
- .genericon-external:before { content: '\f442'; }
155
- .genericon-document:before { content: '\f443'; }
156
- .genericon-book:before { content: '\f444'; }
157
- .genericon-cog:before { content: '\f445'; }
158
- .genericon-unapprove:before { content: '\f446'; }
159
- .genericon-cart:before { content: '\f447'; }
160
- .genericon-pause:before { content: '\f448'; }
161
- .genericon-stop:before { content: '\f449'; }
162
- .genericon-skip-back:before { content: '\f450'; }
163
- .genericon-skip-ahead:before { content: '\f451'; }
164
- .genericon-play:before { content: '\f452'; }
165
- .genericon-tablet:before { content: '\f453'; }
166
- .genericon-send-to-tablet:before { content: '\f454'; }
167
- .genericon-info:before { content: '\f455'; }
168
- .genericon-notice:before { content: '\f456'; }
169
- .genericon-help:before { content: '\f457'; }
170
- .genericon-fastforward:before { content: '\f458'; }
171
- .genericon-rewind:before { content: '\f459'; }
172
- .genericon-portfolio:before { content: '\f460'; }
173
- .genericon-heart:before { content: '\f461'; }
174
- .genericon-code:before { content: '\f462'; }
175
- .genericon-subscribe:before { content: '\f463'; }
176
- .genericon-unsubscribe:before { content: '\f464'; }
177
- .genericon-subscribed:before { content: '\f465'; }
178
- .genericon-reply-alt:before { content: '\f466'; }
179
- .genericon-reply-single:before { content: '\f467'; }
180
- .genericon-flag:before { content: '\f468'; }
181
- .genericon-print:before { content: '\f469'; }
182
- .genericon-lock:before { content: '\f470'; }
183
- .genericon-bold:before { content: '\f471'; }
184
- .genericon-italic:before { content: '\f472'; }
185
- .genericon-picture:before { content: '\f473'; }
186
- .genericon-fullscreen:before { content: '\f474'; }
187
-
188
- /* Generic shapes */
189
- .genericon-uparrow:before { content: '\f500'; }
190
- .genericon-rightarrow:before { content: '\f501'; }
191
- .genericon-downarrow:before { content: '\f502'; }
192
- .genericon-leftarrow:before { content: '\f503'; }
193
-
194
-
195
-
196
-
197
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/jquery-ui-classic.css DELETED
@@ -1,575 +0,0 @@
1
- /*
2
- * jQuery UI CSS Framework 1.8.16
3
- *
4
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Theming/API
9
- */
10
-
11
- /* Layout helpers
12
- ----------------------------------*/
13
- .ui-helper-hidden { display: none; }
14
- .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
- .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
- .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
- .ui-helper-clearfix { display: inline-block; }
18
- /* required comment for clearfix to work in Opera \*/
19
- * html .ui-helper-clearfix { height:1%; }
20
- .ui-helper-clearfix { display:block; }
21
- /* end clearfix */
22
- .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
-
24
-
25
- /* Interaction Cues
26
- ----------------------------------*/
27
- .ui-state-disabled { cursor: default !important; }
28
-
29
-
30
- /* Icons
31
- ----------------------------------*/
32
-
33
- /* states and images */
34
- .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
-
36
-
37
- /* Misc visuals
38
- ----------------------------------*/
39
-
40
- /* Overlays */
41
- .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
-
43
-
44
- /*
45
- * jQuery UI CSS Framework 1.8.16
46
- *
47
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
48
- * Dual licensed under the MIT or GPL Version 2 licenses.
49
- * http://jquery.org/license
50
- *
51
- * http://docs.jquery.com/UI/Theming/API
52
- *
53
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=sans-serif&fwDefault=normal&fsDefault=12px&cornerRadius=3px&bgColorHeader=eff8ff&bgTextureHeader=04_highlight_hard.png&bgImgOpacityHeader=75&borderColorHeader=d1e5ee&fcHeader=333333&iconColorHeader=21759b&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=d1e5ee&fcContent=333333&iconColorContent=333333&bgColorDefault=eff8ff&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=75&borderColorDefault=d1e5ee&fcDefault=333333&iconColorDefault=333333&bgColorHover=f7fcfe&bgTextureHover=06_inset_hard.png&bgImgOpacityHover=75&borderColorHover=b8d7e5&fcHover=000000&iconColorHover=333333&bgColorActive=ffffff&bgTextureActive=01_flat.png&bgImgOpacityActive=65&borderColorActive=d1e5ee&fcActive=333333&iconColorActive=333333&bgColorHighlight=ffffe0&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=e6db55&fcHighlight=333333&iconColorHighlight=21759b&bgColorError=ffebe8&bgTextureError=01_flat.png&bgImgOpacityError=95&borderColorError=cc0000&fcError=cc0000&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=3px
54
- */
55
-
56
-
57
- /* Component containers
58
- ----------------------------------*/
59
- .ui-widget { font-family: sans-serif; font-size: 12px; }
60
- .ui-widget .ui-widget { font-size: 1em; }
61
- .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: sans-serif; font-size: 1em; }
62
- .ui-widget-content { border: 1px solid #d1e5ee; background: #ffffff; color: #333333; }
63
- .ui-widget-header { border: 1px solid #d1e5ee; background-color: #f5fafd; background-image: -ms-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -moz-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -o-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -webkit-gradient(linear, left top, left bottom, from(#f7fcfe), to(#eff8ff)); background-image: -webkit-linear-gradient(top, #f7fcfe, #eff8ff); background-image: linear-gradient(top, #f7fcfe, #eff8ff); color: #333333; font-weight: bold; }
64
- .ui-widget-header a { color: #333333; }
65
-
66
- /* Interaction states
67
- ----------------------------------*/
68
- .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d1e5ee; background-color: #f5fafd; background-image: -ms-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -moz-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -o-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -webkit-gradient(linear, left top, left bottom, from(#f7fcfe), to(#eff8ff)); background-image: -webkit-linear-gradient(top, #f7fcfe, #eff8ff); background-image: linear-gradient(top, #f7fcfe, #eff8ff); font-weight: normal; color: #333333; }
69
- .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #333333; text-decoration: none; }
70
- .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #b8d7e5; background-color: #f7fcfe; background-image: -ms-linear-gradient(top, #eff8ff, #f7fcfe); background-image: -moz-linear-gradient(top, #eff8ff, #f7fcfe); background-image: -o-linear-gradient(top, #eff8ff, #f7fcfe); background-image: -webkit-gradient(linear, left top, left bottom, from(#eff8ff), to(#f7fcfe)); background-image: -webkit-linear-gradient(top, #eff8ff, #f7fcfe); background-image: linear-gradient(top, #eff8ff, #f7fcfe);; font-weight: normal; color: #000000; }
71
- .ui-state-hover a, .ui-state-hover a:hover { color: #000000; text-decoration: none; }
72
- .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #d1e5ee; background: #ffffff; font-weight: normal; color: #333333; }
73
- .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #333333; text-decoration: none; }
74
- .ui-widget :active { outline: none; }
75
-
76
- /* Interaction Cues
77
- ----------------------------------*/
78
- .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #e6db55; background: #ffffe0; color: #333333; }
79
- .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #333333; }
80
- .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cc0000; background: #ffebe8; color: #cc0000; }
81
- .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cc0000; }
82
- .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cc0000; }
83
- .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
84
- .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
85
- .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
86
-
87
- /* Icons
88
- ----------------------------------*/
89
-
90
- /* states and images */
91
- .ui-icon { width: 16px; height: 16px; background-image: url(../images/ui-icons_333333_256x240.png); }
92
- .ui-widget-content .ui-icon {background-image: url(../images/ui-icons_333333_256x240.png); }
93
- .ui-widget-header .ui-icon {background-image: url(../images/ui-icons_999999_256x240.png); }
94
- .ui-state-default .ui-icon { background-image: url(../images/ui-icons_333333_256x240.png); }
95
- .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../images/ui-icons_333333_256x240.png); }
96
- .ui-state-active .ui-icon {background-image: url(../images/ui-icons_333333_256x240.png); }
97
- .ui-state-highlight .ui-icon {background-image: url(../images/ui-icons_21759b_256x240.png); }
98
- .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../images/ui-icons_cc0000_256x240.png); }
99
-
100
- /* positioning */
101
- .ui-icon-carat-1-n { background-position: 0 0; }
102
- .ui-icon-carat-1-ne { background-position: -16px 0; }
103
- .ui-icon-carat-1-e { background-position: -32px 0; }
104
- .ui-icon-carat-1-se { background-position: -48px 0; }
105
- .ui-icon-carat-1-s { background-position: -64px 0; }
106
- .ui-icon-carat-1-sw { background-position: -80px 0; }
107
- .ui-icon-carat-1-w { background-position: -96px 0; }
108
- .ui-icon-carat-1-nw { background-position: -112px 0; }
109
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
110
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
111
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
112
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
113
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
114
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
115
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
116
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
117
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
118
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
119
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
120
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
121
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
122
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
123
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
124
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
125
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
126
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
127
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
128
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
129
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
130
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
131
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
132
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
133
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
134
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
135
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
136
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
137
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
138
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
139
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
140
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
141
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
142
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
143
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
144
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
145
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
146
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
147
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
148
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
149
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
150
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
151
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
152
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
153
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
154
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
155
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
156
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
157
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
158
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
159
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
160
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
161
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
162
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
163
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
164
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
165
- .ui-icon-arrow-4 { background-position: 0 -80px; }
166
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
167
- .ui-icon-extlink { background-position: -32px -80px; }
168
- .ui-icon-newwin { background-position: -48px -80px; }
169
- .ui-icon-refresh { background-position: -64px -80px; }
170
- .ui-icon-shuffle { background-position: -80px -80px; }
171
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
172
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
173
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
174
- .ui-icon-folder-open { background-position: -16px -96px; }
175
- .ui-icon-document { background-position: -32px -96px; }
176
- .ui-icon-document-b { background-position: -48px -96px; }
177
- .ui-icon-note { background-position: -64px -96px; }
178
- .ui-icon-mail-closed { background-position: -80px -96px; }
179
- .ui-icon-mail-open { background-position: -96px -96px; }
180
- .ui-icon-suitcase { background-position: -112px -96px; }
181
- .ui-icon-comment { background-position: -128px -96px; }
182
- .ui-icon-person { background-position: -144px -96px; }
183
- .ui-icon-print { background-position: -160px -96px; }
184
- .ui-icon-trash { background-position: -176px -96px; }
185
- .ui-icon-locked { background-position: -192px -96px; }
186
- .ui-icon-unlocked { background-position: -208px -96px; }
187
- .ui-icon-bookmark { background-position: -224px -96px; }
188
- .ui-icon-tag { background-position: -240px -96px; }
189
- .ui-icon-home { background-position: 0 -112px; }
190
- .ui-icon-flag { background-position: -16px -112px; }
191
- .ui-icon-calendar { background-position: -32px -112px; }
192
- .ui-icon-cart { background-position: -48px -112px; }
193
- .ui-icon-pencil { background-position: -64px -112px; }
194
- .ui-icon-clock { background-position: -80px -112px; }
195
- .ui-icon-disk { background-position: -96px -112px; }
196
- .ui-icon-calculator { background-position: -112px -112px; }
197
- .ui-icon-zoomin { background-position: -128px -112px; }
198
- .ui-icon-zoomout { background-position: -144px -112px; }
199
- .ui-icon-search { background-position: -160px -112px; }
200
- .ui-icon-wrench { background-position: -176px -112px; }
201
- .ui-icon-gear { background-position: -192px -112px; }
202
- .ui-icon-heart { background-position: -208px -112px; }
203
- .ui-icon-star { background-position: -224px -112px; }
204
- .ui-icon-link { background-position: -240px -112px; }
205
- .ui-icon-cancel { background-position: 0 -128px; }
206
- .ui-icon-plus { background-position: -16px -128px; }
207
- .ui-icon-plusthick { background-position: -32px -128px; }
208
- .ui-icon-minus { background-position: -48px -128px; }
209
- .ui-icon-minusthick { background-position: -64px -128px; }
210
- .ui-icon-close { background-position: -80px -128px; }
211
- .ui-icon-closethick { background-position: -96px -128px; }
212
- .ui-icon-key { background-position: -112px -128px; }
213
- .ui-icon-lightbulb { background-position: -128px -128px; }
214
- .ui-icon-scissors { background-position: -144px -128px; }
215
- .ui-icon-clipboard { background-position: -160px -128px; }
216
- .ui-icon-copy { background-position: -176px -128px; }
217
- .ui-icon-contact { background-position: -192px -128px; }
218
- .ui-icon-image { background-position: -208px -128px; }
219
- .ui-icon-video { background-position: -224px -128px; }
220
- .ui-icon-script { background-position: -240px -128px; }
221
- .ui-icon-alert { background-position: 0 -144px; }
222
- .ui-icon-info { background-position: -16px -144px; }
223
- .ui-icon-notice { background-position: -32px -144px; }
224
- .ui-icon-help { background-position: -48px -144px; }
225
- .ui-icon-check { background-position: -64px -144px; }
226
- .ui-icon-bullet { background-position: -80px -144px; }
227
- .ui-icon-radio-off { background-position: -96px -144px; }
228
- .ui-icon-radio-on { background-position: -112px -144px; }
229
- .ui-icon-pin-w { background-position: -128px -144px; }
230
- .ui-icon-pin-s { background-position: -144px -144px; }
231
- .ui-icon-play { background-position: 0 -160px; }
232
- .ui-icon-pause { background-position: -16px -160px; }
233
- .ui-icon-seek-next { background-position: -32px -160px; }
234
- .ui-icon-seek-prev { background-position: -48px -160px; }
235
- .ui-icon-seek-end { background-position: -64px -160px; }
236
- .ui-icon-seek-start { background-position: -80px -160px; }
237
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
238
- .ui-icon-seek-first { background-position: -80px -160px; }
239
- .ui-icon-stop { background-position: -96px -160px; }
240
- .ui-icon-eject { background-position: -112px -160px; }
241
- .ui-icon-volume-off { background-position: -128px -160px; }
242
- .ui-icon-volume-on { background-position: -144px -160px; }
243
- .ui-icon-power { background-position: 0 -176px; }
244
- .ui-icon-signal-diag { background-position: -16px -176px; }
245
- .ui-icon-signal { background-position: -32px -176px; }
246
- .ui-icon-battery-0 { background-position: -48px -176px; }
247
- .ui-icon-battery-1 { background-position: -64px -176px; }
248
- .ui-icon-battery-2 { background-position: -80px -176px; }
249
- .ui-icon-battery-3 { background-position: -96px -176px; }
250
- .ui-icon-circle-plus { background-position: 0 -192px; }
251
- .ui-icon-circle-minus { background-position: -16px -192px; }
252
- .ui-icon-circle-close { background-position: -32px -192px; }
253
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
254
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
255
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
256
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
257
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
258
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
259
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
260
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
261
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
262
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
263
- .ui-icon-circle-check { background-position: -208px -192px; }
264
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
265
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
266
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
267
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
268
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
269
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
270
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
271
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
272
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
273
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
274
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
275
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
276
-
277
-
278
- /* Misc visuals
279
- ----------------------------------*/
280
-
281
- /* Corner radius */
282
- .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -khtml-border-top-left-radius: 3px; border-top-left-radius: 3px; }
283
- .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; -khtml-border-top-right-radius: 3px; border-top-right-radius: 3px; }
284
- .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -khtml-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
285
- .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; -khtml-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
286
-
287
- /* Overlays */
288
- .ui-widget-overlay { background: #000000; opacity: .6;filter:Alpha(Opacity=60); }
289
- .ui-widget-shadow { box-shadow: 0 0 16px rgba(0, 0, 0, 0.3); }/*
290
- * jQuery UI Resizable 1.8.16
291
- *
292
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
293
- * Dual licensed under the MIT or GPL Version 2 licenses.
294
- * http://jquery.org/license
295
- *
296
- * http://docs.jquery.com/UI/Resizable#theming
297
- */
298
- .ui-resizable { position: relative;}
299
- .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
300
- .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
301
- .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
302
- .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
303
- .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
304
- .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
305
- .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
306
- .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
307
- .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
308
- .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
309
- * jQuery UI Selectable 1.8.16
310
- *
311
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
312
- * Dual licensed under the MIT or GPL Version 2 licenses.
313
- * http://jquery.org/license
314
- *
315
- * http://docs.jquery.com/UI/Selectable#theming
316
- */
317
- .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
318
- /*
319
- * jQuery UI Accordion 1.8.16
320
- *
321
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
322
- * Dual licensed under the MIT or GPL Version 2 licenses.
323
- * http://jquery.org/license
324
- *
325
- * http://docs.jquery.com/UI/Accordion#theming
326
- */
327
- /* IE/Win - Fix animation bug - #4615 */
328
- .ui-accordion { width: 100%; }
329
- .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
330
- .ui-accordion .ui-accordion-li-fix { display: inline; }
331
- .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
332
- .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
333
- .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
334
- .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
335
- .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
336
- .ui-accordion .ui-accordion-content-active { display: block; }
337
- /*
338
- * jQuery UI Autocomplete 1.8.16
339
- *
340
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
341
- * Dual licensed under the MIT or GPL Version 2 licenses.
342
- * http://jquery.org/license
343
- *
344
- * http://docs.jquery.com/UI/Autocomplete#theming
345
- */
346
- .ui-autocomplete { position: absolute; cursor: default; }
347
-
348
- /* workarounds */
349
- * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
350
-
351
- /*
352
- * jQuery UI Menu 1.8.16
353
- *
354
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
355
- * Dual licensed under the MIT or GPL Version 2 licenses.
356
- * http://jquery.org/license
357
- *
358
- * http://docs.jquery.com/UI/Menu#theming
359
- */
360
- .ui-menu {
361
- list-style:none;
362
- padding: 2px;
363
- margin: 0;
364
- display:block;
365
- float: left;
366
- }
367
- .ui-menu .ui-menu {
368
- margin-top: -3px;
369
- }
370
- .ui-menu .ui-menu-item {
371
- margin:0;
372
- padding: 0;
373
- zoom: 1;
374
- float: left;
375
- clear: left;
376
- width: 100%;
377
- }
378
- .ui-menu .ui-menu-item a {
379
- text-decoration:none;
380
- display:block;
381
- padding:.2em .4em;
382
- line-height:1.5;
383
- zoom:1;
384
- }
385
- .ui-menu .ui-menu-item a.ui-state-hover,
386
- .ui-menu .ui-menu-item a.ui-state-active {
387
- font-weight: normal;
388
- margin: -1px;
389
- }
390
- /*
391
- * jQuery UI Button 1.8.16
392
- *
393
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
394
- * Dual licensed under the MIT or GPL Version 2 licenses.
395
- * http://jquery.org/license
396
- *
397
- * http://docs.jquery.com/UI/Button#theming
398
- */
399
- .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
400
- .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
401
- button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
402
- .ui-button-icons-only { width: 3.4em; }
403
- button.ui-button-icons-only { width: 3.7em; }
404
-
405
- /*button text element */
406
- .ui-button .ui-button-text { display: block; line-height: 1.4; }
407
- .ui-button-text-only .ui-button-text { padding: .4em 1em; }
408
- .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
409
- .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
410
- .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
411
- .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
412
- /* no icon support for input elements, provide padding by default */
413
- input.ui-button { padding: .4em 1em; }
414
-
415
- /*button icon element(s) */
416
- .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
417
- .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
418
- .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
419
- .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
420
- .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
421
-
422
- /*button sets*/
423
- .ui-buttonset { margin-right: 7px; }
424
- .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
425
-
426
- /* workarounds */
427
- button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
428
- /*
429
- * jQuery UI Dialog 1.8.16
430
- *
431
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
432
- * Dual licensed under the MIT or GPL Version 2 licenses.
433
- * http://jquery.org/license
434
- *
435
- * http://docs.jquery.com/UI/Dialog#theming
436
- */
437
- .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
438
- .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
439
- .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
440
- .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
441
- .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
442
- .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
443
- .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
444
- .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
445
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
446
- .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
447
- .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
448
- .ui-draggable .ui-dialog-titlebar { cursor: move; }
449
- /*
450
- * jQuery UI Slider 1.8.16
451
- *
452
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
453
- * Dual licensed under the MIT or GPL Version 2 licenses.
454
- * http://jquery.org/license
455
- *
456
- * http://docs.jquery.com/UI/Slider#theming
457
- */
458
- .ui-slider { position: relative; text-align: left; }
459
- .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
460
- .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
461
-
462
- .ui-slider-horizontal { height: .8em; }
463
- .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
464
- .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
465
- .ui-slider-horizontal .ui-slider-range-min { left: 0; }
466
- .ui-slider-horizontal .ui-slider-range-max { right: 0; }
467
-
468
- .ui-slider-vertical { width: .8em; height: 100px; }
469
- .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
470
- .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
471
- .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
472
- .ui-slider-vertical .ui-slider-range-max { top: 0; }/*
473
- * jQuery UI Tabs 1.8.16
474
- *
475
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
476
- * Dual licensed under the MIT or GPL Version 2 licenses.
477
- * http://jquery.org/license
478
- *
479
- * http://docs.jquery.com/UI/Tabs#theming
480
- */
481
- .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
482
- .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
483
- .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
484
- .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
485
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
486
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
487
- .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
488
- .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
489
- .ui-tabs .ui-tabs-hide { display: none !important; }
490
- /*
491
- * jQuery UI Datepicker 1.8.16
492
- *
493
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
494
- * Dual licensed under the MIT or GPL Version 2 licenses.
495
- * http://jquery.org/license
496
- *
497
- * http://docs.jquery.com/UI/Datepicker#theming
498
- */
499
- .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
500
- .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
501
- .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
502
- .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
503
- .ui-datepicker .ui-datepicker-prev { left:2px; }
504
- .ui-datepicker .ui-datepicker-next { right:2px; }
505
- .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
506
- .ui-datepicker .ui-datepicker-next-hover { right:1px; }
507
- .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
508
- .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
509
- .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
510
- .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
511
- .ui-datepicker select.ui-datepicker-month,
512
- .ui-datepicker select.ui-datepicker-year { width: 49%;}
513
- .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
514
- .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
515
- .ui-datepicker td { border: 0; padding: 1px; }
516
- .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
517
- .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
518
- .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
519
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
520
-
521
- /* with multiple calendars */
522
- .ui-datepicker.ui-datepicker-multi { width:auto; }
523
- .ui-datepicker-multi .ui-datepicker-group { float:left; }
524
- .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
525
- .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
526
- .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
527
- .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
528
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
529
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
530
- .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
531
- .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
532
-
533
- /* RTL support */
534
- .ui-datepicker-rtl { direction: rtl; }
535
- .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
536
- .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
537
- .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
538
- .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
539
- .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
540
- .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
541
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
542
- .ui-datepicker-rtl .ui-datepicker-group { float:right; }
543
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
544
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
545
-
546
- /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
547
- .ui-datepicker-cover {
548
- display: none; /*sorry for IE5*/
549
- display/**/: block; /*sorry for IE5*/
550
- position: absolute; /*must have*/
551
- z-index: -1; /*must have*/
552
- filter: mask(); /*must have*/
553
- top: -4px; /*must have*/
554
- left: -4px; /*must have*/
555
- width: 200px; /*must have*/
556
- height: 200px; /*must have*/
557
- }/*
558
- * jQuery UI Progressbar 1.8.16
559
- *
560
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
561
- * Dual licensed under the MIT or GPL Version 2 licenses.
562
- * http://jquery.org/license
563
- *
564
- * http://docs.jquery.com/UI/Progressbar#theming
565
- */
566
- .ui-progressbar { height:2em; text-align: left; }
567
- .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
568
- .ui-progressbar .ui-widget-header {
569
- background-color: #83B4D8;
570
- background-image: linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
571
- background-image: -o-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
572
- background-image: -moz-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
573
- background-image: -webkit-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
574
- background-image: -ms-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
575
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/jquery-ui-fresh.css DELETED
@@ -1,575 +0,0 @@
1
- /*
2
- * jQuery UI CSS Framework 1.8.16
3
- *
4
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Theming/API
9
- */
10
-
11
- /* Layout helpers
12
- ----------------------------------*/
13
- .ui-helper-hidden { display: none; }
14
- .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
- .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
- .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
- .ui-helper-clearfix { display: inline-block; }
18
- /* required comment for clearfix to work in Opera \*/
19
- * html .ui-helper-clearfix { height:1%; }
20
- .ui-helper-clearfix { display:block; }
21
- /* end clearfix */
22
- .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
-
24
-
25
- /* Interaction Cues
26
- ----------------------------------*/
27
- .ui-state-disabled { cursor: default !important; }
28
-
29
-
30
- /* Icons
31
- ----------------------------------*/
32
-
33
- /* states and images */
34
- .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
-
36
-
37
- /* Misc visuals
38
- ----------------------------------*/
39
-
40
- /* Overlays */
41
- .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
-
43
-
44
- /*
45
- * jQuery UI CSS Framework 1.8.16
46
- *
47
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
48
- * Dual licensed under the MIT or GPL Version 2 licenses.
49
- * http://jquery.org/license
50
- *
51
- * http://docs.jquery.com/UI/Theming/API
52
- *
53
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=sans-serif&fwDefault=normal&fsDefault=12px&cornerRadius=4px&bgColorHeader=ececec&bgTextureHeader=04_highlight_hard.png&bgImgOpacityHeader=75&borderColorHeader=dfdfdf&fcHeader=333333&iconColorHeader=999999&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=dfdfdf&fcContent=333333&iconColorContent=333333&bgColorDefault=ececec&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=75&borderColorDefault=dfdfdf&fcDefault=333333&iconColorDefault=333333&bgColorHover=ececec&bgTextureHover=06_inset_hard.png&bgImgOpacityHover=75&borderColorHover=ccc&fcHover=000000&iconColorHover=333333&bgColorActive=ffffff&bgTextureActive=01_flat.png&bgImgOpacityActive=65&borderColorActive=dfdfdf&fcActive=333333&iconColorActive=333333&bgColorHighlight=ffffe0&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=e6db55&fcHighlight=333333&iconColorHighlight=21759b&bgColorError=ffebe8&bgTextureError=01_flat.png&bgImgOpacityError=95&borderColorError=cc0000&fcError=cc0000&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=3px
54
- */
55
-
56
-
57
- /* Component containers
58
- ----------------------------------*/
59
- .ui-widget { font-family: sans-serif; font-size: 12px; }
60
- .ui-widget .ui-widget { font-size: 1em; }
61
- .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: sans-serif; font-size: 1em; }
62
- .ui-widget-content { border: 1px solid #dfdfdf; background: #ffffff; color: #333333; }
63
- .ui-widget-header { border: 1px solid #dfdfdf; color: #333333; font-weight: bold; background-color: #f1f1f1; background-image: -ms-linear-gradient(top, #f9f9f9, #ececec); background-image: -moz-linear-gradient(top, #f9f9f9, #ececec); background-image: -o-linear-gradient(top, #f9f9f9, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec)); background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec); background-image: linear-gradient(top, #f9f9f9, #ececec); }
64
- .ui-widget-header a { color: #333333; }
65
-
66
- /* Interaction states
67
- ----------------------------------*/
68
- .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #dfdfdf; background-color: #f1f1f1; background-image: -ms-linear-gradient(top, #f9f9f9, #ececec); background-image: -moz-linear-gradient(top, #f9f9f9, #ececec); background-image: -o-linear-gradient(top, #f9f9f9, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec)); background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec); background-image: linear-gradient(top, #f9f9f9, #ececec); font-weight: normal; color: #333333; }
69
- .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #333333; text-decoration: none; }
70
- .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #ccc; background-color: #ececec; background-image: -ms-linear-gradient(top, #ececec, #f9f9f9); background-image: -moz-linear-gradient(top, #ececec, #f9f9f9); background-image: -o-linear-gradient(top, #ececec, #f9f9f9); background-image: -webkit-gradient(linear, left top, left bottom, from(#ececec), to(#f9f9f9)); background-image: -webkit-linear-gradient(top, #ececec, #f9f9f9); background-image: linear-gradient(top, #ececec, #f9f9f9); font-weight: normal; color: #000000; }
71
- .ui-state-hover a, .ui-state-hover a:hover { color: #000000; text-decoration: none; }
72
- .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #dfdfdf; background: #ffffff; font-weight: normal; color: #333333; }
73
- .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #333333; text-decoration: none; }
74
- .ui-widget :active { outline: none; }
75
-
76
- /* Interaction Cues
77
- ----------------------------------*/
78
- .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #e6db55; background: #ffffe0; color: #333333; }
79
- .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #333333; }
80
- .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cc0000; background: #ffebe8; color: #cc0000; }
81
- .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cc0000; }
82
- .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cc0000; }
83
- .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
84
- .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
85
- .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
86
-
87
- /* Icons
88
- ----------------------------------*/
89
-
90
- /* states and images */
91
- .ui-icon { width: 16px; height: 16px; background-image: url(../images/ui-icons_333333_256x240.png); }
92
- .ui-widget-content .ui-icon {background-image: url(../images/ui-icons_333333_256x240.png); }
93
- .ui-widget-header .ui-icon {background-image: url(../images/ui-icons_999999_256x240.png); }
94
- .ui-state-default .ui-icon { background-image: url(../images/ui-icons_333333_256x240.png); }
95
- .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../images/ui-icons_333333_256x240.png); }
96
- .ui-state-active .ui-icon {background-image: url(../images/ui-icons_333333_256x240.png); }
97
- .ui-state-highlight .ui-icon {background-image: url(../images/ui-icons_21759b_256x240.png); }
98
- .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../images/ui-icons_cc0000_256x240.png); }
99
-
100
- /* positioning */
101
- .ui-icon-carat-1-n { background-position: 0 0; }
102
- .ui-icon-carat-1-ne { background-position: -16px 0; }
103
- .ui-icon-carat-1-e { background-position: -32px 0; }
104
- .ui-icon-carat-1-se { background-position: -48px 0; }
105
- .ui-icon-carat-1-s { background-position: -64px 0; }
106
- .ui-icon-carat-1-sw { background-position: -80px 0; }
107
- .ui-icon-carat-1-w { background-position: -96px 0; }
108
- .ui-icon-carat-1-nw { background-position: -112px 0; }
109
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
110
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
111
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
112
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
113
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
114
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
115
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
116
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
117
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
118
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
119
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
120
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
121
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
122
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
123
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
124
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
125
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
126
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
127
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
128
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
129
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
130
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
131
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
132
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
133
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
134
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
135
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
136
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
137
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
138
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
139
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
140
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
141
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
142
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
143
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
144
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
145
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
146
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
147
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
148
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
149
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
150
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
151
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
152
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
153
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
154
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
155
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
156
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
157
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
158
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
159
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
160
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
161
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
162
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
163
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
164
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
165
- .ui-icon-arrow-4 { background-position: 0 -80px; }
166
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
167
- .ui-icon-extlink { background-position: -32px -80px; }
168
- .ui-icon-newwin { background-position: -48px -80px; }
169
- .ui-icon-refresh { background-position: -64px -80px; }
170
- .ui-icon-shuffle { background-position: -80px -80px; }
171
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
172
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
173
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
174
- .ui-icon-folder-open { background-position: -16px -96px; }
175
- .ui-icon-document { background-position: -32px -96px; }
176
- .ui-icon-document-b { background-position: -48px -96px; }
177
- .ui-icon-note { background-position: -64px -96px; }
178
- .ui-icon-mail-closed { background-position: -80px -96px; }
179
- .ui-icon-mail-open { background-position: -96px -96px; }
180
- .ui-icon-suitcase { background-position: -112px -96px; }
181
- .ui-icon-comment { background-position: -128px -96px; }
182
- .ui-icon-person { background-position: -144px -96px; }
183
- .ui-icon-print { background-position: -160px -96px; }
184
- .ui-icon-trash { background-position: -176px -96px; }
185
- .ui-icon-locked { background-position: -192px -96px; }
186
- .ui-icon-unlocked { background-position: -208px -96px; }
187
- .ui-icon-bookmark { background-position: -224px -96px; }
188
- .ui-icon-tag { background-position: -240px -96px; }
189
- .ui-icon-home { background-position: 0 -112px; }
190
- .ui-icon-flag { background-position: -16px -112px; }
191
- .ui-icon-calendar { background-position: -32px -112px; }
192
- .ui-icon-cart { background-position: -48px -112px; }
193
- .ui-icon-pencil { background-position: -64px -112px; }
194
- .ui-icon-clock { background-position: -80px -112px; }
195
- .ui-icon-disk { background-position: -96px -112px; }
196
- .ui-icon-calculator { background-position: -112px -112px; }
197
- .ui-icon-zoomin { background-position: -128px -112px; }
198
- .ui-icon-zoomout { background-position: -144px -112px; }
199
- .ui-icon-search { background-position: -160px -112px; }
200
- .ui-icon-wrench { background-position: -176px -112px; }
201
- .ui-icon-gear { background-position: -192px -112px; }
202
- .ui-icon-heart { background-position: -208px -112px; }
203
- .ui-icon-star { background-position: -224px -112px; }
204
- .ui-icon-link { background-position: -240px -112px; }
205
- .ui-icon-cancel { background-position: 0 -128px; }
206
- .ui-icon-plus { background-position: -16px -128px; }
207
- .ui-icon-plusthick { background-position: -32px -128px; }
208
- .ui-icon-minus { background-position: -48px -128px; }
209
- .ui-icon-minusthick { background-position: -64px -128px; }
210
- .ui-icon-close { background-position: -80px -128px; }
211
- .ui-icon-closethick { background-position: -96px -128px; }
212
- .ui-icon-key { background-position: -112px -128px; }
213
- .ui-icon-lightbulb { background-position: -128px -128px; }
214
- .ui-icon-scissors { background-position: -144px -128px; }
215
- .ui-icon-clipboard { background-position: -160px -128px; }
216
- .ui-icon-copy { background-position: -176px -128px; }
217
- .ui-icon-contact { background-position: -192px -128px; }
218
- .ui-icon-image { background-position: -208px -128px; }
219
- .ui-icon-video { background-position: -224px -128px; }
220
- .ui-icon-script { background-position: -240px -128px; }
221
- .ui-icon-alert { background-position: 0 -144px; }
222
- .ui-icon-info { background-position: -16px -144px; }
223
- .ui-icon-notice { background-position: -32px -144px; }
224
- .ui-icon-help { background-position: -48px -144px; }
225
- .ui-icon-check { background-position: -64px -144px; }
226
- .ui-icon-bullet { background-position: -80px -144px; }
227
- .ui-icon-radio-off { background-position: -96px -144px; }
228
- .ui-icon-radio-on { background-position: -112px -144px; }
229
- .ui-icon-pin-w { background-position: -128px -144px; }
230
- .ui-icon-pin-s { background-position: -144px -144px; }
231
- .ui-icon-play { background-position: 0 -160px; }
232
- .ui-icon-pause { background-position: -16px -160px; }
233
- .ui-icon-seek-next { background-position: -32px -160px; }
234
- .ui-icon-seek-prev { background-position: -48px -160px; }
235
- .ui-icon-seek-end { background-position: -64px -160px; }
236
- .ui-icon-seek-start { background-position: -80px -160px; }
237
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
238
- .ui-icon-seek-first { background-position: -80px -160px; }
239
- .ui-icon-stop { background-position: -96px -160px; }
240
- .ui-icon-eject { background-position: -112px -160px; }
241
- .ui-icon-volume-off { background-position: -128px -160px; }
242
- .ui-icon-volume-on { background-position: -144px -160px; }
243
- .ui-icon-power { background-position: 0 -176px; }
244
- .ui-icon-signal-diag { background-position: -16px -176px; }
245
- .ui-icon-signal { background-position: -32px -176px; }
246
- .ui-icon-battery-0 { background-position: -48px -176px; }
247
- .ui-icon-battery-1 { background-position: -64px -176px; }
248
- .ui-icon-battery-2 { background-position: -80px -176px; }
249
- .ui-icon-battery-3 { background-position: -96px -176px; }
250
- .ui-icon-circle-plus { background-position: 0 -192px; }
251
- .ui-icon-circle-minus { background-position: -16px -192px; }
252
- .ui-icon-circle-close { background-position: -32px -192px; }
253
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
254
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
255
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
256
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
257
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
258
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
259
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
260
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
261
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
262
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
263
- .ui-icon-circle-check { background-position: -208px -192px; }
264
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
265
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
266
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
267
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
268
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
269
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
270
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
271
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
272
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
273
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
274
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
275
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
276
-
277
-
278
- /* Misc visuals
279
- ----------------------------------*/
280
-
281
- /* Corner radius */
282
- .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
283
- .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
284
- .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
285
- .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
286
-
287
- /* Overlays */
288
- .ui-widget-overlay { background: #000000; opacity: .6;filter:Alpha(Opacity=60); }
289
- .ui-widget-shadow { box-shadow: 0 0 16px rgba(0, 0, 0, 0.3); }/*
290
- * jQuery UI Resizable 1.8.16
291
- *
292
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
293
- * Dual licensed under the MIT or GPL Version 2 licenses.
294
- * http://jquery.org/license
295
- *
296
- * http://docs.jquery.com/UI/Resizable#theming
297
- */
298
- .ui-resizable { position: relative;}
299
- .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
300
- .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
301
- .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
302
- .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
303
- .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
304
- .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
305
- .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
306
- .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
307
- .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
308
- .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
309
- * jQuery UI Selectable 1.8.16
310
- *
311
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
312
- * Dual licensed under the MIT or GPL Version 2 licenses.
313
- * http://jquery.org/license
314
- *
315
- * http://docs.jquery.com/UI/Selectable#theming
316
- */
317
- .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
318
- /*
319
- * jQuery UI Accordion 1.8.16
320
- *
321
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
322
- * Dual licensed under the MIT or GPL Version 2 licenses.
323
- * http://jquery.org/license
324
- *
325
- * http://docs.jquery.com/UI/Accordion#theming
326
- */
327
- /* IE/Win - Fix animation bug - #4615 */
328
- .ui-accordion { width: 100%; }
329
- .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
330
- .ui-accordion .ui-accordion-li-fix { display: inline; }
331
- .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
332
- .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
333
- .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
334
- .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
335
- .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
336
- .ui-accordion .ui-accordion-content-active { display: block; }
337
- /*
338
- * jQuery UI Autocomplete 1.8.16
339
- *
340
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
341
- * Dual licensed under the MIT or GPL Version 2 licenses.
342
- * http://jquery.org/license
343
- *
344
- * http://docs.jquery.com/UI/Autocomplete#theming
345
- */
346
- .ui-autocomplete { position: absolute; cursor: default; }
347
-
348
- /* workarounds */
349
- * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
350
-
351
- /*
352
- * jQuery UI Menu 1.8.16
353
- *
354
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
355
- * Dual licensed under the MIT or GPL Version 2 licenses.
356
- * http://jquery.org/license
357
- *
358
- * http://docs.jquery.com/UI/Menu#theming
359
- */
360
- .ui-menu {
361
- list-style:none;
362
- padding: 2px;
363
- margin: 0;
364
- display:block;
365
- float: left;
366
- }
367
- .ui-menu .ui-menu {
368
- margin-top: -3px;
369
- }
370
- .ui-menu .ui-menu-item {
371
- margin:0;
372
- padding: 0;
373
- zoom: 1;
374
- float: left;
375
- clear: left;
376
- width: 100%;
377
- }
378
- .ui-menu .ui-menu-item a {
379
- text-decoration:none;
380
- display:block;
381
- padding:.2em .4em;
382
- line-height:1.5;
383
- zoom:1;
384
- }
385
- .ui-menu .ui-menu-item a.ui-state-hover,
386
- .ui-menu .ui-menu-item a.ui-state-active {
387
- font-weight: normal;
388
- margin: -1px;
389
- }
390
- /*
391
- * jQuery UI Button 1.8.16
392
- *
393
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
394
- * Dual licensed under the MIT or GPL Version 2 licenses.
395
- * http://jquery.org/license
396
- *
397
- * http://docs.jquery.com/UI/Button#theming
398
- */
399
- .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
400
- .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
401
- button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
402
- .ui-button-icons-only { width: 3.4em; }
403
- button.ui-button-icons-only { width: 3.7em; }
404
-
405
- /*button text element */
406
- .ui-button .ui-button-text { display: block; line-height: 1.4; }
407
- .ui-button-text-only .ui-button-text { padding: .4em 1em; }
408
- .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
409
- .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
410
- .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
411
- .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
412
- /* no icon support for input elements, provide padding by default */
413
- input.ui-button { padding: .4em 1em; }
414
-
415
- /*button icon element(s) */
416
- .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
417
- .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
418
- .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
419
- .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
420
- .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
421
-
422
- /*button sets*/
423
- .ui-buttonset { margin-right: 7px; }
424
- .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
425
-
426
- /* workarounds */
427
- button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
428
- /*
429
- * jQuery UI Dialog 1.8.16
430
- *
431
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
432
- * Dual licensed under the MIT or GPL Version 2 licenses.
433
- * http://jquery.org/license
434
- *
435
- * http://docs.jquery.com/UI/Dialog#theming
436
- */
437
- .ui-dialog { position: fixed; padding: .2em; width: 300px; overflow: hidden; }
438
- .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
439
- .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
440
- .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
441
- .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
442
- .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
443
- .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
444
- .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
445
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
446
- .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
447
- .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
448
- .ui-draggable .ui-dialog-titlebar { cursor: move; }
449
- /*
450
- * jQuery UI Slider 1.8.16
451
- *
452
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
453
- * Dual licensed under the MIT or GPL Version 2 licenses.
454
- * http://jquery.org/license
455
- *
456
- * http://docs.jquery.com/UI/Slider#theming
457
- */
458
- .ui-slider { position: relative; text-align: left; }
459
- .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
460
- .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
461
-
462
- .ui-slider-horizontal { height: .8em; }
463
- .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
464
- .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
465
- .ui-slider-horizontal .ui-slider-range-min { left: 0; }
466
- .ui-slider-horizontal .ui-slider-range-max { right: 0; }
467
-
468
- .ui-slider-vertical { width: .8em; height: 100px; }
469
- .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
470
- .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
471
- .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
472
- .ui-slider-vertical .ui-slider-range-max { top: 0; }/*
473
- * jQuery UI Tabs 1.8.16
474
- *
475
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
476
- * Dual licensed under the MIT or GPL Version 2 licenses.
477
- * http://jquery.org/license
478
- *
479
- * http://docs.jquery.com/UI/Tabs#theming
480
- */
481
- .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
482
- .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
483
- .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
484
- .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
485
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
486
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
487
- .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
488
- .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
489
- .ui-tabs .ui-tabs-hide { display: none !important; }
490
- /*
491
- * jQuery UI Datepicker 1.8.16
492
- *
493
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
494
- * Dual licensed under the MIT or GPL Version 2 licenses.
495
- * http://jquery.org/license
496
- *
497
- * http://docs.jquery.com/UI/Datepicker#theming
498
- */
499
- .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
500
- .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
501
- .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
502
- .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
503
- .ui-datepicker .ui-datepicker-prev { left:2px; }
504
- .ui-datepicker .ui-datepicker-next { right:2px; }
505
- .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
506
- .ui-datepicker .ui-datepicker-next-hover { right:1px; }
507
- .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
508
- .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
509
- .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
510
- .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
511
- .ui-datepicker select.ui-datepicker-month,
512
- .ui-datepicker select.ui-datepicker-year { width: 49%;}
513
- .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
514
- .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
515
- .ui-datepicker td { border: 0; padding: 1px; }
516
- .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
517
- .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
518
- .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
519
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
520
-
521
- /* with multiple calendars */
522
- .ui-datepicker.ui-datepicker-multi { width:auto; }
523
- .ui-datepicker-multi .ui-datepicker-group { float:left; }
524
- .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
525
- .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
526
- .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
527
- .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
528
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
529
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
530
- .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
531
- .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
532
-
533
- /* RTL support */
534
- .ui-datepicker-rtl { direction: rtl; }
535
- .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
536
- .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
537
- .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
538
- .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
539
- .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
540
- .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
541
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
542
- .ui-datepicker-rtl .ui-datepicker-group { float:right; }
543
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
544
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
545
-
546
- /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
547
- .ui-datepicker-cover {
548
- display: none; /*sorry for IE5*/
549
- display/**/: block; /*sorry for IE5*/
550
- position: absolute; /*must have*/
551
- z-index: -1; /*must have*/
552
- filter: mask(); /*must have*/
553
- top: -4px; /*must have*/
554
- left: -4px; /*must have*/
555
- width: 200px; /*must have*/
556
- height: 200px; /*must have*/
557
- }/*
558
- * jQuery UI Progressbar 1.8.16
559
- *
560
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
561
- * Dual licensed under the MIT or GPL Version 2 licenses.
562
- * http://jquery.org/license
563
- *
564
- * http://docs.jquery.com/UI/Progressbar#theming
565
- */
566
- .ui-progressbar { height:2em; text-align: left; }
567
- .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
568
- .ui-progressbar .ui-widget-header {
569
- background-color: #83B4D8;
570
- background-image: linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
571
- background-image: -o-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
572
- background-image: -moz-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
573
- background-image: -webkit-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
574
- background-image: -ms-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
575
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/fonts/genericons-regular-webfont.eot DELETED
Binary file
assets/fonts/genericons-regular-webfont.svg DELETED
@@ -1,135 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata></metadata>
5
- <defs>
6
- <font id="genericonsregular" horiz-adv-x="2048" >
7
- <font-face units-per-em="2048" ascent="1638" descent="-410" />
8
- <missing-glyph horiz-adv-x="500" />
9
- <glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
10
- <glyph unicode="&#xf100;" d="M512 512v128h768v-128h-768zM512 768v128h256v-128h-256zM512 1024v128h640v-128h-640zM512 1280v128h1024v-128h-1024zM896 768v128h640v-128h-640zM1280 1024v128h256v-128h-256z" />
11
- <glyph unicode="&#xf101;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM768 1024q0 -106 75 -181t181 -75t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181z" />
12
- <glyph unicode="&#xf102;" d="M128 384v896l512 128l128 256h512l128 -256l512 -128v-896h-1792zM256 1440v160h256v-96zM576 960q0 -185 131.5 -316.5t316.5 -131.5q186 0 317 131.5t131 316.5q0 186 -131 317t-317 131q-185 0 -316.5 -131t-131.5 -317zM704 960q0 133 93.5 226.5t226.5 93.5 t226.5 -93.5t93.5 -226.5q0 -132 -93.5 -226t-226.5 -94t-226.5 94t-93.5 226z" />
13
- <glyph unicode="&#xf103;" d="M128 512v384h384v-384h-384zM128 1024v384h896v-384h-896zM640 512v384h384v-384h-384zM1152 512v896h896v-896h-896z" />
14
- <glyph unicode="&#xf104;" d="M512 384v1280l1152 -640z" />
15
- <glyph unicode="&#xf105;" d="M640 1408q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5q0 -124 -71.5 -222t-184.5 -138v-536l-256 -128v664q-113 40 -184.5 138t-71.5 222z" />
16
- <glyph unicode="&#xf106;" d="M256 896v640h640v-640q0 -212 -150 -362t-362 -150v256q106 0 181 75t75 181h-384zM1152 896v640h640v-640q0 -212 -150 -362t-362 -150v256q106 0 181 75t75 181h-384z" />
17
- <glyph unicode="&#xf107;" d="M512 704v384q0 97 53 176.5t139 116.5v-151q-64 -57 -64 -142v-384q0 -80 56 -136t136 -56t136 56t56 136v384q0 85 -64 142v151q86 -37 139 -116.5t53 -176.5v-384q0 -133 -93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5zM768 1088v384q0 133 93.5 226.5 t226.5 93.5t226.5 -93.5t93.5 -226.5v-384q0 -97 -53 -176.5t-139 -116.5v151q64 57 64 142v384q0 80 -56 136t-136 56t-136 -56t-56 -136v-384q0 -85 64 -142v-151q-86 37 -139 116.5t-53 176.5z" />
18
- <glyph unicode="&#xf108;" d="M0 1152v384q0 96 80 176t176 80h1024q96 0 176 -80t80 -176v-384q0 -96 -80 -176t-176 -80h-448l-448 -448v448h-128q-96 0 -176 80t-80 176zM768 640l128 128h384q168 0 276 108t108 276v384q96 0 176 -80t80 -176v-384q0 -96 -80 -176t-176 -80h-128v-448l-448 448 h-320z" />
19
- <glyph unicode="&#xf109;" d="M256 768v512h384l384 384v-1280l-384 384h-384zM1205 843q75 75 75 181t-75 181l91 91q26 -27 46.5 -57.5t35 -65t22.5 -72.5t8 -77q0 -78 -29.5 -148t-82.5 -124zM1386 662q71 71 110.5 164.5t39.5 197.5t-39.5 197.5t-110.5 164.5l91 91q88 -89 137.5 -206t49.5 -247 q0 -87 -23 -170t-64.5 -153.5t-99.5 -129.5z" />
20
- <glyph unicode="&#xf200;" d="M0 1024q0 208 81 398t218.5 327t327 218t397.5 81q209 0 398.5 -81t326.5 -218t218 -326.5t81 -398.5q0 -335 -195.5 -601.5t-504.5 -369.5q-36 -7 -53 8.5t-17 40.5q0 4 0.5 102t0.5 179q0 130 -69 189q77 9 137.5 24.5t124.5 51.5t107 89t70.5 140t27.5 201 q0 161 -105 274q6 15 11 35t9 56t-3.5 83.5t-26.5 96.5q-4 1 -10.5 2t-32 -1t-55.5 -11t-79.5 -33.5t-104.5 -61.5q-118 33 -256 35q-138 -2 -256 -35q-55 37 -104 61.5t-80 33t-54.5 11.5t-33.5 1l-10 -2q-58 -146 -10 -271q-105 -115 -105 -274q0 -114 27.5 -201 t70.5 -140t107 -89t124.5 -52t136.5 -24q-53 -47 -65 -137q-28 -13 -59.5 -20t-75.5 -6.5t-87.5 28.5t-75.5 83q-2 4 -6.5 10.5t-19 24t-31.5 31t-44 25.5t-56 14h-10t-18.5 -3.5t-17 -9t4 -18.5t34.5 -31q3 -1 7.5 -4t19 -14.5t27.5 -27t30 -43.5t30 -61q1 -3 2.5 -7t8 -17 t15.5 -25.5t24.5 -28t33.5 -28t45 -23.5t57.5 -16t71.5 -3.5t87 11.5q0 -50 0.5 -110t0.5 -64q0 -24 -17 -40t-53 -10q-309 103 -504.5 370t-195.5 602z" />
21
- <glyph unicode="&#xf201;" d="M0 1024q0 206 82 395.5t219.5 327t327 219.5t395.5 82t395.5 -82t327 -219.5t219.5 -327t82 -395.5t-82 -395.5t-219.5 -327t-327 -219.5t-395.5 -82t-395.5 82t-327 219.5t-219.5 327t-82 395.5zM128 1024q0 -167 58 -319.5t166 -272.5q125 205 339 360t445 232 q-16 48 -80 176q-282 -86 -481.5 -111t-446.5 -1v-64zM160 1232q194 -22 444 14t388 82q-141 282 -320 528q-194 -85 -329.5 -247.5t-182.5 -376.5zM480 320q216 -192 544 -192q181 0 368 80q-33 300 -208 688q-222 -74 -410 -225.5t-294 -350.5zM832 1904 q102 -166 304 -512q6 2 86 31t118.5 45t108 47t122 64t93.5 69q-126 126 -290.5 199t-349.5 73q-32 0 -96 -8t-96 -8zM1200 1248q22 -29 36.5 -54.5t34 -67.5t25.5 -54q170 33 336 30t288 -30q-26 285 -160 464q-71 -57 -162 -104.5t-214.5 -100.5t-183.5 -83zM1344 928 q14 -27 43 -103t74.5 -231t74.5 -306q156 108 258 278t126 362q-276 46 -576 0z" />
22
- <glyph unicode="&#xf202;" d="M128 465q48 -5 88 -5q256 0 456 157q-119 2 -213 73.5t-130 182.5q39 -7 69 -7q47 0 97 13q-127 26 -211 127t-84 233v5q80 -43 167 -46q-76 50 -120 131t-44 175q0 101 50 185q138 -170 335 -271.5t423 -112.5q-10 39 -10 84q0 152 108 259.5t260 107.5q160 0 268 -116 q128 26 233 89q-42 -132 -161 -203q109 13 211 58q-73 -111 -183 -191q0 -7 0.5 -23t0.5 -24q0 -122 -31 -246t-89.5 -241t-149.5 -218.5t-204 -177.5t-260.5 -119.5t-311.5 -43.5q-305 0 -564 165z" />
23
- <glyph unicode="&#xf203;" d="M128 384v1280q0 106 75 181t181 75h1280q106 0 181 -75t75 -181v-1280q0 -106 -75 -181t-181 -75h-282v711h270l12 260h-282v192v12q0 60 21.5 87.5t87.5 27.5l166 -1l6 242q-78 10 -183 10q-94 0 -167 -27.5t-117 -74.5t-66 -105.5t-22 -126.5v-236h-254v-260h254v-711 h-724q-106 0 -181 75t-75 181z" />
24
- <glyph unicode="&#xf204;" d="M640 969v303h222v258q0 78 26 147t77 124t136.5 87t194.5 32q55 0 108 -3t79 -6l26 -3l-7 -282h-193q-76 0 -101.5 -32t-25.5 -101v-14v-207h329l-14 -303h-315v-841h-320v841h-222z" />
25
- <glyph unicode="&#xf205;" d="M128 1024q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348zM218 1024q0 -236 125 -430.5t330 -294.5l-385 1053q-70 -156 -70 -328zM351 1466h52q37 0 91 2.5t89 4.5 l34 3q21 1 30.5 -14.5t2.5 -32.5t-27 -20q-44 -5 -93 -7l294 -873l176 529l-125 344l-85 7q-20 2 -27.5 19t2.5 33t30 15q133 -10 212 -10q38 0 91.5 2.5t88.5 4.5l35 3q16 1 25.5 -8.5t10 -22t-7 -23.5t-23.5 -13q-43 -5 -92 -7l291 -866l81 268q24 79 32.5 107.5 t18.5 74.5t10 79q0 46 -11.5 90.5t-23.5 71t-32 60.5q-2 4 -11.5 19t-12 20t-10.5 18.5t-11 19t-9 17.5t-8.5 19t-6.5 18t-5.5 19.5t-3 18.5t-1.5 20q0 57 39 100t97 43l10 -1q-110 101 -249.5 156.5t-294.5 55.5q-207 0 -385 -98t-288 -266zM796 251q112 -33 228 -33 q138 0 268 46q-4 6 -6 11l-248 679zM1429 328q183 106 292 291.5t109 404.5q0 207 -99 386q5 -40 5 -82q0 -135 -61 -289z" />
26
- <glyph unicode="&#xf206;" d="M128 486v485q125 -127 330 -127q30 0 59 3q-32 -61 -32 -118q0 -33 13 -63t28.5 -48.5t45.5 -47.5q-18 0 -54.5 -0.5t-55.5 -0.5q-183 0 -334 -83zM128 1599v65q0 106 75 181t181 75h1280q106 0 181 -75t75 -181v-128h-256v256h-128v-256h-256v-128h256v-256h128v256h256 v-1024q0 -106 -75 -181t-181 -75h-507q5 28 5 50q0 143 -46.5 230t-189.5 194q-3 2 -20.5 15t-25 19t-25.5 20t-27.5 22.5t-24 22t-23 23.5t-17 22t-12.5 22.5t-4 20.5q0 52 23 87t99 94q180 141 180 324q0 113 -45 204.5t-128 139.5h160l135 142h-607q-127 0 -241.5 -49 t-194.5 -132zM139 309q57 85 166 137.5t237 51.5q84 -1 158 -26q19 -13 62 -42.5t61 -42t48 -37t44.5 -41.5t29 -41.5t21.5 -49.5q7 -29 7 -66q0 -16 -1 -24h-588q-85 0 -153 50.5t-92 130.5zM228 1307q-21 161 50.5 269.5t194.5 104.5q121 -4 215.5 -118.5t116.5 -277.5 q21 -160 -43 -256t-187 -92q-125 4 -225.5 108t-121.5 262z" />
27
- <glyph unicode="&#xf207;" d="M256 1553q0 -73 50.5 -122t131.5 -49h2q84 0 135 49t51 122q-1 75 -51 123t-133 48t-134.5 -48.5t-51.5 -122.5zM275 256h330v991h-330v-991zM787 256h329v553q0 54 11 81q20 50 63 85t106 35q58 0 96 -29t54.5 -77.5t16.5 -117.5v-530h329v568q0 112 -28.5 198 t-80 139.5t-120 81t-150.5 27.5q-36 0 -69 -5.5t-58.5 -15t-49 -23t-40 -27t-32.5 -31t-26.5 -31.5t-21.5 -31v141h-329q1 -26 1.5 -138t0.5 -252.5t-0.5 -277.5t-1.5 -230v-93z" />
28
- <glyph unicode="&#xf208;" d="M128 384v1280q0 106 75 181t181 75h1280q106 0 181 -75t75 -181v-1280q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM384 1422q0 -58 40.5 -97.5t105.5 -39.5h1q67 0 108.5 39.5t41.5 97.5q-2 60 -42 98.5t-106 38.5q-67 0 -108 -39t-41 -98zM400 384h263 v793h-263v-793zM809 384h264v443q0 45 8 64q16 40 50.5 68t85.5 28q133 0 133 -179v-424h264v455q0 175 -83.5 266t-220.5 91q-50 0 -90.5 -12t-68.5 -34t-45 -41t-33 -44v112h-264v-793z" />
29
- <glyph unicode="&#xf209;" d="M171 1260q0 109 35.5 219t110 213t179 182t254 126.5t323.5 47.5q176 0 327.5 -60.5t253.5 -161t160 -231t58 -270.5q0 -246 -85 -443t-241 -309.5t-355 -112.5q-99 0 -186.5 46.5t-121.5 110.5q-73 -290 -89 -347q-34 -123 -127 -270l-149 54q-7 167 22 290l162 688 q-40 81 -40 200q0 139 70.5 232.5t172.5 93.5q83 0 127 -53.5t44 -135.5q0 -51 -18.5 -124t-49 -170t-44.5 -154q-23 -99 37.5 -171t161.5 -72q117 0 209.5 92t142 244.5t49.5 334.5q0 214 -139 349t-387 135q-139 0 -257.5 -49.5t-197 -133t-122.5 -193t-44 -229.5 q0 -147 83 -247q18 -21 21.5 -34t-3.5 -37q-16 -61 -25 -101q-7 -24 -24.5 -32t-39.5 1q-127 51 -192.5 181.5t-65.5 300.5z" />
30
- <glyph unicode="&#xf210;" d="M0 1024q0 208 81 398t218.5 327t327 218t397.5 81q209 0 398.5 -81t326.5 -218t218 -326.5t81 -398.5t-81 -398.5t-218 -326.5t-326.5 -218t-398.5 -81q-147 0 -290 42q74 116 103 219l72 282q28 -53 99 -90.5t151 -37.5q162 0 288.5 91.5t195.5 251t69 359.5 q0 114 -47 220t-130 187.5t-206.5 130.5t-265.5 49q-141 0 -262 -38.5t-205.5 -103t-145.5 -147.5t-89.5 -172.5t-28.5 -178.5q0 -138 53 -243.5t156 -147.5q18 -8 32.5 -1t18.5 26q2 9 10 41t11 41q5 19 2.5 30t-16.5 28q-68 78 -68 200q0 97 35.5 186t99.5 156.5t160 108 t209 40.5q201 0 313.5 -109.5t112.5 -283.5q0 -148 -40 -271.5t-115 -198t-169 -74.5q-82 0 -131.5 58.5t-30.5 138.5q11 46 35.5 125t39.5 138t15 101q0 66 -35.5 109.5t-102.5 43.5q-82 0 -139.5 -76t-57.5 -189q0 -43 8 -83.5t16 -59.5l9 -19q-113 -475 -132 -558 q-24 -97 -18 -235q-275 120 -444 374t-169 564z" />
31
- <glyph unicode="&#xf211;" d="M160 1024q0 -172 122 -294t294 -122t294 122t122 294t-122 294t-294 122t-294 -122t-122 -294zM1056 1024q0 -172 122 -294t294 -122t294 122t122 294t-122 294t-294 122t-294 -122t-122 -294z" />
32
- <glyph unicode="&#xf212;" d="M128 1379l84 -108q121 84 141 84q92 0 173 -287l144 -525q108 -287 265 -287q253 0 619 471q353 451 365 710q16 347 -260 355q-373 12 -505 -417q69 29 133 29q136 0 120 -152q-8 -92 -120 -268q-113 -176 -169 -176q-73 0 -133 271q-20 79 -72 407q-49 303 -258 284 q-89 -8 -265 -160q-127 -113 -262 -231z" />
33
- <glyph unicode="&#xf213;" d="M128 768v512q0 159 112.5 271.5t271.5 112.5h1024q159 0 271.5 -112.5t112.5 -271.5v-512q0 -159 -112.5 -271.5t-271.5 -112.5h-1024q-159 0 -271.5 112.5t-112.5 271.5zM768 640l640 384l-640 384v-768z" />
34
- <glyph unicode="&#xf214;" d="M472 1186h198v-629q0 -121 26 -187q26 -65 92 -122t161 -89q93 -31 218 -31q110 0 201 22q88 20 208 76v282q-134 -88 -271 -88q-76 0 -136 36q-44 25 -61 70q-17 46 -17 200v460h426v281h-426v453h-255q-17 -139 -62 -228q-48 -93 -121 -154q-74 -64 -181 -99v-253z" />
35
- <glyph unicode="&#xf215;" d="M128 384v1280q0 106 75 181t181 75h1280q106 0 181 -75t75 -181v-1280q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM256 384q0 -53 37.5 -90.5t90.5 -37.5h1280q53 0 90.5 37.5t37.5 90.5v768h-272q16 -66 16 -128q0 -212 -150 -362t-362 -150t-362 150 t-150 362q0 62 16 128h-272v-768zM640 1024q0 -159 112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5zM1408 1536q0 -53 37.5 -90.5t90.5 -37.5h128q53 0 90.5 37.5t37.5 90.5v128q0 53 -37.5 90.5t-90.5 37.5 h-128q-53 0 -90.5 -37.5t-37.5 -90.5v-128z" />
36
- <glyph unicode="&#xf216;" d="M256 790v467q0 31 29 55l702 467q17 11 37 11t37 -11l702 -467q29 -24 29 -55v-467q0 -32 -29 -54l-702 -468q-17 -11 -37 -11q-18 0 -37 11l-702 468q-29 22 -29 54zM388 914l165 110l-165 110v-220zM441 790l517 -344v308l-286 191zM441 1257l231 -154l286 191v307z M791 1024l233 -156l234 156l-234 156zM1090 446l517 344l-231 155l-286 -191v-308zM1090 1294l286 -191l231 154l-517 344v-307zM1495 1024l165 -110v220z" />
37
- <glyph unicode="&#xf217;" d="M128 1024q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348zM208 1024q0 -221 109.5 -409t297.5 -297.5t409 -109.5q236 0 432 123.5t298 327.5q59 136 59 266 q0 117 -43.5 221.5t-118.5 182.5t-175.5 131t-215.5 73q116 -48 204 -145t127 -218q54 -151 17.5 -320t-150.5 -289q-111 -123 -276 -179t-332 -27q-168 27 -307 138t-210 270q-74 156 -67.5 338.5t93.5 335.5q88 155 238.5 260t328.5 135q2 0 35 6q-208 -16 -380.5 -128 t-272.5 -293.5t-100 -392.5zM359 998q17 -148 100 -275.5t207 -200.5q120 -71 264 -78.5t267 49.5q-76 -21 -148 -21q-149 0 -275.5 74t-200.5 201t-74 276q0 214 146 373l3 3l14 14l1 1q98 114 235 178t293 64q163 0 306 -70t241 -193q-36 57 -70 96q-104 126 -250 200.5 t-305 80.5q-157 7 -306.5 -51.5t-258.5 -169.5q-109 -107 -159 -254.5t-30 -296.5zM612 1025q8 -119 85 -217t186 -128q110 -33 221.5 8.5t170.5 134.5q61 91 50 204t-86 187q-70 77 -179.5 87t-188.5 -50q-85 -62 -105 -157q-21 -98 30 -182q50 -84 142 -108q92 -23 172 26 q38 23 64 58.5t34 76.5q17 88 -34 159q-52 72 -136 77q-83 6 -142 -54q-57 -55 -45 -138q6 -37 27.5 -68.5t52.5 -47.5q40 -21 87 -16q-46 1 -82 29t-49 71l-2 3q-14 30 -9.5 67t25.5 66q22 30 56.5 46.5t72.5 14.5t73.5 -23.5t54.5 -55.5q46 -76 8 -158 q-18 -39 -53.5 -66.5t-78.5 -35.5q-43 -9 -88.5 3.5t-78.5 43.5q-74 68 -68 169q2 65 45 118.5t109.5 77t132.5 5.5q68 -16 118.5 -70.5t65 -124.5t-9.5 -144q-37 -107 -150 -158.5t-224 -8.5q-114 43 -170 158q-55 117 -17 238q35 121 152 191t246 47q131 -19 223 -128 t95 -246q6 -142 -81 -257q-86 -115 -225 -157q-114 -35 -234 -7q83 -34 174 -34q195 0 333.5 138.5t138.5 333.5v2q-10 107 -63.5 202.5t-137.5 157.5q-102 77 -236 87t-243 -49q-116 -62 -177 -167q-61 -107 -52 -231z" />
38
- <glyph unicode="&#xf218;" d="M128 464q0 -66 32 -125.5t92.5 -107t159 -75.5t222.5 -28q117 0 218.5 25t174 68t124 99.5t76.5 120.5t25 131q0 40 -6.5 74.5t-22.5 65t-30.5 53t-41.5 50t-45 43t-51 44.5l-85 66q-19 15 -28.5 24.5t-21 31t-11.5 45.5t12 47.5t21.5 34.5t32.5 33q37 29 59 48t52 52 t46 64t28 75.5t12 94.5q0 43 -8 82t-23.5 70.5t-30.5 55.5t-38 47.5t-35 34.5t-32 27h146l151 85h-485q-264 0 -421 -129q-73 -64 -111.5 -147.5t-38.5 -167.5q0 -56 16 -109.5t49.5 -100.5t79.5 -82.5t109 -56.5t136 -21q19 0 75 5q0 -2 -4 -10.5t-4.5 -10.5t-3.5 -9.5 t-4 -11l-3 -10.5t-2.5 -12.5t-1 -13t-0.5 -14.5q0 -26 5 -48t18.5 -45t20.5 -32.5t26 -34.5q-61 -4 -98 -7.5t-107 -14.5t-131.5 -32.5t-112.5 -53.5q-50 -29 -86.5 -66.5t-56.5 -76.5t-29 -74.5t-9 -69.5zM335 514q0 47 17 87.5t38.5 64.5t54 45t50.5 28.5t42 16.5 q35 11 76.5 19.5t77.5 12t58.5 5t34.5 1.5q35 0 54 -3q51 -36 82 -59t63.5 -50.5t50.5 -48.5t33.5 -46t21.5 -50.5t6 -55.5q0 -113 -91 -183.5t-255 -70.5q-187 0 -300.5 80t-113.5 207zM453 1591q0 110 51 174q28 35 73.5 56t91.5 21q56 0 105.5 -28.5t83.5 -74.5 t59 -103.5t36.5 -115.5t11.5 -110q0 -113 -59 -172q-18 -19 -44 -33.5t-56.5 -23.5t-58.5 -9q-58 0 -108 28.5t-83.5 73.5t-57.5 101.5t-34.5 111.5t-10.5 104zM1408 1024v128h256v256h128v-256h256v-128h-256v-256h-128v256h-256z" />
39
- <glyph unicode="&#xf219;" d="M134.5 1267.5q5.5 80.5 41 179.5t102.5 191q70 78 153.5 135t167 86.5t172 45.5t169 15t156.5 -8t137.5 -21t107.5 -26.5t72 -22.5l25 -9q12 -5 32 -14.5t74.5 -45.5t101 -78.5t97 -114.5t78 -153t27.5 -194.5t-40 -238.5q-43 -89 -97 -157.5t-109.5 -110t-115.5 -69 t-115.5 -37t-107.5 -12t-95.5 4t-76 13t-49.5 13.5l-18 6v-277q-1 -3 -2 -9t-6.5 -23t-14 -34t-24.5 -39.5t-36 -42t-51.5 -39.5t-68.5 -33q-52 -19 -107 -20t-97 11.5t-76.5 27.5t-53.5 27l-18 13v280q33 -34 67 -55.5t67.5 -28.5t61.5 11t44 63v946h312v-538l65 -13 q206 -32 329 60q105 78 128 243q2 76 -15.5 141t-49 110.5t-72.5 82.5t-86.5 59.5t-91.5 39t-87.5 24t-73.5 11.5t-52 5h-19l-66 -2q-217 -16 -359 -141q-57 -50 -97 -115q-27 -45 -39.5 -93t-11 -88t10 -78.5t22 -67.5t25.5 -51t21 -33l9 -12l-225 -201q-7 9 -18.5 25 t-40.5 68.5t-49.5 107.5t-34.5 137.5t-8.5 163z" />
40
- <glyph unicode="&#xf220;" d="M141 1431q0 133 65.5 245.5t178 178t245.5 65.5q141 0 260 -75q69 12 144 12q171 0 327 -66.5t269 -179.5t179.5 -269t66.5 -327q0 -96 -19 -181q51 -106 50 -217q0 -133 -65.5 -245.5t-178 -178t-244.5 -65.5q-123 0 -231 58q-79 -14 -155 -14q-171 0 -327 67t-269 180 t-179.5 269t-66.5 327q0 86 17 169q-67 116 -67 247zM537 775q0 -75 54 -153q52 -76 139 -123q119 -63 302 -63q150 0 263 46q111 46 171 130q59 85 59 188q0 88 -34 149q-35 62 -96 100q-58 39 -143 66q-77 25 -187 49q-89 20 -116 28q-35 9 -68 27q-33 15 -50 38 q-17 20 -17 49q0 46 52 80q54 36 146 36q97 0 141 -32q43 -32 75 -94q30 -48 51 -67q25 -22 72 -22q53 0 87 36q34 35 34 81t-25 96q-24 47 -82 92q-57 45 -139 70q-86 26 -197 26q-139 0 -247 -40q-107 -39 -164 -113q-57 -73 -57 -170q0 -102 55 -170q52 -65 144 -105 q95 -40 221 -66q93 -20 154 -38q57 -19 90 -50q33 -30 33 -80q0 -64 -62 -105q-65 -44 -170 -44q-78 0 -123 22q-47 22 -70 54q-27 34 -49 86q-21 49 -49 72q-32 26 -75 26q-52 0 -87 -33q-36 -33 -36 -79z" />
41
- <glyph unicode="&#xf221;" d="M384 384v640h192q49 0 104 47t103.5 127.5t80.5 204.5t32 261q0 5 0.5 13.5t4 31t9.5 39t19 30.5t31 14q33 0 77.5 -42t79.5 -119t35 -159q0 -85 -8 -165t-16 -117l-8 -38h416q53 0 90.5 -37.5t37.5 -90.5q0 -41 -24 -74t-62 -46q22 -33 22 -72q0 -41 -24 -74t-62 -46 q22 -33 22 -72q0 -53 -37.5 -90.5t-90.5 -37.5h-64q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-448q-65 0 -123 20t-93.5 44t-80.5 44t-87 20h-128z" />
42
- <glyph unicode="&#xf222;" d="M205 1168q0 83 59 142t142 59q100 0 160 -83q183 97 412 106l92 457q5 22 23 33q18 12 39 7l313 -72q24 41 65.5 65.5t89.5 24.5q74 0 126.5 -52.5t52.5 -126.5t-52.5 -126.5t-126.5 -52.5q-71 0 -122 48.5t-56 119.5l-262 60l-77 -386q222 -12 397 -108q60 86 163 86 q83 0 141.5 -59t58.5 -142q0 -55 -28 -100.5t-74 -72.5q14 -50 14 -99q0 -135 -98.5 -250t-267.5 -181.5t-368 -66.5t-368.5 66.5t-268 181t-98.5 249.5q0 50 16 104q-44 27 -70.5 71.5t-26.5 97.5zM307 1168q0 -47 40 -75q47 75 132 137q-29 36 -73 36q-41 0 -70 -28.5 t-29 -69.5zM388 896q0 -107 85 -198t230.5 -144t317.5 -53q171 0 316.5 53t230.5 143.5t85 197.5q0 108 -85 199t-230.5 144t-316.5 53q-172 0 -317.5 -53t-230.5 -144t-85 -198zM672 982q0 46 32.5 79t78.5 33q47 0 79.5 -33t32.5 -79t-33 -79t-79 -33t-78.5 33t-32.5 79z M737 739.5q0 21.5 15 36.5t36 15t36 -15q56 -56 199 -56q145 0 201 56q15 15 36 15t36 -15t15 -36.5t-15 -36.5q-86 -86 -271 -86q-187 0 -273 86q-15 15 -15 36.5zM1153 982q0 46 32.5 79t79.5 33t79.5 -33t32.5 -79t-33 -79t-79 -33t-79 33t-33 79zM1523 1728 q0 -32 22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5t-54.5 -22.5t-22.5 -54.5zM1567 1227q83 -61 131 -138q43 31 43 79q0 40 -28.5 69t-69.5 29q-45 0 -76 -39z" />
43
- <glyph unicode="&#xf223;" d="M256 849v209h263v-206q0 -33 23.5 -56.5t57.5 -23.5t57.5 23.5t23.5 56.5v487q5 136 104.5 230.5t238.5 94.5t238.5 -95.5t104.5 -231.5v-107l-157 -45l-105 48v92q0 34 -23.5 57t-57.5 23t-57.5 -23t-23.5 -57l-1 -481q-1 -138 -101.5 -235t-241.5 -97q-142 0 -242.5 99 t-100.5 238zM1105 846v210l105 -48l157 46v-212q0 -33 23.5 -56.5t57.5 -23.5t57.5 23.5t23.5 56.5v216h263v-209q0 -139 -100.5 -238t-242.5 -99t-242 97.5t-102 236.5z" />
44
- <glyph unicode="&#xf224;" d="M256 1152v384q0 106 75 181t181 75h1024q106 0 181 -75t75 -181v-384q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM512 1281q0 -53 38 -91l362 -362l4 4q37 -64 108 -64t108 64l5 -4l362 362q37 38 37 91t-37 90t-91 37 q-53 0 -90 -37l-294 -294l-293 294q-37 37 -91 37t-90 -37q-38 -37 -38 -90z" />
45
- <glyph unicode="&#xf225;" d="M128 930l365 291l531 -328l-369 -308zM128 1513l527 345l369 -308l-531 -329zM497 508v115l158 -103l370 307l370 -307l158 103v-115l-528 -317zM1024 893l532 328l364 -291l-527 -345zM1024 1550l369 308l527 -345l-364 -292z" />
46
- <glyph unicode="&#xf300;" d="M256 896v384q0 106 75 181t181 75h1024q106 0 181 -75t75 -181v-384q0 -106 -75 -181t-181 -75h-448l-448 -448v448h-128q-106 0 -181 75t-75 181z" />
47
- <glyph unicode="&#xf301;" d="M384 512v1024h384l64 -128h448v-128h-640l-128 -256h128l64 128h960l-256 -640h-1024z" />
48
- <glyph unicode="&#xf302;" d="M256 768l768 768h512v-512l-768 -768zM1152 1280q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
49
- <glyph unicode="&#xf303;" d="M256 1088q0 143 55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5t-55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5zM384 1088q0 -117 45.5 -223.5t123 -184t184 -123t223.5 -45.5 t223.5 45.5t184 123t123 184t45.5 223.5t-45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5zM896 1062v474h128v-421l298 -298l-90 -91z" />
50
- <glyph unicode="&#xf304;" d="M512 384v256q0 159 112.5 271.5t271.5 112.5h256q159 0 271.5 -112.5t112.5 -271.5v-256h-1024zM768 1408q0 106 75 181t181 75t181 -75t75 -181t-75 -181t-181 -75t-181 75t-75 181z" />
51
- <glyph unicode="&#xf305;" d="M256 384v1280h256v128h128v-128h640v128h128v-128h256v-1280h-1408zM384 640q0 -53 37.5 -90.5t90.5 -37.5h896q53 0 90.5 37.5t37.5 90.5v640q0 53 -37.5 90.5t-90.5 37.5h-896q-53 0 -90.5 -37.5t-37.5 -90.5v-640zM768 1216q0 26 19 45t45 19h128q26 0 45 -19t19 -45 v-512q0 -26 -19 -45t-45 -19t-45 19t-19 45v448h-64q-26 0 -45 19t-19 45z" />
52
- <glyph unicode="&#xf306;" d="M256 384v1280h256v128h128v-128h640v128h128v-128h256v-1280h-1408zM384 640q0 -53 37.5 -90.5t90.5 -37.5h896q53 0 90.5 37.5t37.5 90.5v640q0 53 -37.5 90.5t-90.5 37.5h-896q-53 0 -90.5 -37.5t-37.5 -90.5v-640zM768 1216q0 26 19 45t45 19h256h2h1h3 q22 -2 38.5 -18t19.5 -39v-2v-2v-1v-2q0 -5 -2 -15l-128 -512q-6 -26 -28.5 -40t-48.5 -7q-26 6 -40 28.5t-7 48.5l108 433h-174q-26 0 -45 19t-19 45z" />
53
- <glyph unicode="&#xf307;" d="M256 384v1280h256v128h128v-128h640v128h128v-128h256v-1280h-1408zM384 640q0 -53 37.5 -90.5t90.5 -37.5h896q53 0 90.5 37.5t37.5 90.5v640q0 53 -37.5 90.5t-90.5 37.5h-896q-53 0 -90.5 -37.5t-37.5 -90.5v-640zM512 640v128h128v-128h-128zM512 896v128h128v-128 h-128zM768 640v128h128v-128h-128zM768 896v128h128v-128h-128zM768 1152v128h128v-128h-128zM1024 640v128h128v-128h-128zM1024 896v128h128v-128h-128zM1024 1152v128h128v-128h-128zM1280 896v128h128v-128h-128zM1280 1152v128h128v-128h-128z" />
54
- <glyph unicode="&#xf308;" d="M342 342q12 45 22 71t38 66.5t76 88.5l395 395l-227 227l181 181q37 -37 90.5 -37t91.5 37l181 181q38 38 38 91t-38 90l181 181l543 -543l-181 -181q-37 38 -90 38t-91 -38l-181 -181q-37 -37 -37 -90t37 -91l-181 -181l-227 226l-395 -395q-68 -68 -113.5 -93 t-112.5 -43z" />
55
- <glyph unicode="&#xf400;" d="M256 1216q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5q0 -184 -111 -337l495 -495l-128 -128l-495 495q-153 -111 -337 -111q-117 0 -223.5 45.5t-184 123t-123 184t-45.5 223.5zM384 1216q0 -185 131.5 -316.5 t316.5 -131.5q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5q-185 0 -316.5 -131.5t-131.5 -316.5z" />
56
- <glyph unicode="&#xf401;" d="M256 1216q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5q0 -184 -111 -337l495 -495l-128 -128l-495 495q-153 -111 -337 -111q-117 0 -223.5 45.5t-184 123t-123 184t-45.5 223.5zM384 1216q0 -185 131.5 -316.5 t316.5 -131.5q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5q-185 0 -316.5 -131.5t-131.5 -316.5zM512 1152v128h640v-128h-640z" />
57
- <glyph unicode="&#xf402;" d="M256 1216q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5q0 -184 -111 -337l495 -495l-128 -128l-495 495q-153 -111 -337 -111q-117 0 -223.5 45.5t-184 123t-123 184t-45.5 223.5zM384 1216q0 -185 131.5 -316.5 t316.5 -131.5q186 0 317 131.5t131 316.5t-131 316.5t-317 131.5q-185 0 -316.5 -131.5t-131.5 -316.5zM512 1152v128h256v256h128v-256h256v-128h-256v-256h-128v256h-256z" />
58
- <glyph unicode="&#xf403;" d="M0 1024l506 506q101 103 234.5 160.5t283.5 57.5t283.5 -57.5t233.5 -159.5l507 -507l-506 -507q-101 -103 -234.5 -160t-283.5 -57t-283.5 57.5t-233.5 160.5zM272 1024l370 -371q77 -78 175.5 -119.5t206.5 -41.5t206 41.5t174 118.5l373 372l-371 371 q-158 161 -382 161q-108 0 -206.5 -41t-173.5 -119zM640 1024q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5zM1024 1152q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5z" />
59
- <glyph unicode="&#xf404;" d="M0 1024l506 506q101 103 234.5 160.5t283.5 57.5q193 0 358 -95l-143 -143q-103 46 -215 46q-108 0 -206.5 -41t-173.5 -119l-372 -372l240 -240l-136 -136zM339 429l90 -90l1280 1280l-90 90zM640 1024q0 159 112.5 271.5t271.5 112.5q44 0 98 -14l-468 -468 q-14 54 -14 98zM666 395l143 143q103 -46 215 -46q108 0 206 41.5t174 118.5l373 372l-241 241l136 135l376 -376l-506 -507q-101 -103 -234.5 -160t-283.5 -57q-193 0 -358 95zM926 654l468 468q14 -54 14 -98q0 -159 -112.5 -271.5t-271.5 -112.5q-44 0 -98 14z" />
60
- <glyph unicode="&#xf405;" d="M640 768l320 320l-320 320l128 128l320 -320l320 320l128 -128l-320 -320l320 -320l-128 -128l-320 320l-320 -320z" />
61
- <glyph unicode="&#xf406;" d="M128 256l832 832l-832 832l128 128l832 -832l832 832l128 -128l-832 -832l832 -832l-128 -128l-832 832l-832 -832z" />
62
- <glyph unicode="&#xf407;" d="M384 1280v128l256 128q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5l256 -128v-128h-1152zM512 512v704h128v-704h128v704h128v-704h128v704h128v-704h128v704h128v-704q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5zM768 1472 q0 -26 19 -45t45 -19h256q26 0 45 19t19 45t-19 45t-45 19h-256q-26 0 -45 -19t-19 -45z" />
63
- <glyph unicode="&#xf408;" d="M256 1151l476 -330l-183 -535l475 332l475 -332l-183 535l476 330l-587 -1l-181 535l-180 -535z" />
64
- <glyph unicode="&#xf409;" d="M384 1152l640 512l640 -512l-128 -128v-512h-1024v512zM896 576h256v448h-256v-448z" />
65
- <glyph unicode="&#xf410;" d="M256 512v704l768 -384l768 384v-704h-1536zM256 1408v128h1536v-128l-768 -384z" />
66
- <glyph unicode="&#xf411;" d="M384 384v448l896 896l448 -448l-896 -896h-448zM512 768l256 -256l128 128l-256 256zM685 941l96 -96l595 595l-96 96zM845 781l96 -96l595 595l-96 96z" />
67
- <glyph unicode="&#xf412;" d="M256 640v704l384 384v-704h640v448l640 -640l-640 -640v448h-1024z" />
68
- <glyph unicode="&#xf413;" d="M256 448q0 -80 56 -136t136 -56t136 56t56 136t-56 136t-136 56t-136 -56t-56 -136zM256 1024v256q209 0 398.5 -81t326.5 -218t218 -326.5t81 -398.5h-256q0 209 -103 385.5t-279.5 279.5t-385.5 103zM256 1536v256q209 0 408 -55t367.5 -154t310.5 -241t241 -310.5 t154 -367.5t55 -408h-256q0 260 -101.5 497t-273 408.5t-408.5 273t-497 101.5z" />
69
- <glyph unicode="&#xf414;" d="M21 358q-57 102 31 244l760 1237q57 93 134.5 126.5t155 0t135.5 -126.5l759 -1237q88 -142 31 -244t-224 -102h-1557q-168 0 -225 102zM883 1536l51 -640h179l52 640h-282zM896 640q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5z" />
70
- <glyph unicode="&#xf415;" d="M128 1024v256h310q75 172 233.5 278t352.5 106q130 0 246.5 -50t204.5 -139q37 -37 37 -90t-37 -91t-90 -38t-91 38q-116 114 -270 114q-159 0 -271.5 -112.5t-112.5 -271.5h-512zM536 665q0 53 38 90t91 37t90 -37q113 -115 269 -115q159 0 271.5 112.5t112.5 271.5h512 v-256h-310q-75 -172 -233.5 -278t-352.5 -106q-130 0 -246 50t-205 139l1 1q-38 38 -38 91zM832 1024q0 80 56 136t136 56t136 -56t56 -136t-56 -136t-136 -56t-136 56t-56 136z" />
71
- <glyph unicode="&#xf416;" d="M512 832v320h128v-320q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5t93.5 226.5v640q0 80 -56 136t-136 56t-136 -56t-56 -136v-512q0 -26 19 -45t45 -19t45 19t19 45v452h128v-452q0 -80 -56 -136t-136 -56t-136 56t-56 136v512q0 133 93.5 226.5t226.5 93.5t226.5 -93.5 t93.5 -226.5v-640q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5z" />
72
- <glyph unicode="&#xf417;" d="M384 1216q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5t-44.5 -222.5t-124.5 -185.5l-407 -406l-407 406q-80 80 -124.5 185.5t-44.5 222.5zM640 1216q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5t93.5 226.5t-93.5 226.5 t-226.5 93.5t-226.5 -93.5t-93.5 -226.5z" />
73
- <glyph unicode="&#xf418;" d="M608 1056l128 128l224 -192l448 512l128 -96l-512 -768h-128z" />
74
- <glyph unicode="&#xf419;" d="M0 256v256h2048v-256h-2048zM0 896v256h2048v-256h-2048zM0 1536v256h2048v-256h-2048z" />
75
- <glyph unicode="&#xf420;" d="M256 1024q0 155 60 294.5t167 246.5l-227 227h640v-640l-232 232q-72 -71 -112 -163.5t-40 -196.5q0 -176 108.5 -313.5t275.5 -180.5v-262q-180 30 -326 137t-230 269.5t-84 349.5zM1152 256v640l19 -19l213 -213q71 71 111.5 164t40.5 196q0 176 -108.5 313.5 t-275.5 180.5v263q180 -31 326 -137.5t230 -269.5t84 -350q0 -155 -60 -294.5t-167 -246.5l227 -227h-640z" />
76
- <glyph unicode="&#xf421;" d="M384 896v256h1152v-256h-1152z" />
77
- <glyph unicode="&#xf422;" d="M384 512v1024h1152v-1024h-1152zM512 640h896v640h-896v-640z" />
78
- <glyph unicode="&#xf423;" d="M83 832l373 671l112 -62l-267 -481h403v-384h-128v256h-493zM768 1024q0 87 43 160.5t116.5 116.5t160.5 43t160.5 -43t116.5 -116.5t43 -160.5t-43 -160.5t-116.5 -116.5t-160.5 -43t-160.5 43t-116.5 116.5t-43 160.5zM896 1024q0 -79 56.5 -135.5t135.5 -56.5 t135.5 56.5t56.5 135.5t-56.5 135.5t-135.5 56.5t-135.5 -56.5t-56.5 -135.5zM1427 832l373 671l112 -62l-267 -481h403v-384h-128v256h-493z" />
79
- <glyph unicode="&#xf424;" d="M256 640v768l384 384h768l384 -384v-768l-384 -384h-768zM883 1536l51 -640h179l52 640h-282zM896 640q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
80
- <glyph unicode="&#xf425;" d="M384 384v1280h256q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5h256v-1280h-1152zM512 512h896v1024h-128v-128h-640v128h-128v-1024zM640 704q0 26 19 45t45 19t45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45zM640 960q0 26 19 45t45 19t45 -19t19 -45 t-19 -45t-45 -19t-45 19t-19 45zM640 1216q0 26 19 45t45 19t45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45zM768 1600q0 -26 19 -45t45 -19h256q26 0 45 19t19 45t-19 45t-45 19h-256q-26 0 -45 -19t-19 -45zM896 640v128h384v-128h-384zM896 896v128h384v-128h-384z M896 1152v128h384v-128h-384z" />
81
- <glyph unicode="&#xf426;" d="M128 768q0 106 75 181t181 75h7q-7 29 -7 64q0 133 93.5 226.5t226.5 93.5q134 0 228 -96q47 101 140.5 162.5t207.5 61.5q159 0 271.5 -112.5t112.5 -271.5q0 -62 -23 -128h23q106 0 181 -75t75 -181t-75 -181t-181 -75h-1280q-106 0 -181 75t-75 181z" />
82
- <glyph unicode="&#xf427;" d="M384 384v288l455 455l-1 1q-74 74 -74 180t74 181l233 233q75 74 181 74t180 -74l286 -286q74 -75 74 -180.5t-74 -180.5l-233 -233q-74 -73 -178.5 -74t-179.5 71l-455 -455h-288zM1088 1360l256 -256l160 160l-256 256z" />
83
- <glyph unicode="&#xf428;" d="M768 1024q0 106 75 181t181 75t181 -75t75 -181t-75 -181t-181 -75t-181 75t-75 181z" />
84
- <glyph unicode="&#xf429;" d="M384 896v128h896l-343 343l87 86l493 -493l-493 -493l-87 86l343 343h-896z" />
85
- <glyph unicode="&#xf430;" d="M531 960l493 -493l87 86l-343 343h896v128h-896l343 343l-87 86z" />
86
- <glyph unicode="&#xf431;" d="M384 1152l128 128l448 -448l448 448l128 -128l-576 -576z" />
87
- <glyph unicode="&#xf432;" d="M384 768l576 576l576 -576l-128 -128l-448 448l-448 -448z" />
88
- <glyph unicode="&#xf433;" d="M0 0v896l896 -896h-896z" />
89
- <glyph unicode="&#xf434;" d="M1152 0l896 896v-896h-896z" />
90
- <glyph unicode="&#xf435;" d="M384 512l640 640l640 -640h-1280zM384 1280v128h1280v-128h-1280z" />
91
- <glyph unicode="&#xf436;" d="M512 640v128h128v-128h-128zM512 896v128h128v-128h-128zM512 1152v128h128v-128h-128zM512 1408v128h128v-128h-128zM768 640v128h128v-128h-128zM768 896v128h128v-128h-128zM768 1152v128h128v-128h-128zM768 1408v128h128v-128h-128zM1024 640v128h128v-128h-128z M1024 896v128h128v-128h-128zM1024 1152v128h128v-128h-128zM1024 1408v128h128v-128h-128zM1280 640v128h128v-128h-128zM1280 896v128h128v-128h-128zM1280 1152v128h128v-128h-128zM1280 1408v128h128v-128h-128z" />
92
- <glyph unicode="&#xf437;" d="M512 512v1024q0 106 75 181t181 75h512q106 0 181 -75t75 -181v-1024q0 -106 -75 -181t-181 -75h-512q-106 0 -181 75t-75 181zM640 768h768v768h-768v-768zM896 512q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z " />
93
- <glyph unicode="&#xf438;" d="M256 1024v256h512v128l384 -256l-384 -256v128h-512zM512 512v384h128v-128h768v768h-768v-128h-128v128q0 106 75 181t181 75h512q106 0 181 -75t75 -181v-1024q0 -106 -75 -181t-181 -75h-512q-106 0 -181 75t-75 181zM896 512q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
94
- <glyph unicode="&#xf439;" d="M384 1152h1280q0 -231 -145.5 -406.5t-366.5 -220.5v-269h-256v269q-221 45 -366.5 220.5t-145.5 406.5zM640 1280v384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5v-384h-256zM1152 1280v384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5v-384h-256z" />
95
- <glyph unicode="&#xf440;" d="M128 768q0 106 75 181t181 75h6q-6 32 -6 64q0 133 93.5 226.5t226.5 93.5q134 0 228 -96q47 101 140.5 162.5t207.5 61.5q159 0 271.5 -112.5t112.5 -271.5q0 -62 -23 -128h23q106 0 181 -75t75 -181t-75 -181t-181 -75h-384v256h-512v-256h-384q-106 0 -181 75t-75 181 zM640 384h256v256h256v-256h256l-384 -384z" />
96
- <glyph unicode="&#xf441;" d="M128 768q0 106 75 181t181 75h6q-6 32 -6 64q0 133 93.5 226.5t226.5 93.5q134 0 228 -96q47 101 140.5 162.5t207.5 61.5q159 0 271.5 -112.5t112.5 -271.5q0 -62 -23 -128h23q106 0 181 -75t75 -181t-75 -181t-181 -75h-512v256h256l-384 384l-384 -384h256v-256h-512 q-106 0 -181 75t-75 181z" />
97
- <glyph unicode="&#xf442;" d="M512 512v896h512l-128 -128h-256v-640h640v256l128 128v-512h-896zM896 987l550 549h-422v128h640v-640h-128v422l-550 -550z" />
98
- <glyph unicode="&#xf443;" d="M512 384v1280h640l384 -384v-896h-1024zM640 512h768v640h-384v384h-384v-1024z" />
99
- <glyph unicode="&#xf444;" d="M384 512v1024q0 106 75 181t181 75h1024v-1152h-64q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5h64v-128h-1024q-106 0 -181 75t-75 181zM512 512q0 -53 37.5 -90.5t90.5 -37.5h818q-50 55 -50 128t50 128h-818q-53 0 -90.5 -37.5t-37.5 -90.5z" />
100
- <glyph unicode="&#xf445;" d="M160 747l232 201q-8 67 -8 76q0 8 8 75l-232 201l58 139l305 -21q47 60 107 107l-21 305l139 58l201 -232q67 8 75 8t75 -8l201 232l140 -58l-22 -305q56 -44 107 -107l305 22l58 -139l-232 -201q8 -67 8 -76q0 -8 -8 -75l232 -201l-58 -140l-305 22q-44 -56 -107 -107 l22 -305l-139 -58l-201 232q-67 -8 -76 -8q-8 0 -75 8l-201 -232l-139 58l21 305q-56 44 -107 107l-305 -22zM768 1024q0 -106 75 -181t181 -75t181 75t75 181t-75 181t-181 75t-181 -75t-75 -181z" />
101
- <glyph unicode="&#xf446;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM512 1024q0 -212 150 -362t362 -150q135 0 259 72l-699 699q-72 -126 -72 -259zM765 1464l699 -699 q72 123 72 259q0 212 -150 362t-362 150q-136 0 -259 -72z" />
102
- <glyph unicode="&#xf447;" d="M256 1664v128h384v-256h1152l-256 -640h-896v-128h896v-128h-1024v1024h-256zM512 384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5zM1280 384q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5t-37.5 -90.5 t-90.5 -37.5t-90.5 37.5t-37.5 90.5z" />
103
- <glyph unicode="&#xf448;" d="M512 384v1280h384v-1280h-384zM1152 384v1280h384v-1280h-384z" />
104
- <glyph unicode="&#xf449;" d="M512 512v1024h1024v-1024h-1024z" />
105
- <glyph unicode="&#xf450;" d="M256 384v1280h384v-1280h-384zM768 1024l1024 640v-1280z" />
106
- <glyph unicode="&#xf451;" d="M256 384v1280l1024 -640zM1408 384v1280h384v-1280h-384z" />
107
- <glyph unicode="&#xf452;" d="M512 384v1280l1024 -640z" />
108
- <glyph unicode="&#xf453;" d="M256 256v1536q0 106 75 181t181 75h1024q106 0 181 -75t75 -181v-1536q0 -106 -75 -181t-181 -75h-1024q-106 0 -181 75t-75 181zM512 512h1024v1280h-1024v-1280zM896 256q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5z" />
109
- <glyph unicode="&#xf454;" d="M128 1024v256h512v128l384 -256l-384 -256v128h-512zM256 256v640h256v-384h1024v1280h-1024v-384h-256v384q0 106 75 181t181 75h1024q106 0 181 -75t75 -181v-1536q0 -106 -75 -181t-181 -75h-1024q-106 0 -181 75t-75 181zM896 256q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
110
- <glyph unicode="&#xf455;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM896 1408q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5zM928 512h192v640h-192v-640z" />
111
- <glyph unicode="&#xf456;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM883 1536l51 -640h179l52 640h-282zM896 640q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5 t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
112
- <glyph unicode="&#xf457;" d="M256 1024q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5zM720 1442l92 -180q134 71 234 71q38 0 65 -16q26 -17 26 -44q0 -35 -24 -63q-24 -27 -77 -61 q-68 -42 -95 -87q-26 -44 -26 -109v-57h204v34q0 29 17 49q18 21 87 66q83 53 120 111t37 139q0 111 -84 176q-85 65 -232 65q-180 0 -344 -94zM896 640q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
113
- <glyph unicode="&#xf458;" d="M128 384v1280l768 -480v480l1024 -640l-1024 -640v480z" />
114
- <glyph unicode="&#xf459;" d="M128 1024l1024 -640v480l768 -480v1280l-768 -480v480z" />
115
- <glyph unicode="&#xf460;" d="M256 1280h128l86 256h340l86 -256l-256 -768h-128zM533 1280h214l-43 128h-128zM768 512l256 768h128l86 256h340l86 -256h128l-256 -768h-768zM1301 1280h214l-43 128h-128z" />
116
- <glyph unicode="&#xf461;" d="M256 1261q8 -158 120 -264l648 -613l648 613q112 106 120 264t-93 276t-251.5 126.5t-262.5 -97.5l-161 -153l-161 153q-112 106 -262.5 97.5t-251.5 -126.5t-93 -276z" />
117
- <glyph unicode="&#xf462;" d="M102 1024l304 -455l213 142l-209 313l209 313l-213 142zM772 543l248 -62l256 1024l-248 62zM1430 711l213 -142l303 455l-303 455l-213 -142l208 -313z" />
118
- <glyph unicode="&#xf463;" d="M0 512v704l768 -384l256 128v-448h-1024zM0 1408v128h1536v-128l-768 -384zM1152 384v640q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5zM1280 640h256v-256h128v256h256v128h-256 v256h-128v-256h-256v-128z" />
119
- <glyph unicode="&#xf464;" d="M0 512v704l768 -384l256 128v-448h-1024zM0 1408v128h1536v-128l-768 -384zM1152 384v640q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5zM1280 640h640v128h-640v-128z" />
120
- <glyph unicode="&#xf465;" d="M0 512v704l768 -384l256 128v-448h-1024zM0 1408v128h1536v-128l-768 -384zM1152 384v640q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5zM1260 656l272 -272l452 453l-90 90 l-362 -362l-181 181z" />
121
- <glyph unicode="&#xf466;" d="M0 1024l640 640v-320l-320 -320l320 -320v-320zM512 1024l640 640v-384h256q212 0 362 -150t150 -362v-300l-150 150q-74 74 -168 112t-194 38h-256v-384z" />
122
- <glyph unicode="&#xf467;" d="M384 1024l640 640v-384h256q212 0 362 -150t150 -362v-300l-150 150q-74 74 -168 112t-194 38h-256v-384z" />
123
- <glyph unicode="&#xf468;" d="M256 256v1536h256v-1536h-256zM640 896v768q35 0 63.5 13t54 32t56.5 38t85 32t125 13q70 0 125.5 -13t93 -32l75 -38t93 -32t125.5 -13h256v-768h-256q-70 0 -125.5 13t-93 32l-75 38t-93 32t-125.5 13q-71 0 -125 -13t-85 -32t-56.5 -38t-54 -32t-63.5 -13z" />
124
- <glyph unicode="&#xf469;" d="M256 512v768h1536v-768h-256v384h-1024v-384h-256zM640 640v128h768v-128q0 -158 113 -271l112 -113h-768l-112 113q-113 113 -113 271zM640 1408h768v256h-768v-256z" />
125
- <glyph unicode="&#xf470;" d="M384 384v640q0 53 37.5 90.5t90.5 37.5v128q0 212 150 362t362 150t362 -150t150 -362v-128q53 0 90.5 -37.5t37.5 -90.5v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-1024q-53 0 -90.5 37.5t-37.5 90.5zM768 1152h512v128q0 106 -75 181t-181 75t-181 -75t-75 -181v-128z" />
126
- <glyph unicode="&#xf471;" d="M512 512v1024h512q106 0 181 -75t75 -181q0 -87 -57 -159q83 -39 134 -117t51 -172q0 -133 -93.5 -226.5t-226.5 -93.5h-576zM768 640h192q80 0 136 56t56 136t-56 136t-136 56h-192v-384zM768 1152h128q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5h-128v-256z" />
127
- <glyph unicode="&#xf472;" d="M640 512l40 128h128l240 768h-128l40 128h448l-40 -128h-128l-240 -768h128l-40 -128h-448z" />
128
- <glyph unicode="&#xf473;" d="M384 384v1280h1280v-1280h-1280zM512 512h1024v576l-128 192l-448 -672l-192 288zM640 1280q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
129
- <glyph unicode="&#xf474;" d="M128 256v384l154 -154l230 154l-154 -230l154 -154h-384zM128 1408v384h384l-154 -154l154 -230l-230 154zM640 768v512h768v-512h-768zM1536 256l154 154l-154 230l230 -154l154 154v-384h-384zM1536 1408l154 230l-154 154h384v-384l-154 154z" />
130
- <glyph unicode="&#xf500;" d="M128 0l960 960l960 -960h-1920z" />
131
- <glyph unicode="&#xf501;" d="M0 128l960 960l-960 960v-1920z" />
132
- <glyph unicode="&#xf502;" d="M128 2048l960 -960l960 960h-1920z" />
133
- <glyph unicode="&#xf503;" d="M1088 1088l960 960v-1920z" />
134
- </font>
135
- </defs></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/fonts/genericons-regular-webfont.ttf DELETED
Binary file
assets/fonts/genericons-regular-webfont.woff DELETED
Binary file
assets/images/chosen-sprite.png DELETED
Binary file
assets/images/chosen-sprite@2x.png DELETED
Binary file
assets/images/extensions/custom-login-page-template-300x200.jpg DELETED
Binary file
assets/images/extensions/custom-login-redirects-300x200.jpg DELETED
Binary file
assets/images/extensions/custom-login-stealth-login-300x200.jpg DELETED
Binary file
assets/js/admin.js DELETED
@@ -1,90 +0,0 @@
1
- jQuery(document).ready(function($) {
2
-
3
- var Select = $('select[name="custom_login[logo_background_size]"]');
4
- var Custom = $('input[name="custom_login[logo_background_size_custom]"]');
5
-
6
- if ( 'custom' !== Select.val() ) {
7
- $(Custom).parent().parent().hide('slow');
8
- }
9
-
10
- $(Select).chosen().on('change',function() {
11
- var Val = $(this).val();
12
- // console.log(Val);
13
-
14
- if ( 'custom' === Val ) {
15
- $(Custom).parent().parent().show('fast');
16
- }
17
- else {
18
- $(Custom).parent().parent().hide('slow');
19
- }
20
-
21
- });
22
-
23
- // Allow tab key
24
- $('textarea[name="custom_login[custom_css]"]').on("keydown",function(e) {
25
- if ( e.keyCode == 9 ) {
26
- e.preventDefault();
27
- insertAtCursor(document.getElementById("custom_login[custom_css]"), " ");
28
- }
29
- });
30
-
31
- // Allow tab key
32
- if ( $('div.img').length ) {
33
- $('div.img').each(function() {
34
- var $size = $(this).parent().width();
35
- $(this).css({
36
- 'max-width': $size,
37
- 'width' : $size
38
- }).slideDown('fast');
39
- });
40
- }
41
-
42
- // Remote API helper
43
- $('#custom_login_extensions a[data-toggle]').on('click',function(e) {
44
- e.preventDefault();
45
- $('#' + $(this).data('toggle')).toggle();
46
- });
47
-
48
- // Show Purchase button
49
- $('a[data-edd-install]').each(function() {
50
- var $this = $(this);
51
- setTimeout( function() {
52
- if ( $this.prev('.eddri-status').text() === 'Not Installed' ) {
53
- $this.closest( $this.parent() ).children('a.button').hide();
54
- $this.closest( $this.parent() ).children('a.button.show-if-not-purchased').show();
55
- }
56
- }, 500 );
57
- });
58
-
59
- });
60
-
61
- /**
62
- * @ref http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript#comment-3817
63
- */
64
- function insertAtCursor(myField, myValue) {
65
- //IE support
66
- if (document.selection) {
67
- var temp;
68
- myField.focus();
69
- sel = document.selection.createRange();
70
- temp = sel.text.lenght;
71
- sel.text = myValue;
72
- if (myValue.length == 0) {
73
- sel.moveStart('character', myValue.length);
74
- sel.moveEnd('character', myValue.length);
75
- } else {
76
- sel.moveStart('character', -myValue.length + temp);
77
- }
78
- sel.select();
79
- }
80
- //MOZILLA/NETSCAPE support
81
- else if (myField.selectionStart || myField.selectionStart == '0') {
82
- var startPos = myField.selectionStart;
83
- var endPos = myField.selectionEnd;
84
- myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
85
- myField.selectionStart = startPos + myValue.length;
86
- myField.selectionEnd = startPos + myValue.length;
87
- } else {
88
- myField.value += myValue;
89
- }
90
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/chosen.jquery.min.js DELETED
@@ -1,2 +0,0 @@
1
- /* Chosen v1.0.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
- !function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),children:0,disabled:a.disabled}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(c.text));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=""!==a.style.cssText?' style="'+a.style+'"':"",'<li class="'+b.join(" ")+'"'+c+' data-option-array-index="'+a.array_index+'">'+a.search_text+"</li>"):"":""},AbstractChosen.prototype.result_add_group=function(a){return a.search_match||a.group_match?a.active_options>0?'<li class="group-result">'+a.search_text+"</li>":"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;for(this.no_results_clear(),e=0,g=this.get_search_text(),a=g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=this.search_contains?"":"^",c=new RegExp(d+a,"i"),j=new RegExp(a,"i"),m=this.results_data,k=0,l=m.length;l>k;k++)b=m[k],b.search_match=!1,f=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(f=this.results_data[b.group_array_index],0===f.active_options&&f.search_match&&(e+=1),f.active_options+=1),(!b.group||this.group_search)&&(b.search_text=b.group?b.label:b.html,b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(e+=1),b.search_match?(g.length&&(h=b.search_text.search(j),i=b.search_text.substr(0,h+g.length)+"</em>"+b.search_text.substr(h+g.length),b.search_text=i.substr(0,h)+"<em>"+i.substr(h)),null!=f&&(f.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>e&&g.length?(this.update_results_content(""),this.no_results(g)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d?d.destroy():d||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(document).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b,c,d;return b=-(null!=(c=a.originalEvent)?c.wheelDelta:void 0)||(null!=(d=a.originialEvent)?d.detail:void 0),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(document).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){return this.container.is(a(b.target).closest(".chosen-container"))?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results())},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+b.html+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_option_count=null,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c,d;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):(this.result_single_selected&&(this.result_single_selected.removeClass("result-selected"),d=this.result_single_selected[0].getAttribute("data-option-array-index"),this.results_data[d].selected=!1),this.result_single_selected=b),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(c.text),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c)},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}.call(this);
 
 
assets/js/functions.js DELETED
@@ -1,3 +0,0 @@
1
- jQuery(document).ready(function($) {
2
-
3
- });
 
 
 
classes/changelog.txt DELETED
@@ -1,41 +0,0 @@
1
- Version 1.0.17 (6/23/14)
2
-
3
- Version 1.0.17 (6/23/14)
4
- Fix opacity select options from not showing when selected.
5
-
6
- Version 1.0.15 (6/3/14)
7
- Added do_action( 'custom_login_admin_enqueue_scripts' ) for extenstions to hook into settings page scripts.
8
-
9
- Version 1.0.14 (5/14/14)
10
- One instance.
11
-
12
- Version 1.0.13 (1/28/14)
13
- Added image preview on files.
14
-
15
- Version 1.0.12 (1/25/14)
16
- Added $cache_time to wp_remote_get_set_transient();
17
-
18
- Version 1.0.11 (1/23/14)
19
- Added helper class wp_remote_get_set_transient();
20
-
21
- Version 1.0.10 (1/8/14)
22
-
23
- Updated chosen() class names for 1.0.0
24
- Added static $couters to functions to output scripts once.
25
-
26
- Version 1.0.9 (12/17/13)
27
-
28
- Added admin.js
29
- Updated chosen().js to version 1.0.0
30
-
31
- Version 1.0.8 (12/3/13)
32
-
33
- Make sure the $announcement isn't empty or has error before caching.
34
-
35
- Version 1.0.7 (5/20/13)
36
-
37
- !empty( $old_message )
38
-
39
- Version 1.0.4 (4/22/13)
40
-
41
- Only enqueue admin scripts on "settings_page_custom-login" $hook
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class.settings-api.php DELETED
@@ -1,1126 +0,0 @@
1
- <?php
2
-
3
- // Exit if accessed directly
4
- if ( ! defined( 'ABSPATH' ) ) exit;
5
-
6
- /**
7
- * Extendd Plugin Settings API wrapper class
8
- *
9
- * @original author: Tareq Hasan <tareq@weDevs.com>
10
- */
11
- if ( !class_exists( 'Extendd_Plugin_Settings_API' ) ):
12
- class Extendd_Plugin_Settings_API {
13
-
14
- /**
15
- * Version
16
- */
17
- var $api_version = '1.0.18';
18
-
19
- /**
20
- * settings sections array
21
- *
22
- * @var array
23
- */
24
- private $settings_sections = array();
25
-
26
- /**
27
- * Settings sections array
28
- *
29
- * @var array
30
- */
31
- private $settings_sidebars = array();
32
-
33
- /**
34
- * Settings fields array
35
- *
36
- * @var array
37
- */
38
- private $settings_fields = array();
39
-
40
- /**
41
- * The Plugin prefix
42
- *
43
- * @var string
44
- */
45
- private $prefix;
46
-
47
- /**
48
- * The Plugin domain
49
- *
50
- * @var string
51
- */
52
- private $domain;
53
-
54
- /**
55
- * The Parent Plugin version
56
- *
57
- * @var string
58
- */
59
- private $version;
60
-
61
- /**
62
- * Singleton instance
63
- *
64
- * @var object
65
- */
66
- private static $_instance;
67
-
68
- /**
69
- * Main Instance
70
- *
71
- * @staticvar array $instance
72
- * @return The one true instance
73
- */
74
- public static function instance() {
75
- if ( ! isset( self::$_instance ) ) {
76
- self::$_instance = new self;
77
- self::$_instance->init();
78
- }
79
- return self::$_instance;
80
- }
81
-
82
- function __construct() {}
83
-
84
- /**
85
- * Fire
86
- *
87
- */
88
- function init() {
89
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
90
- add_action( 'init', array( $this, 'late_init' ), 89 );
91
- }
92
-
93
- /**
94
- * Fire any actions needed a little late
95
- *
96
- * @return void
97
- */
98
- function late_init() {
99
- if ( function_exists( 'EXTENDD_settings_init' ) ) {
100
- $extendd_settings_api = EXTENDD_settings_init();
101
- add_action( $this->prefix . '_settings_sidebars', array( $extendd_settings_api, 'extendd_plugins_sidebar' ), 11 );
102
- } else {
103
- add_action( $this->prefix . '_settings_sidebars', array( $this, 'extendd_plugins_sidebar' ), 11 );
104
- }
105
-
106
- add_action( 'admin_notices', array( $this, 'show_notifications' ) );
107
- add_action( 'admin_init', array( $this, 'notification_ignore' ) );
108
- add_action( 'admin_menu', array( $this, 'modify_transient' ) );
109
- }
110
-
111
- /**
112
- * Set parent prefix
113
- *
114
- * @param string $prefix
115
- * @return void
116
- */
117
- public function set_prefix( $prefix ) {
118
- $this->prefix = $prefix;
119
- }
120
-
121
- /**
122
- * Set parent domain
123
- *
124
- * @param string $domain
125
- * @return void
126
- */
127
- public function set_domain( $domain ) {
128
- $this->domain = $domain;
129
- }
130
-
131
- /**
132
- * Set parent version
133
- *
134
- * @param string $version
135
- * @return void
136
- */
137
- public function set_version( $version ) {
138
- $this->version = $version;
139
- }
140
-
141
- /**
142
- * Enqueue scripts and styles
143
- */
144
- function admin_enqueue_scripts( $hook ) {
145
- if ( 'settings_page_' . $this->domain !== $hook )
146
- return;
147
-
148
- /* Core */
149
- if ( function_exists( 'wp_enqueue_media' ) ) wp_enqueue_media();
150
- wp_enqueue_script( 'wp-color-picker' );
151
- wp_enqueue_style( 'wp-color-picker' );
152
-
153
- /* jQuery Chosen */
154
- wp_enqueue_script( 'jquery-chosen', plugins_url( 'assets/js/chosen.jquery.min.js', CUSTOM_LOGIN_FILE ), array( 'jquery' ), '1.0.0', false );
155
- wp_enqueue_style( 'jquery-chosen', plugins_url( 'assets/css/chosen.css', CUSTOM_LOGIN_FILE ), false, '1.0.0', 'screen' );
156
-
157
- /* Admin */
158
- wp_enqueue_script( $this->domain, plugins_url( 'assets/js/admin.js', CUSTOM_LOGIN_FILE ), array( 'jquery' ), $this->version, false );
159
- wp_enqueue_style( $this->domain, plugins_url( 'assets/css/admin.css', CUSTOM_LOGIN_FILE ), false, $this->version, 'screen' );
160
-
161
- /* Genericons */
162
- wp_enqueue_style( 'genericons', plugins_url( 'assets/css/genericons.css', CUSTOM_LOGIN_FILE ), false, '3.0.3', 'screen' );
163
-
164
- do_action( 'custom_login_admin_enqueue_scripts' );
165
- }
166
-
167
- /**
168
- * Set settings sections
169
- *
170
- * @param array $sections setting sections array
171
- */
172
- function set_sections( $sections ) {
173
- $sections = apply_filters( $this->prefix . '_add_settings_sections', $sections );
174
- $this->settings_sections = $sections;
175
-
176
- return $this;
177
- }
178
-
179
- /**
180
- * Add a single section
181
- *
182
- * @param array $section
183
- */
184
- function add_section( $section ) {
185
- $this->settings_sections[] = $section;
186
-
187
- return $this;
188
- }
189
-
190
- /**
191
- * Set settings fields
192
- *
193
- * @param array $fields settings fields array
194
- */
195
- function set_fields( $fields ) {
196
- $fields = apply_filters( $this->prefix . '_add_settings_fields', $fields );
197
- $this->settings_fields = $fields;
198
-
199
- return $this;
200
- }
201
-
202
- function add_field( $section, $field ) {
203
- $defaults = array(
204
- 'name' => '',
205
- 'label' => '',
206
- 'desc' => '',
207
- 'type' => 'text'
208
- );
209
-
210
- $args = wp_parse_args( $field, $defaults );
211
- $this->settings_fields[$section][] = $args;
212
-
213
- return $this;
214
- }
215
-
216
- /**
217
- * Add a single section
218
- *
219
- * @param array $section
220
- */
221
- function add_sidebar( $sidebar = array() ) {
222
- $sidebar = apply_filters( $this->prefix . '_add_settings_sidebar', $sidebar );
223
- if ( !empty( $sidebar ) ) {
224
- $this->settings_sidebars[] = $sidebar;
225
- }
226
- }
227
-
228
- /**
229
- * Initialize and registers the settings sections and fileds to WordPress
230
- *
231
- * Usually this should be called at `admin_init` hook.
232
- *
233
- * This function gets the initiated settings sections and fields. Then
234
- * registers them to WordPress and ready for use.
235
- */
236
- function admin_init() {
237
- //register settings sections
238
- foreach ( $this->settings_sections as $section ) {
239
- if ( false == get_option( $section['id'] ) ) {
240
- add_option( $section['id'] );
241
- }
242
-
243
- add_settings_section( $section['id'], $section['title'], '__return_false', $section['id'] );
244
- }
245
-
246
- //register settings fields
247
- foreach ( $this->settings_fields as $section => $field ) {
248
- foreach ( $field as $option ) {
249
-
250
- $type = isset( $option['type'] ) ? $option['type'] : 'text';
251
-
252
- $args = array(
253
- 'id' => $option['name'],
254
- 'desc' => isset( $option['desc'] ) ? $option['desc'] : '',
255
- 'name' => $option['label'],
256
- 'section' => $section,
257
- 'size' => isset( $option['size'] ) ? $option['size'] : null,
258
- 'options' => isset( $option['options'] ) ? $option['options'] : '',
259
- 'std' => isset( $option['default'] ) ? $option['default'] : '',
260
- 'sanitize_callback' => isset( $option['sanitize_callback'] ) ? $option['sanitize_callback'] : '',
261
- 'class' => isset( $option['class'] ) ? $option['class'] : $this,
262
- );
263
- $args = wp_parse_args( $args, $option );
264
- add_settings_field( $section . '[' . $option['name'] . ']', $option['label'], array( $args['class'], 'callback_' . $type ), $section, $section, $args );
265
- }
266
- }
267
-
268
- // creates our settings in the options table
269
- foreach ( $this->settings_sections as $section ) {
270
- register_setting( $section['id'], $section['id'], array( $this, 'sanitize_options' ) );
271
- }
272
- }
273
-
274
- /**
275
- * Displays a text field for a settings field
276
- *
277
- * @param array $args settings field args
278
- */
279
- function callback_text( $args ) {
280
-
281
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
282
- $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
283
-
284
- $html = sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s"/>', $size, $args['section'], $args['id'], $value );
285
- $html .= sprintf( '<span class="description"> %s</span>', $args['desc'] );
286
-
287
- echo $html;
288
- }
289
-
290
- /**
291
- * Displays a text field for a settings field
292
- *
293
- * @param array $args settings field args
294
- */
295
- function callback_text_array( $args ) {
296
- static $counter = 0;
297
-
298
- $value = $this->get_option( $args['id'], $args['section'], $args['std'] );
299
- $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
300
-
301
- $html = '<ul style="margin-top:0">';
302
-
303
- if ( is_array( $value ) ) {
304
- foreach ( $value as $key => $val ) {
305
- $html .= '<li>';
306
- $html .= sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s][]" value="%4$s" data-key="%5$s"/>', $size, $args['section'], $args['id'], esc_attr( $val ), $key );
307
- $html .= sprintf( '<a href="#" class="button dodelete-%1$s[%2$s]">-</a>', $args['section'], $args['id'] );
308
- $html .= '</li>';
309
- }
310
- } else {
311
- $html .= '<li>';
312
- $html .= sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s][]" value="%4$s" data-key="0" data-array="false"/>', $size, $args['section'], $args['id'], esc_attr( $value ) );
313
- $html .= sprintf( '<a href="#" class="button dodelete-%1$s[%2$s]">-</a>', $args['section'], $args['id'] );
314
- $html .= '</li>';
315
- }
316
-
317
- $html .= '</ul>';
318
- $html .= sprintf( '<a href="#" class="button docopy-%1$s[%2$s]">+</a>', $args['section'], $args['id'] );
319
-
320
- $counter++;
321
- ob_start(); ?>
322
- <script>
323
- jQuery(document).ready(function($) {
324
- $('body').on('click', 'a[class^="button docopy-"]', function(e) {
325
- e.preventDefault();
326
-
327
- var $this = $(this).prev().children();
328
- //console.log($this);return;
329
- var clone = $('input[id="' + $this.children().prop('id') + '"]');
330
- var value = clone.data('key');
331
- var newValue = parseInt(value) + 1;
332
-
333
- //console.log( clone );
334
- var newInput = $this.last().clone();
335
- newInput.insertAfter( clone.parent().last() );
336
- newInput.children().val('').data('key',newValue);
337
- return false;
338
- });
339
- $('body').on('click', 'a[class^="button dodelete-"]', function(e) {
340
- e.preventDefault();
341
- // console.log(this);
342
-
343
- $(this).parent().remove();
344
- });
345
- });
346
- </script><?php
347
-
348
- $html .= 1 === $counter ? ob_get_clean() : '';
349
-
350
- $html .= sprintf( '<span class="description"> %s</span>', $args['desc'] );
351
-
352
- echo $html;
353
- }
354
-
355
- /**
356
- * Displays a text field for a settings field
357
- *
358
- * @param array $args settings field args
359
- */
360
- function callback_colorpicker( $args ) {
361
- static $counter = 0;
362
-
363
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
364
- $check = esc_attr( $this->get_option( $args['id'] . '_checkbox', $args['section'], $args['std'] ) );
365
- $opacity = esc_attr( $this->get_option( $args['id'] . '_opacity', $args['section'], $args['std'] ) );
366
- $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'small';
367
- $opaque_options = array( '1', '0.9', '0.8', '0.7', '0.6', '0.5', '0.4', '0.3', '0.2', '0.1', '0', );
368
- $class = 'on' != $check ? ' hidden' : '';
369
-
370
- /* Color */
371
- $html = sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s" style="float:left"/>', $size, $args['section'], $args['id'], $value );
372
-
373
- /* Allow Opacity */
374
- $html .= '<div class="checkbox-wrap">';
375
- $html .= sprintf( '<input type="hidden" name="%1$s[%2$s]" value="off" />', $args['section'], $args['id'] . '_checkbox' );
376
- $html .= sprintf( '<input type="checkbox" class="checkbox" id="%1$s[%2$s]" name="%1$s[%2$s]" value="on"%4$s />', $args['section'], $args['id'] . '_checkbox', $check, checked( $check, 'on', false ) );
377
- $html .= sprintf( __( '<label for="%1$s[%2$s]">Opacity</label>', $this->domain ), $args['section'], $args['id'] . '_checkbox' );
378
- $html .= '</div>';
379
-
380
- /* Opacity */
381
- // $html .= sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s" style="margin-left:70px;%5$s" />', $size, $args['section'], $args['id'] . '_opacity', $opacity, ( 'on' !== $check ? 'display:none;' : '' ) );
382
- $html .= sprintf( '<select class="%1$s%4$s" name="%2$s[%3$s]" id="%2$s[%3$s]" style="margin-left:70px;">', $size, $args['section'], $args['id'] . '_opacity', $class );
383
- foreach ( $opaque_options as $key ) {
384
- $html .= sprintf( '<option value="%s"%s>%s</option>', $key, selected( $opacity, $key, false ), $key );
385
- }
386
- $html .= sprintf( '</select>' );
387
-
388
- $counter++;
389
- ob_start(); ?>
390
- <script>
391
- jQuery(document).ready(function($) {
392
- var myOptions = {
393
- // you can declare a default color here,
394
- // or in the data-default-color attribute on the input
395
- defaultColor: false,
396
- // a callback to fire whenever the color changes to a valid color
397
- change: function(event, ui){},
398
- // a callback to fire when the input is emptied or an invalid color
399
- clear: function() {},
400
- // hide the color picker controls on load
401
- hide: true,
402
- // show a group of common colors beneath the square
403
- // or, supply an array of colors to customize further
404
- palettes: true
405
- };
406
- $('input[name="<?php echo $args['section'] . '[' . $args['id'] . ']'; ?>"]').wpColorPicker();
407
-
408
- if ( $('select[name="<?php echo $args['section'] . '[' . $args['id'] . '_opacity]'; ?>"]').hasClass('hidden') ) {
409
- $('select[name="<?php echo $args['section'] . '[' . $args['id'] . '_opacity]'; ?>"]').removeClass('hidden').chosen().addClass('hidden');
410
- } else {
411
- $('select[name="<?php echo $args['section'] . '[' . $args['id'] . '_opacity]'; ?>"]').chosen();
412
- }
413
-
414
- if ( $('select[name="<?php echo $args['section'] . '[' . $args['id'] . '_opacity]'; ?>"]').hasClass('hidden') ) {
415
- $('#<?php echo str_replace( '[', '_', $args['section'] . '[' . $args['id'] . '_opacity' ); ?>__chosen').hide();
416
- }
417
-
418
- $('input[name="<?php echo $args['section'] . '[' . $args['id'] . '_checkbox]'; ?>"]').on('change', function() {
419
- $('#<?php echo str_replace( '[', '_', $args['section'] . '[' . $args['id'] . '_opacity' ); ?>__chosen').toggle();
420
- });
421
- });
422
- </script><?php
423
- $html .= 1 === $counter ? ob_get_clean() : '';
424
-
425
- /* Description */
426
- if ( !empty( $args['desc'] ) )
427
- $html .= sprintf( '<span class="description"> %s</span>', $args['desc'] );
428
-
429
- echo $html;
430
- }
431
-
432
- /**
433
- * Displays a checkbox for a settings field
434
- *
435
- * @param array $args settings field args
436
- */
437
- function callback_checkbox( $args ) {
438
-
439
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
440
-
441
- $html = '<div class="checkbox-wrap">';
442
- $html .= sprintf( '<input type="hidden" name="%1$s[%2$s]" value="off" />', $args['section'], $args['id'] );
443
- $html .= sprintf( '<input type="checkbox" class="checkbox" id="%1$s[%2$s]" name="%1$s[%2$s]" value="on"%4$s />', $args['section'], $args['id'], $value, checked( $value, 'on', false ) );
444
- $html .= sprintf( '<label for="%1$s[%2$s]"></label>', $args['section'], $args['id'] );
445
- $html .= '</div>';
446
- $html .= sprintf( '<span class="description"> %s</label>', $args['desc'] );
447
-
448
- echo $html;
449
- }
450
-
451
- /**
452
- * Displays a multicheckbox a settings field
453
- *
454
- * @param array $args settings field args
455
- */
456
- function callback_multicheck( $args ) {
457
-
458
- $value = $this->get_option( $args['id'], $args['section'], $args['std'] );
459
-
460
- $html = '<div class="checkbox-wrap">';
461
- $html .= '<ul>';
462
- foreach ( $args['options'] as $key => $label ) {
463
- $checked = isset( $value[$key] ) ? $value[$key] : '0';
464
- $html .= '<li>';
465
- $html .= sprintf( '<input type="checkbox" class="checkbox" id="%1$s[%2$s][%3$s]" name="%1$s[%2$s][%3$s]" value="%3$s"%4$s />', $args['section'], $args['id'], $key, checked( $checked, $key, false ) );
466
- $html .= sprintf( '<label for="%1$s[%2$s][%4$s]" title="%3$s"> %3$s</label>', $args['section'], $args['id'], $label, $key );
467
- $html .= '</li>';
468
- }
469
- $html .= '</ul>';
470
- $html .= '</div>';
471
- $html .= sprintf( '<span class="description"> %s</label>', $args['desc'] );
472
-
473
- echo $html;
474
- }
475
-
476
- /**
477
- * Displays a multicheckbox a settings field
478
- *
479
- * @param array $args settings field args
480
- */
481
- function callback_radio( $args ) {
482
-
483
- $value = $this->get_option( $args['id'], $args['section'], $args['std'] );
484
-
485
- $html = '<div class="radio-wrap">';
486
- $html .= '<ul>';
487
- foreach ( $args['options'] as $key => $label ) {
488
- $html .= '<li>';
489
- $html .= sprintf( '<input type="radio" class="radio" id="%1$s[%2$s][%3$s]" name="%1$s[%2$s]" value="%3$s"%4$s />', $args['section'], $args['id'], $key, checked( $value, $key, false ) );
490
- $html .= sprintf( '<label for="%1$s[%2$s][%4$s]" title="%3$s"> %3$s</label><br>', $args['section'], $args['id'], $label, $key );
491
- $html .= '</li>';
492
- }
493
- $html .= '</ul>';
494
- $html .= '</div>';
495
-
496
-
497
- $html .= sprintf( '<span class="description"> %s</label>', $args['desc'] );
498
-
499
- echo $html;
500
- }
501
-
502
- /**
503
- * Displays a selectbox for a settings field
504
- *
505
- * @param array $args settings field args
506
- */
507
- function callback_select( $args ) {
508
-
509
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
510
- $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
511
-
512
- $html = sprintf( '<select class="%1$s" name="%2$s[%3$s]" id="%2$s[%3$s]">', $size, $args['section'], $args['id'] );
513
- foreach ( $args['options'] as $key => $label ) {
514
- $html .= sprintf( '<option value="%s"%s>%s</option>', $key, selected( $value, $key, false ), $label );
515
- }
516
- $html .= sprintf( '</select>' );
517
-
518
- ob_start(); ?>
519
- <script>
520
- jQuery(document).ready(function($) {
521
- $('select[name="<?php echo $args['section'] . '[' . $args['id'] . ']'; ?>"]').chosen();
522
- });
523
- </script><?php
524
-
525
- $html .= ob_get_clean();
526
- $html .= sprintf( '<span class="description"> %s</span>', $args['desc'] );
527
-
528
- echo $html;
529
- }
530
-
531
- /**
532
- * Displays a textarea for a settings field
533
- *
534
- * @param array $args settings field args
535
- */
536
- function callback_textarea( $args ) {
537
-
538
- $value = esc_textarea( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
539
- //$value = wp_specialchars_decode( stripslashes( $this->get_option( $args['id'], $args['section'], $args['std'] ) ), 1, 0, 1 );
540
- $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
541
-
542
- $html = sprintf( '<textarea rows="5" cols="55" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]">%4$s</textarea>', $size, $args['section'], $args['id'], stripslashes( $value ) );
543
- $html .= sprintf( '<br><span class="description"> %s</span>', $args['desc'] );
544
-
545
- echo $html;
546
- }
547
-
548
- /**
549
- * Displays a textarea for a settings field
550
- *
551
- * @param array $args settings field args
552
- */
553
- function callback_html( $args ) {
554
- echo $args['desc'];
555
- }
556
-
557
- /**
558
- * Displays a rich text textarea for a settings field
559
- *
560
- * @param array $args settings field args
561
- */
562
- function callback_wysiwyg( $args ) {
563
-
564
- $value = wpautop( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
565
- $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : '500px';
566
-
567
- echo '<div style="width: ' . $size . ';">';
568
-
569
- wp_editor( $value, $args['section'] . '[' . $args['id'] . ']', array( 'teeny' => true, 'textarea_rows' => 10 ) );
570
-
571
- echo '</div>';
572
-
573
- echo sprintf( '<br><span class="description"> %s</span>', $args['desc'] );
574
- }
575
-
576
- /**
577
- * Displays a file upload field for a settings field
578
- *
579
- * @param array $args settings field args
580
- */
581
- function callback_file( $args ) {
582
- static $counter = 0;
583
-
584
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
585
- $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
586
- $id = $args['section'] . '[' . $args['id'] . ']';
587
- $html = sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s"/>', $size, $args['section'], $args['id'], $value );
588
- $html .= '<input type="button" class="button extendd-browse" id="'. $id .'_button" value="Browse" style="margin-left:5px" />';
589
- $html .= '<input type="button" class="button extendd-clear" id="'. $id .'_clear" value="Clear" style="margin-left:5px" />';
590
-
591
- $counter++;
592
- if ( 1 === $counter ) {
593
- ob_start(); ?>
594
- <script>
595
- jQuery(document).ready(function($) {
596
- // WP 3.5+ uploader
597
- var file_frame;
598
- var wp_media_post_id = wp.media.model.settings.post.id; // Store the old id
599
- var set_to_post_id = <?php echo isset( $args['page_id'] ) ? $args['page_id'] : '0'; ?>; // Set this
600
- window.formfield = '';
601
-
602
- $(document.body).on('click', 'input[type="button"].button.extendd-browse', function(e) {
603
-
604
- e.preventDefault();
605
-
606
- var button = $(this);
607
-
608
- window.formfield = $(this).closest('td');
609
-
610
- // If the media frame already exists, reopen it.
611
- if ( file_frame ) {
612
- file_frame.uploader.uploader.param( 'post_id', set_to_post_id );
613
- file_frame.open();
614
- return;
615
- } else {
616
- // Set the wp.media post id so the uploader grabs the ID we want when initialised
617
- wp.media.model.settings.post.id = set_to_post_id;
618
- }
619
-
620
- // Create the media frame.
621
- file_frame = wp.media.frames.file_frame = wp.media({
622
- frame: 'post',
623
- state: 'insert',
624
- title: button.data( 'uploader_title' ),
625
- button: {
626
- text: button.data( 'uploader_button_text' ),
627
- },
628
- library: {
629
- type: 'image',
630
- },
631
- multiple: false // Set to true to allow multiple files to be selected
632
- });
633
-
634
- file_frame.on( 'menu:render:default', function(view) {
635
- // Store our views in an object.
636
- var views = {};
637
-
638
- // Unset default menu items
639
- view.unset('library-separator');
640
- view.unset('gallery');
641
- view.unset('featured-image');
642
- view.unset('embed');
643
-
644
- // Initialize the views in our view object.
645
- view.set(views);
646
- });
647
-
648
- // When an image is selected, run a callback.
649
- file_frame.on( 'insert', function() {
650
- var attachment = file_frame.state().get('selection').first().toJSON();
651
- // console.log(attachment);
652
-
653
- window.formfield.find('input[type="text"]').val(attachment.url);
654
- window.formfield.find('#<?php echo $id; ?>_preview').html('<div class="img" style="width:250px"><img src="'+attachment.url+'" alt="" /><a href="#" class="remove_file_button" rel="<?php echo $id; ?>">Remove Image</a></div>');
655
- });
656
-
657
- // Finally, open the modal
658
- file_frame.open();
659
- });
660
-
661
- // WP 3.5+ uploader
662
- var file_frame;
663
- window.formfield = '';
664
-
665
- $('input[type="button"].button.extendd-clear').on('click', function(e) {
666
- e.preventDefault();
667
- $(this).closest('td').find('input[type="text"]').val('');
668
- $(this).closest('td').find('#' + $(this).prop('id').replace( '_clear', '_preview') + ' div.image').remove();
669
- });
670
- $('a.remove_file_button').on( 'click', function(e) {
671
- e.preventDefault();
672
- $(this).closest('td').find('input[type="text"]').val('');
673
- $(this).parent().slideUp().remove();
674
- });
675
- });
676
- </script><?php
677
- $html .= ob_get_clean();
678
- }
679
- $html .= sprintf( '<br><span class="description"> %s</span>', $args['desc'] );
680
-
681
- /* Image */
682
- $html .= '<div id="' . $id . '_preview" class="' . $id . '_preview">';
683
- if ( $value != '' ) {
684
- $check_image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $value );
685
- if ( $check_image ) {
686
- $html .= '<div class="img" style="display:none">';
687
- $html .= '<img src="' . $value . '" alt="" />';
688
- $html .= '<a href="#" class="remove_file_button" rel="' . $id . '">Remove Image</a>';
689
- $html .= '</div>';
690
- }
691
- }
692
- $html .= '</div>';
693
-
694
- echo $html;
695
- }
696
-
697
- /**
698
- * Displays a password field for a settings field
699
- *
700
- * @param array $args settings field args
701
- */
702
- function callback_password( $args ) {
703
-
704
- $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
705
- $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
706
-
707
- $html = sprintf( '<input type="password" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s"/>', $size, $args['section'], $args['id'], $value );
708
- $html .= sprintf( '<span class="description"> %s</span>', $args['desc'] );
709
-
710
- echo $html;
711
- }
712
-
713
- /**
714
- * Sanitize callback for Settings API
715
- */
716
- function sanitize_options( $options ) {
717
- delete_transient( $this->prefix . '_style' );
718
- delete_transient( $this->prefix . '_script' );
719
-
720
- foreach( $options as $option_slug => $option_value ) {
721
- $sanitize_callback = $this->get_sanitize_callback( $option_slug );
722
-
723
- // If callback is set, call it
724
- if ( $sanitize_callback ) {
725
- $options[ $option_slug ] = call_user_func( $sanitize_callback, $option_value );
726
- continue;
727
- }
728
-
729
- // Treat everything that's not an array as a string
730
- if ( !is_array( $option_value ) ) {
731
- $options[ $option_slug ] = sanitize_text_field( $option_value );
732
- continue;
733
- }
734
- }
735
- return $options;
736
- }
737
-
738
- /**
739
- * Get sanitization callback for given option slug
740
- *
741
- * @param string $slug option slug
742
- *
743
- * @return mixed string or bool false
744
- */
745
- function get_sanitize_callback( $slug = '' ) {
746
- if ( empty( $slug ) )
747
- return false;
748
- // Iterate over registered fields and see if we can find proper callback
749
- foreach( $this->settings_fields as $section => $options ) {
750
- foreach ( $options as $option ) {
751
- if ( $option['name'] != $slug )
752
- continue;
753
- // Return the callback name
754
- return isset( $option['sanitize_callback'] ) && is_callable( $option['sanitize_callback'] ) ? $option['sanitize_callback'] : false;
755
- }
756
- }
757
- return false;
758
- }
759
-
760
- /**
761
- * Get the value of a settings field
762
- *
763
- * @param string $option settings field name
764
- * @param string $section the section name this field belongs to
765
- * @param string $default default text if it's not found
766
- * @return string
767
- */
768
- function get_option( $option, $section, $default = '' ) {
769
-
770
- $options = get_option( $section );
771
-
772
- if ( isset( $options[$option] ) ) {
773
- return $options[$option];
774
- }
775
-
776
- return $default;
777
- }
778
-
779
- /**
780
- * Show navigations as tab
781
- *
782
- * Shows all the settings section labels as tab
783
- */
784
- function show_navigation() {
785
- $html = '<h2 class="nav-tab-wrapper">';
786
-
787
- foreach ( $this->settings_sections as $tab ) {
788
- $html .= sprintf( '<a href="#%1$s" class="nav-tab" id="%1$s-tab">%2$s</a>', $tab['id'], $tab['title'] );
789
- }
790
-
791
- $html .= '</h2>';
792
-
793
- echo $html;
794
- }
795
-
796
- /**
797
- * Helper function to make remote calls
798
- *
799
- * @since 2.2
800
- */
801
- function wp_remote_get_set_transient( $url = false, $transient, $type = 'message', $cache_time = null ) {
802
- if ( !$url ) return;
803
-
804
- if ( is_null( $cache_time ) ) {
805
- if ( defined( 'DAY_IN_SECONDS' ) )
806
- $cache_time = DAY_IN_SECONDS;
807
- else
808
- $cache_time = 24 * 60 * 60;
809
- }
810
-
811
- if ( false === ( $output = get_transient( $transient ) ) ) {
812
- $site = wp_remote_get( $url, array( 'timeout' => 15, 'sslverify' => false ) );
813
- if ( !is_wp_error( $site ) ) {
814
- if ( isset( $site['body'] ) && strlen( $site['body'] ) > 0 ) {
815
- $output = json_decode( wp_remote_retrieve_body( $site ) );
816
-
817
- // For when I mess up the JSON or github is down.
818
- if ( is_wp_error( $output ) || empty( $output->$type ) )
819
- return false;
820
-
821
- set_transient( $transient, $output, $cache_time ); // Cache for two weeks
822
- update_option( $transient . '_message', $output->$type ); // Update the message
823
-
824
- // Return the data
825
- return $output;
826
- }
827
- } else {
828
- // Error, lets return!
829
- return false;
830
- }
831
- }
832
- return $output;
833
-
834
- }
835
-
836
- /**
837
- * Show the section settings forms
838
- *
839
- * This function displays every sections in a different form
840
- *
841
- * @uses http://codex.wordpress.org/Transients_API#Using_Time_Constants
842
- */
843
- function show_notifications() {
844
- $transient = $this->prefix . '_announcement';
845
- $ignore = $this->prefix . '_ignore_announcement';
846
- $old_message = get_option( $transient . '_message' );
847
- $user_meta = get_user_meta( get_current_user_id(), $ignore, true );
848
-
849
- // delete_user_meta( get_current_user_id(), $ignore, 1 );
850
- // delete_transient( $transient );
851
- // delete_option( $this->prefix . '_announcement_message' );
852
-
853
- /* Current user can */
854
- if ( !current_user_can( 'manage_options' ) )
855
- return;
856
-
857
- $announcement = $this->wp_remote_get_set_transient( 'https://raw.github.com/thefrosty/custom-login/master/extensions.json', $transient, 'message' );
858
-
859
- //print_r( $announcement );
860
-
861
- if ( false === $announcement ) return;
862
-
863
- if ( trim( $old_message ) !== trim( $announcement->message ) && !empty( $old_message ) ) {
864
- delete_user_meta( get_current_user_id(), $ignore, 1 );
865
- delete_transient( $transient );
866
- delete_option( $transient . '_message' );
867
- //echo 'test';
868
- }
869
-
870
- $html = '<div class="updated" data-old-message="' . esc_attr( $old_message ) . '" data-announcement="' . esc_attr( $announcement->message ) . '"><p>';
871
- $html .= sprintf( __( '%1$s | <a href="%2$s">Dismiss notice</a>', $this->domain ), $announcement->message, esc_url( add_query_arg( $ignore, wp_create_nonce( $ignore ), admin_url( 'options-general.php?page=custom-login' ) ) ) );
872
- $html .= '</p></div>';
873
-
874
- if ( !$user_meta && 1 !== $user_meta )
875
- echo $html;
876
- }
877
-
878
- /**
879
- * Remove notification
880
- *
881
- * @return void
882
- */
883
- function notification_ignore() {
884
- $ignore = $this->prefix . '_ignore_announcement';
885
-
886
- //if ( isset( $_GET[$ignore] ) ) echo $_GET[$ignore]; exit;
887
-
888
- if ( !isset( $_GET[$ignore] ) )
889
- return;
890
-
891
- // Check nonce
892
- check_admin_referer( $ignore, $ignore );
893
-
894
- /* If user clicks to ignore the notice, add that to their user meta */
895
- add_user_meta( get_current_user_id(), $ignore, 1, true );
896
- }
897
-
898
- /**
899
- */
900
- function load_edd_add_ons_page() {
901
- if ( ! class_exists( 'Easy_Digital_Downloads' ) )
902
- return;
903
-
904
- global $edd_add_ons_page;
905
- add_action( 'load-' . $edd_add_ons_page, array( $this, 'modify_transient' ), 11 );
906
- }
907
-
908
- /**
909
- */
910
- function modify_transient() {
911
-
912
- if ( false !== ( $cache = get_transient( 'easydigitaldownloads_add_ons_feed' ) ) ) {
913
-
914
- if ( false === ( $cl = get_transient( 'custom_login_edd_add_ons_feed' ) ) ) {
915
- // Replace ?utm_* link
916
- //$cache = preg_replace( '/(\?|\&|&#038;)utm_[a-z]+=[a-zA-Z0-9-]+/', '', $cache );
917
- //var_dump( $cache ); exit;
918
- // Replace 'ref=1' on "Get the Add On" link.
919
- $cache = preg_replace( '/ref=(\d+)/i', 'ref=116', $cache );
920
- //echo( $cache ); exit;
921
- delete_transient( 'easydigitaldownloads_add_ons_feed' );
922
- set_transient( 'easydigitaldownloads_add_ons_feed', $cache, WEEK_IN_SECONDS * 2 );
923
- set_transient( 'custom_login_edd_add_ons_feed', '1', WEEK_IN_SECONDS * 2 );
924
- }
925
- }
926
-
927
- }
928
-
929
- /**
930
- * Show the section settings forms
931
- *
932
- * This function displays every sections in a different form
933
- */
934
- function show_forms() { ?>
935
- <div class="section col-group">
936
- <div class="postbox col span_2_of_3">
937
- <?php foreach ( $this->settings_sections as $form ) { ?>
938
- <div id="<?php echo $form['id']; ?>" class="group">
939
- <form method="post" action="options.php">
940
-
941
- <?php do_action( $this->prefix . '_form_top_' . $form['id'], $form ); ?>
942
- <?php settings_fields( $form['id'] ); ?>
943
- <div class="inside"><?php do_settings_sections( $form['id'] ); ?></div>
944
- <?php do_action( $this->prefix . '_form_bottom_' . $form['id'], $form ); ?>
945
-
946
- <div style="padding-left: 10px">
947
- <?php submit_button(); ?>
948
- </div>
949
- </form>
950
- </div>
951
- <?php } ?>
952
- </div>
953
- <div class="col span_1_of_3" style="margin-top:0">
954
- <?php do_action( $this->prefix . '_settings_sidebars', $this->settings_sidebars ); ?>
955
- </div>
956
-
957
- </div>
958
- <br class="clear">
959
- <?php
960
- }
961
-
962
- /**
963
- * Tabbable JavaScript codes
964
- *
965
- * This code uses localstorage for displaying active tabs
966
- */
967
- function inline_jquery() { ?>
968
- <script type="text/javascript">
969
- jQuery(document).ready(function($) {
970
- // Switches option sections
971
- $('.group').hide();
972
- var activetab = '';
973
- if (typeof(localStorage) != 'undefined' ) {
974
- activetab = localStorage.getItem("activetab");
975
- }
976
- if (activetab != '' && $(activetab).length ) {
977
- $(activetab).fadeIn();
978
- $(activetab + '_sidebar').fadeIn();
979
- } else {
980
- $('.group:first').fadeIn();
981
- $('.metabox-holder.group:first').fadeIn();
982
- }
983
- $('.group .collapsed').each(function(){
984
- $(this).find('input:checked').parent().parent().parent().nextAll().each(
985
- function(){
986
- if ($(this).hasClass('last')) {
987
- $(this).removeClass('hidden');
988
- return false;
989
- }
990
- $(this).filter('.hidden').removeClass('hidden');
991
- });
992
- });
993
-
994
- if (activetab != '' && $(activetab + '-tab').length ) {
995
- $(activetab + '-tab').addClass('nav-tab-active');
996
- }
997
- else {
998
- $('.nav-tab-wrapper a:first').addClass('nav-tab-active');
999
- }
1000
- $('.nav-tab-wrapper a').on('click',function(e) {
1001
- $('.nav-tab-wrapper a').removeClass('nav-tab-active');
1002
- $(this).addClass('nav-tab-active').blur();
1003
- var clicked_group = $(this).attr('href');
1004
- if (typeof(localStorage) != 'undefined' ) {
1005
- localStorage.setItem("activetab", $(this).attr('href'));
1006
- }
1007
- $('.group').hide();
1008
- $(clicked_group).fadeIn();
1009
- $(clicked_group + '_sidebar').fadeIn();
1010
- e.preventDefault();
1011
- });
1012
- <?php if ( isset( $_GET['settings-updated'] ) && 'true' === $_GET['settings-updated'] ) { ?>
1013
-
1014
- setTimeout( function() {
1015
- $('#setting-error-settings_updated, #setting-error-transitent_deleted').fadeOut('slow');
1016
- }, 4000 );
1017
- <?php } ?>
1018
- });
1019
- </script><?php
1020
- }
1021
-
1022
- /**
1023
- * Create a potbox widget.
1024
- *
1025
- * @param string $id ID of the postbox.
1026
- * @param string $title Title of the postbox.
1027
- * @param string $content Content of the postbox.
1028
- */
1029
- public function postbox( $id, $title, $content, $group = false ) {
1030
- ?>
1031
- <div class="metabox-holder<?php if ( $group ) echo ' group'; ?>" id="<?php echo $id; ?>">
1032
- <div class="postbox">
1033
- <h3><?php echo $title; ?></h3>
1034
- <div class="inside"><?php echo $content; ?></div>
1035
- </div>
1036
- </div>
1037
- <?php
1038
- }
1039
-
1040
- /**
1041
- * Fetch RSS items from the feed.
1042
- *
1043
- * @param int $num Number of items to fetch.
1044
- * @param string $feed The feed to fetch.
1045
- * @return array|bool False on error, array of RSS items on success.
1046
- */
1047
- public function fetch_rss_items( $num, $feed ) {
1048
- if ( !function_exists( 'fetch_feed' ) )
1049
- include_once( ABSPATH . WPINC . '/feed.php' );
1050
-
1051
- $rss = fetch_feed( $feed );
1052
-
1053
- // Bail if feed doesn't work
1054
- if ( !$rss || is_wp_error( $rss ) )
1055
- return false;
1056
-
1057
- $rss_items = $rss->get_items( 0, $rss->get_item_quantity( $num ) );
1058
-
1059
- // If the feed was erroneous
1060
- if ( !$rss_items ) {
1061
- $md5 = md5( $feed );
1062
- delete_transient( 'feed_' . $md5 );
1063
- delete_transient( 'feed_mod_' . $md5 );
1064
- $rss = fetch_feed( $feed );
1065
- $rss_items = $rss->get_items( 0, $rss->get_item_quantity( $num ) );
1066
- }
1067
-
1068
- return $rss_items;
1069
- }
1070
-
1071
- /**
1072
- * Box with latest plugins from Extendd.com for sidebar
1073
- */
1074
- function extendd_plugins_sidebar( $args ) {
1075
-
1076
- $defaults = array(
1077
- 'items' => 6,
1078
- 'feed' => 'https://extendd.com/feed/?post_type=download',
1079
- );
1080
-
1081
- $args = wp_parse_args( $args, $defaults );
1082
-
1083
- $rss_items = $this->fetch_rss_items( $args['items'], $args['feed'] );
1084
-
1085
- $content = '<ul>';
1086
- if ( !$rss_items ) {
1087
- $content .= '<li>' . __( 'Error fetching feed', $this->domain ) . '</li>';
1088
- } else {
1089
- foreach ( $rss_items as $item ) {
1090
- $url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), null, 'display' ) );
1091
- $content .= '<li>';
1092
- $content .= '<a class="rsswidget" href="' . $url . '#utm_source=wpadmin&utm_medium=sidebarwidget&utm_term=newsitem&utm_campaign=' . $this->prefix . 'settingsapi">' . esc_html( $item->get_title() ) . '</a> ';
1093
- $content .= '</li>';
1094
- }
1095
- }
1096
- $content .= '</ul>';
1097
- $content .= '<ul class="social">';
1098
- $content .= '<li class="facebook"><span class="genericon genericon-facebook"></span><a href="https://www.facebook.com/WPExtendd">' . __( 'Like Extendd on Facebook', $this->domain ) . '</a></li>';
1099
- $content .= '<li class="twitter"><span class="genericon genericon-twitter"></span><a href="https://twitter.com/WPExtendd">' . __( 'Follow Extendd on Twitter', $this->domain ) . '</a></li>';
1100
- $content .= '<li class="twitter"><span class="genericon genericon-twitter"></span><a href="http://twitter.com/TheFrosty">' . __( 'Follow Austin on Twitter', $this->domain ) . '</a></li>';
1101
- $content .= '<li class="googleplus"><span class="genericon genericon-googleplus"></span><a href="https://plus.google.com/113609352601311785002/">' . __( 'Circle Extendd on Google+', $this->domain ) . '</a></li>';
1102
- $content .= '<li class="email"><span class="genericons genericons-mail"></span><a href="http://eepurl.com/vi0bz">' . __( 'Subscribe via email', $this->domain ) . '</a></li>';
1103
-
1104
- $content .= '</ul>';
1105
- $this->postbox( 'extenddlatest', __( 'Latest plugins from Extendd.com', $this->domain ), $content );
1106
- }
1107
-
1108
- }
1109
- endif;
1110
-
1111
- /**
1112
- * The main function responsible for returning the one true
1113
- * Instance to functions everywhere.
1114
- *
1115
- * Use this function like you would a global variable, except without needing
1116
- * to declare the global.
1117
- *
1118
- * Example: <?php $custom_login = CUSTOMLOGIN(); ?>
1119
- *
1120
- * @return The one true Instance
1121
- */
1122
- if ( !function_exists( 'EXTENDD_PLUGIN_SETTINGS_API' ) ) {
1123
- function EXTENDD_PLUGIN_SETTINGS_API() {
1124
- return Extendd_Plugin_Settings_API::instance();
1125
- }
1126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/welcome.php DELETED
@@ -1,193 +0,0 @@
1
- <?php
2
- /**
3
- * Weclome Page Class
4
- *
5
- * @package Custom Login
6
- * @subpackage Welcome Page
7
- * @copyright Copyright (c) 2013, Austin Passy
8
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
- * @since 2.0
10
- */
11
-
12
- // Exit if accessed directly
13
- if ( ! defined( 'ABSPATH' ) ) exit;
14
-
15
- /**
16
- * Custom Login Welcome Page Class
17
- *
18
- * A general class for About and Credits page.
19
- *
20
- * @access public
21
- * @since 2.0
22
- * @return void
23
- */
24
- class Custom_Login_Welcome {
25
-
26
- /**
27
- * @var string
28
- */
29
- public $minimum_capability = 'manage_options';
30
-
31
- /**
32
- * Get things started
33
- *
34
- * @access private
35
- * @since 2.0
36
- * @return void
37
- */
38
- public function __construct() {
39
- add_action( 'admin_menu', array( $this, 'admin_menus') );
40
- add_action( 'admin_head', array( $this, 'admin_head' ) );
41
- add_action( 'admin_init', array( $this, 'welcome' ) );
42
- }
43
-
44
- /**
45
- * Register dashboard pages.
46
- *
47
- * Later they are hidden in 'admin_head'.
48
- *
49
- * @since 2.0
50
- * @return void
51
- */
52
- public function admin_menus() {
53
- $login = CUSTOMLOGIN();
54
- // About Page
55
- add_dashboard_page(
56
- __( 'Welcome to Custom Login', $login->domain ),
57
- __( 'Welcome to Custom Login', $login->domain ),
58
- $this->minimum_capability,
59
- 'custom-login-about',
60
- array( $this, 'about_screen' )
61
- );
62
- }
63
-
64
- /**
65
- * Hide Individual Dashboard Menus
66
- *
67
- * @since 2.0
68
- * @return void
69
- */
70
- public function admin_head() {
71
- remove_submenu_page( 'index.php', 'custom-login-about' );
72
-
73
- // Badge for welcome page
74
- $badge_url = CUSTOM_LOGIN_URL . 'assets/images/welcome-badge.png';
75
- ?>
76
- <style type="text/css" media="screen">
77
- /*<![CDATA[*/
78
- .cl-badge {
79
- padding-top: 150px;
80
- height: 52px;
81
- width: 185px;
82
- color: #666;
83
- font-weight: bold;
84
- font-size: 14px;
85
- text-align: center;
86
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
87
- margin: 0 -5px;
88
- background: url('<?php echo $badge_url; ?>') no-repeat;
89
- }
90
- .about-wrap .cl-badge {
91
- position: absolute;
92
- top: 0;
93
- right: 0;
94
- }
95
- /*]]>*/
96
- </style>
97
- <?php
98
- }
99
-
100
- /**
101
- * Render About Screen
102
- *
103
- * @since 2.0
104
- */
105
- public function about_screen() {
106
- list( $display_version ) = explode( '-', CUSTOM_LOGIN_VERSION );
107
- $login = CUSTOMLOGIN();
108
- ?>
109
- <div class="wrap about-wrap">
110
- <h1><?php printf( __( 'Welcome to Custom Login %s', $login->domain ), $display_version ); ?></h1>
111
- <div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! Custom Login %s is ready to make your login page better!', $login->domain ), $display_version ); ?></div>
112
- <div class="cl-badge"><?php printf( __( 'Version %s', $login->domain ), $display_version ); ?></div>
113
-
114
- <h2 class="nav-tab-wrapper">
115
- <a class="nav-tab nav-tab-active" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'custom-login-about' ), 'index.php' ) ) ); ?>">
116
- <?php _e( "What's New", $login->domain ); ?>
117
- </a>
118
- </h2>
119
-
120
- <div class="changelog">
121
- <h3><?php _e( 'Improved Settings', $login->domain ); ?></h3>
122
-
123
- <div class="feature-section">
124
-
125
- <h4><?php _e( 'Load times', $login->domain ); ?></h4>
126
- <p><?php _e( 'There were some rare cases in versions 1.x that had the plugin loading on pages it wasn\'t supposted to. Custom Login <strong>2.x</strong> now caches all queries and database calls. Making it over 140% faster.', $login->domain ); ?></p>
127
-
128
- <h4><?php _e( 'Better features', $login->domain ); ?></h4>
129
- <p><?php printf( __( 'With a complete rewrite of the plugin, I have to ability to build custom add-ons (think extensions), like stealth login, email logins and 2-step authentication to name a few of the add-ons you can find on %sExtendd.com%s in the future.', $login->domain ), '<a href="https://extendd.com">', '</a>' ); ?></p>
130
-
131
- </div>
132
- </div>
133
-
134
- <div class="changelog">
135
- <h3><?php _e( 'Extensions', $login->domain ); ?></h3>
136
-
137
- <div class="feature-section col three-col">
138
- <div>
139
- <h4><?php _e( 'Stealth Login', $login->domain ); ?></h4>
140
- <a href="https://extendd.com/plugin/custom-login-stealth-login/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=welcome" target="_blank">
141
- <img src="https://i.imgur.com/mhuymPG.jpg">
142
- </a>
143
- <p><?php _e( 'Protect your wp-login.php page from brute force attacks.', $login->domain ); ?></p>
144
- </div>
145
-
146
- <div>
147
- <h4><?php _e( 'Page Template', $login->domain ); ?></h4>
148
- <a href="https://extendd.com/plugin/custom-login-page-template/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=welcome" target="_blank">
149
- <img src="https://i.imgur.com/A0rzS9q.jpg">
150
- </a>
151
- <p><?php _e( 'Add a login form to any WordPress page.', $login->domain ); ?></p>
152
- </div>
153
-
154
- <div class="last-feature">
155
- <h4><?php _e( 'Login Redirects', $login->domain ); ?></h4>
156
- <a href="https://extendd.com/plugin/wordpress-login-redirects/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=welcome" target="_blank">
157
- <img class="eddri-thumbnail" src="https://i.imgur.com/aNGoyAa.jpg">
158
- </a>
159
- <p><?php _e( 'Manage redirects after logging in.', $login->domain ); ?></p>
160
- </div>
161
- </div>
162
- </div>
163
-
164
- <div class="return-to-dashboard">
165
- <a href="<?php echo esc_url( admin_url( 'options-general.php?page=' . $login->domain ) ); ?>"><?php _e( 'Go to Custom Login Settings', $login->domain ); ?></a>
166
- </div>
167
- </div>
168
- <?php
169
- }
170
-
171
- /**
172
- * Sends user to the welcome page on first activation
173
- *
174
- * @since 2.0
175
- * @return void
176
- */
177
- public function welcome() {
178
- // Bail if no activation redirect
179
- if ( ! get_transient( '_custom_login_activation_redirect' ) )
180
- return;
181
-
182
- // Delete the redirect transient
183
- delete_transient( '_custom_login_activation_redirect' );
184
-
185
- // Bail if activating from network, or bulk
186
- if ( is_network_admin() || isset( $_GET['activate-multi'] ) )
187
- return;
188
-
189
- wp_safe_redirect( admin_url( 'index.php?page=custom-login-about' ) ); exit;
190
-
191
- }
192
- }
193
- new Custom_Login_Welcome();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
css/admin.css ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .cl-container {
3
+ background-color: #f5f5f5;
4
+ background-image: -moz-linear-gradient(center top , #f2f2f2 0px, #f5f5f5 100%);
5
+ background-repeat: repeat-x;
6
+ border: 1px solid #dedede;
7
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
8
+ margin-top: 5px;
9
+ overflow: hidden;
10
+ }
11
+
12
+ .cl-container * {
13
+ transition: all 0.5s ease-in-out;
14
+ }
15
+ [class^="chosen-"], [class^="chosen-"] * {
16
+ transition: none;
17
+ }
18
+
19
+ .cl-container .cl-header {
20
+ box-sizing: border-box;
21
+ float: none !important;
22
+ position: relative !important;
23
+ width: 100% !important;
24
+ }
25
+
26
+ .cl-header h2,
27
+ .cl-header h3 {
28
+ display: inline-block;
29
+ padding-right: 5px;
30
+ }
31
+ .cl-header a {
32
+ color: inherit;
33
+ text-decoration: none;
34
+ }
35
+
36
+ .cl-container .cl-header, .cl-container .cl-footer {
37
+ padding: 6px 10px;
38
+ }
39
+
40
+ /************ NOTICES *************/
41
+ #cl-notices {
42
+ }
43
+ #cl-notices h2 {
44
+ display: none;
45
+ }
46
+
47
+ #cl-notices div.updated,
48
+ #cl-notices div.error {
49
+ background-color: transparent;
50
+ margin: 0;
51
+ }
52
+
53
+ /************ STICKY *************/
54
+ #cl-sticky {
55
+ background: #f3f3f3;
56
+ box-shadow: 0 1px 0 #dedede inset;
57
+ padding: 0;
58
+ position: relative;
59
+ z-index: 19;
60
+ }
61
+ #cl-sticky .wrap {
62
+ margin: 0;
63
+ padding: 4px 15px;
64
+ }
65
+ .is-sticky > #cl-sticky {
66
+ bottom: 0;
67
+ border-top: 1px solid #dedede;
68
+ box-shadow: 0 1px 0 #fcfcfc inset;
69
+ top: auto !important;
70
+ }
71
+
72
+ #sticky-admin-notice {
73
+ display: inline-block;
74
+ }
75
+
76
+ #sticky-admin-notice ul.social {
77
+ display: none;
78
+ margin: 5px 0 0 0;
79
+ }
80
+ .is-sticky #sticky-admin-notice ul.social {
81
+ display: inline-block;
82
+ }
83
+ #sticky-admin-notice ul li {
84
+ display: inline;
85
+ margin-right: 8px;
86
+ }
87
+ #sticky-admin-notice ul li a {
88
+ color: #898989;
89
+ text-decoration: none;
90
+ }
91
+ #sticky-admin-notice ul li a:hover {
92
+ text-decoration: underline;
93
+ }
94
+
95
+ /*******SIDEBAR/MAIN *************/
96
+ .cl-container .cl-sidebar, .cl-container .cl-main {
97
+ min-height: 850px;
98
+ }
99
+
100
+ /************ SIDEBAR ************/
101
+ .cl-sidebar {
102
+ float: left;
103
+ width: 222px;
104
+ }
105
+ #wpbody-content .cl-sidebar .metabox-holder {
106
+ padding-top: 0;
107
+ }
108
+
109
+ .cl-sections-menu {
110
+ border-top: 1px solid #dedede;
111
+ margin-top: 0;
112
+ }
113
+ .cl-sections-menu li {
114
+ }
115
+ .cl-sections-menu li > a {
116
+ border-bottom: 1px solid #dedede;
117
+ box-shadow: 0 1px 0 #fff;
118
+ color: #555;
119
+ display: block;
120
+ padding: 10px 15px;
121
+ text-decoration: none;
122
+ }
123
+ .cl-sections-menu li > a:hover {
124
+ color: #222;
125
+ padding-left: 20px;
126
+ }
127
+ .cl-sections-menu li > a.active {
128
+ background-color: #0074a2;
129
+ color: #efefef;
130
+ }
131
+ /* Addons */
132
+ .cl-sections-menu li > a[href="#custom_login_extensions"] {
133
+ background-color: #e7ecef;
134
+ color: #474747;
135
+ font-weight: bold;
136
+ }
137
+ .cl-sections-menu li > a.active[href="#custom_login_extensions"] {
138
+ }
139
+
140
+ .cl-sidebar .postbox {
141
+ border-right: none;
142
+ border-left: none;
143
+ font-size: 80%;
144
+ min-width: 222px; /* Same as .cl-sidebar width */
145
+ margin-bottom: -1px;
146
+ }
147
+
148
+ .cl-sidebar .star-rating {
149
+ text-decoration: none;
150
+ }
151
+ .cl-sidebar .star-rating i {
152
+ color: #fddb5a;
153
+ }
154
+
155
+ /************ MAIN ***************/
156
+ .cl-main {
157
+ background: none repeat scroll 0 0 #fcfcfc;
158
+ border-top: 1px solid #dedede;
159
+ border-left: 1px solid #d8d8d8;
160
+ box-shadow: 0 1px 0 #fff inset;
161
+ margin-left: 221px;
162
+ padding: 10px 20px;
163
+ position: relative;
164
+ z-index: 1;
165
+ }
166
+
167
+ .cl-main > .group {
168
+ display: none;
169
+ }
170
+ .no-js .cl-main > .group {
171
+ display: block;
172
+ }
173
+
174
+ .cl-container .cl-main h3 {
175
+ border-bottom: 1px solid #e7e7e7;
176
+ line-height: 2em;
177
+ margin-top: 0;
178
+ }
179
+ .cl-main .form-table {
180
+ clear: none;
181
+ margin-top: 0 !important;
182
+ }
183
+ .cl-main .form-table th {
184
+ font-weight: 400;
185
+ width: 33%;
186
+ }
187
+ .cl-main .form-table th h4 {
188
+ font-weight: 600;
189
+ font-size: 1.25em;
190
+ margin: 0.95em 0;
191
+ }
192
+
193
+ /* CALLBACKS */
194
+ .cl-main .checkbox-wrap {
195
+ display: inline-block;
196
+ float: left;
197
+ margin: 0 35px 0 0;
198
+ position: relative;
199
+ }
200
+
201
+ .cl-main .cl-colorpicker-wrap {
202
+ position: relative;
203
+ }
204
+ .cl-main .cl-colorpicker-wrap * {
205
+ transition: none;
206
+ }
207
+
208
+ .cl-main .wp-picker-container {
209
+ float: left;
210
+ margin-right: 10px;
211
+ }
212
+
213
+ .cl-main .cl-colorpicker-wrap .checkbox-wrap {
214
+ float: left;
215
+ }
216
+ .cl-main .cl-colorpicker-wrap .checkbox-wrap > input {
217
+ float: none;
218
+ }
219
+
220
+ .cl-container select {
221
+ min-width: 120px;
222
+ }
223
+
224
+ .cl-main .img-wrapper {
225
+ height: auto;
226
+ margin: 10px 0;
227
+ width: 100%;
228
+ }
229
+ .cl-main .img-wrapper img {
230
+ border: 1px solid #aaa;
231
+ box-shadow: 0 0 2px 0 #BFBFBF;
232
+ height: auto;
233
+ width: 250px;
234
+ }
235
+ .cl-main .img-wrapper a {
236
+ display: block;
237
+ }
238
+
239
+ /* ACE */
240
+ div[id$="_ace"] {
241
+ min-height: 150px;
242
+ position: relative;
243
+ }
244
+ div[id$="_ace"] * {
245
+ transition: none;
246
+ }
247
+
248
+ /* EDDRI */
249
+ .eddri-addon-container {
250
+ padding: 1%;
251
+ }
252
+
253
+ @media screen and (max-width: 600px) {
254
+ .cl-sidebar {
255
+ float: none;
256
+ width: 100%;
257
+ }
258
+ .cl-main {
259
+ float: none;
260
+ margin-left: 0;
261
+ }
262
+ }
263
+
264
+ /* SECTIONS */
265
+ .section {
266
+ clear: both;
267
+ padding: 0px;
268
+ margin: 0px;
269
+ }
270
+ .section * {
271
+ box-sizing: border-box;
272
+ }
273
+
274
+ /* COLUMN SETUP */
275
+ .col {
276
+ display: block;
277
+ float: left;
278
+ margin: 1% 0 1% 1.6%;
279
+ }
280
+ .col:nth-child(3n+1) { clear: both; margin-left: 0; }
281
+
282
+ /* GRID OF TWO */
283
+ .span_2_of_2 {
284
+ width: 100%;
285
+ }
286
+ .span_1_of_2 {
287
+ width: 50%;
288
+ }
289
+
290
+ /* GRID OF THREE */
291
+ .span_3_of_3 {
292
+ width: 100%;
293
+ }
294
+ .span_2_of_3 {
295
+ width: 66.1%;
296
+ }
297
+ .span_1_of_3 {
298
+ width: 32.2%;
299
+ }
300
+
301
+ /* GO FULL WIDTH AT LESS THAN 480 PIXELS */
302
+ @media only screen and (max-width: 762px) {
303
+ .col {
304
+ margin: 1% 0 1em;
305
+ }
306
+ }
307
+
308
+ /* GO FULL WIDTH AT LESS THAN 480 PIXELS */
309
+ @media only screen and (max-width: 480px) {
310
+ .span_1_of_2 {
311
+ width: 100%;
312
+ }
313
+ .span_3_of_3 {
314
+ width: 100%;
315
+ }
316
+ .span_2_of_3 {
317
+ width: 100%;
318
+ }
319
+ .span_1_of_3 {
320
+ width: 100%;
321
+ }
322
+ }
css/chosen/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
css/chosen/chosen-sprite.png ADDED
Binary file
css/chosen/chosen-sprite@2x.png ADDED
Binary file
{assets/css → css/chosen}/chosen.css RENAMED
@@ -2,9 +2,9 @@
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
- Version 1.1.0
6
  Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011 Harvest http://getharvest.com
8
 
9
  MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
  This file is generated by `grunt build`, do not edit it by hand.
@@ -22,14 +22,16 @@ This file is generated by `grunt build`, do not edit it by hand.
22
  -moz-user-select: none;
23
  user-select: none;
24
  }
 
 
 
 
 
25
  .chosen-container .chosen-drop {
26
  position: absolute;
27
  top: 100%;
28
  left: -9999px;
29
  z-index: 1010;
30
- -webkit-box-sizing: border-box;
31
- -moz-box-sizing: border-box;
32
- box-sizing: border-box;
33
  width: 100%;
34
  border: 1px solid #aaa;
35
  border-top: 0;
@@ -50,7 +52,7 @@ This file is generated by `grunt build`, do not edit it by hand.
50
  display: block;
51
  overflow: hidden;
52
  padding: 0 0 0 8px;
53
- height: 23px;
54
  border: 1px solid #aaa;
55
  border-radius: 5px;
56
  background-color: #fff;
@@ -86,7 +88,7 @@ This file is generated by `grunt build`, do not edit it by hand.
86
  display: block;
87
  width: 12px;
88
  height: 12px;
89
- background: url('../images/chosen-sprite.png') -42px 1px no-repeat;
90
  font-size: 1px;
91
  }
92
  .chosen-container-single .chosen-single abbr:hover {
@@ -107,7 +109,7 @@ This file is generated by `grunt build`, do not edit it by hand.
107
  display: block;
108
  width: 100%;
109
  height: 100%;
110
- background: url('../images/chosen-sprite.png') no-repeat 0px 2px;
111
  }
112
  .chosen-container-single .chosen-search {
113
  position: relative;
@@ -117,17 +119,14 @@ This file is generated by `grunt build`, do not edit it by hand.
117
  white-space: nowrap;
118
  }
119
  .chosen-container-single .chosen-search input[type="text"] {
120
- -webkit-box-sizing: border-box;
121
- -moz-box-sizing: border-box;
122
- box-sizing: border-box;
123
  margin: 1px 0;
124
  padding: 4px 20px 4px 5px;
125
  width: 100%;
126
  height: auto;
127
  outline: 0;
128
  border: 1px solid #aaa;
129
- background: white url('../images/chosen-sprite.png') no-repeat 100% -20px;
130
- background: url('../images/chosen-sprite.png') no-repeat 100% -20px;
131
  font-size: 1em;
132
  font-family: sans-serif;
133
  line-height: normal;
@@ -146,6 +145,7 @@ This file is generated by `grunt build`, do not edit it by hand.
146
  /* @end */
147
  /* @group Results */
148
  .chosen-container .chosen-results {
 
149
  position: relative;
150
  overflow-x: hidden;
151
  overflow-y: auto;
@@ -160,6 +160,7 @@ This file is generated by `grunt build`, do not edit it by hand.
160
  padding: 5px 6px;
161
  list-style: none;
162
  line-height: 15px;
 
163
  -webkit-touch-callout: none;
164
  }
165
  .chosen-container .chosen-results li.active-result {
@@ -181,6 +182,7 @@ This file is generated by `grunt build`, do not edit it by hand.
181
  color: #fff;
182
  }
183
  .chosen-container .chosen-results li.no-results {
 
184
  display: list-item;
185
  background: #f4f4f4;
186
  }
@@ -202,11 +204,8 @@ This file is generated by `grunt build`, do not edit it by hand.
202
  .chosen-container-multi .chosen-choices {
203
  position: relative;
204
  overflow: hidden;
205
- -webkit-box-sizing: border-box;
206
- -moz-box-sizing: border-box;
207
- box-sizing: border-box;
208
  margin: 0;
209
- padding: 0;
210
  width: 100%;
211
  height: auto !important;
212
  height: 1%;
@@ -230,39 +229,42 @@ This file is generated by `grunt build`, do not edit it by hand.
230
  }
231
  .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
232
  margin: 1px 0;
233
- padding: 5px;
234
- height: 15px;
235
  outline: 0;
236
  border: 0 !important;
237
  background: transparent !important;
238
  box-shadow: none;
239
- color: #666;
240
  font-size: 100%;
241
  font-family: sans-serif;
242
  line-height: normal;
243
  border-radius: 0;
244
  }
245
- .chosen-container-multi .chosen-choices li.search-field .default {
246
- color: #999;
247
- }
248
  .chosen-container-multi .chosen-choices li.search-choice {
249
  position: relative;
250
- margin: 3px 0 3px 5px;
251
  padding: 3px 20px 3px 5px;
252
  border: 1px solid #aaa;
 
253
  border-radius: 3px;
254
- background-color: #e4e4e4;
255
  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
256
  background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
257
  background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
258
  background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
259
  background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
 
 
260
  background-clip: padding-box;
261
  box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
262
  color: #333;
263
  line-height: 13px;
264
  cursor: default;
265
  }
 
 
 
266
  .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
267
  position: absolute;
268
  top: 4px;
@@ -270,7 +272,7 @@ This file is generated by `grunt build`, do not edit it by hand.
270
  display: block;
271
  width: 12px;
272
  height: 12px;
273
- background: url('../images/chosen-sprite.png') -42px 1px no-repeat;
274
  font-size: 1px;
275
  }
276
  .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
@@ -334,7 +336,7 @@ This file is generated by `grunt build`, do not edit it by hand.
334
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
335
  }
336
  .chosen-container-active .chosen-choices li.search-field input[type="text"] {
337
- color: #111 !important;
338
  }
339
 
340
  /* @end */
@@ -406,8 +408,8 @@ This file is generated by `grunt build`, do not edit it by hand.
406
  }
407
  .chosen-rtl .chosen-search input[type="text"] {
408
  padding: 4px 5px 4px 20px;
409
- background: white url('../images/chosen-sprite.png') no-repeat -30px -20px;
410
- background: url('../images/chosen-sprite.png') no-repeat -30px -20px;
411
  direction: rtl;
412
  }
413
  .chosen-rtl.chosen-container-single .chosen-single div b {
@@ -427,7 +429,7 @@ This file is generated by `grunt build`, do not edit it by hand.
427
  .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
428
  .chosen-container .chosen-results-scroll-down span,
429
  .chosen-container .chosen-results-scroll-up span {
430
- background-image: url('../images/chosen-sprite@2x.png') !important;
431
  background-size: 52px 37px !important;
432
  background-repeat: no-repeat !important;
433
  }
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
+ Version 1.3.0
6
  Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2014 Harvest http://getharvest.com
8
 
9
  MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
  This file is generated by `grunt build`, do not edit it by hand.
22
  -moz-user-select: none;
23
  user-select: none;
24
  }
25
+ .chosen-container * {
26
+ -webkit-box-sizing: border-box;
27
+ -moz-box-sizing: border-box;
28
+ box-sizing: border-box;
29
+ }
30
  .chosen-container .chosen-drop {
31
  position: absolute;
32
  top: 100%;
33
  left: -9999px;
34
  z-index: 1010;
 
 
 
35
  width: 100%;
36
  border: 1px solid #aaa;
37
  border-top: 0;
52
  display: block;
53
  overflow: hidden;
54
  padding: 0 0 0 8px;
55
+ height: 25px;
56
  border: 1px solid #aaa;
57
  border-radius: 5px;
58
  background-color: #fff;
88
  display: block;
89
  width: 12px;
90
  height: 12px;
91
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
92
  font-size: 1px;
93
  }
94
  .chosen-container-single .chosen-single abbr:hover {
109
  display: block;
110
  width: 100%;
111
  height: 100%;
112
+ background: url('chosen-sprite.png') no-repeat 0px 2px;
113
  }
114
  .chosen-container-single .chosen-search {
115
  position: relative;
119
  white-space: nowrap;
120
  }
121
  .chosen-container-single .chosen-search input[type="text"] {
 
 
 
122
  margin: 1px 0;
123
  padding: 4px 20px 4px 5px;
124
  width: 100%;
125
  height: auto;
126
  outline: 0;
127
  border: 1px solid #aaa;
128
+ background: white url('chosen-sprite.png') no-repeat 100% -20px;
129
+ background: url('chosen-sprite.png') no-repeat 100% -20px;
130
  font-size: 1em;
131
  font-family: sans-serif;
132
  line-height: normal;
145
  /* @end */
146
  /* @group Results */
147
  .chosen-container .chosen-results {
148
+ color: #444;
149
  position: relative;
150
  overflow-x: hidden;
151
  overflow-y: auto;
160
  padding: 5px 6px;
161
  list-style: none;
162
  line-height: 15px;
163
+ word-wrap: break-word;
164
  -webkit-touch-callout: none;
165
  }
166
  .chosen-container .chosen-results li.active-result {
182
  color: #fff;
183
  }
184
  .chosen-container .chosen-results li.no-results {
185
+ color: #777;
186
  display: list-item;
187
  background: #f4f4f4;
188
  }
204
  .chosen-container-multi .chosen-choices {
205
  position: relative;
206
  overflow: hidden;
 
 
 
207
  margin: 0;
208
+ padding: 0 5px;
209
  width: 100%;
210
  height: auto !important;
211
  height: 1%;
229
  }
230
  .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
231
  margin: 1px 0;
232
+ padding: 0;
233
+ height: 25px;
234
  outline: 0;
235
  border: 0 !important;
236
  background: transparent !important;
237
  box-shadow: none;
238
+ color: #999;
239
  font-size: 100%;
240
  font-family: sans-serif;
241
  line-height: normal;
242
  border-radius: 0;
243
  }
 
 
 
244
  .chosen-container-multi .chosen-choices li.search-choice {
245
  position: relative;
246
+ margin: 3px 5px 3px 0;
247
  padding: 3px 20px 3px 5px;
248
  border: 1px solid #aaa;
249
+ max-width: 100%;
250
  border-radius: 3px;
251
+ background-color: #eeeeee;
252
  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
253
  background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
254
  background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
255
  background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
256
  background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
257
+ background-size: 100% 19px;
258
+ background-repeat: repeat-x;
259
  background-clip: padding-box;
260
  box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
261
  color: #333;
262
  line-height: 13px;
263
  cursor: default;
264
  }
265
+ .chosen-container-multi .chosen-choices li.search-choice span {
266
+ word-wrap: break-word;
267
+ }
268
  .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
269
  position: absolute;
270
  top: 4px;
272
  display: block;
273
  width: 12px;
274
  height: 12px;
275
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
276
  font-size: 1px;
277
  }
278
  .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
336
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
337
  }
338
  .chosen-container-active .chosen-choices li.search-field input[type="text"] {
339
+ color: #222 !important;
340
  }
341
 
342
  /* @end */
408
  }
409
  .chosen-rtl .chosen-search input[type="text"] {
410
  padding: 4px 5px 4px 20px;
411
+ background: white url('chosen-sprite.png') no-repeat -30px -20px;
412
+ background: url('chosen-sprite.png') no-repeat -30px -20px;
413
  direction: rtl;
414
  }
415
  .chosen-rtl.chosen-container-single .chosen-single div b {
429
  .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
430
  .chosen-container .chosen-results-scroll-down span,
431
  .chosen-container .chosen-results-scroll-up span {
432
+ background-image: url('chosen-sprite@2x.png') !important;
433
  background-size: 52px 37px !important;
434
  background-repeat: no-repeat !important;
435
  }
css/chosen/chosen.min.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /* Chosen v1.3.0 | (c) 2011-2014 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
+
3
+ .chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;*display:inline;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(chosen-sprite.png) no-repeat 100% -20px;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:transparent!important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:0;background:transparent}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single-nosearch .chosen-search,.chosen-rtl .chosen-drop{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:0}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:#fff url(chosen-sprite.png) no-repeat -30px -20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-rtl .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-container-single .chosen-search input[type=text],.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
css/login/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
css/login/login-rtl.css ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import url(/wp-admin/css/forms.css);
2
+ @import url(/wp-admin/css/l10n.css);
3
+
4
+ html,
5
+ body {
6
+ height: 100%;
7
+ margin: 0;
8
+ padding: 0;
9
+ }
10
+
11
+ html {
12
+ background: #f1f1f1;
13
+ }
14
+
15
+ body {
16
+ background: #f1f1f1;
17
+ min-width: 0;
18
+ color: #444;
19
+ font-family: "Open Sans", sans-serif;
20
+ font-size: 13px;
21
+ line-height: 1.4em;
22
+ }
23
+
24
+ a {
25
+ color: #0074a2;
26
+ -webkit-transition-property: border, background, color;
27
+ transition-property: border, background, color;
28
+ -webkit-transition-duration: .05s;
29
+ transition-duration: .05s;
30
+ -webkit-transition-timing-function: ease-in-out;
31
+ transition-timing-function: ease-in-out;
32
+ }
33
+
34
+ a {
35
+ outline: 0;
36
+ }
37
+
38
+ a:hover,
39
+ a:active {
40
+ color: #2ea2cc;
41
+ }
42
+
43
+ a:focus {
44
+ color: #124964;
45
+ }
46
+
47
+ a:focus,
48
+ a:active {
49
+ outline: thin dotted;
50
+ }
51
+
52
+ p {
53
+ line-height: 1.5;
54
+ }
55
+
56
+ .login .message {
57
+ border-right: 4px solid #7ad03a;
58
+ padding: 1px 12px;
59
+ background-color: #fff;
60
+ -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
61
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
62
+ }
63
+
64
+ .login #login_error {
65
+ border-right: 4px solid #dd3d36;
66
+ background: #fff;
67
+ -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
68
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
69
+ }
70
+
71
+ #loginform p.submit,
72
+ .login-action-lostpassword p.submit {
73
+ border: none;
74
+ margin: -10px 0 20px; /* May want to revisit this */
75
+ }
76
+
77
+ .login * {
78
+ margin: 0;
79
+ padding: 0;
80
+ }
81
+
82
+ .login form {
83
+ margin-top: 20px;
84
+ margin-right: 0;
85
+ padding: 26px 24px 46px;
86
+ font-weight: normal;
87
+ overflow: hidden;
88
+ background: #fff;
89
+ -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13);
90
+ box-shadow: 0 1px 3px rgba(0,0,0,0.13);
91
+ }
92
+
93
+ .login form .forgetmenot {
94
+ font-weight: normal;
95
+ float: right;
96
+ margin-bottom: 0;
97
+ }
98
+
99
+ .login .button-primary {
100
+ float: left;
101
+ }
102
+
103
+ #login form p {
104
+ margin-bottom: 0;
105
+ }
106
+
107
+ #login form p.submit {
108
+ margin: 0;
109
+ padding: 0;
110
+ }
111
+
112
+ .login label {
113
+ color: #777;
114
+ font-size: 14px;
115
+ }
116
+
117
+ .login form .forgetmenot label {
118
+ font-size: 12px;
119
+ line-height: 19px;
120
+ }
121
+
122
+ .login h1 {
123
+ text-align: center;
124
+ }
125
+
126
+ .login h1 a {
127
+ background-position: center top;
128
+ background-repeat: no-repeat;
129
+ color: #999;
130
+ font-size: 20px;
131
+ font-weight: normal;
132
+ line-height: 1.3em;
133
+ margin: 0 auto 25px;
134
+ padding: 0;
135
+ text-decoration: none;
136
+ text-indent: -9999px;
137
+ outline: none;
138
+ overflow: hidden;
139
+ display: block;
140
+ }
141
+
142
+ #login {
143
+ width: 320px;
144
+ padding: 8% 0 0;
145
+ margin: auto;
146
+ }
147
+
148
+ #login_error,
149
+ .login .message {
150
+ margin-right: 0;
151
+ padding: 12px;
152
+ }
153
+
154
+ .login #nav,
155
+ .login #backtoblog {
156
+ font-size: 13px;
157
+ padding: 0 24px 0;
158
+ }
159
+
160
+ .login #nav {
161
+ margin: 24px 0 0 0;
162
+ }
163
+
164
+ #backtoblog {
165
+ margin: 16px 0 0 0;
166
+ }
167
+
168
+ .login #nav a,
169
+ .login #backtoblog a {
170
+ text-decoration: none;
171
+ color: #999;
172
+ }
173
+
174
+ .login #nav a:hover,
175
+ .login #backtoblog a:hover,
176
+ .login h1 a:hover {
177
+ color: #2ea2cc;
178
+ }
179
+
180
+ .login form .input,
181
+ .login input[type="text"] {
182
+ font-size: 24px;
183
+ width: 100%;
184
+ padding: 3px;
185
+ margin: 2px 0 16px 6px;
186
+ }
187
+
188
+ .login form .input,
189
+ .login input[type="text"],
190
+ .login form input[type="checkbox"] {
191
+ background: #fbfbfb;
192
+ }
193
+
194
+ .ie7 .login form .input,
195
+ .ie8 .login form .input {
196
+ font-family: sans-serif;
197
+ }
198
+
199
+ .login #pass-strength-result {
200
+ width: 250px;
201
+ font-weight: 600;
202
+ margin: 12px 0 6px;
203
+ padding: 6px 5px;
204
+ text-align: center;
205
+ }
206
+
207
+ .mobile #login {
208
+ padding: 20px 0;
209
+ }
210
+
211
+ .mobile #login form,
212
+ .mobile #login .message,
213
+ .mobile #login_error {
214
+ margin-right: 0;
215
+ }
216
+
217
+ .mobile #login #nav,
218
+ .mobile #login #backtoblog {
219
+ margin-right: 8px;
220
+ }
221
+
222
+ .mobile #login h1 a {
223
+ width: auto;
224
+ }
225
+
226
+ body.interim-login {
227
+ height: auto;
228
+ }
229
+
230
+ .interim-login #login {
231
+ padding: 0;
232
+ margin: 5px auto 20px;
233
+ }
234
+
235
+ .interim-login.login h1 a {
236
+ width: auto;
237
+ }
238
+
239
+ .interim-login #login_error,
240
+ .interim-login.login .message {
241
+ margin: 0 0 16px;
242
+ }
243
+
244
+ .interim-login.login form {
245
+ margin: 0;
246
+ }
247
+
248
+ @-ms-viewport {
249
+ width: device-width;
250
+ }
251
+
252
+ @media screen and ( max-width: 782px ) {
253
+ .interim-login input[type=checkbox] {
254
+ height: 16px;
255
+ width: 16px;
256
+ }
257
+
258
+ .interim-login input[type=checkbox]:checked:before {
259
+ width: 16px;
260
+ font: normal 21px/1 'dashicons';
261
+ margin: -3px -4px 0 0;
262
+ }
263
+ }
css/login/login.css ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import url(/wp-admin/css/forms.css);
2
+ @import url(/wp-admin/css/l10n.css);
3
+
4
+ html,
5
+ body {
6
+ height: 100%;
7
+ margin: 0;
8
+ padding: 0;
9
+ }
10
+
11
+ html {
12
+ background: #f1f1f1;
13
+ }
14
+
15
+ body {
16
+ background: #f1f1f1;
17
+ min-width: 0;
18
+ color: #444;
19
+ font-family: "Open Sans", sans-serif;
20
+ font-size: 13px;
21
+ line-height: 1.4em;
22
+ }
23
+
24
+ a {
25
+ color: #0074a2;
26
+ -webkit-transition-property: border, background, color;
27
+ transition-property: border, background, color;
28
+ -webkit-transition-duration: .05s;
29
+ transition-duration: .05s;
30
+ -webkit-transition-timing-function: ease-in-out;
31
+ transition-timing-function: ease-in-out;
32
+ }
33
+
34
+ a {
35
+ outline: 0;
36
+ }
37
+
38
+ a:hover,
39
+ a:active {
40
+ color: #2ea2cc;
41
+ }
42
+
43
+ a:focus {
44
+ color: #124964;
45
+ }
46
+
47
+ a:focus,
48
+ a:active {
49
+ outline: thin dotted;
50
+ }
51
+
52
+ p {
53
+ line-height: 1.5;
54
+ }
55
+
56
+ .login .message {
57
+ border-left: 4px solid #7ad03a;
58
+ padding: 1px 12px;
59
+ background-color: #fff;
60
+ -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
61
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
62
+ }
63
+
64
+ .login #login_error {
65
+ border-left: 4px solid #dd3d36;
66
+ background: #fff;
67
+ -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
68
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
69
+ }
70
+
71
+ #loginform p.submit,
72
+ .login-action-lostpassword p.submit {
73
+ border: none;
74
+ margin: -10px 0 20px; /* May want to revisit this */
75
+ }
76
+
77
+ .login * {
78
+ margin: 0;
79
+ padding: 0;
80
+ }
81
+
82
+ .login form {
83
+ margin-top: 20px;
84
+ margin-left: 0;
85
+ padding: 26px 24px 46px;
86
+ font-weight: normal;
87
+ overflow: hidden;
88
+ background: #fff;
89
+ -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13);
90
+ box-shadow: 0 1px 3px rgba(0,0,0,0.13);
91
+ }
92
+
93
+ .login form .forgetmenot {
94
+ font-weight: normal;
95
+ float: left;
96
+ margin-bottom: 0;
97
+ }
98
+
99
+ .login .button-primary {
100
+ float: right;
101
+ }
102
+
103
+ #login form p {
104
+ margin-bottom: 0;
105
+ }
106
+
107
+ #login form p.submit {
108
+ margin: 0;
109
+ padding: 0;
110
+ }
111
+
112
+ .login label {
113
+ color: #777;
114
+ font-size: 14px;
115
+ }
116
+
117
+ .login form .forgetmenot label {
118
+ font-size: 12px;
119
+ line-height: 19px;
120
+ }
121
+
122
+ .login h1 {
123
+ text-align: center;
124
+ }
125
+
126
+ .login h1 a {
127
+ /**
128
+ * Removed from default login.css
129
+ **********************************
130
+ background-image: url(../images/w-logo-blue.png?ver=20131202);
131
+ background-image: none, url(../images/wordpress-logo.svg?ver=20131107);
132
+ -webkit-background-size: 84px;
133
+ background-size: 84px;
134
+ *
135
+ */
136
+
137
+ background-position: center top;
138
+ background-repeat: no-repeat;
139
+ color: #999;
140
+ font-size: 20px;
141
+ font-weight: normal;
142
+ line-height: 1.3em;
143
+ margin: 0 auto 25px;
144
+ padding: 0;
145
+ text-decoration: none;
146
+ text-indent: -9999px;
147
+ outline: none;
148
+ overflow: hidden;
149
+ display: block;
150
+ }
151
+
152
+ #login {
153
+ width: 320px;
154
+ padding: 8% 0 0;
155
+ margin: auto;
156
+ }
157
+
158
+ #login_error,
159
+ .login .message {
160
+ margin-left: 0;
161
+ padding: 12px;
162
+ }
163
+
164
+ .login #nav,
165
+ .login #backtoblog {
166
+ font-size: 13px;
167
+ padding: 0 24px 0;
168
+ }
169
+
170
+ .login #nav {
171
+ margin: 24px 0 0 0;
172
+ }
173
+
174
+ #backtoblog {
175
+ margin: 16px 0 0 0;
176
+ }
177
+
178
+ .login #nav a,
179
+ .login #backtoblog a {
180
+ text-decoration: none;
181
+ color: #999;
182
+ }
183
+
184
+ .login #nav a:hover,
185
+ .login #backtoblog a:hover,
186
+ .login h1 a:hover {
187
+ color: #2ea2cc;
188
+ }
189
+
190
+ .login form .input,
191
+ .login input[type="text"] {
192
+ font-size: 24px;
193
+ width: 100%;
194
+ padding: 3px;
195
+ margin: 2px 6px 16px 0;
196
+ }
197
+
198
+ .login form .input,
199
+ .login input[type="text"],
200
+ .login form input[type="checkbox"] {
201
+ background: #fbfbfb;
202
+ }
203
+
204
+ .ie7 .login form .input,
205
+ .ie8 .login form .input {
206
+ font-family: sans-serif;
207
+ }
208
+
209
+ .login #pass-strength-result {
210
+ width: 250px;
211
+ font-weight: 600;
212
+ margin: 12px 0 6px;
213
+ padding: 6px 5px;
214
+ text-align: center;
215
+ }
216
+
217
+ .mobile #login {
218
+ padding: 20px 0;
219
+ }
220
+
221
+ .mobile #login form,
222
+ .mobile #login .message,
223
+ .mobile #login_error {
224
+ margin-left: 0;
225
+ }
226
+
227
+ .mobile #login #nav,
228
+ .mobile #login #backtoblog {
229
+ margin-left: 8px;
230
+ }
231
+
232
+ .mobile #login h1 a {
233
+ width: auto;
234
+ }
235
+
236
+ body.interim-login {
237
+ height: auto;
238
+ }
239
+
240
+ .interim-login #login {
241
+ padding: 0;
242
+ margin: 5px auto 20px;
243
+ }
244
+
245
+ .interim-login.login h1 a {
246
+ width: auto;
247
+ }
248
+
249
+ .interim-login #login_error,
250
+ .interim-login.login .message {
251
+ margin: 0 0 16px;
252
+ }
253
+
254
+ .interim-login.login form {
255
+ margin: 0;
256
+ }
257
+
258
+ @-ms-viewport {
259
+ width: device-width;
260
+ }
261
+
262
+ @media screen and ( max-width: 782px ) {
263
+ .interim-login input[type=checkbox] {
264
+ height: 16px;
265
+ width: 16px;
266
+ }
267
+
268
+ .interim-login input[type=checkbox]:checked:before {
269
+ width: 16px;
270
+ font: normal 21px/1 'dashicons';
271
+ margin: -3px 0 0 -4px;
272
+ }
273
+ }
custom-login.php CHANGED
@@ -1,15 +1,16 @@
1
  <?php
2
-
3
  /**
4
  * Plugin Name: Custom Login
5
- * Plugin URI: https://extendd.com/plugin/custom-login
6
- * Description: A simple way to customize your WordPress <code>wp-login.php</code> screen! Use the built in, easy to use <a href="./options-general.php?page=custom-login">settings</a> page to do the work for you. Share you designs on <a href="http://flickr.com/groups/custom-login/">Flickr</a> or get Custom Login extensions at <a href="https://extendd.com/plugins/tag/custom-login-extension">Extendd.com</a>.
7
- * Version: 2.4.0
8
  * Author: Austin Passy
9
- * Author URI: http://austin.passy.co
10
  * Text Domain: custom-login
 
 
11
  *
12
- * @copyright 2012 - 2014
13
  * @author Austin Passy
14
  * @link http://austin.passy.co/
15
  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
@@ -18,34 +19,33 @@
18
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
  *
21
- * @class custom_login_pro
22
  */
23
-
24
  if ( !class_exists( 'Custom_Login' ) ) :
25
- class Custom_Login {
26
-
 
 
 
 
 
 
27
  /** Singleton *************************************************************/
28
  private static $instance;
29
-
30
  /**
31
  * Plugin vars
32
  * @return string
33
  */
34
- var $version = '2.4.0',
35
- $domain,
36
- $id;
37
 
38
  /**
39
  * Private settings
40
  */
41
- private $settings_api,
42
- $remote_install,
43
- $sections;
44
-
45
- /**
46
- * Options page
47
- */
48
- public $options_page;
49
 
50
  /**
51
  * Main Instance
@@ -54,932 +54,283 @@ class Custom_Login {
54
  * @return The one true instance
55
  */
56
  public static function instance() {
57
- if ( ! isset( self::$instance ) ) {
58
- self::$instance = new self;
59
  self::$instance->setup_constants();
60
- self::$instance->plugin_textdomain();
61
- self::$instance->required_functions();
62
- self::$instance->init();
 
 
63
  }
64
  return self::$instance;
65
  }
66
-
67
- /**
68
- * To infinity and beyond
69
- */
70
- function init() {
71
-
72
- /* vars */
73
- $this->domain = 'custom-login';
74
- $this->id = 'custom_login';
75
-
76
- /* Constants */
77
- add_action( 'admin_init', array( $this, 'check_version' ), 1 );
78
-
79
- /* Constants */
80
- add_action( 'init', array( $this, 'setup_constants' ) );
81
-
82
- /* Scripts */
83
- add_action( 'login_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
84
-
85
- /* Custom jQuery templates */
86
- add_action( 'login_footer', array( $this, 'login_footer_jquery' ) );
87
-
88
- /* Includes */
89
- add_action( 'init', array( $this, 'required_classes' ) );
90
- add_action( 'init', array( $this, 'required_functions' ) );
91
-
92
- /* Shortcodes */
93
- add_action( 'init', array( $this, 'add_shortcodes' ) );
94
-
95
- /* Settings */
96
- add_action( 'admin_init', array( $this, 'admin_init' ), 9 );
97
- add_action( 'admin_menu', array( $this, 'admin_menu' ), 9 );
98
-
99
- /* Clear transient cache button */
100
- add_action( $this->id .
101
- '_form_bottom_' . $this->id, array( $this, 'delete_transient_button_output' ) );
102
-
103
- /* Delete transient action */
104
- add_action( 'admin_action_' .
105
- $this->id . '-delete_transient', array( $this, 'delete_custom_login_transient_cache' ) );
106
-
107
- /* Notices */
108
- add_action( 'admin_notices', array( $this, 'admin_messages' ) );
109
-
110
- /* Add a settings page to the plugin menu */
111
- add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
112
-
113
- /* Filter in your URL */
114
- add_filter( 'login_headerurl', array( $this, 'login_url' ) );
115
-
116
- /* Filter in your description */
117
- add_filter( 'login_headertitle', array( $this, 'login_title' ) );
118
-
119
- /* Custom HTML */
120
- add_action( 'login_footer', array( $this, 'login_footer_html' ) );
121
- }
122
-
123
- /**
124
- * WordPress version check
125
- *
126
- * @since 2.0.3
127
- */
128
- function check_version() {
129
- global $wp_version;
130
-
131
- if ( version_compare( $wp_version, '3.5', '<' ) ) {
132
- add_action( 'admin_notices', array( $this, 'version_notification' ) );
133
- if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) deactivate_plugins( plugin_basename( __FILE__ ) );
134
- }
135
- }
136
-
137
- /**
138
- * Deactivation notice
139
- *
140
- */
141
- function version_notification() {
142
- global $wp_version;
143
-
144
- $html = '<div class="error"><p>';
145
- $html .= sprintf( __( 'Custom Login has been deactivated because it requires a WordPress version greater than 3.5. You are running <code>%s</code>', $this->domain ), $wp_version );
146
- $html .= '</p></div>';
147
-
148
- echo $html;
149
- }
150
-
151
  /**
152
  * Setup plugin constants
153
  *
154
- * @since 2.0
155
  * @access private
156
- * @uses plugin_dir_path()
157
- * @uses plugin_dir_url()
158
  */
159
- function setup_constants() {
160
 
 
 
 
 
 
161
  // Plugin version
162
- if ( ! defined( 'CUSTOM_LOGIN_VERSION' ) )
163
  define( 'CUSTOM_LOGIN_VERSION', $this->version );
164
-
165
- // Plugin settings
166
- if ( ! defined( 'CUSTOM_LOGIN_SETTINGS' ) )
167
- define( 'CUSTOM_LOGIN_SETTINGS', $this->id );
168
 
169
- // Plugin Folder URL
170
- if ( ! defined( 'CUSTOM_LOGIN_URL' ) )
171
- define( 'CUSTOM_LOGIN_URL', plugin_dir_url( __FILE__ ) );
 
172
 
173
  // Plugin Folder Path
174
- if ( ! defined( 'CUSTOM_LOGIN_DIR' ) )
175
- define( 'CUSTOM_LOGIN_DIR', plugin_dir_path( __FILE__ ) );
 
176
 
177
- // Plugin Root File
178
- if ( ! defined( 'CUSTOM_LOGIN_FILE' ) )
179
- define( 'CUSTOM_LOGIN_FILE', __FILE__ );
180
-
181
- // Plugin version
182
- if ( ! defined( 'EXTENDD_API_URL' ) )
183
- define( 'EXTENDD_API_URL', 'http://extendd.com' );
184
- }
185
-
186
- /**
187
- * Load the plugin translations
188
- *
189
- */
190
- function plugin_textdomain() {
191
- load_plugin_textdomain( 'custom-login', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
192
- }
193
-
194
- /**
195
- * Enqueue additional scripts.
196
- *
197
- * @since 2.0
198
- * @updated 2.1
199
- */
200
- function enqueue_scripts() {
201
- if ( !$this->is_active() )
202
- return;
203
-
204
- global $cl_css_atts;
205
 
206
- $cl_css_atts = array(
207
- 'version' => CUSTOM_LOGIN_VERSION,
208
- );
209
- $cl_css_atts = wp_parse_args( get_option( $this->id, array() ), $cl_css_atts );
210
-
211
- ob_start();
212
- echo "<style type=\"text/css\">\n";
213
- $login_template = new Custom_Login_Templates;
214
- $login_template->get_template_part( 'wp-login', 'style' );
215
- echo "\n</style>";
216
- echo ob_get_clean();
217
 
218
- /* Custom jQuery */
219
- $jquery = $this->get_option( 'custom_jquery', $this->id );
220
- if ( !empty( $jquery ) ) {
221
- wp_enqueue_script( array( 'jquery' ) );
222
  }
223
  }
224
-
225
  /**
226
- * Database access to the scripts and styles.
227
  *
228
- * @since 2.1
229
- * @return string|void
230
  */
231
- function login_footer_jquery() {
232
- $jquery = $this->get_option( 'custom_jquery', $this->id );
233
- if ( !empty( $jquery ) ) :
234
-
235
- global $cl_js_atts;
236
-
237
- $cl_js_atts = array(
238
- 'version' => CUSTOM_LOGIN_VERSION,
239
- );
240
- $cl_js_atts = wp_parse_args( get_option( $this->id, array() ), $cl_js_atts );
241
-
242
- foreach( $cl_js_atts as $atts => $value ) {
243
- if ( 'custom_jquery' !== $atts && 'version' !== $atts )
244
- unset( $cl_js_atts[$atts] );
245
- }
246
-
247
- ob_start();
248
- echo "<script type=\"text/javascript\">\n";
249
- $login_template = new Custom_Login_Templates;
250
- $login_template->get_template_part( 'wp-login', 'script' );
251
- echo "\n</script>";
252
- echo ob_get_clean();
253
-
254
- endif; // jQUery
255
  }
256
-
257
  /**
258
  * Includes required functions
259
  *
260
  */
261
- function required_classes() {
262
- require_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'classes/class.settings-api.php' );
263
- $this->settings_api = EXTENDD_PLUGIN_SETTINGS_API();
 
 
 
 
 
 
 
 
264
 
265
  if ( is_admin() ) {
266
- // Settings API
267
- $this->settings_api->set_prefix( $this->id );
268
- $this->settings_api->set_domain( $this->domain );
269
- $this->settings_api->set_version( $this->version );
270
-
271
- // Welcome API
272
- require_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'classes/welcome.php' );
273
-
274
- // Extensions install API
275
- if ( $this->class_exists_require( 'Extendd_Remote_Install_Client', 'edd-remote-install-client/EDD_Remote_Install_Client.php' ) ) {
276
- $this->remote_install = new Extendd_Remote_Install_Client( EXTENDD_API_URL, 'settings_page_' . $this->domain,
277
- array( 'skipplugincheck' => true, 'url' => home_url() )
278
- );
279
- add_action( 'eddri-install-complete-settings_page_' . $this->domain, array( $this, 'custom_login_extension_install_complete' ), 10, 1 );
280
- }
281
- }
282
- require_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'classes/templates.php' );
283
- require_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'classes/scripts-styles.php' );
284
- }
285
-
286
- /**
287
- * Includes required functions
288
- *
289
- */
290
- function required_functions() {
291
- require_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'functions/upgrades/upgrade-functions.php' );
292
- require_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'functions/upgrades/upgrades.php' );
293
- }
294
-
295
- /**
296
- * Helper function to require classes if they do not exist.
297
- *
298
- */
299
- function class_exists_require( $class_name, $dir_path = null ) {
300
- if ( !class_exists( $class_name ) ) {
301
- $dir_path = trailingslashit( plugin_dir_path( __FILE__ ) ) . 'classes/' . $dir_path;
302
-
303
- if ( file_exists( $dir_path ) ) {
304
- require_once( $dir_path );
305
- return true;
306
- }
307
- return false;
308
  }
309
- return false;
310
  }
311
-
312
- /**
313
- * Add shortcodes
314
- *
315
- */
316
- function add_shortcodes() {
317
- #add_shortcode( 'custom-login', array( $this, 'login_shortcode' ) );
318
- }
319
-
320
  /**
321
- * Login shortcode
322
- *
323
  */
324
- function login_shortcode( $atts ) {
325
- return '';
 
 
 
 
 
 
 
 
 
 
 
 
326
  }
327
-
328
  /**
329
- * Get the value of a settings field
330
  *
331
- * $this->get_option( 'field_name', 'section_name', 'default value' );
332
- *
333
- * @param string $option settings field name
334
- * @param string $section the section name this field belongs to
335
- * @param string $default default text if it's not found
336
- * @return mixed
337
- */
338
- public function get_option( $option, $section, $default = '' ) {
339
-
340
- $options = get_option( $section );
341
-
342
- if ( isset( $options[$option] ) ) {
343
- return $options[$option];
344
- }
345
-
346
- return $default;
347
  }
348
-
349
- /**
350
- * Registers settings section and fields
351
- */
352
- function admin_init() {
353
-
354
- $this->sections = array(
355
- array(
356
- 'id' => $this->id,
357
- 'title' => __( 'General Settings', $this->domain )
358
- ),
359
- );
360
-
361
- $fields = array(
362
- $this->id => array(
363
- array(
364
- 'name' => 'active',
365
- 'label' => __( 'Activate', $this->domain ),
366
- 'desc' => __( 'Toggle this plugin on &amp; off.', $this->domain ),
367
- 'type' => 'checkbox'
368
- ),
369
- /** BREAK **/
370
- array(
371
- 'name' => 'break_1',
372
- 'label' => __( '<h4><abbr title="Hyper Text Markup Language">HTML</abbr></h4>', $this->domain ),
373
- 'desc' => '',
374
- 'type' => 'html',
375
- ),
376
- /** BREAK **/
377
- array(
378
- 'name' => 'html_background_color',
379
- 'label' => __( 'HTML Background Color', $this->domain ),
380
- 'desc' => '',
381
- 'type' => 'colorpicker',
382
- 'default' => '',
383
- ),
384
- array(
385
- 'name' => 'html_background_url',
386
- 'label' => __( 'HTML Background Image', $this->domain ),
387
- 'desc' => __( 'Upload an image or a repeating pattern (optional).', $this->domain ),
388
- 'type' => 'file',
389
- 'default' => '',
390
- 'page_id' => '0',
391
- 'sanitize_callback' => 'esc_url',
392
- ),
393
- array(
394
- 'name' => 'html_background_position',
395
- 'label' => __( 'HTML Background Position', $this->domain ),
396
- 'desc' => sprintf( __( '<a href="%s" target="_blank">html background position</a>.', $this->domain ), 'http://www.w3schools.com/cssref/pr_background-position.asp' ),
397
- 'type' => 'select',
398
- 'options' => array(
399
- 'left top' => 'left top',
400
- 'left center' => 'left center',
401
- 'left bottom' => 'left bottom',
402
- 'right top' => 'right top',
403
- 'right center' => 'right center',
404
- 'right bottom' => 'right bottom',
405
- 'center top' => 'center top',
406
- 'center center' => 'center center',
407
- 'center bottom' => 'center bottom',
408
- ),
409
- ),
410
- array(
411
- 'name' => 'html_background_repeat',
412
- 'label' => __( 'HTML Background repeat', $this->domain ),
413
- 'desc' => '',
414
- 'type' => 'select',
415
- 'options' => array(
416
- 'no-repeat' => 'no-repeat',
417
- 'repeat' => 'repeat',
418
- 'repeat-x' => 'repeat-x',
419
- 'repeat-y' => 'repeat-y',
420
- )
421
- ),
422
- array(
423
- 'name' => 'html_background_size',
424
- 'label' => __( 'HTML Background size', $this->domain ),
425
- 'desc' => '',
426
- 'type' => 'select',
427
- 'options' => array(
428
- 'none' => 'none',
429
- 'cover' => 'cover',
430
- 'contain' => 'contain',
431
- 'flex' => 'flex',
432
- )
433
- ),
434
- /** BREAK **/
435
- array(
436
- 'name' => 'break_2',
437
- 'label' => __( '<h4>Logo</h4>', $this->domain ),
438
- 'desc' => '',
439
- 'type' => 'html',
440
- ),
441
- /** BREAK **/
442
- array(
443
- 'name' => 'hide_wp_logo',
444
- 'label' => __( 'Hide the WP logo', $this->domain ),
445
- 'desc' => __( 'Works when there is no logo present, otherwise the WP logo is replaced by your logo.', $this->domain ),
446
- 'type' => 'checkbox'
447
- ),
448
- array(
449
- 'name' => 'logo_background_url',
450
- 'label' => __( 'Logo', $this->domain ),
451
- 'desc' => __( 'Replace the WordPress logo (optional).', $this->domain ),
452
- 'type' => 'file',
453
- 'default' => '',
454
- 'page_id' => '0',
455
- 'sanitize_callback' => 'esc_url',
456
- ),
457
- array(
458
- 'name' => 'logo_background_size_width',
459
- 'label' => __( 'Logo Image width', $this->domain ),
460
- 'desc' => __( 'Enter your image size in "pixels" without the "px"', $this->domain ),
461
- 'type' => 'text',
462
- 'size' => 'small',
463
- 'default' => '',
464
- 'sanitize_callback' => 'absint',
465
- ),
466
- array(
467
- 'name' => 'logo_background_size_height',
468
- 'label' => __( 'Logo Image height', $this->domain ),
469
- 'desc' => __( 'Enter your image size in "pixels" without the "px"', $this->domain ),
470
- 'type' => 'text',
471
- 'size' => 'small',
472
- 'default' => '',
473
- 'sanitize_callback' => 'absint',
474
- ),
475
- array(
476
- 'name' => 'logo_background_position',
477
- 'label' => __( 'Logo Background Position', $this->domain ),
478
- 'desc' => sprintf( __( '<a href="%s" target="_blank">html background position</a>.', $this->domain ), 'http://www.w3schools.com/cssref/pr_background-position.asp' ),
479
- 'type' => 'select',
480
- 'options' => array(
481
- 'left top' => 'left top',
482
- 'left center' => 'left center',
483
- 'left bottom' => 'left bottom',
484
- 'right top' => 'right top',
485
- 'right center' => 'right center',
486
- 'right bottom' => 'right bottom',
487
- 'center top' => 'center top',
488
- 'center center' => 'center center',
489
- 'center bottom' => 'center bottom',
490
- ),
491
- ),
492
- array(
493
- 'name' => 'logo_background_repeat',
494
- 'label' => __( 'Logo Background repeat', $this->domain ),
495
- 'desc' => '',
496
- 'type' => 'select',
497
- 'options' => array(
498
- 'no-repeat' => 'no-repeat',
499
- 'repeat' => 'repeat',
500
- 'repeat-x' => 'repeat-x',
501
- 'repeat-y' => 'repeat-y',
502
- )
503
- ),
504
- array(
505
- 'name' => 'logo_background_size',
506
- 'label' => __( 'Logo Background size', $this->domain ),
507
- 'desc' => '',
508
- 'type' => 'select',
509
- 'options' => array(
510
- 'none' => 'none',
511
- 'cover' => 'cover',
512
- 'contain' => 'contain',
513
- 'flex' => 'flex',
514
- 'custom' => 'custom',
515
- )
516
- ),
517
- array(
518
- 'name' => 'logo_background_size_custom',
519
- 'label' => __( 'Logo Background size (custom)', $this->domain ),
520
- 'desc' => sprintf( __( 'Use size values in format "INT unit INT unit". Example: 10px 15px or 55px 55px etc. %sNote: Logo Background size MUST be set to none.%s', $this->domain ), '<strong>', '</strong>' ),
521
- 'type' => 'text',
522
- 'size' => 'medium',
523
- 'default' => '',
524
- 'sanitize_callback' => '',
525
- ),
526
- /** BREAK **/
527
- array(
528
- 'name' => 'break_3',
529
- 'label' => __( '<h4>Login form</h4>', $this->domain ),
530
- 'desc' => '',
531
- 'type' => 'html',
532
- ),
533
- /** BREAK **/
534
- array(
535
- 'name' => 'login_form_background_color',
536
- 'label' => __( 'Login Form Background Color', $this->domain ),
537
- 'desc' => '',
538
- 'type' => 'colorpicker',
539
- 'default' => ''
540
- ),
541
- array(
542
- 'name' => 'login_form_background_url',
543
- 'label' => __( 'Login Form Background URL', $this->domain ),
544
- 'desc' => __( 'Add an image to the form (optional).', $this->domain ),
545
- 'type' => 'file',
546
- 'default' => '',
547
- 'page_id' => '0',
548
- 'sanitize_callback' => 'esc_url',
549
- ),
550
- array(
551
- 'name' => 'login_form_background_position',
552
- 'label' => __( 'Login Form Background Position', $this->domain ),
553
- 'desc' => sprintf( __( '<a href="%s" target="_blank">html background position</a>.', $this->domain ), 'http://www.w3schools.com/cssref/pr_background-position.asp' ),
554
- 'type' => 'select',
555
- 'options' => array(
556
- 'left top' => 'left top',
557
- 'left center' => 'left center',
558
- 'left bottom' => 'left bottom',
559
- 'right top' => 'right top',
560
- 'right center' => 'right center',
561
- 'right bottom' => 'right bottom',
562
- 'center top' => 'center top',
563
- 'center center' => 'center center',
564
- 'center bottom' => 'center bottom',
565
- ),
566
- ),
567
- array(
568
- 'name' => 'login_form_background_repeat',
569
- 'label' => __( 'Login Form Background repeat', $this->domain ),
570
- 'desc' => '',
571
- 'type' => 'select',
572
- 'options' => array(
573
- 'no-repeat' => 'no-repeat',
574
- 'repeat' => 'repeat',
575
- 'repeat-x' => 'repeat-x',
576
- 'repeat-y' => 'repeat-y',
577
- )
578
- ),
579
- array(
580
- 'name' => 'login_form_background_size',
581
- 'label' => __( 'Login Form Background size', $this->domain ),
582
- 'desc' => '',
583
- 'type' => 'select',
584
- 'options' => array(
585
- 'none' => 'none',
586
- 'cover' => 'cover',
587
- 'contain' => 'contain',
588
- 'flex' => 'flex',
589
- )
590
- ),
591
- array(
592
- 'name' => 'login_form_border_radius',
593
- 'label' => __( 'Login Form Border Radius', $this->domain ),
594
- 'desc' => '',
595
- 'type' => 'text',
596
- 'size' => 'small',
597
- 'default' => '',
598
- 'sanitize_callback' => 'absint',
599
- ),
600
- array(
601
- 'name' => 'login_form_border_size',
602
- 'label' => __( 'Login Form Border Size', $this->domain ),
603
- 'desc' => '',
604
- 'type' => 'text',
605
- 'size' => 'small',
606
- 'default' => '',
607
- 'sanitize_callback' => 'absint',
608
- ),
609
- array(
610
- 'name' => 'login_form_border_color',
611
- 'label' => __( 'Login Form Border Color', $this->domain ),
612
- 'desc' => '',
613
- 'type' => 'colorpicker',
614
- 'default' => ''
615
- ),
616
- array(
617
- 'name' => 'login_form_box_shadow',
618
- 'label' => __( 'Login Form Box Shadow', $this->domain ),
619
- 'desc' => sprintf( __( 'Use <a href="%s" target="_blank">box shadow</a> syntax w/ out color. <code>inset h-shadow v-shadow blur spread</code>', $this->domain ), 'http://www.w3schools.com/cssref/css3_pr_box-shadow.asp' ),
620
- 'type' => 'text',
621
- 'size' => 'medium',
622
- 'default' => '5px 5px 10px'
623
- ),
624
- array(
625
- 'name' => 'login_form_box_shadow_color',
626
- 'label' => __( 'Login Form Box Shadow Color', $this->domain ),
627
- 'desc' => '',
628
- 'type' => 'colorpicker',
629
- 'default' => ''
630
- ),
631
- /** BREAK **/
632
- array(
633
- 'name' => 'break_4',
634
- 'label' => __( '<h4>Misc.</h4>', $this->domain ),
635
- 'desc' => '',
636
- 'type' => 'html',
637
- ),
638
- /** BREAK **/
639
- array(
640
- 'name' => 'label_color',
641
- 'label' => __( 'Login Form Label Color', $this->domain ),
642
- 'desc' => '',
643
- 'type' => 'colorpicker',
644
- 'default' => ''
645
- ),
646
- /** BREAK **/
647
- array(
648
- 'name' => 'break_5',
649
- 'label' => __( '<h4>Below form anchor</h4>', $this->domain ),
650
- 'desc' => '',
651
- 'type' => 'html',
652
- ),
653
- /** BREAK **/
654
- array(
655
- 'name' => 'nav_color',
656
- 'label' => __( 'Below form nav color', $this->domain ),
657
- 'desc' => '',
658
- 'type' => 'colorpicker',
659
- 'default' => '',
660
- ),
661
- array(
662
- 'name' => 'nav_text_shadow_color',
663
- 'label' => __( 'Below form nav text-shadow color', $this->domain ),
664
- 'desc' => '',
665
- 'type' => 'colorpicker',
666
- 'default' => '',
667
- ),
668
- array(
669
- 'name' => 'nav_hover_color',
670
- 'label' => __( 'Below form nav color hover', $this->domain ),
671
- 'desc' => '',
672
- 'type' => 'colorpicker',
673
- 'default' => '',
674
- ),
675
- array(
676
- 'name' => 'nav_text_shadow_hover_color',
677
- 'label' => __( 'Below form nav text-shadow hover', $this->domain ),
678
- 'desc' => '',
679
- 'type' => 'colorpicker',
680
- 'default' => '',
681
- ),
682
- /** BREAK **/
683
- array(
684
- 'name' => 'break_6',
685
- 'label' => __( '<h4>Custom HTML/CSS &amp; jQuery</h4>', $this->domain ),
686
- 'desc' => '',
687
- 'type' => 'html',
688
- ),
689
- /** BREAK **/
690
- array(
691
- 'name' => 'custom_css',
692
- 'label' => __( 'Custom CSS', $this->domain ),
693
- 'desc' => sprintf( __( 'Use the "Tab" key to format your CSS.<br><strong>New:</strong> %sAllowed variables%s. %s', $this->domain ), '<a href="#" data-toggle="custom-css-variables">', '</a>', '<div id="custom-css-variables" style="display:none"><ul>
694
- <li>%%BSLASH%% = "\" (backslash)</li>
695
- <li><a href="http://wordpress.org/support/topic/quotes-in-custom-css-gets-replaced-with-useless-quote?replies=4">Request others</a></li>
696
- </ul></div>' ),
697
- 'type' => 'textarea',
698
- 'sanitize_callback' => 'wp_filter_nohtml_kses',
699
- ),
700
- array(
701
- 'name' => 'custom_html',
702
- 'label' => __( 'Custom HTML', $this->domain ),
703
- 'desc' => '',
704
- 'type' => 'textarea',
705
- 'sanitize_callback' => 'wp_kses_post', //Allow HTML
706
- ),
707
- array(
708
- 'name' => 'custom_jquery',
709
- 'label' => __( 'Custom jQuery', $this->domain ),
710
- 'desc' => '',
711
- 'type' => 'textarea',
712
- 'sanitize_callback' => 'wp_specialchars_decode',
713
- ),
714
- ),
715
- );
716
-
717
- //set sections and fields
718
- $this->settings_api->set_sections( $this->sections );
719
- $this->settings_api->set_fields( $fields );
720
-
721
- //initialize them
722
- $this->settings_api->admin_init();
723
-
724
- add_action( $this->id . '_settings_sidebars', array( $this, 'sidebar' ), 1 );
725
- add_action( $this->id . '_settings_sidebars', array( $this, 'extensions' ), 12 );
726
-
727
- return $this;
728
- // wp_die( "Bork! <br><pre>" . print_r( $this->settings_api, true ) . "</pre>" );
729
- }
730
 
731
  /**
732
  * Register the plugin page
733
  */
734
- function admin_menu() {
735
- $this->options_page = add_options_page( __( 'Custom Login Settings', $this->domain ), __( 'Custom Login', $this->domain ), 'manage_options', $this->domain, array( $this, 'plugin_page' ) );
736
 
737
- add_action( 'admin_footer-' . $this->options_page, array( $this->settings_api, 'inline_jquery' ) );
738
- }
739
-
740
- /**
741
- * Delete the transient
742
- *
743
- */
744
- function delete_transient_button_output() {
745
- $button = '<div style="padding-left: 10px">';
746
- $button .= wpautop( $this->delete_transient_button_link() );
747
- $button .= '<span class="description">' . __( 'If your stylesheet isn\'t updating click update above to delete the transient cache.', $this->domain ) . '</span>';
748
- $button .= '</div>';
749
 
750
- echo $button;
 
 
 
 
 
 
751
  }
752
-
753
  /**
754
- * Delete button link output
755
- *
756
- * @return string
757
  */
758
- function delete_transient_button_link( $class = 'button' ) {
759
- return sprintf( '<a href="%s" title="%s" class="%s">%s</a>',
760
- esc_url( wp_nonce_url( add_query_arg( array( 'action' => $this->id . '-delete_transient' ), admin_url() ), $this->id . '-delete_transient' ) ),
761
- esc_attr__( 'Clear the transient cache', $this->domain ),
762
- sanitize_html_class( $class ),
763
- __( 'Clear stylesheet cache', $this->domain )
764
- );
765
  }
766
-
767
  /**
768
- * Check for post activation on edit.php, when proper action
769
- * is called set the post ID and write the content (CSS) to file.
770
- *
771
- * @return array()
772
  */
773
- function delete_custom_login_transient_cache() {
774
-
775
- if ( !( isset( $_GET[$this->id . '-delete_transient'] ) || ( isset( $_REQUEST['action'] ) && $this->id . '-delete_transient' == $_REQUEST['action'] ) ) )
776
- return;
777
-
778
- check_admin_referer( $this->id . '-delete_transient' );
779
-
780
- delete_transient( $this->id . '_style' );
781
- delete_transient( $this->id . '_script' );
782
-
783
- /* Redirect */
784
- wp_redirect( admin_url( sprintf( 'options-general.php?page=%s&settings-updated=true&message=1', $this->domain ) ) );
785
- exit;
 
 
 
 
 
786
  }
787
 
788
  /**
789
- * Show a message when prompted
 
790
  *
791
- * @return string|void
792
  */
793
- function admin_messages() {
794
- global $pagenow;
795
-
796
- if ( ( isset( $_GET['page'] ) && isset( $_GET['message'] ) ) && $pagenow == 'options-general.php' && $this->domain == $_GET['page'] ) {
797
-
798
- $html = '<div id="setting-error-transitent_deleted" class="updated"><p>';
799
-
800
- switch ( $_GET['message'] ) {
801
- case 1 :
802
- $html .= __( 'The cache has been deleted.', $this->domain );
803
- break;
804
-
805
- case 2 :
806
- $html .= '';
807
- break;
808
- }
809
-
810
- $html .= '</p></div>';
811
-
812
- echo $html;
813
- }
814
  }
815
 
816
  /**
817
- * Plugin Action
818
- */
819
- function plugin_action_links( $links, $file ) {
820
- if ( plugin_basename( __FILE__ ) === $file ) {
821
- $settings_link = '<a href="' . admin_url( 'options-general.php?page=custom-login' ) . '">' . __( 'Settings', $this->domain ) . '</a>';
822
- array_unshift( $links, $settings_link ); // before other links
823
- }
824
- return $links;
825
- }
826
-
827
- /**
828
- * Display the plugin settings options page
829
  */
830
- function plugin_page() {
831
- echo '<div class="wrap">';
832
-
833
- $this->settings_api->show_navigation();
834
- $this->settings_api->show_forms();
835
-
836
- echo '</div>';
837
 
838
- if ( defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV && WP_DEBUG ) {
839
- /**
840
- foreach( apply_filters( $this->id . '_add_settings_sections', $this->sections ) as $section )
841
- echo '<pre data-id="'.$section['id'].'">' . print_r( get_option( $section['id'] ), true ) . '</pre>';
842
- echo '<pre data-id="custom_login_settings">' . print_r( get_option( 'custom_login_settings' ), true ) . '</pre>';
843
-
844
- echo '<pre data-id="' . $this->id . '_ignore_announcement">' . print_r( get_user_meta( get_current_user_id(), $this->id . '_ignore_announcement', true ), true ) . '</pre>';
845
- echo '<pre data-id="' . $this->id . '_announcement_message">' . print_r( get_option( $this->id . '_announcement_message' ), true ) . '</pre>';
846
- // */
847
- }
848
 
849
- }
850
-
851
- /**
852
- * Sidebar info about this plugin
853
- *
854
- * @since 2.0
855
- * @return string
856
- */
857
- function sidebar( $args ) {
858
- $content = '<ul class="social">';
859
- $content .= '<li><span class="genericon genericon-user"></span>&nbsp;<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X4JPT57AWMTYW">' . __( 'Support this plugin and buy me a beer', $this->domain ) . '</a></li>';
860
- $content .= '<li><span class="genericon genericon-star"></span>&nbsp;<a href="https://wordpress.org/extend/plugins/custom-login/">' . __( 'Rate this plugin on WordPress.org', $this->domain ) . '</a></li>';
861
- $content .= '<li><span class="genericon genericon-share"></span>&nbsp;<a href="http://www.flickr.com/groups/custom-login/">' . __( 'Share your designs on <strong style="color:#0066DC;">Flick</strong><strong style="color:#ff0084;">r</strong>', $this->domain ) . '</a></li>';
862
- $content .= '<li><span class="genericon genericon-wordpress"></span>&nbsp;<a href="https://wordpress.org/support/plugin/custom-login">' . __( 'Get support on WordPress.org', $this->domain ) . '</a></li>';
863
- $content .= '<li><span class="genericon genericon-github"></span>&nbsp;<a href="https://github.com/thefrosty/custom-login">' . __( 'Contribute development on GitHub', $this->domain ) . '</a></li>';
864
- $content .= '<li><span class="genericon genericon-link"></span>&nbsp;<a href="https://extendd.com/plugins/tag/custom-login-extension/">' . __( 'Get Custom Login Extensions', $this->domain ) . '</a></li>';
865
 
866
- if ( defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV ) {
867
- $content .= '<li><span class="genericon genericon-warning"></span>&nbsp;' . $this->get_queries( true ) . '</li>';
 
 
 
 
 
 
 
 
 
 
868
  }
869
 
870
- $content .= '<li><span class="genericon genericon-warning"></span>&nbsp;' . $this->delete_transient_button_link( '' ) . '</li>';
871
-
872
- $content .= '</ul>';
873
- $this->settings_api->postbox( $this->id . '_sidebar', sprintf( __( '<a href="%s">%s</a> | <code>version %s</code>', $this->domain ), 'https://extendd.com/plugin/custom-login', ucwords( str_replace( '-', ' ', $this->domain ) ), $this->version ), $content, false );
874
- }
875
-
876
- /**
877
- * Sidebar info to remote install extensions
878
- *
879
- * @since 2.2
880
- * @return string
881
- */
882
- function extensions( $args ) {
883
- $content = wpautop( __( '<a href="#" data-toggle="extendd-license">Please read!</a> | <a href="#" data-toggle="extendd-license-help">Help</a>', $this->domain ) );
884
 
885
- $content .= wpautop( sprintf( __( '<span id="extendd-license" style="display:none">Most of these extensions require a license key which can be purchased on <a href="%1$s" target="_blank">%2$s</a>. You\'ll have to have the key ready to install the extension.</span>', $this->domain ), 'https://extendd.com/plugins/tag/custom-login-extension/', 'Extendd.com' ) );
 
 
 
 
 
886
 
887
- $content .= wpautop( __( '<span id="extendd-license-help" style="display:none">Click "install" to auto-install the extension on your site (which will also auto-activate it).<br>Free extensions will auto-install, while paid extensions will need a valid license key. Prices subject to change. Clicking "Purchase License" will show a quick link to purchase the extension (license) directly through PayPal. Choose which license you\'d like and you\'ll receive an email with your license key.</span>', $this->domain ) );
888
-
889
- $transient = $this->id . '_extensions';
890
- $old_html = get_option( $transient . '_message' );
891
 
892
- $extensions = $this->settings_api->wp_remote_get_set_transient( 'https://raw.github.com/thefrosty/custom-login/master/extensions.json', $transient, 'html' );
893
- if ( false === $extensions ) {
894
- // FIND THIS CODE in wp.dev (mu-plugins)
895
- $content .= '<div class="eddri-addon"> <div class="eddri-addon-container"> <div class="eddri-img-wrap"> <a href="http://extendd.com/plugin/custom-login-stealth-login/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=eddri" target="_blank"><img class="eddri-thumbnail" src="https://i.imgur.com/mhuymPG.jpg"></a> <p>Protect your wp-login.php page from brute force attacks.</p> </div> <h3>Stealth Login</h3> <span class="eddri-status">Not Installed</span> <a class="button" data-edd-install="Custom Login Stealth Login">Install</a> <a class="button show-if-not-purchased" data-toggle="purchase-links-1" style="display:none">Purchase License</a> <div id="purchase-links-1" style="display:none"> <ul> <li><a href="http://extendd.com/checkout?edd_action=straight_to_gateway&download_id=7819&edd_options[price_id]=0">Single site license ($25)</a></li> <li><a href="http://extendd.com/checkout?edd_action=straight_to_gateway&download_id=7819&edd_options[price_id]=1">Up to 5 site licenses ($70)</a></li> <li><a href="http://extendd.com/checkout?edd_action=straight_to_gateway&download_id=7819&edd_options[price_id]=2">Unlimited site licenses ($100)</a></li> </ul> </div> </div> </div><div class="eddri-addon"> <div class="eddri-addon-container"> <div class="eddri-img-wrap"> <a href="http://extendd.com/plugin/custom-login-page-template/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=eddri" target="_blank"><img class="eddri-thumbnail" src="https://i.imgur.com/A0rzS9q.jpg"></a> <p>Add a login form to any WordPress page.</p> </div> <h3>Page Template</h3> <span class="eddri-status">Not Installed</span> <a class="button" data-edd-install="Custom Login Page Template">Install</a> <a class="button show-if-not-purchased" data-toggle="purchase-links-2" style="display:none">Purchase License</a> <div id="purchase-links-2" style="display:none"> <ul> <li><a href="http://extendd.com/checkout?edd_action=straight_to_gateway&download_id=13528">One price! ($35)</a></li> </ul> </div> </div> </div><div class="eddri-addon"> <div class="eddri-addon-container"> <div class="eddri-img-wrap"> <a href="http://extendd.com/plugin/wordpress-login-redirects/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=eddri" target="_blank"><img class="eddri-thumbnail" src="https://i.imgur.com/aNGoyAa.jpg"></a> <p>Manage redirects after logging in.</p> </div> <h3>Login Redirects</h3> <span class="eddri-status">Not Installed</span> <a class="button" data-edd-install="WordPress Login Redirects">Install</a> <a class="button show-if-not-purchased" data-toggle="purchase-links-3" style="display:none">Purchase License</a> <div id="purchase-links-3" style="display:none"> <ul> <li><a href="http://extendd.com/checkout?edd_action=straight_to_gateway&download_id=14333&edd_options[price_id]=0">Single site license ($30)</a></li> <li><a href="http://extendd.com/checkout?edd_action=straight_to_gateway&download_id=14333&edd_options[price_id]=1">Up to 5 site licenses ($70)</a></li> <li><a href="http://extendd.com/checkout?edd_action=straight_to_gateway&download_id=14333&edd_options[price_id]=2">Unlimited site licenses ($150)</a></li> </ul> </div> </div> </div>';
896
- }
897
- else {
898
- $content .= $extensions->html;
899
 
900
- if ( trim( $old_html ) !== trim( $extensions->html ) && !empty( $old_html ) ) {
901
- delete_transient( $transient );
902
- delete_option( $transient . '_message' );
903
- }
904
  }
905
 
906
- $this->settings_api->postbox( $this->id . '_extensions', __( 'Custom Login Extensions', $this->domain ), $content, false );
907
- }
908
-
909
- /**
910
- * Is plugin active
911
- *
912
- */
913
- function is_active() {
914
- $active = $this->get_option( 'active', $this->id );
915
- if ( isset( $active ) && 'on' === $active )
916
- return true;
917
-
918
- return false;
919
- }
920
-
921
- /**
922
- * Replace the default link to your URL
923
- *
924
- */
925
- function login_url() {
926
- if ( !is_multisite() ) return home_url( '/' );
927
- else return network_home_url( '/' );
928
- }
929
-
930
- /**
931
- * Replace the default title to your description
932
- *
933
- */
934
- function login_title() {
935
- return get_bloginfo( 'description' );
936
  }
937
 
938
  /**
939
- * If there is custom HTML set in the settings echo it to the
940
- * `login_footer` hook in wp-login.php.
941
  *
 
942
  */
943
- function login_footer_html() {
944
- $custom_html = $this->get_option( 'custom_html', $this->id );
945
- $html = '';
946
 
947
- if ( !empty( $custom_html ) )
948
- $html .= $custom_html;
949
 
950
- $html .= defined( 'WP_DEBUG' ) && WP_DEBUG ? $this->get_queries() : '';
951
- $html .= "\n";
952
-
953
- echo $html;
954
- }
955
-
956
- /**
957
- * Helper function to get total numer of queries and execution time
958
- *
959
- */
960
- function get_queries( $display = false ) {
961
- return sprintf( ( $display ? '' : '<div style="display:none">' ) . esc_attr__( '%s queries in %s seconds.', $this->domain ) . ( $display ? '' : '</div>' ), get_num_queries(), timer_stop() );
962
- }
963
-
964
- /**
965
- * Activate the license key for the Extendd Settings API.
966
- *
967
- * Extendd settings format: 'extendd_' . 'plugin_folder_name'
968
- */
969
- function custom_login_extension_install_complete( $args ) {
970
- $plugin = 'extendd_' . str_replace( '-', '_', $args['slug'] );
971
- $option = get_option( $plugin, array() );
972
 
973
- if ( empty( $option ) || empty( $option['license_key'] ) ) {
974
- $option['license_key'] = $args['license'];
975
- $option['license_active'] = $args['license_active'];
976
- // Update the settings
977
- update_option( $plugin, $option );
978
- }
979
  }
980
-
981
  }
982
- endif;
 
983
 
984
  /**
985
  * The main function responsible for returning the one true
1
  <?php
 
2
  /**
3
  * Plugin Name: Custom Login
4
+ * Plugin URI: https://frosty.media/plugins/custom-login
5
+ * Description: A simple way to customize your WordPress <code>wp-login.php</code> screen! A <a href="https://frosty.media/">Frosty Media</a> plugin.
6
+ * Version: 3.0.8.1
7
  * Author: Austin Passy
8
+ * Author URI: https://austin.passy.co
9
  * Text Domain: custom-login
10
+ * GitHub Plugin URI: https://github.com/thefrosty/custom-login
11
+ * GitHub Branch: master
12
  *
13
+ * @copyright 2012 - 2015
14
  * @author Austin Passy
15
  * @link http://austin.passy.co/
16
  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21
  *
22
+ * @class Custom_Login
23
  */
24
+
25
  if ( !class_exists( 'Custom_Login' ) ) :
26
+
27
+ /**
28
+ * Main Custom_Login Class
29
+ *
30
+ * @since 1.0
31
+ */
32
+ final class Custom_Login {
33
+
34
  /** Singleton *************************************************************/
35
  private static $instance;
36
+
37
  /**
38
  * Plugin vars
39
  * @return string
40
  */
41
+ var $version = '3.0.8.1',
42
+ $menu_page,
43
+ $prefix;
44
 
45
  /**
46
  * Private settings
47
  */
48
+ public $settings_api;
 
 
 
 
 
 
 
49
 
50
  /**
51
  * Main Instance
54
  * @return The one true instance
55
  */
56
  public static function instance() {
57
+ if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Custom_Login ) ) {
58
+ self::$instance = new Custom_Login;
59
  self::$instance->setup_constants();
60
+
61
+ add_action( 'plugins_loaded', array( self::$instance, 'plugin_textdomain' ) );
62
+
63
+ self::$instance->includes();
64
+ self::$instance->actions();
65
  }
66
  return self::$instance;
67
  }
68
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  /**
70
  * Setup plugin constants
71
  *
 
72
  * @access private
73
+ * @since 3.0
74
+ * @return void
75
  */
76
+ private function setup_constants() {
77
 
78
+ // API URL
79
+ if ( ! defined( 'CUSTOM_LOGIN_API_URL' ) ) {
80
+ define( 'CUSTOM_LOGIN_API_URL', 'https://frosty.media/' );
81
+ }
82
+
83
  // Plugin version
84
+ if ( ! defined( 'CUSTOM_LOGIN_VERSION' ) ) {
85
  define( 'CUSTOM_LOGIN_VERSION', $this->version );
86
+ }
 
 
 
87
 
88
+ // Plugin Root File
89
+ if ( ! defined( 'CUSTOM_LOGIN_FILE' ) ) {
90
+ define( 'CUSTOM_LOGIN_FILE', __FILE__ );
91
+ }
92
 
93
  // Plugin Folder Path
94
+ if ( ! defined( 'CUSTOM_LOGIN_DIR' ) ) {
95
+ define( 'CUSTOM_LOGIN_DIR', plugin_dir_path( CUSTOM_LOGIN_FILE ) );
96
+ }
97
 
98
+ // Plugin Folder URL
99
+ if ( ! defined( 'CUSTOM_LOGIN_URL' ) ) {
100
+ define( 'CUSTOM_LOGIN_URL', plugin_dir_url( CUSTOM_LOGIN_FILE ) );
101
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
+ // Plugin Root Basename
104
+ if ( ! defined( 'CUSTOM_LOGIN_BASENAME' ) ) {
105
+ define( 'CUSTOM_LOGIN_BASENAME', plugin_basename( CUSTOM_LOGIN_FILE ) );
106
+ }
107
+
108
+ // Plugin Dirname
109
+ if ( ! defined( 'CUSTOM_LOGIN_DIRNAME' ) ) {
110
+ define( 'CUSTOM_LOGIN_DIRNAME', dirname( CUSTOM_LOGIN_BASENAME ) );
111
+ }
 
 
112
 
113
+ // Plugin Settings Name
114
+ if ( ! defined( 'CUSTOM_LOGIN_OPTION' ) ) {
115
+ define( 'CUSTOM_LOGIN_OPTION', str_replace( '-', '_', CUSTOM_LOGIN_DIRNAME ) );
 
116
  }
117
  }
118
+
119
  /**
120
+ * Load the plugin translations
121
  *
 
 
122
  */
123
+ public function plugin_textdomain() {
124
+ load_plugin_textdomain( CUSTOM_LOGIN_DIRNAME, false, CUSTOM_LOGIN_DIRNAME . '/languages/' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
126
+
127
  /**
128
  * Includes required functions
129
  *
130
  */
131
+ private function includes() {
132
+
133
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/class-cl-common.php' );
134
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/class-cl-cron.php' );
135
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/class-cl-extensions.php' );
136
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/class-cl-templates.php' );
137
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/class-cl-scripts-styles.php' );
138
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/class-cl-settings-api.php' );
139
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/class-cl-settings-upgrades.php' );
140
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/class-cl-wp-login.php' );
141
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/functions.php' );
142
 
143
  if ( is_admin() ) {
144
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/admin/plugins.php' );
145
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/admin/import-export.php' );
146
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/admin/tracking.php' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  }
 
148
  }
149
+
 
 
 
 
 
 
 
 
150
  /**
151
+ * To infinity and beyond
 
152
  */
153
+ private function actions() {
154
+
155
+ $this->prefix = CUSTOM_LOGIN_OPTION;
156
+
157
+ add_action( 'login_head', array( $this, 'cl_version_in_header' ), 1 );
158
+ add_action( 'wp_head', array( $this, 'cl_version_in_header' ) );
159
+ add_action( 'admin_menu', array( $this, 'admin_menu' ), 9 );
160
+ add_action( 'admin_init', array( $this, 'load_settings' ), 8 );
161
+ add_action( $this->prefix . '_after_sanatize_options', array( $this, 'delete_transients' ), 8 );
162
+
163
+ add_action( 'admin_notices', array( $this, 'show_notifications' ) );
164
+ add_action( 'admin_init', array( $this, 'notification_ignore' ) );
165
+
166
+ do_action( $this->prefix . '_actions' );
167
  }
168
+
169
  /**
170
+ * Adds CL Version to the <head> tag
171
  *
172
+ * @since 3.0.0
173
+ * @return void
174
+ */
175
+ function cl_version_in_header(){
176
+ echo '<meta name="generator" content="Custom Login v' . CUSTOM_LOGIN_VERSION . '" />' . "\n";
 
 
 
 
 
 
 
 
 
 
 
177
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
 
179
  /**
180
  * Register the plugin page
181
  */
182
+ public function admin_menu() {
 
183
 
184
+ $capability = CL_Common::get_option( 'capability', 'general', 'manage_options' );
 
 
 
 
 
 
 
 
 
 
 
185
 
186
+ $this->menu_page = add_options_page(
187
+ __( 'Custom Login Settings', CUSTOM_LOGIN_DIRNAME ),
188
+ __( 'Custom Login', CUSTOM_LOGIN_DIRNAME ),
189
+ $capability,
190
+ CUSTOM_LOGIN_DIRNAME,
191
+ array( $this, 'settings_page' )
192
+ );
193
  }
194
+
195
  /**
196
+ * Display the plugin settings options page
 
 
197
  */
198
+ public function settings_page() { ?>
199
+
200
+ <div class="wrap">
201
+ <?php $this->settings_api->settings_html(); ?>
202
+ </div><?php
 
 
203
  }
204
+
205
  /**
206
+ * Display the plugin settings options page
 
 
 
207
  */
208
+ public function load_settings() {
209
+
210
+ include_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/default-settings.php' );
211
+ $this->settings_api = new CL_Settings_API(
212
+ $sections,
213
+ $fields,
214
+ array(
215
+ 'option_name' => CUSTOM_LOGIN_OPTION,
216
+ 'option_group' => CUSTOM_LOGIN_OPTION . '_group',
217
+ 'domain' => CUSTOM_LOGIN_DIRNAME,
218
+ 'prefix' => $this->prefix,
219
+ 'version' => $this->version,
220
+ 'menu_page' => $this->menu_page,
221
+ 'nonce' => CUSTOM_LOGIN_OPTION . '_nonce_' . CUSTOM_LOGIN_BASENAME,
222
+ 'file' => CUSTOM_LOGIN_FILE,
223
+ )
224
+ );
225
+ $this->settings_api->admin_init();
226
  }
227
 
228
  /**
229
+ * Hook into the 'sanatize_options' hook in the Settings API
230
+ * and remove the transient settings for the style and script.
231
  *
232
+ * @since 3.0.0
233
  */
234
+ public function delete_transients() {
235
+ delete_transient( CL_Common::get_transient_key( 'style' ) );
236
+ delete_transient( CL_Common::get_transient_key( 'script' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  }
238
 
239
  /**
240
+ * Show global notifications if they are allowed.
241
+ *
 
 
 
 
 
 
 
 
 
 
242
  */
243
+ function show_notifications() {
 
 
 
 
 
 
244
 
245
+ $screen = get_current_screen();
246
+ $is_cl_screen = isset( $screen->id ) ? $screen->id === 'settings_page_' . CUSTOM_LOGIN_DIRNAME : false;
247
+ $transient_key = CL_Common::get_transient_key( 'announcement' );
248
+ $ignore_key = CUSTOM_LOGIN_OPTION . '_ignore_announcement';
249
+ $old_message = get_option( CUSTOM_LOGIN_OPTION . '_announcement_message' );
250
+ $user_meta = get_user_meta( get_current_user_id(), $ignore_key, true );
251
+ $capability = CL_Common::get_option( 'capability', 'general', 'manage_options' );
 
 
 
252
 
253
+ /**
254
+ delete_user_meta( get_current_user_id(), $ignore_key, 1 );
255
+ delete_transient( $transient_key );
256
+ update_option( CUSTOM_LOGIN_OPTION . '_announcement_message', '' ); //*/
 
 
 
 
 
 
 
 
 
 
 
 
257
 
258
+ // Current user can't manage options
259
+ if ( !current_user_can( $capability ) ) return;
260
+
261
+ if ( !$is_cl_screen ) {
262
+
263
+ // Global notifications
264
+ if ( 'off' === CL_Common::get_option( 'admin_notices', 'general', 'on' ) )
265
+ return;
266
+
267
+ // Make sure 'Frosty_Media_Notifications' isn't activated
268
+ if ( class_exists( 'Frosty_Media_Notifications' ) )
269
+ return;
270
  }
271
 
272
+ // https://raw.github.com/thefrosty/custom-login/master/extensions.json
273
+ $message_url = add_query_arg( array( 'edd_action' => 'cl_announcements' ), trailingslashit( CUSTOM_LOGIN_API_URL ) . 'cl-checkin-api/' );
 
 
 
 
 
 
 
 
 
 
 
 
274
 
275
+ $announcement = CL_Common::wp_remote_get(
276
+ $message_url,
277
+ $transient_key,
278
+ DAY_IN_SECONDS,
279
+ 'CustomLogin' // We need our custom $user_agent
280
+ );
281
 
282
+ // Bail if errors
283
+ if ( is_wp_error( $announcement ) )
284
+ return;
 
285
 
286
+ // Bail if false or empty
287
+ if ( !$announcement || empty( $announcement ) )
288
+ return;
 
 
 
 
289
 
290
+ if ( trim( $old_message ) !== trim( $announcement->message ) && !empty( $old_message ) ) {
291
+ delete_user_meta( get_current_user_id(), $ignore_key, 1 );
292
+ delete_transient( $transient_key );
293
+ update_option( CUSTOM_LOGIN_OPTION . '_announcement_message', $announcement->message );
294
  }
295
 
296
+ $html = '<div class="updated"><p>';
297
+ $html .= !$is_cl_screen ? // If we're on our settings page let not show the dismiss notice link.
298
+ sprintf( '%2$s <span class="alignright">| <a href="%3$s">%1$s</a></span>',
299
+ __( 'Dismiss', CUSTOM_LOGIN_DIRNAME ),
300
+ $announcement->message,
301
+ esc_url( add_query_arg( $ignore_key, wp_create_nonce( $ignore_key ), admin_url( 'options-general.php?page=custom-login' ) ) ),
302
+ esc_url( admin_url( 'options-general.php?page=custom-login#custom_login_general' ) )
303
+ ) :
304
+ sprintf( '%s', $announcement->message );
305
+ $html .= '</p></div>';
306
+
307
+ if ( ( !$user_meta && 1 !== $user_meta ) || $is_cl_screen )
308
+ echo $html;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  }
310
 
311
  /**
312
+ * Remove the admin notification.
 
313
  *
314
+ * @return void
315
  */
316
+ function notification_ignore() {
 
 
317
 
318
+ $ignore_key = CUSTOM_LOGIN_OPTION . '_ignore_announcement';
 
319
 
320
+ // Bail if not set
321
+ if ( !isset( $_GET[$ignore_key] ) )
322
+ return;
323
+
324
+ // Check nonce
325
+ check_admin_referer( $ignore_key, $ignore_key );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
 
327
+ // If user clicks to ignore the notice, add that to their user meta
328
+ add_user_meta( get_current_user_id(), $ignore_key, 1, true );
 
 
 
 
329
  }
330
+
331
  }
332
+
333
+ endif; // End if class_exists check
334
 
335
  /**
336
  * The main function responsible for returning the one true
extensions.json CHANGED
@@ -1 +1 @@
1
- {"version":"2.3.9 10\/27\/14","message":"Download the <a href=\"https:\/\/extendd.com\/plugin\/custom-login-bundle\/\" target=\"_blank\">Custom Login Bundle<\/a> and save over $200!","html":"<div class=\"eddri-addon\"> <div class=\"eddri-addon-container\"> <div class=\"eddri-img-wrap\"> <a href=\"http:\/\/extendd.com\/plugin\/custom-login-stealth-login\/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=eddri\" target=\"_blank\"><img class=\"eddri-thumbnail\" src=\"https:\/\/i.imgur.com\/mhuymPG.jpg\"><\/a> <p>Protect your wp-login.php page from brute force attacks.<\/p> <\/div> <h3>Stealth Login<\/h3> <span class=\"eddri-status\">Not Installed<\/span> <a class=\"button\" data-edd-install=\"Custom Login Stealth Login\">Install<\/a> <a class=\"button show-if-not-purchased\" data-toggle=\"purchase-links-1\" style=\"display:none\">Purchase License<\/a> <div id=\"purchase-links-1\" style=\"display:none\"> <ul> <li><a href=\"http:\/\/extendd.com\/checkout?edd_action=straight_to_gateway&download_id=7819&edd_options[price_id]=0\">Single site license ($25)<\/a><\/li> <li><a href=\"http:\/\/extendd.com\/checkout?edd_action=straight_to_gateway&download_id=7819&edd_options[price_id]=1\">Up to 5 site licenses ($70)<\/a><\/li> <li><a href=\"http:\/\/extendd.com\/checkout?edd_action=straight_to_gateway&download_id=7819&edd_options[price_id]=2\">Unlimited site licenses ($100)<\/a><\/li> <\/ul> <\/div> <\/div> <\/div><div class=\"eddri-addon\"> <div class=\"eddri-addon-container\"> <div class=\"eddri-img-wrap\"> <a href=\"http:\/\/extendd.com\/plugin\/custom-login-page-template\/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=eddri\" target=\"_blank\"><img class=\"eddri-thumbnail\" src=\"https:\/\/i.imgur.com\/A0rzS9q.jpg\"><\/a> <p>Add a login form to any WordPress page.<\/p> <\/div> <h3>Page Template<\/h3> <span class=\"eddri-status\">Not Installed<\/span> <a class=\"button\" data-edd-install=\"Custom Login Page Template\">Install<\/a> <a class=\"button show-if-not-purchased\" data-toggle=\"purchase-links-2\" style=\"display:none\">Purchase License<\/a> <div id=\"purchase-links-2\" style=\"display:none\"> <ul> <li><a href=\"http:\/\/extendd.com\/checkout?edd_action=straight_to_gateway&download_id=13528\">One price! ($35)<\/a><\/li> <\/ul> <\/div> <\/div> <\/div><div class=\"eddri-addon\"> <div class=\"eddri-addon-container\"> <div class=\"eddri-img-wrap\"> <a href=\"http:\/\/extendd.com\/plugin\/wordpress-login-redirects\/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=eddri\" target=\"_blank\"><img class=\"eddri-thumbnail\" src=\"https:\/\/i.imgur.com\/aNGoyAa.jpg\"><\/a> <p>Manage redirects after logging in.<\/p> <\/div> <h3>Login Redirects<\/h3> <span class=\"eddri-status\">Not Installed<\/span> <a class=\"button\" data-edd-install=\"WordPress Login Redirects\">Install<\/a> <a class=\"button show-if-not-purchased\" data-toggle=\"purchase-links-3\" style=\"display:none\">Purchase License<\/a> <div id=\"purchase-links-3\" style=\"display:none\"> <ul> <li><a href=\"http:\/\/extendd.com\/checkout?edd_action=straight_to_gateway&download_id=14333&edd_options[price_id]=0\">Single site license ($30)<\/a><\/li> <li><a href=\"http:\/\/extendd.com\/checkout?edd_action=straight_to_gateway&download_id=14333&edd_options[price_id]=1\">Up to 5 site licenses ($70)<\/a><\/li> <li><a href=\"http:\/\/extendd.com\/checkout?edd_action=straight_to_gateway&download_id=14333&edd_options[price_id]=2\">Unlimited site licenses ($150)<\/a><\/li> <\/ul> <\/div> <\/div> <\/div>"}
1
+ {"version":"3.0.0 01\/12\/15","message":"Download the <a href=\"https:\/\/frosty.media\/plugins\/custom-login-bundle\/\" target=\"_blank\">Custom Login Bundle<\/a> and save over $200!","html":"<div class=\"eddri-addon\"> <div class=\"eddri-addon-container\"> <div class=\"eddri-img-wrap\"> <a href=\"https:\/\/frosty.media\/plugins\/custom-login-stealth-login\/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=eddri\" target=\"_blank\"><img class=\"eddri-thumbnail\" src=\"https:\/\/i.imgur.com\/mhuymPG.jpg\"><\/a> <p>Protect your wp-login.php page from brute force attacks.<\/p> <\/div> <h3>Stealth Login<\/h3> <span class=\"eddri-status\">Not Installed<\/span> <a class=\"button\" data-edd-install=\"Custom Login Stealth Login\">Install<\/a> <a class=\"button show-if-not-purchased\" data-toggle=\"purchase-links-1\" style=\"display:none\">Purchase License<\/a> <div id=\"purchase-links-1\" style=\"display:none\"> <ul> <li><a href=\"http:\/\/frosty.media\/checkout?edd_action=straight_to_gateway&download_id=7819&edd_options[price_id]=0\">Single site license ($25)<\/a><\/li> <li><a href=\"http:\/\/frosty.media\/checkout?edd_action=straight_to_gateway&download_id=7819&edd_options[price_id]=1\">Up to 5 site licenses ($70)<\/a><\/li> <li><a href=\"http:\/\/frosty.media\/checkout?edd_action=straight_to_gateway&download_id=7819&edd_options[price_id]=2\">Unlimited site licenses ($100)<\/a><\/li> <\/ul> <\/div> <\/div> <\/div><div class=\"eddri-addon\"> <div class=\"eddri-addon-container\"> <div class=\"eddri-img-wrap\"> <a href=\"https:\/\/frosty.media\/plugins\/custom-login-page-template\/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=eddri\" target=\"_blank\"><img class=\"eddri-thumbnail\" src=\"https:\/\/i.imgur.com\/A0rzS9q.jpg\"><\/a> <p>Add a login form to any WordPress page.<\/p> <\/div> <h3>Page Template<\/h3> <span class=\"eddri-status\">Not Installed<\/span> <a class=\"button\" data-edd-install=\"Custom Login Page Template\">Install<\/a> <a class=\"button show-if-not-purchased\" data-toggle=\"purchase-links-2\" style=\"display:none\">Purchase License<\/a> <div id=\"purchase-links-2\" style=\"display:none\"> <ul> <li><a href=\"http:\/\/frosty.media\/checkout?edd_action=straight_to_gateway&download_id=13528\">One price! ($35)<\/a><\/li> <\/ul> <\/div> <\/div> <\/div><div class=\"eddri-addon\"> <div class=\"eddri-addon-container\"> <div class=\"eddri-img-wrap\"> <a href=\"https:\/\/frosty.media\/plugins\/wordpress-login-redirects\/?utm_source=wordpressorg&utm_medium=custom-login&utm_campaign=eddri\" target=\"_blank\"><img class=\"eddri-thumbnail\" src=\"https:\/\/i.imgur.com\/aNGoyAa.jpg\"><\/a> <p>Manage redirects after logging in.<\/p> <\/div> <h3>Login Redirects<\/h3> <span class=\"eddri-status\">Not Installed<\/span> <a class=\"button\" data-edd-install=\"WordPress Login Redirects\">Install<\/a> <a class=\"button show-if-not-purchased\" data-toggle=\"purchase-links-3\" style=\"display:none\">Purchase License<\/a> <div id=\"purchase-links-3\" style=\"display:none\"> <ul> <li><a href=\"http:\/\/frosty.media\/checkout?edd_action=straight_to_gateway&download_id=14333&edd_options[price_id]=0\">Single site license ($30)<\/a><\/li> <li><a href=\"http:\/\/frosty.media\/checkout?edd_action=straight_to_gateway&download_id=14333&edd_options[price_id]=1\">Up to 5 site licenses ($70)<\/a><\/li> <li><a href=\"http:\/\/frosty.media\/checkout?edd_action=straight_to_gateway&download_id=14333&edd_options[price_id]=2\">Unlimited site licenses ($150)<\/a><\/li> <\/ul> <\/div> <\/div> <\/div>"}
functions/install.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
- /**
3
- * Install Function
4
- *
5
- * @package Custom Login
6
- * @subpackage Install Function
7
- * @copyright Copyright (c) 2013, Austin Passy
8
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
- * @since 2.0
10
- */
11
-
12
- // Exit if accessed directly
13
- if ( ! defined( 'ABSPATH' ) ) exit;
14
-
15
- /**
16
- * Install
17
- *
18
- * Runs on plugin install.
19
- *
20
- * @access private
21
- * @since 1.0
22
- * @return void
23
- */
24
- function ap_custom_login_install() {
25
-
26
- // Setup the Custom Post Type
27
- ap_custom_login_post_types();
28
-
29
- // Clear the permalinks
30
- flush_rewrite_rules();
31
-
32
- $cl_settings_page = get_page_by_title( __( 'Custom Login Settings', 'custom-login' ), '', 'custom_login' );
33
-
34
- // Checks if the purchase page option exists
35
- if ( empty( $cl_settings_page ) ) {
36
-
37
- // Settings Page
38
- $settings = wp_insert_post(
39
- array(
40
- 'post_title' => __( 'Custom Login Settings', 'custom-login' ),
41
- 'post_content' => '',
42
- 'post_status' => 'publish',
43
- 'post_author' => 1,
44
- 'post_type' => 'custom_login',
45
- 'comment_status' => 'closed',
46
- 'ping_status' => 'closed',
47
- )
48
- );
49
-
50
- // update_option( 'custom_login_version', CUSTOM_LOGIN_VERSION );
51
- }
52
-
53
- // Bail if activating from network, or bulk
54
- if ( is_network_admin() || isset( $_GET['activate-multi'] ) )
55
- return;
56
-
57
- // Add the transient to redirect
58
- set_transient( '_custom_login_activation_redirect', true, 30 );
59
- }
60
- register_activation_hook( CUSTOM_LOGIN_FILE, 'ap_custom_login_install' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/post-types.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
- /**
3
- * Post Type Functions
4
- *
5
- * @package Custom Login
6
- * @subpackage Post Type Functions
7
- * @copyright Copyright (c) 2013, Austin Passy
8
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
- * @since 2.0
10
- */
11
-
12
- // Exit if accessed directly
13
- if ( ! defined( 'ABSPATH' ) ) exit;
14
-
15
- /**
16
- * Setup Core Post Type
17
- *
18
- * @access private
19
- * @since 2.0
20
- * @return void
21
- */
22
- function ap_custom_login_post_types() {
23
- /** Payment Post Type */
24
- $labels = array(
25
- 'name' => _x('Logins', 'post type general name', 'custom-login' ),
26
- 'singular_name' => _x('Login', 'post type singular name', 'custom-login' ),
27
- 'add_new' => __( 'Add New', 'custom-login' ),
28
- 'add_new_item' => __( 'Add New Login', 'custom-login' ),
29
- 'edit_item' => __( 'Edit Login', 'custom-login' ),
30
- 'new_item' => __( 'New Login', 'custom-login' ),
31
- 'all_items' => __( 'All Logins', 'custom-login' ),
32
- 'view_item' => __( 'View Login', 'custom-login' ),
33
- 'search_items' => __( 'Search Logins', 'custom-login' ),
34
- 'not_found' => __( 'No Logins found', 'custom-login' ),
35
- 'not_found_in_trash'=> __( 'No Logins found in Trash', 'custom-login' ),
36
- 'parent_item_colon' => '',
37
- 'menu_name' => __( 'Custom Login', 'custom-login' )
38
- );
39
-
40
- $args = array(
41
- 'labels' => $labels,
42
- 'public' => false,
43
- 'query_var' => false,
44
- 'rewrite' => false,
45
- 'capability_type' => 'page',
46
- 'map_meta_cap' => true,
47
- 'supports' => array( 'title' ),
48
- 'can_export' => false
49
- );
50
- register_post_type( 'custom_login', $args );
51
- }
52
- add_action( 'init', 'ap_custom_login_post_types', 75 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/upgrades/upgrade-functions.php DELETED
@@ -1,149 +0,0 @@
1
- <?php
2
- /**
3
- * Upgrade Functions
4
- *
5
- * @package Custom Login
6
- * @copyright Copyright (c) 2013, Austin Passy
7
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
- * @since 2.0
9
- */
10
-
11
- // Exit if accessed directly
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- /**
15
- * Display Upgrade Notices
16
- *
17
- * @access private
18
- * @since 2.0
19
- * @return void
20
- */
21
- function ap_custom_login_show_upgrade_notices() {
22
- if ( isset( $_GET['page'] ) && $_GET['page'] == 'custom-login-upgrades' )
23
- return; // Don't show notices on the upgrades page
24
-
25
- $login = CUSTOMLOGIN();
26
-
27
- $old_settings = get_option( 'custom_login_settings' );
28
-
29
- /* New install */
30
- if ( empty( $old_settings ) )
31
- return;
32
-
33
- if ( !empty( $old_settings ) && !empty( $old_settings['version'] ) )
34
- $cl_version = $old_settings['version'];
35
- else
36
- $cl_version = $login->version;
37
-
38
- //versions less than 2.0
39
- if ( version_compare( $cl_version, '2.0', '<' ) ) {
40
- printf(
41
- '<div class="updated"><p>' . esc_html__( 'Custom Login needs to be upgraded, please click %shere%s to start the upgrade.', $login->domain ) . '</p></div>',
42
- '<a href="' . esc_url( admin_url( 'options.php?page=custom-login-upgrades' ) ) . '">',
43
- '</a>'
44
- );
45
- }
46
- }
47
- add_action( 'admin_notices', 'ap_custom_login_show_upgrade_notices' );
48
-
49
- /**
50
- * Triggers all upgrade functions
51
- *
52
- * This function is usually triggered via ajax
53
- *
54
- * @access private
55
- * @since 2.0
56
- */
57
- function ap_custom_login_trigger_upgrades() {
58
- $login = CUSTOMLOGIN();
59
-
60
- $old_settings = get_option( 'custom_login_settings' );
61
-
62
- if ( !empty( $old_settings ) && !empty( $old_settings['version'] ) )
63
- $cl_version = $old_settings['version'];
64
- else
65
- $cl_version = $login->version;
66
-
67
- if ( version_compare( $cl_version, '2.0', '<' ) ) {
68
- ap_custom_login_v2_0_0_upgrades();
69
- }
70
-
71
- if ( DOING_AJAX ) die( 'complete' ); // Let ajax know we are done
72
- }
73
- add_action( 'wp_ajax_custom_login_trigger_upgrades', 'ap_custom_login_trigger_upgrades' );
74
-
75
- /**
76
- * Upgrade routine for v2.0.0
77
- *
78
- * @access private
79
- * @since 2.0
80
- * @return void
81
- */
82
- function ap_custom_login_v2_0_0_upgrades() {
83
- $login = CUSTOMLOGIN();
84
- $ss = CUSTOM_LOGIN_SCRIPT_STYLES();
85
- $old_settings = get_option( 'custom_login_settings' );
86
- $new_settings = get_option( $login->id, array() );
87
-
88
- $new_settings['active'] = $login->version;
89
- $new_settings['active'] = true === $old_settings['custom'] ? 'on' : 'off';
90
- $new_settings['html_background_color'] = $ss->is_rgba( $old_settings['html_background_color'] ) ? $ss->rgba2hex( $old_settings['html_background_color'] ) : $old_settings['html_background_color'];
91
- $new_settings['html_background_color_checkbox'] = 'off';
92
- $new_settings['html_background_color_opacity'] = '';
93
- $new_settings['html_background_url'] = $old_settings['html_background_url'];
94
- $new_settings['html_background_position'] = 'left top';
95
- $new_settings['html_background_repeat'] = $old_settings['html_background_repeat'];
96
- $new_settings['html_background_size'] = $old_settings['html_background_size'];
97
- $new_settomgs['hide_wp_logo'] = 'on';
98
- $new_settings['logo_background_url'] = $old_settings['login_form_logo'];
99
- $new_settings['logo_background_position'] = 'top center';
100
- $new_settings['logo_background_repeat'] = '';
101
- $new_settings['logo_background_size'] = '';
102
- $new_settings['login_form_background_color'] = $ss->is_rgba( $old_settings['html_background_color'] ) ? $ss->rgba2hex( $old_settings['login_form_background_color'] ) : $old_settings['login_form_background_color'];
103
- $new_settings['login_form_background_color_checkbox'] = 'off';
104
- $new_settings['login_form_background_color_opacity'] = '';
105
- $new_settings['login_form_background_url'] = $old_settings['login_form_background'];
106
- $new_settings['login_form_background_position'] = '';
107
- $new_settings['login_form_background_repeat'] = '';
108
- $new_settings['login_form_background_size'] = $old_settings['login_form_background_size'];
109
- $new_settings['login_form_border_radius'] = $old_settings['login_form_border_radius'];
110
- $new_settings['login_form_border_size'] = $old_settings['login_form_border'];
111
- $new_settings['login_form_border_color'] = $ss->is_rgba( $old_settings['html_background_color'] ) ? $ss->rgba2hex( $old_settings['login_form_border_color'] ) : $old_settings['login_form_border_color'];
112
- $new_settings['login_form_border_color_checkbox'] = 'off';
113
- $new_settings['login_form_border_color_opacity'] = '';
114
- $new_settings['login_form_box_shadow'] = $old_settings['login_form_box_shadow_1'] . 'px ' . $old_settings['login_form_box_shadow_2'] . 'px ' . $old_settings['login_form_box_shadow_3'] . 'px';
115
- $new_settings['login_form_box_shadow_color'] = $ss->is_rgba( $old_settings['html_background_color'] ) ? $ss->rgba2hex( $old_settings['login_form_box_shadow_4'] ) : $old_settings['login_form_box_shadow_4'];
116
- $new_settings['login_form_box_shadow_color_checkbox'] = 'off';
117
- $new_settings['login_form_box_shadow_color_opacity'] = '';
118
- $new_settings['label_color'] = $ss->is_rgba( $old_settings['html_background_color'] ) ? $ss->rgba2hex( $old_settings['label_color'] ) : $old_settings['label_color'];
119
- $new_settings['label_color_checkbox'] = 'off';
120
- $new_settings['label_color_opacity'] = '';
121
- $new_settings['nav_color'] = '';
122
- $new_settings['nav_color_checkbox'] = 'off';
123
- $new_settings['nav_color_opacity'] = '';
124
- $new_settings['nav_text_shadow_color'] = '';
125
- $new_settings['nav_text_shadow_color_checkbox'] = 'off';
126
- $new_settings['nav_text_shadow_color_opacity'] = '';
127
- $new_settings['nav_hover_color'] = '';
128
- $new_settings['nav_hover_color_checkbox'] = 'off';
129
- $new_settings['nav_hover_color_opacity'] = '';
130
- $new_settings['nav_text_shadow_hover_color'] = '';
131
- $new_settings['nav_text_shadow_hover_color_checkbox'] = 'off';
132
- $new_settings['nav_text_shadow_hover_color_opacity'] = '';
133
- $new_settings['custom_css'] = esc_attr( $old_settings['custom_css'] );
134
- $new_settings['custom_html'] = wp_specialchars_decode( stripslashes( $old_settings['custom_html'] ), 1, 0, 1 );
135
- $new_settings['custom_jquery'] = esc_html( $old_settings['custom_jquery'] );
136
-
137
- update_option( $login->id, $new_settings );
138
- delete_option( 'custom_login_settings' );
139
- return true;
140
- }
141
-
142
- /**
143
- *
144
- option_name: custom_login_settings
145
- option_value:
146
- a:30:{s:7:"version";s:5:"1.1.4";s:6:"custom";b:1;s:8:"gravatar";b:0;s:14:"hide_dashboard";b:0;s:19:"disable_presstrends";b:0;s:12:"hide_upgrade";b:0;s:16:"upgrade_complete";b:0;s:10:"custom_css";s:0:"";s:11:"custom_html";s:0:"";s:13:"custom_jquery";s:0:"";s:21:"html_border_top_color";s:0:"";s:26:"html_border_top_background";s:0:"";s:21:"html_background_color";s:0:"";s:19:"html_background_url";s:0:"";s:22:"html_background_repeat";s:8:"repeat-x";s:20:"html_background_size";s:5:"cover";s:15:"login_form_logo";s:0:"";s:27:"login_form_border_top_color";s:0:"";s:27:"login_form_background_color";s:0:"";s:21:"login_form_background";s:0:"";s:26:"login_form_background_size";s:5:"cover";s:24:"login_form_border_radius";s:2:"11";s:17:"login_form_border";s:1:"1";s:23:"login_form_border_color";s:0:"";s:23:"login_form_box_shadow_1";s:1:"5";s:23:"login_form_box_shadow_2";s:1:"5";s:23:"login_form_box_shadow_3";s:2:"18";s:23:"login_form_box_shadow_4";s:7:"#464646";s:22:"login_form_padding_top";b:1;s:11:"label_color";s:7:"#ffffff";}
147
-
148
- a:46:{s:6:"active";s:2:"on";s:21:"html_background_color";s:0:"";s:30:"html_background_color_checkbox";s:3:"off";s:29:"html_background_color_opacity";s:1:"1";s:19:"html_background_url";s:0:"";s:24:"html_background_position";s:8:"left top";s:22:"html_background_repeat";s:9:"no-repeat";s:20:"html_background_size";s:4:"none";s:19:"logo_background_url";s:0:"";s:24:"logo_background_position";s:8:"left top";s:22:"logo_background_repeat";s:9:"no-repeat";s:20:"logo_background_size";s:4:"none";s:27:"login_form_background_color";s:0:"";s:36:"login_form_background_color_checkbox";s:3:"off";s:35:"login_form_background_color_opacity";s:1:"1";s:25:"login_form_background_url";s:0:"";s:30:"login_form_background_position";s:8:"left top";s:28:"login_form_background_repeat";s:9:"no-repeat";s:26:"login_form_background_size";s:4:"none";s:24:"login_form_border_radius";s:0:"";s:22:"login_form_border_size";s:0:"";s:23:"login_form_border_color";s:0:"";s:32:"login_form_border_color_checkbox";s:3:"off";s:31:"login_form_border_color_opacity";s:1:"1";s:21:"login_form_box_shadow";s:12:"5px 5px 10px";s:27:"login_form_box_shadow_color";s:0:"";s:36:"login_form_box_shadow_color_checkbox";s:3:"off";s:35:"login_form_box_shadow_color_opacity";s:1:"1";s:11:"label_color";s:0:"";s:20:"label_color_checkbox";s:3:"off";s:19:"label_color_opacity";s:1:"1";s:9:"nav_color";s:0:"";s:18:"nav_color_checkbox";s:3:"off";s:17:"nav_color_opacity";s:1:"1";s:21:"nav_text_shadow_color";s:0:"";s:30:"nav_text_shadow_color_checkbox";s:3:"off";s:29:"nav_text_shadow_color_opacity";s:1:"1";s:15:"nav_hover_color";s:0:"";s:24:"nav_hover_color_checkbox";s:3:"off";s:23:"nav_hover_color_opacity";s:1:"1";s:27:"nav_text_shadow_hover_color";s:0:"";s:36:"nav_text_shadow_hover_color_checkbox";s:3:"off";s:35:"nav_text_shadow_hover_color_opacity";s:1:"1";s:10:"custom_css";s:0:"";s:11:"custom_html";s:0:"";s:13:"custom_jquery";s:0:"";}
149
- **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions/upgrades/upgrades.php DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
- /**
3
- * Upgrade Screen
4
- *
5
- * @package Custom Login
6
- * @subpackage functions/upgrades
7
- * @copyright Copyright (c) 2013, Austin Passy
8
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
- * @since 2.0
10
- */
11
-
12
- // Exit if accessed directly
13
- if ( !defined( 'ABSPATH' ) ) exit;
14
-
15
- /**
16
- * Render Upgrades Screen
17
- *
18
- * @access private
19
- * @since 2.0
20
- * @return void
21
- */
22
- function ap_custom_login_upgrades_screen() {
23
- $login = CUSTOMLOGIN(); ?>
24
- <div class="wrap">
25
- <h2><?php _e( 'Custom Login - Upgrades', $login->domain ); ?></h2>
26
- <div id="custom-login-upgrade-status">
27
- <p>
28
- <?php _e( 'The upgrade process has started, please be patient. This could take several minutes. You will be automatically redirected when the upgrade is finished.', $login->domain ); ?>
29
- <img src="<?php echo esc_url( admin_url( 'images/loading.gif' ) ); ?>" id="custom-login-upgrade-loader"/>
30
- </p>
31
- </div>
32
- <script type="text/javascript">
33
- jQuery( document ).ready( function() {
34
- // Trigger upgrades on page load
35
- var data = { action: 'custom_login_trigger_upgrades' };
36
- jQuery.post( ajaxurl, data, function (response) {
37
- if ( response == 'complete' ) {
38
- jQuery('#custom-login-upgrade-loader').hide();
39
- document.location.href = 'index.php?page=custom-login-about'; // Redirect to the welcome page
40
- }
41
- });
42
- });
43
- </script>
44
- </div>
45
- <?php
46
- }
47
-
48
- /**
49
- * Add Options Link
50
- *
51
- * Creates the admin submenu pages.
52
- *
53
- * @access private
54
- * @since 1.0
55
- * @return void
56
- */
57
- function ap_custom_login_upgrades_page() {
58
- $login = CUSTOMLOGIN();
59
- add_submenu_page( null, __( 'Custom Login Upgrades', $login->domain ), __( 'Custom Login Upgrades', $login->domain ), 'update_plugins', 'custom-login-upgrades', 'ap_custom_login_upgrades_screen' );
60
- }
61
- add_action( 'admin_menu', 'ap_custom_login_upgrades_page', 10 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
includes/admin/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
includes/admin/import-export.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package CustomLogin
4
+ * @subpackage Classes/CL_Import_Export
5
+ * @author Austin Passy <http://austin.passy.co>
6
+ * @copyright Copyright (c) 2014-2015, Austin Passy
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) exit;
12
+
13
+
14
+ /**
15
+ * Usage tracking
16
+ *
17
+ * @access public
18
+ * @since 3.0.7
19
+ * @return void
20
+ */
21
+ class CL_Import_Export {
22
+
23
+ /**
24
+ * The menu
25
+ *
26
+ * @access private
27
+ */
28
+ private $menu_page;
29
+
30
+ /**
31
+ * Get things going
32
+ *
33
+ * @access public
34
+ * @return void
35
+ */
36
+ public function __construct() {
37
+
38
+ add_action( CUSTOM_LOGIN_OPTION . '_settings_sidebars', array( $this, 'settings_sidebar' ), 30 );
39
+ add_action( 'admin_action_' . CUSTOM_LOGIN_OPTION . '_import_settings', array( $this, 'import_settings' ) );
40
+ add_action( 'admin_action_' . CUSTOM_LOGIN_OPTION . '_export_settings', array( $this, 'export_settings' ) );
41
+ }
42
+
43
+ /**
44
+ * Box with a link to the extensions page.
45
+ */
46
+ function settings_sidebar( $args ) {
47
+
48
+ $import_url = wp_nonce_url(
49
+ add_query_arg( array( 'action' => CUSTOM_LOGIN_OPTION . '_import_settings' ),
50
+ admin_url( 'admin.php' )
51
+ ),
52
+ 'import',
53
+ 'cl_nonce'
54
+ );
55
+ $export_url = wp_nonce_url(
56
+ add_query_arg( array( 'action' => CUSTOM_LOGIN_OPTION . '_export_settings' ),
57
+ admin_url( 'admin.php' )
58
+ ),
59
+ 'export',
60
+ 'cl_nonce'
61
+ );
62
+
63
+ if ( CUSTOM_LOGIN_VERSION < '3.1.0' ) {
64
+ $content = __( 'Coming in version 3.1', CUSTOM_LOGIN_DIRNAME );
65
+ }
66
+ else {
67
+ $content = '<ul>';
68
+ $content .= sprintf( __( '<li><a href="%s">Import</a></li>', CUSTOM_LOGIN_DIRNAME ), esc_url( $import_url ) );
69
+ $content .= sprintf( __( '<li><textarea></textarea></li>', CUSTOM_LOGIN_DIRNAME ), esc_url( $import_url ) );
70
+ $content .= '</ul>';
71
+ $content .= '<div id="import-export-wrapper"></div>';
72
+ }
73
+
74
+ CUSTOMLOGIN()->settings_api->postbox( 'custom-login-import-export', __( 'Settings Import/Export', CUSTOM_LOGIN_DIRNAME ), $content );
75
+ }
76
+
77
+ /**
78
+ * Import some settings into Custom Login.
79
+ *
80
+ * @access public
81
+ * @return array
82
+ */
83
+ function import_settings() {
84
+
85
+ if ( !isset( $_GET['cl_nonce']) || !wp_verify_nonce( $_GET['cl_nonce'], 'import' ) ) {
86
+ }
87
+
88
+ wp_redirect( remove_query_arg( array( 'action', 'cl_nonce' ) ) );
89
+ exit;
90
+ }
91
+
92
+ /**
93
+ * Export Custom Logins settings.
94
+ *
95
+ * @access public
96
+ * @return void
97
+ */
98
+ function export_settings() {
99
+
100
+ if ( !isset( $_GET['cl_nonce']) || !wp_verify_nonce( $_GET['cl_nonce'], 'import' ) ) {
101
+ }
102
+
103
+ wp_redirect( remove_query_arg( array( 'action', 'cl_nonce' ) ) );
104
+ exit;
105
+ }
106
+
107
+ }
108
+ $GLOBALS['cl_import_export'] = new CL_Import_Export;
includes/admin/plugins.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package CustomLogin
4
+ * @subpackage Admin/Plugins
5
+ * @author Austin Passy <http://austin.passy.co>
6
+ * @copyright Copyright (c) 2014, Austin Passy
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ * @since 3.0
9
+ */
10
+
11
+ // Exit if accessed directly
12
+ if ( ! defined( 'ABSPATH' ) ) exit;
13
+
14
+ /**
15
+ * Plugins row action links
16
+ *
17
+ * @since 3.0
18
+ * @param array $links already defined action links
19
+ * @param string $file plugin file path and name being processed
20
+ * @return array $links
21
+ */
22
+ function custom_login_plugin_action_links( $links, $file ) {
23
+ $settings_link = '<a href="' . sprintf( admin_url( 'options-general.php?page=%s' ), CUSTOM_LOGIN_DIRNAME ) . '">' . esc_html__( 'Settings', CUSTOM_LOGIN_DIRNAME ) . '</a>';
24
+ if ( $file == CUSTOM_LOGIN_BASENAME )
25
+ array_unshift( $links, $settings_link );
26
+
27
+ return $links;
28
+ }
29
+ add_filter( 'plugin_action_links', 'custom_login_plugin_action_links', 10, 2 );
30
+
31
+
32
+ /**
33
+ * Plugin row meta links
34
+ *
35
+ * @since 3.0
36
+ * @param array $input already defined meta links
37
+ * @param string $file plugin file path and name being processed
38
+ * @return array $input
39
+ */
40
+ function custom_login_plugin_row_meta( $input, $file ) {
41
+ if ( $file != CUSTOM_LOGIN_BASENAME )
42
+ return $input;
43
+
44
+ $links = array(
45
+ '<a href="' . sprintf( admin_url( 'options-general.php?page=%s/extensions' ), CUSTOM_LOGIN_DIRNAME ) . '">' . esc_html__( 'Extension Installer', CUSTOM_LOGIN_DIRNAME ) . '</a>',
46
+ '<a href="https://frosty.media/plugin/tag/custom-login-extension/" target="_blank">' . esc_html__( 'Add Ons', CUSTOM_LOGIN_DIRNAME ) . '</a>',
47
+ );
48
+
49
+ $input = array_merge( $input, $links );
50
+
51
+ return $input;
52
+ }
53
+ add_filter( 'plugin_row_meta', 'custom_login_plugin_row_meta', 10, 2 );
includes/admin/tracking.php ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package CustomLogin
4
+ * @subpackage Classes/CL_Common
5
+ * @author Austin Passy <http://austin.passy.co>
6
+ * @copyright Copyright (c) 2014-2015, Austin Passy
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) exit;
12
+
13
+
14
+ /**
15
+ * Usage tracking
16
+ *
17
+ * @access public
18
+ * @since 3.0.0
19
+ * @return void
20
+ */
21
+ class CL_Tracking {
22
+
23
+ /**
24
+ * The data to send to the FM site
25
+ *
26
+ * @access private
27
+ */
28
+ private $data;
29
+ private $option;
30
+ private $api;
31
+
32
+ /**
33
+ * Get things going
34
+ *
35
+ * @access public
36
+ * @return void
37
+ */
38
+ public function __construct() {
39
+
40
+ $this->option = CUSTOM_LOGIN_OPTION . '_general';
41
+ $this->api = defined( 'WP_LOCAL_DEV' ) ? 'http://frosty.media.dev/cl-checkin-api/?edd_action=cl_checkin' : CUSTOM_LOGIN_API_URL . 'cl-checkin-api/?edd_action=cl_checkin';
42
+ $this->schedule_send();
43
+
44
+ add_action( CUSTOM_LOGIN_OPTION . '_after_sanatize_options', array( $this, 'check_for_settings_optin' ) );
45
+ add_action( 'admin_action_cl_opt_into_tracking', array( $this, 'check_for_optin' ) );
46
+ add_action( 'admin_action_cl_opt_out_of_tracking', array( $this, 'check_for_optout' ) );
47
+ add_action( 'admin_notices', array( $this, 'admin_notice' ) );
48
+
49
+ register_activation_hook( CUSTOM_LOGIN_FILE, array( $this, 'activate' ) );
50
+ }
51
+
52
+ /**
53
+ * Runs on plugin install.
54
+ *
55
+ * @since 3.0.0
56
+ * @return void
57
+ */
58
+ function activate() {
59
+ $this->send_checkin( true, array( 'on_activation' => 'yes' ) );
60
+ }
61
+
62
+ /**
63
+ * Check if the user has opted into tracking
64
+ *
65
+ * @access private
66
+ * @return bool
67
+ */
68
+ private function tracking_allowed() {
69
+ $tracking = CL_Common::get_option( 'tracking', 'general', 'off' );
70
+
71
+ if ( 'on' === $tracking )
72
+ return true;
73
+
74
+ return false;
75
+ }
76
+
77
+ /**
78
+ * Setup the data that is going to be tracked
79
+ *
80
+ * @access private
81
+ * @return void
82
+ */
83
+ private function setup_data( $extra_data = array() ) {
84
+
85
+ $data = array();
86
+
87
+ $theme_data = wp_get_theme();
88
+ $theme = $theme_data->Name . ' ' . $theme_data->Version;
89
+
90
+ $data['url'] = home_url();
91
+ $data['version'] = get_bloginfo( 'version' );
92
+ $data['theme'] = $theme;
93
+ $data['email'] = get_bloginfo( 'admin_email' );
94
+
95
+ // Retrieve current plugin information
96
+ if ( ! function_exists( 'get_plugins' ) ) {
97
+ include ABSPATH . '/wp-admin/includes/plugin.php';
98
+ }
99
+
100
+ $plugins = array_keys( get_plugins() );
101
+ $active_plugins = get_option( 'active_plugins', array() );
102
+
103
+ foreach ( $plugins as $key => $plugin ) {
104
+ if ( in_array( $plugin, $active_plugins ) ) {
105
+ // Remove active plugins from list so we can show active and inactive separately
106
+ unset( $plugins[ $key ] );
107
+ }
108
+ }
109
+
110
+ $data['active_plugins'] = $active_plugins;
111
+ $data['inactive_plugins'] = $plugins;
112
+ $data['post_count'] = wp_count_posts( 'post' )->publish;
113
+
114
+ if ( is_array( $extra_data ) && !empty( $extra_data ) ) {
115
+ foreach( $extra_data as $key => $value ) {
116
+ $data[$key] = $value;
117
+ }
118
+ }
119
+
120
+ $this->data = $data;
121
+ }
122
+
123
+ /**
124
+ * Send the data to the FM server
125
+ *
126
+ * @access private
127
+ * @return void
128
+ */
129
+ public function send_checkin( $override = false, $extra_data = array() ) {
130
+
131
+ if ( ! $this->tracking_allowed() && ! $override )
132
+ return;
133
+
134
+ // Send a maximum of once per week
135
+ $last_send = $this->get_last_send();
136
+ if ( $last_send && $last_send > strtotime( '-1 week' ) )
137
+ return;
138
+
139
+ $this->setup_data( $extra_data );
140
+
141
+ $response = wp_remote_post( $this->api, array(
142
+ 'method' => 'POST',
143
+ 'timeout' => 20,
144
+ 'redirection' => 5,
145
+ 'body' => $this->data,
146
+ 'user-agent' => 'CustomLogin/' . CUSTOM_LOGIN_VERSION . '; ' . get_bloginfo( 'url' )
147
+ ) );
148
+
149
+ if ( !is_wp_error( $response ) ) {
150
+ update_option( 'cl_tracking_last_send', time() );
151
+ }
152
+
153
+ }
154
+
155
+ /**
156
+ * Check for a new opt-in on settings save
157
+ *
158
+ * This runs during the sanitation of General settings, thus the return
159
+ *
160
+ * @access public
161
+ * @return array
162
+ */
163
+ public function check_for_settings_optin( $input ) {
164
+
165
+ // Send an intial check in on settings save
166
+ if ( isset( $input['tracking'] ) && 'on' === $input['tracking'] ) {
167
+ $this->send_checkin( true, array( 'on_activation' => 'settings', 'mailchimp_sub' => 'yes' ) );
168
+ }
169
+
170
+ return $input;
171
+ }
172
+
173
+ /**
174
+ * Check for a new opt-in via the admin notice
175
+ *
176
+ * @access public
177
+ * @return void
178
+ */
179
+ public function check_for_optin( $data ) {
180
+
181
+ $options = get_option( $this->option, array() );
182
+
183
+ #var_dump( $options ); exit;
184
+
185
+ $options['tracking'] = 'on';
186
+ update_option( $this->option, $options );
187
+ update_option( 'cl_tracking_notice', '1' );
188
+
189
+ $this->send_checkin( true, array( 'on_activation' => 'admin notice', 'mailchimp_sub' => 'yes' ) );
190
+
191
+ wp_redirect( remove_query_arg( 'action' ) );
192
+ exit;
193
+ }
194
+
195
+ /**
196
+ * Check for a new opt-in via the admin notice
197
+ *
198
+ * @access public
199
+ * @return void
200
+ */
201
+ public function check_for_optout( $data ) {
202
+
203
+ $options = get_option( $this->option, array() );
204
+
205
+ #var_dump( $options ); exit;
206
+
207
+ $options['tracking'] = 'off';
208
+ update_option( $this->option, $options );
209
+ update_option( 'cl_tracking_notice', '1' );
210
+
211
+ wp_redirect( remove_query_arg( 'action' ) );
212
+ exit;
213
+ }
214
+
215
+ /**
216
+ * Get the last time a checkin was sent
217
+ *
218
+ * @access private
219
+ * @return false/string
220
+ */
221
+ private function get_last_send() {
222
+ return get_option( 'cl_tracking_last_send' );
223
+ }
224
+
225
+ /**
226
+ * Schedule a weekly checkin
227
+ *
228
+ * @access private
229
+ * @return void
230
+ */
231
+ private function schedule_send() {
232
+ // We send once a week (while tracking is allowed) to check in, which can be used to determine active sites
233
+ add_action( 'cl_weekly_scheduled_events', array( $this, 'send_checkin' ) );
234
+ }
235
+
236
+ /**
237
+ * Display the admin notice to users that have not opted-in or out
238
+ *
239
+ * @access public
240
+ * @return void
241
+ */
242
+ public function admin_notice() {
243
+
244
+ $options = get_option( $this->option, array() );
245
+ $hide_notice = get_option( 'cl_tracking_notice' );
246
+
247
+ if ( $hide_notice ) return;
248
+
249
+ if ( isset( $options['admin_notices'] ) && 'off' === $options['admin_notices'] )
250
+ return;
251
+
252
+ if ( isset( $options['tracking'] ) && 'on' === $options['tracking'] )
253
+ return;
254
+
255
+ if ( ! current_user_can( 'manage_options' ) )
256
+ return;
257
+
258
+ if (
259
+ stristr( network_site_url( '/' ), 'dev' ) !== false ||
260
+ stristr( network_site_url( '/' ), 'localhost' ) !== false ||
261
+ stristr( network_site_url( '/' ), ':8888' ) !== false // This is common with MAMP on OS X
262
+ ) {
263
+ update_option( 'cl_tracking_notice', '1' ); // Don't update the notice in case someone pushes local to live? Maybe return.
264
+ }
265
+ else {
266
+ $admin_url = admin_url( 'admin.php' );
267
+ $optin_url = add_query_arg( 'action', 'cl_opt_into_tracking' );
268
+ $optout_url = add_query_arg( 'action', 'cl_opt_out_of_tracking' );
269
+
270
+ echo '<div class="updated"><p>';
271
+ echo __( 'Allow Custom Login to anonymously track how this plugin is used and help us make the plugin better?<br>Opt-in and receive a 20% discount code for any plugin on our <a href="https://frosty.media/plugins" target="_blank">site</a>. No sensitive data is tracked.', CUSTOM_LOGIN_DIRNAME );
272
+ echo '<span class="alignright">';
273
+ echo '<a href="' . esc_url( $optin_url ) . '" class="">' . __( 'Allow', CUSTOM_LOGIN_DIRNAME ) . '</a> | ';
274
+ echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="">' . __( 'Do not allow', CUSTOM_LOGIN_DIRNAME ) . '</a>';
275
+ echo '</span>';
276
+ echo '</p></div>';
277
+ }
278
+ }
279
+
280
+ }
281
+ $GLOBALS['cl_tracking'] = new CL_Tracking;
includes/class-cl-common.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package CustomLogin
4
+ * @subpackage Classes/CL_Common
5
+ * @author Austin Passy <http://austin.passy.co>
6
+ * @copyright Copyright (c) 2014, Austin Passy
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) exit;
12
+
13
+ class CL_Common {
14
+
15
+ /**
16
+ * Fetch RSS items from the feed.
17
+ *
18
+ * @param int $num Number of items to fetch.
19
+ * @param string $feed The feed to fetch.
20
+ * @return array|bool False on error, array of RSS items on success.
21
+ */
22
+ public static function fetch_rss_items( $num, $feed ) {
23
+
24
+ if ( !function_exists( 'fetch_feed' ) )
25
+ include_once( ABSPATH . WPINC . '/feed.php' );
26
+
27
+ $rss = fetch_feed( $feed );
28
+
29
+ // Bail if feed doesn't work
30
+ if ( !$rss || is_wp_error( $rss ) )
31
+ return false;
32
+
33
+ $rss_items = $rss->get_items( 0, $rss->get_item_quantity( $num ) );
34
+
35
+ // If the feed was erroneous
36
+ if ( !$rss_items ) {
37
+ $md5 = md5( $feed );
38
+ delete_transient( 'feed_' . $md5 );
39
+ delete_transient( 'feed_mod_' . $md5 );
40
+ $rss = fetch_feed( $feed );
41
+ $rss_items = $rss->get_items( 0, $rss->get_item_quantity( $num ) );
42
+ }
43
+
44
+ return $rss_items;
45
+ }
46
+
47
+ /**
48
+ * Helper function to return the data URI.
49
+ *
50
+ * @return string
51
+ */
52
+ public static function get_data_uri( $_image, $mime = '' ) {
53
+
54
+ $image = trailingslashit( CUSTOM_LOGIN_URL );
55
+ $image .= $_image;
56
+
57
+ $data = file_exists( $image ) ? base64_encode( file_get_contents( $image ) ) : '';
58
+
59
+ return !empty( $data ) ? 'data:image/' . $mime . ';base64,' . $data : '';
60
+ }
61
+
62
+ /**
63
+ * Get's the cached transient key.
64
+ *
65
+ * @return string
66
+ */
67
+ public static function get_transient_key( $input ) {
68
+
69
+ $len = is_multisite() ? 40 : 45;
70
+ $key = 'custom_login_';
71
+ $key = $key . substr( md5( $input ), 0, $len - strlen( $key ) );
72
+
73
+ return $key;
74
+ }
75
+
76
+ /**
77
+ * Get the value of a settings field
78
+ *
79
+ * @param string $option settings field name
80
+ * @param string $subsection the section name this field belongs to
81
+ * @param string $default default text if it's not found
82
+ *
83
+ * @return string
84
+ */
85
+ public static function get_option( $option, $subsection = '', $default = '' ) {
86
+
87
+ $section = CUSTOM_LOGIN_OPTION . '_' . $subsection;
88
+ $setting = get_option( $section, array() );
89
+
90
+ if ( isset( $setting[$option] ) ) {
91
+ return $setting[$option];
92
+ }
93
+
94
+ return $default;
95
+ }
96
+
97
+ /**
98
+ * Get all values of a settings section
99
+ *
100
+ * @param string $subsection the section name this field belongs to
101
+ *
102
+ * @return array
103
+ */
104
+ public static function get_options( $subsection = 'design' ) {
105
+
106
+ $section = CUSTOM_LOGIN_OPTION . '_' . $subsection;
107
+ $settings = get_option( $section, array() );
108
+
109
+ return $settings;
110
+ }
111
+
112
+ /**
113
+ * Helper function to make remote calls
114
+ *
115
+ * @since 3.0.0
116
+ * @updated 3.0.8
117
+ */
118
+ public static function wp_remote_get( $url = false, $transient_key, $expiration = null, $user_agent = 'WordPress' ) {
119
+
120
+ if ( !$url ) return false;
121
+
122
+ if ( 'WordPress' == $user_agent ) {
123
+ global $wp_version;
124
+ $_version = $wp_version;
125
+ }
126
+ else {
127
+ $_version = CUSTOM_LOGIN_VERSION;
128
+ }
129
+
130
+ $expiration = null !== $expiration ? $expiration : WEEK_IN_SECONDS;
131
+
132
+ # delete_transient( $transient_key );
133
+ if ( false === ( $json = get_transient( $transient_key ) ) ) {
134
+
135
+ $response = wp_remote_get(
136
+ esc_url( $url ),
137
+ array(
138
+ 'timeout' => apply_filters( 'cl_wp_remote_get_timeout', (int) 15 ),
139
+ 'sslverify' => false,
140
+ 'user-agent' => $user_agent . '/' . $_version . '; ' . get_bloginfo( 'url' ),
141
+ )
142
+ );
143
+
144
+ if ( !is_wp_error( $response ) ) {
145
+
146
+ if ( isset( $response['body'] ) && strlen( $response['body'] ) > 0 ) {
147
+
148
+ $json = json_decode( wp_remote_retrieve_body( $response ) );
149
+
150
+ // Discount, double check?
151
+ if ( is_wp_error( $json ) )
152
+ return false;
153
+
154
+ // Cache the results for '$expiration'
155
+ set_transient( $transient_key, $json, $expiration );
156
+
157
+ // Return the data
158
+ return $json;
159
+ }
160
+ }
161
+ else {
162
+ return false; // Error, lets return!
163
+ }
164
+ }
165
+
166
+ return $json;
167
+ }
168
+
169
+ }
includes/class-cl-cron.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package CustomLogin
4
+ * @subpackage Classes/CL_Cron
5
+ * @author Austin Passy <http://austin.passy.co>
6
+ * @copyright Copyright (c) 2014, Austin Passy
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * CL_Cron Class
15
+ *
16
+ * This class handles scheduled events
17
+ *
18
+ */
19
+ class CL_Cron {
20
+
21
+ /**
22
+ * Get things going
23
+ *
24
+ * @since 1.6
25
+ * @see CL_Cron::weekly_events()
26
+ */
27
+ public function __construct() {
28
+ add_filter( 'cron_schedules', array( $this, 'add_schedules' ) );
29
+ add_action( 'wp', array( $this, 'schedule_events' ) );
30
+ }
31
+
32
+ /**
33
+ * Registers new cron schedules
34
+ *
35
+ * @since 1.6
36
+ *
37
+ * @param array $schedules
38
+ * @return array
39
+ */
40
+ public function add_schedules( $schedules = array() ) {
41
+ // Adds once weekly to the existing schedules.
42
+ $schedules['weekly'] = array(
43
+ 'interval' => 604800,
44
+ 'display' => __( 'Once Weekly', CUSTOM_LOGIN_DIRNAME )
45
+ );
46
+
47
+ return $schedules;
48
+ }
49
+
50
+ /**
51
+ * Schedules our events
52
+ *
53
+ * @access public
54
+ * @since 1.6
55
+ * @return void
56
+ */
57
+ public function schedule_events() {
58
+ $this->weekly_events();
59
+ $this->daily_events();
60
+ }
61
+
62
+ /**
63
+ * Schedule weekly events
64
+ *
65
+ * @access private
66
+ * @since 1.6
67
+ * @return void
68
+ */
69
+ private function weekly_events() {
70
+ if ( ! wp_next_scheduled( 'cl_weekly_scheduled_events' ) ) {
71
+ wp_schedule_event( current_time( 'timestamp' ), 'weekly', 'cl_weekly_scheduled_events' );
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Schedule daily events
77
+ *
78
+ * @access private
79
+ * @since 1.6
80
+ * @return void
81
+ */
82
+ private function daily_events() {
83
+ if ( ! wp_next_scheduled( 'cl_daily_scheduled_events' ) ) {
84
+ wp_schedule_event( current_time( 'timestamp' ), 'daily', 'cl_daily_scheduled_events' );
85
+ }
86
+ }
87
+
88
+ }
89
+ $cl_cron = new CL_Cron;
includes/class-cl-extensions.php ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package CustomLogin
4
+ * @subpackage Classes/CL_Extensions
5
+ * @author Austin Passy <http://austin.passy.co>
6
+ * @copyright Copyright (c) 2014-2015, Austin Passy
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) exit;
12
+
13
+ class CL_Extensions {
14
+
15
+ var $extensions = array(),
16
+ $checkout_url = '',
17
+ $menu_page;
18
+
19
+ public function __construct() {
20
+
21
+ $this->checkout_url = CUSTOM_LOGIN_API_URL . 'checkout/';
22
+
23
+ add_action( CUSTOM_LOGIN_OPTION . '_settings_sidebars', array( $this, 'settings_sidebar' ), 20 );
24
+ add_action( 'admin_menu', array( $this, 'admin_menu' ), 10 );
25
+ add_action( 'admin_init', array( $this, 'remote_install_client' ), 10 );
26
+
27
+ $this->get_extensions();
28
+ }
29
+
30
+ /**
31
+ * Box with a link to the extensions page.
32
+ */
33
+ function settings_sidebar( $args ) {
34
+
35
+ $content = sprintf( __( 'Install Custom Login extensions on <a href="%s">this page</a> with a valid license key. <small>Purchase your license key by clicking the appropriate link below</small>.', CUSTOM_LOGIN_DIRNAME ), sprintf( admin_url( 'options-general.php?page=%s/extensions' ), CUSTOM_LOGIN_DIRNAME ) );
36
+
37
+ CUSTOMLOGIN()->settings_api->postbox( 'custom-login-extensions', __( 'Extensions Installer', CUSTOM_LOGIN_DIRNAME ), $content );
38
+ }
39
+
40
+ public function admin_menu() {
41
+
42
+ $this->menu_page = add_options_page(
43
+ __( 'Custom Login Extensions', CUSTOM_LOGIN_DIRNAME ),
44
+ __( 'Custom Login Extentions', CUSTOM_LOGIN_DIRNAME ),
45
+ 'install_plugins',
46
+ sprintf( '%s/extensions', CUSTOM_LOGIN_DIRNAME ),
47
+ array( $this, 'html' )
48
+ );
49
+
50
+ remove_submenu_page( 'options-general.php', sprintf( '%s/extensions', CUSTOM_LOGIN_DIRNAME ) );
51
+
52
+ add_action( 'load-' . $this->menu_page, array( $this, 'load' ) );
53
+ }
54
+
55
+ public function load() {
56
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
57
+ }
58
+
59
+ public function admin_enqueue() {
60
+ wp_enqueue_style( CUSTOM_LOGIN_DIRNAME, plugins_url( 'css/admin.css', CUSTOM_LOGIN_FILE ), false, CUSTOM_LOGIN_VERSION, 'screen' );
61
+ }
62
+
63
+ /**
64
+ * Load the remote installer
65
+ */
66
+ public function remote_install_client() {
67
+
68
+ if ( !class_exists( 'CL_Remote_Install_Client' ) )
69
+ require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/libraries/edd-remote-install-client/EDD_Remote_Install_Client.php' );
70
+
71
+ $cl_remote_install_client = new CL_Remote_Install_Client(
72
+ trailingslashit( CUSTOM_LOGIN_API_URL ) . 'edd-sl-api/',
73
+ 'settings_page_custom-login/extensions', // HARD CODE IT!!! Get is with var_dump( get_current_screen() );
74
+ array( 'skipplugincheck' => 0, 'url' => home_url() )
75
+ );
76
+ }
77
+
78
+ private function get_extensions() {
79
+
80
+ // Save this for a latter date since our checkin for our HTML data doesn't get called on init...
81
+ $ext_url = false; //add_query_arg( array( 'edd_action' => 'cl_announcements' ), trailingslashit( CUSTOM_LOGIN_API_URL ) . 'cl-checkin-api/' );
82
+ $transient_key = CL_Common::get_transient_key( 'extensions' );
83
+ $extensions = CL_Common::wp_remote_get( $ext_url, $transient_key, WEEK_IN_SECONDS, 'CustomLogin' );
84
+
85
+ if ( $extensions ) {
86
+ $this->extensions[] = $extensions->html;
87
+ }
88
+ else {
89
+ /* Stealth Login */
90
+ $this->extensions[] = array(
91
+ 'title' => 'Custom Login Stealth Login',
92
+ 'description' => 'Protect your wp-login.php page from brute force attacks.',
93
+ 'url' => 'https://frosty.media/plugins/custom-login-stealth-login/',
94
+ 'image' => 'https://i.imgur.com/mhuymPG.jpg',
95
+ 'links' => array(
96
+ array(
97
+ 'description' => 'Personal',
98
+ 'download_id' => '108',
99
+ 'price_id' => '1',
100
+ 'price' => '$35',
101
+ ),
102
+ array(
103
+ 'description' => 'Plus',
104
+ 'download_id' => '108',
105
+ 'price_id' => '2',
106
+ 'price' => '$95',
107
+ ),
108
+ array(
109
+ 'description' => 'Professional',
110
+ 'download_id' => '108',
111
+ 'price_id' => '3',
112
+ 'price' => '$195',
113
+ ),
114
+ ),
115
+ );
116
+
117
+ /* Page Template */
118
+ $this->extensions[] = array(
119
+ 'title' => 'Custom Login Page Template',
120
+ 'description' => 'Add a login form to any WordPress page.',
121
+ 'url' => 'https://frosty.media/plugins/custom-login-page-template/',
122
+ 'image' => 'https://i.imgur.com/A0rzS9q.jpg',
123
+ 'links' => array(
124
+ array(
125
+ 'description' => 'Personal',
126
+ 'download_id' => '120',
127
+ 'price_id' => '1',
128
+ 'price' => '$35',
129
+ ),
130
+ array(
131
+ 'description' => 'Plus',
132
+ 'download_id' => '120',
133
+ 'price_id' => '2',
134
+ 'price' => '$95',
135
+ ),
136
+ array(
137
+ 'description' => 'Professional',
138
+ 'download_id' => '120',
139
+ 'price_id' => '3',
140
+ 'price' => '$195',
141
+ ),
142
+ ),
143
+ );
144
+
145
+ /* Login Redirects */
146
+ $this->extensions[] = array(
147
+ 'title' => 'Custom Login Redirects',
148
+ 'description' => 'Manage redirects after logging in.',
149
+ 'url' => 'https://extendd.com/plugin/wordpress-login-redirects/',
150
+ 'image' => 'https://i.imgur.com/aNGoyAa.jpg',
151
+ 'links' => array(
152
+ array(
153
+ 'description' => 'Personal',
154
+ 'download_id' => '124',
155
+ 'price_id' => '1',
156
+ 'price' => '$35',
157
+ ),
158
+ array(
159
+ 'description' => 'Plus',
160
+ 'download_id' => '124',
161
+ 'price_id' => '2',
162
+ 'price' => '$95',
163
+ ),
164
+ array(
165
+ 'description' => 'Professional',
166
+ 'download_id' => '124',
167
+ 'price_id' => '3',
168
+ 'price' => '$195',
169
+ ),
170
+ ),
171
+ );
172
+
173
+ /* No Password */
174
+ $this->extensions[] = array(
175
+ 'title' => 'Custom Login No Password',
176
+ 'description' => 'Allow users to login without a password.',
177
+ 'url' => 'https://frosty.media/plugins/custom-login-no-passowrd-login/',
178
+ 'image' => 'https://i.imgur.com/7SXIpi5.jpg',
179
+ 'links' => array(
180
+ array(
181
+ 'description' => 'Personal',
182
+ 'download_id' => '128',
183
+ 'price_id' => '1',
184
+ 'price' => '$35',
185
+ ),
186
+ array(
187
+ 'description' => 'Plus',
188
+ 'download_id' => '128',
189
+ 'price_id' => '2',
190
+ 'price' => '$95',
191
+ ),
192
+ array(
193
+ 'description' => 'Professional',
194
+ 'download_id' => '128',
195
+ 'price_id' => '3',
196
+ 'price' => '$195',
197
+ ),
198
+ ),
199
+ );
200
+
201
+ } // if
202
+ }
203
+
204
+ public function html() {
205
+
206
+ $html = '<div class="wrap">';
207
+ $html .= '<h2>' . __( 'Available Custom Login Extensions' ) . '</h2>';
208
+ $html .= '<form method="post" action="options.php">';
209
+ $html .= '<div class="section">';
210
+
211
+ foreach( $this->extensions as $key => $extension ) {
212
+ $html .= '<div class="col span_1_of_3 eddri-addon">';
213
+ $html .= '<div class="eddri-addon-container">';
214
+ $html .= '<div class="eddri-img-wrap">';
215
+ $html .= '<a href="' . add_query_arg( array( 'utm_source' => 'wordpressorg', 'utm_medium' => 'custom-login', 'utm_campaign' => 'eddri' ), $extension['url'] ) . '" target="_blank"><img class="eddri-thumbnail" src="' . $extension['image'] . '"></a>';
216
+ $html .= '<p>' . $extension['description'] . '</p>';
217
+ $html .= '</div>';
218
+
219
+ $html .= '<h3>' . $extension['title'] . '</h3>';
220
+ $html .= '<span class="eddri-status">Not Installed</span>';
221
+ $html .= '<a class="button" data-edd-install="' . $extension['title'] . '">Install</a>';
222
+ $html .= '<a class="button show-if-not-purchased" data-toggle="purchase-links-' . $key . '" style="display:none">Purchase License</a>';
223
+ $html .= '<div id="purchase-links-' . $key . '" style="display:none">';
224
+
225
+ $html .= '<ul>';
226
+ foreach( $extension['links'] as $link ) {
227
+ $html .= '<li>';
228
+ $html .= $link['description'] . ' (' . $link['price'] . '): <a href="' . add_query_arg( array( 'edd_action' => 'straight_to_gateway', 'download_id' => $link['download_id'], 'edd_options[price_id]' => $link['price_id'] ), $this->checkout_url ) . '">PayPal</a>';
229
+ $html .= ' | ';
230
+ $html .= '<a href="' . add_query_arg( array( 'edd_action' => 'add_to_cart', 'download_id' => $link['download_id'], 'edd_options[price_id]' => $link['price_id'] ), $this->checkout_url ) . '">Credit Card</a>';
231
+ $html .= '</li>';
232
+ }
233
+ $html .= '</ul>';
234
+
235
+ $html .= '</div>';
236
+ $html .= '</div>';
237
+ $html .= '</div>';
238
+ } // foreach
239
+
240
+ $html .= '</div>';
241
+ $html .= '</form>';
242
+ $html .= $this->footer_script();
243
+ $html .= '</div>';
244
+
245
+ echo $html;
246
+ }
247
+
248
+ function footer_script() {
249
+ ob_start(); ?>
250
+ <script type="text/javascript">
251
+ jQuery(document).ready(function($) {
252
+
253
+ setTimeout( function() {
254
+ // Remote API helper
255
+ $('a[data-toggle]').on('click',function(e) {
256
+ e.preventDefault();
257
+ $('#' + $(this).data('toggle')).toggle();
258
+ });
259
+
260
+ // Show Purchase button
261
+ $('a[data-edd-install]').each(function() {
262
+ var $this = $(this);
263
+ setTimeout( function() {
264
+ if ( $this.prev('.eddri-status').text() === 'Not Installed' ) {
265
+ $this.closest( $this.parent() ).children('a.button').hide();
266
+ $this.closest( $this.parent() ).children('a.button.show-if-not-purchased').show();
267
+ }
268
+ }, 500 );
269
+ });
270
+
271
+ }, 1000 );
272
+ });
273
+ </script><?php return ob_get_clean();
274
+ }
275
+
276
+ }
277
+ $GLOBALS['cl_extensions'] = new CL_Extensions();
classes/scripts-styles.php → includes/class-cl-scripts-styles.php RENAMED
@@ -1,44 +1,22 @@
1
  <?php
2
-
3
  /**
4
- * Weclome Page Class
5
- *
6
- * @package Custom Login
7
- * @subpackage Welcome Page
8
- * @copyright Copyright (c) 2013, Austin Passy
9
  * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
- * @since 2.0
11
  */
12
 
13
  // Exit if accessed directly
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
  /**
17
- * Custom Login Welcome Page Class
18
- *
19
- * A general class for About and Credits page.
20
  *
21
  * @access public
22
  * @since 2.0
23
  * @return void
24
  */
25
- class Custom_Login_Scripts_Styles {
26
-
27
- /** Singleton *************************************************************/
28
- private static $instance;
29
-
30
- /**
31
- * Main Instance
32
- *
33
- * @staticvar array $instance
34
- * @return The one true instance
35
- */
36
- public static function instance() {
37
- if ( ! isset( self::$instance ) ) {
38
- self::$instance = new self;
39
- }
40
- return self::$instance;
41
- }
42
 
43
  /**
44
  * Helper function to convert HEX to RGB
@@ -46,7 +24,7 @@ class Custom_Login_Scripts_Styles {
46
  * @ref http://css-tricks.com/snippets/php/convert-hex-to-rgb/#comment-355641
47
  * @return array
48
  */
49
- public function hex2rgb( $color ) {
50
  if ( $color[0] == '#' ) {
51
  $color = substr( $color, 1 );
52
  }
@@ -69,7 +47,7 @@ class Custom_Login_Scripts_Styles {
69
  * @ref http://bavotasan.com/2011/convert-hex-color-to-rgb-using-php/
70
  * @return string
71
  */
72
- public function rgb2hex( $rgb ) {
73
  $hex = "#";
74
  $hex .= str_pad( dechex( $rgb[0] ), 2, "0", STR_PAD_LEFT );
75
  $hex .= str_pad( dechex( $rgb[1] ), 2, "0", STR_PAD_LEFT );
@@ -84,8 +62,7 @@ class Custom_Login_Scripts_Styles {
84
  * @ref http://stackoverflow.com/questions/5798129/regular-expression-to-only-allow-whole-numbers-and-commas-in-a-string
85
  * @return string
86
  */
87
- public function rgba2hex( $rgba ) {
88
- // $rgba = str_replace( array( 'rgb', 'rgba', '(', ')' ), '', $rgba );
89
  $rgba = preg_replace(
90
  array(
91
  '/[^\d,]/', // Matches anything that's not a comma or number.
@@ -108,7 +85,7 @@ class Custom_Login_Scripts_Styles {
108
  *
109
  * @return bool
110
  */
111
- public function is_rgba( $str ) {
112
  $is_rgba = strpos( $str, 'rgba' );
113
 
114
  if ( false === $is_rgba )
@@ -122,13 +99,13 @@ class Custom_Login_Scripts_Styles {
122
  *
123
  * @since 1.1 (1/8/13)
124
  */
125
- public function prefixit( $input, $option ) {
126
- $prefixs = array( '-webkit-', '-moz-', '-ms-', '-o-', '' );
127
 
128
- $output = "\n\t";
129
 
130
- foreach ( $prefixs as $prefix ) {
131
- $output .= $this->trailingsemicolonit( $prefix . $input . ': ' . esc_attr( $option ) );
132
  }
133
 
134
  return $output;
@@ -142,7 +119,7 @@ class Custom_Login_Scripts_Styles {
142
  * @since 1.1 (1/8/13)
143
  * @updated 1.1.1 (1/9/13)
144
  */
145
- public function trailingsemicolonit( $input ) {
146
  $output = rtrim( $input, ';' );
147
  $output .= ';' . "\n\t";
148
 
@@ -154,20 +131,11 @@ class Custom_Login_Scripts_Styles {
154
  *
155
  * @since 2.0
156
  */
157
- public function cssrule( $rule ) {
158
  $output = rtrim( $rule, '{' );
159
  $output .= " {\n\t";
160
 
161
  return $output;
162
  }
163
 
164
- }
165
-
166
- /**
167
- * Funky fresh.
168
- */
169
- if ( !function_exists( 'CUSTOM_LOGIN_SCRIPT_STYLES' ) ) :
170
- function CUSTOM_LOGIN_SCRIPT_STYLES() {
171
- return Custom_Login_Scripts_Styles::instance();
172
- }
173
- endif;
1
  <?php
 
2
  /**
3
+ * @package CustomLogin
4
+ * @subpackage Classes/CL_Scripts_Styles
5
+ * @author Austin Passy <http://austin.passy.co>
6
+ * @copyright Copyright (c) 2014, Austin Passy
 
7
  * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
 
8
  */
9
 
10
  // Exit if accessed directly
11
  if ( ! defined( 'ABSPATH' ) ) exit;
12
 
13
  /**
 
 
 
14
  *
15
  * @access public
16
  * @since 2.0
17
  * @return void
18
  */
19
+ class CL_Scripts_Styles {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  /**
22
  * Helper function to convert HEX to RGB
24
  * @ref http://css-tricks.com/snippets/php/convert-hex-to-rgb/#comment-355641
25
  * @return array
26
  */
27
+ public static function hex2rgb( $color ) {
28
  if ( $color[0] == '#' ) {
29
  $color = substr( $color, 1 );
30
  }
47
  * @ref http://bavotasan.com/2011/convert-hex-color-to-rgb-using-php/
48
  * @return string
49
  */
50
+ public static function rgb2hex( $rgb ) {
51
  $hex = "#";
52
  $hex .= str_pad( dechex( $rgb[0] ), 2, "0", STR_PAD_LEFT );
53
  $hex .= str_pad( dechex( $rgb[1] ), 2, "0", STR_PAD_LEFT );
62
  * @ref http://stackoverflow.com/questions/5798129/regular-expression-to-only-allow-whole-numbers-and-commas-in-a-string
63
  * @return string
64
  */
65
+ public static function rgba2hex( $rgba ) {
 
66
  $rgba = preg_replace(
67
  array(
68
  '/[^\d,]/', // Matches anything that's not a comma or number.
85
  *
86
  * @return bool
87
  */
88
+ public static function is_rgba( $str ) {
89
  $is_rgba = strpos( $str, 'rgba' );
90
 
91
  if ( false === $is_rgba )
99
  *
100
  * @since 1.1 (1/8/13)
101
  */
102
+ public static function prefixit( $input, $option ) {
103
+ $prefix = array( '-webkit-', '-moz-', '-ms-', '-o-', '' );
104
 
105
+ $output = "\n\t";
106
 
107
+ foreach ( $prefix as $_prefix ) {
108
+ $output .= self::trailingsemicolonit( $_prefix . $input . ': ' . esc_attr( $option ) );
109
  }
110
 
111
  return $output;
119
  * @since 1.1 (1/8/13)
120
  * @updated 1.1.1 (1/9/13)
121
  */
122
+ public static function trailingsemicolonit( $input ) {
123
  $output = rtrim( $input, ';' );
124
  $output .= ';' . "\n\t";
125
 
131
  *
132
  * @since 2.0
133
  */
134
+ public static function cssrule( $rule ) {
135
  $output = rtrim( $rule, '{' );
136
  $output .= " {\n\t";
137
 
138
  return $output;
139
  }
140
 
141
+ }
 
 
 
 
 
 
 
 
 
includes/class-cl-settings-api.php ADDED
@@ -0,0 +1,872 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) exit;
5
+
6
+ /**
7
+ * Custom Login Settings API
8
+ */
9
+ class CL_Settings_API {
10
+
11
+ /**
12
+ * Version
13
+ */
14
+ var $api_version = '2.0.2';
15
+
16
+ /**
17
+ * @var array
18
+ */
19
+ private $settings_sections = array();
20
+ private $settings_fields = array();
21
+ private $settings_sidebars = array();
22
+ private $localize_array = array();
23
+
24
+ /**
25
+ * @var array
26
+ */
27
+ private $settings = array();
28
+
29
+ /**
30
+ * Fire away captain!
31
+ */
32
+ public function __construct( $sections = array(), $fields = array(), $args = array() ) {
33
+
34
+ $this->settings = $args;
35
+
36
+ if ( !empty( $sections ) ) {
37
+ $this->set_sections( $sections );
38
+ }
39
+
40
+ if ( !empty( $fields ) ) {
41
+ $this->set_fields( $fields );
42
+ }
43
+
44
+ add_action( 'load-' . $this->settings['menu_page'], array( $this, 'init' ), 89 );
45
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
46
+ add_action( 'admin_footer', array( $this, 'wp_localize_script' ), 99 );
47
+ add_action( 'wp_ajax_' . $this->settings['prefix'] . '_get_form', array( $this, 'get_form' ), 99 );
48
+ }
49
+
50
+ /**
51
+ * Fire any actions needed a little late
52
+ *
53
+ * @return void
54
+ */
55
+ public function init() {
56
+
57
+ add_action( 'admin_notices', array( $this, 'upgrade_notices' ) );
58
+ add_action( $this->settings['prefix'] . '_sticky_admin_notice', array( $this, 'sticky_admin_notice_social_links' ), 10 );
59
+ add_action( $this->settings['prefix'] . '_settings_sidebars', array( $this, 'about_the_author' ), 19 );
60
+ add_action( $this->settings['prefix'] . '_settings_sidebars', array( $this, 'sidebar_feed' ), 20 );
61
+ }
62
+
63
+ /**
64
+ * Enqueue scripts and styles
65
+ */
66
+ public function admin_enqueue_scripts( $hook ) {
67
+ if ( 'settings_page_' . $this->settings['domain'] !== $hook )
68
+ return;
69
+
70
+ /* Core */
71
+ wp_enqueue_media();
72
+ wp_enqueue_script( 'wp-color-picker' );
73
+ wp_enqueue_style( 'wp-color-picker' );
74
+
75
+ /* jQuery Chosen */
76
+ wp_enqueue_script( 'chosen', plugins_url( 'js/chosen.jquery.min.js', $this->settings['file'] ), array( 'jquery' ), '1.3.0', true );
77
+ wp_enqueue_style( 'chosen', plugins_url( 'css/chosen/chosen.min.css', $this->settings['file'] ), null, '1.3.0', 'screen' );
78
+
79
+ /* jQuery Sticky */
80
+ wp_enqueue_script( 'sticky', plugins_url( 'js/jquery.sticky.js', $this->settings['file'] ), array( 'jquery' ), '1.0.0', true );
81
+
82
+ /* Ace */
83
+ wp_enqueue_script( 'ace', plugins_url( 'js/ace/src-min-noconflict/ace.js', $this->settings['file'] ), null, '20.12.14', true );
84
+
85
+ /* Dashicons */
86
+ wp_enqueue_style( 'dashicons' );
87
+
88
+ /* Admin */
89
+ wp_enqueue_script( $this->settings['domain'], plugins_url( 'js/admin.js', $this->settings['file'] ), array( 'jquery', 'jquery-form' ), $this->settings['version'], true );
90
+ wp_enqueue_style( $this->settings['domain'], plugins_url( 'css/admin.css', $this->settings['file'] ), false, $this->settings['version'], 'screen' );
91
+
92
+ do_action( "{$this->settings['domain']}_admin_enqueue_scripts" );
93
+ }
94
+
95
+ /**
96
+ * Localize our script array.
97
+ */
98
+ public function wp_localize_script() {
99
+ $this->localize_array['prefix'] = $this->settings['prefix'];
100
+ $this->localize_array['blog_id'] = get_current_blog_id();
101
+ $this->localize_array['nonce'] = wp_create_nonce( $this->settings['nonce'] );
102
+ wp_localize_script( $this->settings['domain'], 'cl_settings_api', $this->localize_array );
103
+ }
104
+
105
+ /**
106
+ * Set settings sections
107
+ *
108
+ * @param array $sections setting sections array
109
+ */
110
+ public function set_sections( $sections ) {
111
+
112
+ $sections = apply_filters( $this->settings['prefix'] . '_add_settings_sections', $sections );
113
+ $this->settings_sections = $sections;
114
+ return $this;
115
+ }
116
+
117
+ /**
118
+ * Add a single section
119
+ *
120
+ * @param array $section
121
+ */
122
+ public function add_section( $section ) {
123
+
124
+ $this->settings_sections[] = $section;
125
+ return $this;
126
+ }
127
+
128
+ /**
129
+ * Set settings fields
130
+ *
131
+ * @param array $fields settings fields array
132
+ */
133
+ public function set_fields( $fields ) {
134
+
135
+ $fields = apply_filters( $this->settings['prefix'] . '_add_settings_fields', $fields );
136
+ $this->settings_fields = $fields;
137
+ return $this;
138
+ }
139
+
140
+ /**
141
+ * Add a single field
142
+ *
143
+ * @param array $section
144
+ * @param array $field
145
+ */
146
+ public function add_field( $section, $field ) {
147
+
148
+ $defaults = array(
149
+ 'name' => '',
150
+ 'label' => '',
151
+ 'desc' => '',
152
+ 'type' => 'text',
153
+ );
154
+
155
+ $args = wp_parse_args( $field, $defaults );
156
+ $this->settings_fields[$section][] = $args;
157
+ return $this;
158
+ }
159
+
160
+ /**
161
+ * Add a single section
162
+ *
163
+ * @param array $section
164
+ */
165
+ public function add_sidebar( $sidebar = array() ) {
166
+
167
+ $sidebar = apply_filters( $this->settings['prefix'] . '_add_settings_sidebar', $sidebar );
168
+ if ( !empty( $sidebar ) ) {
169
+ $this->settings_sidebars[] = $sidebar;
170
+ }
171
+ }
172
+
173
+ /**
174
+ * Initialize and registers the settings sections and fileds to WordPress
175
+ *
176
+ * Usually this should be called at `admin_init` hook.
177
+ *
178
+ * This function gets the initiated settings sections and fields. Then
179
+ * registers them to WordPress and ready for use.
180
+ */
181
+ public function admin_init() {
182
+
183
+ //register settings sections
184
+ foreach ( $this->settings_sections as $section ) {
185
+ if ( false == get_option( $section['id'] ) && ( isset( $section['option'] ) && false !== $section['option'] ) ) {
186
+ add_option( $section['id'] );
187
+ }
188
+
189
+ add_settings_section( $section['id'], $section['title'], '__return_false', $section['id'] );
190
+ }
191
+
192
+ //register settings fields
193
+ foreach ( $this->settings_fields as $section => $field ) {
194
+ foreach ( $field as $option ) {
195
+
196
+ $type = isset( $option['type'] ) ? $option['type'] : 'text';
197
+
198
+ $args = array(
199
+ 'id' => $option['name'],
200
+ 'desc' => isset( $option['desc'] ) ? $option['desc'] : '',
201
+ 'name' => $option['label'],
202
+ 'section' => $section,
203
+ 'size' => isset( $option['size'] ) ? $option['size'] : null,
204
+ 'options' => isset( $option['options'] ) ? $option['options'] : '',
205
+ 'default' => isset( $option['default'] ) ? $option['default'] : '',
206
+ 'sanitize' => isset( $option['sanitize'] ) ? $option['sanitize'] : '',
207
+ 'class' => isset( $option['class'] ) ? $option['class'] : $this,
208
+ );
209
+ $args = wp_parse_args( $args, $option );
210
+
211
+ add_settings_field( $section . '[' . $option['name'] . ']', $option['label'], array( $args['class'], 'callback_' . $type ), $section, $section, $args );
212
+ }
213
+ }
214
+
215
+ // creates our settings in the options table
216
+ foreach ( $this->settings_sections as $section ) {
217
+ register_setting( $section['id'], $section['id'], array( $this, 'sanitize_options' ) );
218
+ }
219
+ }
220
+
221
+ /**
222
+ * Displays a text field for a settings field
223
+ *
224
+ * @param array $args settings field args
225
+ * @updated 2.0.2
226
+ */
227
+ function callback_text( $args ) {
228
+
229
+ $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['default'] ) );
230
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
231
+ $type = isset( $args['type'] ) && !is_null( $args['type'] ) ? $args['type'] : 'text';
232
+
233
+ $html = sprintf( '<input type="%1$s" class="%2$s-text" id="%3$s[%4$s]" name="%3$s[%4$s]" value="%5$s">', $type, $size, $args['section'], $args['id'], $value );
234
+ $html .= !empty( $args['desc'] ) ? sprintf( '<span class="description"> %s</span>', $args['desc'] ) : '';
235
+
236
+ echo $html;
237
+ }
238
+
239
+ /**
240
+ * Displays a text field for a settings field
241
+ *
242
+ * @param array $args settings field args
243
+ * @since 2.0.2
244
+ */
245
+ function callback_text_number( $args ) {
246
+
247
+ $args['type'] = 'number';
248
+ $this->callback_text( $args );
249
+ }
250
+
251
+ /**
252
+ * Displays a text field for a settings field
253
+ *
254
+ * @param array $args settings field args
255
+ */
256
+ function callback_text_array( $args ) {
257
+
258
+ $value = $this->get_option( $args['id'], $args['section'], $args['default'] );
259
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
260
+
261
+ $html = '<ul style="margin-top:0">';
262
+
263
+ if ( is_array( $value ) ) {
264
+ foreach ( $value as $key => $val ) {
265
+ $html .= '<li>';
266
+ $html .= sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s][]" value="%4$s" data-key="%5$s">', $size, $args['section'], $args['id'], esc_attr( $val ), $key );
267
+ $html .= sprintf( '<a href="#" class="button dodelete-%1$s[%2$s]">-</a>', $args['section'], $args['id'] );
268
+ $html .= '</li>';
269
+ }
270
+ }
271
+ else {
272
+ $html .= '<li>';
273
+ $html .= sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s][]" value="%4$s" data-key="0" data-array="false">', $size, $args['section'], $args['id'], esc_attr( $value ) );
274
+ $html .= sprintf( '<a href="#" class="button dodelete-%1$s[%2$s]">-</a>', $args['section'], $args['id'] );
275
+ $html .= '</li>';
276
+ }
277
+
278
+ $html .= '</ul>';
279
+ $html .= sprintf( '<a href="#" class="button docopy-%1$s[%2$s]">+</a>', $args['section'], $args['id'] );
280
+
281
+ $html .= !empty( $args['desc'] ) ? sprintf( '<span class="description"> %s</span>', $args['desc'] ) : '';
282
+
283
+ echo $html;
284
+ }
285
+
286
+ /**
287
+ * Displays a text field for a settings field
288
+ *
289
+ * @param array $args settings field args
290
+ */
291
+ function callback_colorpicker( $args ) {
292
+
293
+ $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['default'] ) );
294
+ $check = esc_attr( $this->get_option( $args['id'] . '_checkbox', $args['section'], $args['default'] ) );
295
+ $opacity = esc_attr( $this->get_option( $args['id'] . '_opacity', $args['section'], $args['default'] ) );
296
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'small';
297
+ $options = array( '1', '0.9', '0.8', '0.7', '0.6', '0.5', '0.4', '0.3', '0.2', '0.1', '0', );
298
+ $class = 'on' != $check ? ' hidden' : '';
299
+
300
+ /* Localize the array */
301
+ $this->localize_array['callback_colorpicker'][] = array( 'id' => $args['id'], 'section' => $args['section'] );
302
+
303
+ /* Color */
304
+ $html = '<div class="cl-colorpicker-wrap">';
305
+ $html .= sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s" style="float:left">', $size, $args['section'], $args['id'], $value );
306
+
307
+ /* Allow Opacity */
308
+ $html .= '<div class="checkbox-wrap">';
309
+ $html .= sprintf( '<input type="hidden" name="%1$s[%2$s]" value="off" >', $args['section'], $args['id'] . '_checkbox' );
310
+ $html .= sprintf( '<input type="checkbox" class="checkbox" id="%1$s[%2$s]" name="%1$s[%2$s]" value="on"%4$s >', $args['section'], $args['id'] . '_checkbox', $check, checked( $check, 'on', false ) );
311
+ $html .= sprintf( __( '<label for="%1$s[%2$s]">Opacity</label>', $this->settings['domain'] ), $args['section'], $args['id'] . '_checkbox' );
312
+ $html .= '</div>';
313
+
314
+ /* Opacity */
315
+ $html .= sprintf( '<select class="%1$s%4$s" name="%2$s[%3$s]" id="%2$s[%3$s]" style="margin-left:70px;">', $size, $args['section'], $args['id'] . '_opacity', $class );
316
+ foreach ( $options as $key ) {
317
+ $html .= sprintf( '<option value="%s"%s>%s</option>', $key, selected( $opacity, $key, false ), $key );
318
+ }
319
+ $html .= '</select>';
320
+ $html .= '<br class="clear">';
321
+ $html .= '</div>';
322
+
323
+ $html .= !empty( $args['desc'] ) ? sprintf( '<span class="description"> %s</span>', $args['desc'] ) : '';
324
+
325
+ echo $html;
326
+ }
327
+
328
+ /**
329
+ * Displays a checkbox for a settings field
330
+ *
331
+ * @param array $args settings field args
332
+ */
333
+ function callback_checkbox( $args ) {
334
+
335
+ $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['default'] ) );
336
+
337
+ $html = '<div class="checkbox-wrap">';
338
+ $html .= sprintf( '<input type="hidden" name="%1$s[%2$s]" value="off" >', $args['section'], $args['id'] );
339
+ $html .= sprintf( '<input type="checkbox" class="checkbox" id="%1$s[%2$s]" name="%1$s[%2$s]" value="on"%4$s >', $args['section'], $args['id'], $value, checked( $value, 'on', false ) );
340
+ $html .= sprintf( '<label for="%1$s[%2$s]"></label>', $args['section'], $args['id'] );
341
+ $html .= '</div>';
342
+
343
+ $html .= !empty( $args['desc'] ) ? sprintf( '<span class="description"> %s</span>', $args['desc'] ) : '';
344
+
345
+ echo $html;
346
+ }
347
+
348
+ /**
349
+ * Displays a multicheckbox a settings field
350
+ *
351
+ * @param array $args settings field args
352
+ */
353
+ function callback_multicheck( $args ) {
354
+
355
+ $value = $this->get_option( $args['id'], $args['section'], $args['default'] );
356
+
357
+ $html = '<div class="checkbox-wrap">';
358
+ $html .= '<ul>';
359
+ foreach ( $args['options'] as $key => $label ) {
360
+ $checked = isset( $value[$key] ) ? $value[$key] : '0';
361
+ $html .= '<li>';
362
+ $html .= sprintf( '<input type="checkbox" class="checkbox" id="%1$s[%2$s][%3$s]" name="%1$s[%2$s][%3$s]" value="%3$s"%4$s >', $args['section'], $args['id'], $key, checked( $checked, $key, false ) );
363
+ $html .= sprintf( '<label for="%1$s[%2$s][%4$s]" title="%3$s"> %3$s</label>', $args['section'], $args['id'], $label, $key );
364
+ $html .= '</li>';
365
+ }
366
+ $html .= '</ul>';
367
+ $html .= '</div>';
368
+
369
+ $html .= !empty( $args['desc'] ) ? sprintf( '<span class="description"> %s</span>', $args['desc'] ) : '';
370
+
371
+ echo $html;
372
+ }
373
+
374
+ /**
375
+ * Displays a multicheckbox a settings field
376
+ *
377
+ * @param array $args settings field args
378
+ */
379
+ function callback_radio( $args ) {
380
+
381
+ $value = $this->get_option( $args['id'], $args['section'], $args['default'] );
382
+
383
+ $html = '<div class="radio-wrap">';
384
+ $html .= '<ul>';
385
+ foreach ( $args['options'] as $key => $label ) {
386
+ $html .= '<li>';
387
+ $html .= sprintf( '<input type="radio" class="radio" id="%1$s[%2$s][%3$s]" name="%1$s[%2$s]" value="%3$s"%4$s >', $args['section'], $args['id'], $key, checked( $value, $key, false ) );
388
+ $html .= sprintf( '<label for="%1$s[%2$s][%4$s]" title="%3$s"> %3$s</label><br>', $args['section'], $args['id'], $label, $key );
389
+ $html .= '</li>';
390
+ }
391
+ $html .= '</ul>';
392
+ $html .= '</div>';
393
+
394
+ $html .= !empty( $args['desc'] ) ? sprintf( '<span class="description"> %s</span>', $args['desc'] ) : '';
395
+
396
+ echo $html;
397
+ }
398
+
399
+ /**
400
+ * Displays a selectbox for a settings field
401
+ *
402
+ * @param array $args settings field args
403
+ */
404
+ function callback_select( $args ) {
405
+
406
+ $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['default'] ) );
407
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
408
+
409
+ /* Localize the array */
410
+ $this->localize_array['callback_select'][] = array( 'id' => $args['id'], 'section' => $args['section'] );
411
+
412
+ $html = sprintf( '<select class="%1$s" name="%2$s[%3$s]" id="%2$s[%3$s]">', $size, $args['section'], $args['id'] );
413
+ foreach ( $args['options'] as $key => $label ) {
414
+ $html .= sprintf( '<option value="%s"%s>%s</option>', $key, selected( $value, $key, false ), $label );
415
+ }
416
+ $html .= sprintf( '</select>' );
417
+
418
+ $html .= !empty( $args['desc'] ) ? sprintf( '<br><span class="description"> %s</span>', $args['desc'] ) : '';
419
+
420
+ echo $html;
421
+ }
422
+
423
+ /**
424
+ * Displays a textarea for a settings field
425
+ *
426
+ * @param array $args settings field args
427
+ */
428
+ function callback_textarea( $args ) {
429
+
430
+ $value = esc_textarea( $this->get_option( $args['id'], $args['section'], $args['default'] ) );
431
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
432
+ $extra = isset( $args['extra'] ) && is_array( $args['extra'] ) ? $args['extra'] : null;
433
+ $param = '';
434
+
435
+ if ( null !== $extra ) {
436
+ foreach( $extra as $p_key => $p_value ) {
437
+ $param .= $p_key . '="' . $p_value . '"';
438
+ }
439
+ }
440
+
441
+ $html = sprintf( '<textarea rows="5" cols="55" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]"%5$s>%4$s</textarea>', $size, $args['section'], $args['id'], stripslashes( $value ), $param );
442
+ $html .= !empty( $args['desc'] ) ? sprintf( '<span class="description"> %s</span>', $args['desc'] ) : '';
443
+
444
+ echo $html;
445
+ }
446
+
447
+ /**
448
+ * Displays a HTML for a settings field
449
+ *
450
+ * @param array $args settings field args
451
+ */
452
+ function callback_html( $args ) {
453
+ static $counter = 0;
454
+
455
+ $html = isset( $args['desc'] ) ? sprintf( '<div class="section-%s-%d">%s</div><hr>', $args['section'], $counter, $args['desc'] ) : '';
456
+ $counter++;
457
+
458
+ echo $html;
459
+ }
460
+
461
+ /**
462
+ * Displays raw HTML for a settings field
463
+ *
464
+ * @param array $args settings field args
465
+ */
466
+ function callback_raw( $args ) {
467
+
468
+ $html = isset( $args['desc'] ) ? sprintf( '<div class="raw-html">%s</div>', $args['desc'] ) : '';
469
+
470
+ echo $html;
471
+ }
472
+
473
+ /**
474
+ * Displays a rich text textarea for a settings field
475
+ *
476
+ * @param array $args settings field args
477
+ */
478
+ function callback_wysiwyg( $args ) {
479
+
480
+ $value = wpautop( $this->get_option( $args['id'], $args['section'], $args['default'] ) );
481
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : '500px';
482
+
483
+ $html = sprintf( '<div style="width: %s">', $size );
484
+
485
+ ob_start();
486
+ wp_editor( $value, $args['section'] . '[' . $args['id'] . ']', array( 'teeny' => true, 'textarea_rows' => 10 ) );
487
+
488
+ $html .= ob_get_clean();
489
+ $html .= '</div>';
490
+
491
+ $html .= !empty( $args['desc'] ) ? sprintf( '<br><span class="description"> %s</span>', $args['desc'] ) : '';
492
+
493
+ echo $html;
494
+ }
495
+
496
+ /**
497
+ * Displays a file upload field for a settings field
498
+ *
499
+ * @param array $args settings field args
500
+ */
501
+ function callback_file( $args ) {
502
+ static $counter = 0;
503
+
504
+ $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['default'] ) );
505
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
506
+ $id = $args['section'] . '[' . $args['id'] . ']';
507
+
508
+ /* Localize the array */
509
+ $this->localize_array['callback_file'][] = array( 'id' => $args['id'], 'section' => $args['section'] );
510
+
511
+ $html = sprintf( '<input type="text" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s">', $size, $args['section'], $args['id'], $value );
512
+ $html .= '<input type="button" class="button '. $args['id'] .'-browse" id="'. $id .'_button" value="Browse" style="margin-left:5px" >';
513
+ $html .= '<input type="button" class="button '. $args['id'] .'-clear" id="'. $id .'_clear" value="Clear" style="margin-left:5px" >';
514
+
515
+ $html .= !empty( $args['desc'] ) ? sprintf( '<br><span class="description"> %s</span>', $args['desc'] ) : '';
516
+
517
+ /* Image */
518
+ $html .= '<div id="' . $id . '_preview" class="' . $id . '_preview">';
519
+ if ( $value != '' ) {
520
+ $check_image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $value );
521
+ if ( $check_image ) {
522
+ $html .= '<div class="img-wrapper">';
523
+ $html .= '<img src="' . $value . '" alt="" >';
524
+ $html .= '<a href="#" class="remove_file_button" rel="' . $id . '">Remove Image</a>';
525
+ $html .= '</div>';
526
+ }
527
+ }
528
+ $html .= '</div>';
529
+
530
+ echo $html;
531
+ }
532
+
533
+ /**
534
+ * Displays a password field for a settings field
535
+ *
536
+ * @param array $args settings field args
537
+ */
538
+ function callback_password( $args ) {
539
+
540
+ $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['default'] ) );
541
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
542
+
543
+ $html = sprintf( '<input type="password" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s">', $size, $args['section'], $args['id'], $value );
544
+ $html .= !empty( $args['desc'] ) ? sprintf( '<span class="description"> %s</span>', $args['desc'] ) : '';
545
+
546
+ echo $html;
547
+ }
548
+
549
+ /**
550
+ * Sanitize callback for Settings API
551
+ */
552
+ function sanitize_options( $options ) {
553
+
554
+ do_action( $this->settings['prefix'] . '_before_sanatize_options', $options );
555
+
556
+ foreach( $options as $option_slug => $option_value ) {
557
+ $sanitize_callback = $this->get_sanitize_callback( $option_slug );
558
+
559
+ // If callback is set, call it
560
+ if ( $sanitize_callback ) {
561
+ $options[ $option_slug ] = call_user_func( $sanitize_callback, $option_value );
562
+ continue;
563
+ }
564
+
565
+ // Treat everything that's not an array as a string
566
+ if ( !is_array( $option_value ) ) {
567
+ $options[ $option_slug ] = sanitize_text_field( $option_value );
568
+ continue;
569
+ }
570
+ }
571
+
572
+ do_action( $this->settings['prefix'] . '_after_sanatize_options', $options );
573
+
574
+ return $options;
575
+ }
576
+
577
+ /**
578
+ * Get sanitization callback for given option slug
579
+ *
580
+ * @param string $slug option slug
581
+ *
582
+ * @return mixed string or bool false
583
+ */
584
+ function get_sanitize_callback( $slug = '' ) {
585
+
586
+ if ( empty( $slug ) )
587
+ return false;
588
+
589
+ // Iterate over registered fields and see if we can find proper callback
590
+ foreach( $this->settings_fields as $section => $options ) {
591
+ foreach ( $options as $option ) {
592
+ if ( $option['name'] != $slug )
593
+ continue;
594
+ // Return the callback name
595
+ return isset( $option['sanitize'] ) && is_callable( $option['sanitize'] ) ? $option['sanitize'] : false;
596
+ }
597
+ }
598
+ return false;
599
+ }
600
+
601
+ /**
602
+ * Outpute our settings HTML
603
+ *
604
+ */
605
+ public function settings_html() { ?>
606
+
607
+ <div class="cl-container">
608
+
609
+ <div class="cl-header">
610
+ <h3><?php _e( 'Custom Login', $this->settings['domain'] ); ?></h3>
611
+ <span><?php echo $this->settings['version']; ?></span>
612
+ <div>
613
+ <?php echo sprintf( __( 'A %s plugin', $this->settings['domain'] ), '<strong><a href="https://frosty.media/" target="_blank">Frosty Media</a></strong>' ); ?>
614
+ &nbsp;&nbsp;|&nbsp;&nbsp;<a href="https://twitter.com/FrostyMediaWP"><span class="dashicons dashicons-twitter"></span></a>
615
+ </div>
616
+ </div><!-- #cl-header -->
617
+
618
+ <div id="cl-notices">
619
+ <h2></h2>
620
+ </div><!-- #cl-text -->
621
+
622
+ <div id="cl-sticky">
623
+ <div class="wrap">
624
+ <div id="sticky-admin-notice">
625
+ <?php do_action( $this->settings['prefix'] . '_sticky_admin_notice' ); ?>
626
+ </div>
627
+ <div class="alignright">
628
+ <?php do_action( $this->settings['prefix'] . '_before_submit_button' ); ?>
629
+ <?php submit_button( __( 'Save Changes', $this->settings['domain'] ), 'primary', 'cl_save', false ); ?>
630
+ </div>
631
+ <br class="clear">
632
+ </div>
633
+ </div><!-- #cl-sticky -->
634
+
635
+ <div class="cl-sidebar">
636
+ <?php $this->show_navigation(); ?>
637
+ <?php do_action( $this->settings['prefix'] . '_settings_sidebars', $this->settings_sidebars ); ?>
638
+ </div><!-- #cl-header -->
639
+
640
+ <div class="cl-main">
641
+ <?php $this->show_forms(); ?>
642
+ </div><!-- #cl-header -->
643
+
644
+ </div><!-- #cl-wrapper -->
645
+ <?php
646
+ }
647
+
648
+ /**
649
+ * Show navigation as lists
650
+ *
651
+ * Shows all the settings section labels as list items
652
+ */
653
+ private function show_navigation() {
654
+
655
+ $html = '<ul class="cl-sections-menu">';
656
+ foreach ( $this->settings_sections as $tab ) {
657
+ $html .= sprintf( '<li><a href="%1$s">%2$s</a></li>', isset( $tab['href'] ) ? $tab['href'] : '#' . $tab['id'], $tab['title'] );
658
+ }
659
+ $html .= '</ul>';
660
+
661
+ echo $html;
662
+ }
663
+
664
+ /**
665
+ * Show the section settings forms
666
+ *
667
+ * This function displays every sections in a different form
668
+ */
669
+ private function show_forms() {
670
+
671
+ foreach ( $this->settings_sections as $form ) {
672
+ $form_id = $form['id']; ?>
673
+ <div id="<?php echo $form_id; ?>" class="group">
674
+ <form action="options.php" id="<?php echo $form_id; ?>form" method="post" >
675
+ <?php do_action( $this->settings['prefix'] . '_form_top_' . $form['id'], $form ); ?>
676
+ <?php settings_fields( $form['id'] ); ?>
677
+ <?php do_settings_sections( $form['id'] ); ?>
678
+ <?php do_action( $this->settings['prefix'] . '_form_bottom_' . $form['id'], $form ); ?>
679
+ <?php if ( isset( $form['submit'] ) && $form['submit'] ) submit_button( ); ?>
680
+ </form>
681
+ </div><?php
682
+ # var_dump( $form_id, get_option( $form_id ) );
683
+ }
684
+ }
685
+
686
+ /**
687
+ * Show the section settings forms
688
+ *
689
+ * This function displays every sections in a different form
690
+ */
691
+ public function get_form() {
692
+
693
+ check_ajax_referer( $this->settings['nonce'], 'nonce' );
694
+
695
+ if ( isset( $_POST['form_id'] ) ) {
696
+
697
+ $setting_form = array();
698
+ $setting_form['error'] = 1;
699
+
700
+ foreach ( $this->settings_sections as $form ) {
701
+ $form_id = $form['id'];
702
+ if ( str_replace( '#', '', $_POST['form_id'] ) !== $form_id ) {
703
+ continue;
704
+ }
705
+ ob_start(); ?><form action="options.php" id="<?php echo $form_id; ?>form" method="post" >
706
+ <?php do_action( $this->settings['prefix'] . '_form_top_' . $form['id'], $form ); ?>
707
+ <?php settings_fields( $form['id'] ); ?>
708
+ <?php do_settings_sections( $form['id'] ); ?>
709
+ <?php do_action( $this->settings['prefix'] . '_form_bottom_' . $form['id'], $form ); ?>
710
+ <?php submit_button( ); ?>
711
+ </form><?php
712
+ $setting_form['error'] = 0;
713
+ $setting_form['html'] = ob_get_clean();
714
+ }
715
+
716
+ header('Content-Type: application/json');
717
+ echo json_encode( $setting_form );
718
+ die();
719
+ }
720
+ }
721
+
722
+ /**
723
+ * Create a potbox widget.
724
+ *
725
+ * @param string $id ID of the postbox.
726
+ * @param string $title Title of the postbox.
727
+ * @param string $content Content of the postbox.
728
+ */
729
+ public function postbox( $id, $title, $content, $group = false ) { ?>
730
+
731
+ <div class="metabox-holder<?php if ( $group ) echo ' group'; ?>" id="<?php echo $id; ?>">
732
+ <div class="postbox">
733
+ <h3><?php echo $title; ?></h3>
734
+ <div class="inside"><?php echo $content; ?></div>
735
+ </div>
736
+ </div><?php
737
+ }
738
+
739
+ /**
740
+ * Box with latest plugins from Extendd.com for sidebar
741
+ */
742
+ function about_the_author( $args ) {
743
+
744
+ $content = sprintf( '%s: <a href="https://wordpress.org/support/view/plugin-reviews/custom-login" class="star-rating">
745
+ <i class="dashicons dashicons-star-filled"></i>
746
+ <i class="dashicons dashicons-star-filled"></i>
747
+ <i class="dashicons dashicons-star-filled"></i>
748
+ <i class="dashicons dashicons-star-filled"></i>
749
+ <i class="dashicons dashicons-star-filled"></i>
750
+ </a>', _x( 'Rate', 'rate; as in rate this plugin', $this->settings['domain'] ) );
751
+
752
+ $content .= '<ul>';
753
+ $content .= sprintf( '<li>%s: <a href="https://austin.passy.co">Austin Passy</a></li>', _x( 'Author', 'the author of this plugin', $this->settings['domain'] ) );
754
+ $content .= sprintf( '<li>%s: <a href="https://twitter.com/TheFrosty">TheFrosty</a></li>', __( 'Twitter', $this->settings['domain'] ) );
755
+ $content .= '</ul>';
756
+
757
+ $content .= sprintf( __( '<small>If you have suggestions for a new add-on, feel free to open a support request on <a href="%s">GitHub</a>. Want regular updates? Follow me on <a href="%s">Twitter</a> or visit my <a href="%s">blog</a>.</small>' ),
758
+ 'https://github.com/thefrosty/custom-login/issues',
759
+ 'https://twitter.com/TheFrosty',
760
+ 'https://austin.passy.co'
761
+ );
762
+
763
+ $this->postbox( 'frosty-media-author', __( 'Custom Login', $this->settings['domain'] ), $content );
764
+ }
765
+
766
+ /**
767
+ * Box with latest plugins from Extendd.com for sidebar
768
+ */
769
+ function sidebar_feed( $args ) {
770
+
771
+ $defaults = array(
772
+ 'items' => 6,
773
+ 'feed' => 'https://frosty.media/feed/?post_type=plugin&plugin_tag=custom-login-extension',
774
+ );
775
+
776
+ $args = wp_parse_args( $args, $defaults );
777
+
778
+ $rss_items = CL_Common::fetch_rss_items( $args['items'], $args['feed'] );
779
+
780
+ $content = '<ul>';
781
+ if ( !$rss_items ) {
782
+ $content .= '<li>' . __( 'Error fetching feed', $this->settings['domain'] ) . '</li>';
783
+ }
784
+ else {
785
+ foreach ( $rss_items as $item ) {
786
+ $url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), null, 'display' ) );
787
+ $content .= '<li>';
788
+ $content .= '<a href="' . $url . '?utm_source=wpadmin&utm_medium=sidebarwidget&utm_term=newsite&utm_campaign=' . $this->settings['prefix'] . '_settings-api" target="_blank">' . esc_html( $item->get_title() ) . '</a>';
789
+ $content .= '</li>';
790
+ }
791
+ }
792
+ $content .= '</ul>';
793
+
794
+ $this->postbox( 'custom-login-extensions', sprintf( __( 'Custom Login Extensions %s', $this->settings['domain'] ), '<small class="dashicons dashicons-external"></small>' ), $content );
795
+ }
796
+
797
+ /**
798
+ * Display Upgrade Notices
799
+ *
800
+ * @access private
801
+ * @since 3.0.3
802
+ * @return void
803
+ */
804
+ public function upgrade_notices() {
805
+
806
+ $show_upgrade_notice = false;
807
+
808
+ // Version < 2.0
809
+ if ( false !== get_option( 'custom_login_settings', false ) ) {
810
+ $show_upgrade_notice = true;
811
+ }
812
+
813
+ // Version > 2.0
814
+ if ( false !== get_option( 'custom_login', false ) ) {
815
+ $show_upgrade_notice = true;
816
+ }
817
+
818
+ if ( $show_upgrade_notice && ( '' === get_option( CUSTOM_LOGIN_OPTION . '_general', '' ) ) ) {
819
+ remove_action( 'admin_notice', array( CL_Settings_Upgrade::instance(), 'upgrade_notices' ) );
820
+ printf(
821
+ '<div class="error"><p>' . esc_html__( 'Custom Login has detected old settings. If you wish to use them please run %sthis%s script before making any changes below.', CUSTOM_LOGIN_DIRNAME ) . '</p></div>',
822
+ '<a href="' . esc_url( admin_url( 'options.php?page=custom-login-upgrades' ) ) . '">',
823
+ '</a>'
824
+ );
825
+ }
826
+ }
827
+
828
+ /**
829
+ * Box with latest plugins from Extendd.com for sidebar
830
+ */
831
+ public function sticky_admin_notice_social_links() {
832
+
833
+ $content = '<ul class="social">';
834
+ $content .= '<li><a href="https://www.facebook.com/FrostyMediaWP"><span class="dashicons dashicons-facebook"></span></a></li>';
835
+ $content .= '<li><a href="https://twitter.com/FrostyMediaWP"><span class="dashicons dashicons-twitter"></span></a></li>';
836
+ $content .= '<li><a href="https://plus.google.com/+FrostyMedia/"><span class="dashicons dashicons-googleplus"></span></a></li>';
837
+ $content .= '<li><a href="http://eepurl.com/bbj0bD"><span class="dashicons dashicons-email"></span></a></li>';
838
+ $content .= '</ul>';
839
+
840
+ echo $content;
841
+ }
842
+
843
+ /**
844
+ * Replace all square brackets with and underscore.
845
+ *
846
+ * @param string $input
847
+ * @return string
848
+ */
849
+ private function replace_bracket_underscore( $input ) {
850
+ return preg_replace( '/[\[\]]/', '_', $input );
851
+ }
852
+
853
+ /**
854
+ * Get the value of a settings field
855
+ *
856
+ * @param string $option settings field name
857
+ * @param string $section the section name this field belongs to
858
+ * @param string $default default text if it's not found
859
+ * @return string
860
+ */
861
+ function get_option( $option, $section, $default = '' ) {
862
+
863
+ $options = get_option( $section, array() );
864
+
865
+ if ( isset( $options[$option] ) ) {
866
+ return $options[$option];
867
+ }
868
+
869
+ return $default;
870
+ }
871
+
872
+ }
includes/class-cl-settings-upgrades.php ADDED
@@ -0,0 +1,372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package CustomLogin
4
+ * @subpackage Classes/CL_Settings_Upgrade
5
+ * @author Austin Passy <http://austin.passy.co>
6
+ * @copyright Copyright (c) 2014-2015, Austin Passy
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) exit;
12
+
13
+ class CL_Settings_Upgrade {
14
+
15
+ /** Singleton *************************************************************/
16
+ private static $instance;
17
+
18
+ protected $parent;
19
+
20
+ /**
21
+ * Main Instance
22
+ *
23
+ * @staticvar array $instance
24
+ * @return The one true instance
25
+ */
26
+ public static function instance() {
27
+ if ( ! isset( self::$instance ) ) {
28
+ self::$instance = new self;
29
+ self::$instance->actions();
30
+ self::$instance->parent = CUSTOMLOGIN();
31
+ }
32
+ return self::$instance;
33
+ }
34
+
35
+ private function actions() {
36
+
37
+ add_action( 'admin_notices', array( $this, 'upgrade_notices' ) );
38
+ add_action( 'admin_menu', array( $this, 'add_submenu_page' ) );
39
+ add_action( 'wp_ajax_custom_login_trigger_upgrades', array( $this, 'trigger_upgrades' ) );
40
+ }
41
+
42
+ /**
43
+ * Display Upgrade Notices
44
+ *
45
+ * @access private
46
+ * @since 2.0
47
+ * @return void
48
+ */
49
+ public function upgrade_notices() {
50
+
51
+ if ( isset( $_GET['page'] ) && $_GET['page'] == ( 'custom-login-upgrades' || 'custom-login' ) )
52
+ return; // Don't show notices on the upgrades page
53
+
54
+ $cl_version = get_option( CUSTOM_LOGIN_OPTION . '_version' );
55
+
56
+ if ( ! $cl_version ) {
57
+ // 2.0 is the first version to use this option so we must add it
58
+ $cl_version = '2.0';
59
+ }
60
+
61
+ $cl_version = preg_replace( '/[^0-9.].*/', '', $cl_version );
62
+
63
+ // Version less than 2.0
64
+ if ( false !== ( $old_settings = get_option( 'custom_login_settings', false ) ) ) {
65
+
66
+ // New install
67
+ if ( !$old_settings )
68
+ return;
69
+
70
+ if ( !empty( $old_settings ) && !empty( $old_settings['version'] ) )
71
+ $cl_version = $old_settings['version'];
72
+
73
+ // Versions less than 2.0
74
+ if ( version_compare( $cl_version, '2.0', '<' ) ) {
75
+ printf(
76
+ '<div class="updated"><p>' . esc_html__( 'Custom Login needs to be upgraded, please click %shere%s to start the upgrade.', CUSTOM_LOGIN_DIRNAME ) . '</p></div>',
77
+ '<a href="' . esc_url( admin_url( 'options.php?page=custom-login-upgrades' ) ) . '">',
78
+ '</a>'
79
+ );
80
+ }
81
+ } // 2.0
82
+
83
+ // Version less than 2.0
84
+ if ( false !== ( $old_settings = get_option( 'custom_login', false ) ) ) {
85
+
86
+ // Versions less than 2.0
87
+ if ( version_compare( $cl_version, '3.0', '<' ) ) {
88
+ printf(
89
+ '<div class="updated"><p>' . esc_html__( 'Custom Login needs to be upgraded, please click %shere%s to start the upgrade.', CUSTOM_LOGIN_DIRNAME ) . '</p></div>',
90
+ '<a href="' . esc_url( admin_url( 'options.php?page=custom-login-upgrades' ) ) . '">',
91
+ '</a>'
92
+ );
93
+ }
94
+ } // 2.0
95
+ }
96
+
97
+ /**
98
+ * Add Submenu Upgrade page
99
+ *
100
+ * @access private
101
+ * @since 1.0
102
+ * @return void
103
+ */
104
+ public function add_submenu_page() {
105
+
106
+ add_submenu_page(
107
+ null,
108
+ __( 'Custom Login Upgrades', CUSTOM_LOGIN_DIRNAME ),
109
+ __( 'Custom Login Upgrades', CUSTOM_LOGIN_DIRNAME ),
110
+ 'update_plugins',
111
+ 'custom-login-upgrades',
112
+ array( $this, 'upgrades_screen' )
113
+ );
114
+ }
115
+
116
+ /**
117
+ * Render Upgrades Screen
118
+ *
119
+ * @access private
120
+ * @since 2.0
121
+ * @return void
122
+ */
123
+ function upgrades_screen() {
124
+ ?>
125
+ <div class="wrap">
126
+ <h2><?php _e( 'Custom Login - Upgrades', CUSTOM_LOGIN_DIRNAME ); ?></h2>
127
+ <div id="custom-login-upgrade-status">
128
+ <p>
129
+ <?php _e( 'The upgrade process has started, please be patient. This could take several minutes. You will be automatically redirected when the upgrade is finished.', CUSTOM_LOGIN_DIRNAME ); ?>
130
+ <img src="<?php echo esc_url( admin_url( 'images/loading.gif' ) ); ?>" id="custom-login-upgrade-loader"/>
131
+ </p>
132
+ </div>
133
+ <script type="text/javascript">
134
+ jQuery( document ).ready( function($) {
135
+ // Trigger upgrades on page load
136
+ var data = {
137
+ action : 'custom_login_trigger_upgrades',
138
+ nonce : '<?php echo wp_create_nonce( 'CL_Settings_Upgrade' . basename( __FILE__ ) ); ?>'
139
+ };
140
+ $.post( ajaxurl, data, function (response) {
141
+ if ( response == 'complete' ) {
142
+ $('#custom-login-upgrade-loader').hide();
143
+ document.location.href = 'options-general.php?page=custom-login';
144
+ }
145
+ });
146
+ });
147
+ </script>
148
+ </div>
149
+ <?php
150
+ }
151
+
152
+ /**
153
+ * Triggers all upgrade functions
154
+ *
155
+ * This function is usually triggered via ajax
156
+ *
157
+ * @access private
158
+ * @since 2.0
159
+ */
160
+ public function trigger_upgrades() {
161
+
162
+ check_ajax_referer( 'CL_Settings_Upgrade' . basename( __FILE__ ), 'nonce' );
163
+
164
+ // Version less than 2.0
165
+ if ( false !== ( $old_settings = get_option( 'custom_login_settings', false ) ) ) {
166
+
167
+ $cl_version = '1.0';
168
+
169
+ if ( !empty( $old_settings ) && !empty( $old_settings['version'] ) )
170
+ $cl_version = $old_settings['version'];
171
+
172
+ if ( version_compare( $cl_version, '2.0', '<' ) ) {
173
+ $this->cl_v20_upgrades();
174
+ }
175
+
176
+ } // 2.0
177
+
178
+ // Version less than 3.0
179
+ if ( false !== ( $old_settings = get_option( 'custom_login', false ) ) ) {
180
+
181
+ $cl_version = '2.0';
182
+
183
+ if ( !empty( $old_settings ) && !empty( $old_settings['version'] ) )
184
+ $cl_version = $old_settings['version'];
185
+
186
+ if ( version_compare( $cl_version, '3.0', '<' ) ) {
187
+ $this->cl_v30_upgrades();
188
+ }
189
+
190
+ } // 3.0
191
+
192
+ if ( DOING_AJAX ) {
193
+ echo 'complete';
194
+ die();
195
+ }
196
+ }
197
+
198
+ /**
199
+ * Upgrade routine for v2.0
200
+ *
201
+ * @access private
202
+ * @since 2.0.0
203
+ * @return void
204
+ */
205
+ private function cl_v20_upgrades() {
206
+
207
+ $old_settings = get_option( 'custom_login_settings' );
208
+ $new_settings = get_option( 'custom_login', array() );
209
+
210
+ $new_settings['version'] = $this->parent->version;
211
+ $new_settings['active'] = true === $old_settings['custom'] ? 'on' : 'off';
212
+ $new_settings['html_background_color'] = CL_Scripts_Styles::is_rgba( $old_settings['html_background_color'] ) ? CL_Scripts_Styles::rgba2hex( $old_settings['html_background_color'] ) : $old_settings['html_background_color'];
213
+ $new_settings['html_background_color_checkbox'] = 'off';
214
+ $new_settings['html_background_color_opacity'] = '';
215
+ $new_settings['html_background_url'] = $old_settings['html_background_url'];
216
+ $new_settings['html_background_position'] = 'left top';
217
+ $new_settings['html_background_repeat'] = $old_settings['html_background_repeat'];
218
+ $new_settings['html_background_size'] = $old_settings['html_background_size'];
219
+ $new_settomgs['hide_wp_logo'] = 'on';
220
+ $new_settings['logo_background_url'] = $old_settings['login_form_logo'];
221
+ $new_settings['logo_background_position'] = 'top center';
222
+ $new_settings['logo_background_repeat'] = '';
223
+ $new_settings['logo_background_size'] = '';
224
+ $new_settings['login_form_background_color'] = CL_Scripts_Styles::is_rgba( $old_settings['html_background_color'] ) ? CL_Scripts_Styles::rgba2hex( $old_settings['login_form_background_color'] ) : $old_settings['login_form_background_color'];
225
+ $new_settings['login_form_background_color_checkbox'] = 'off';
226
+ $new_settings['login_form_background_color_opacity'] = '';
227
+ $new_settings['login_form_background_url'] = $old_settings['login_form_background'];
228
+ $new_settings['login_form_background_position'] = '';
229
+ $new_settings['login_form_background_repeat'] = '';
230
+ $new_settings['login_form_background_size'] = $old_settings['login_form_background_size'];
231
+ $new_settings['login_form_border_radius'] = $old_settings['login_form_border_radius'];
232
+ $new_settings['login_form_border_size'] = $old_settings['login_form_border'];
233
+ $new_settings['login_form_border_color'] = CL_Scripts_Styles::is_rgba( $old_settings['html_background_color'] ) ? CL_Scripts_Styles::rgba2hex( $old_settings['login_form_border_color'] ) : $old_settings['login_form_border_color'];
234
+ $new_settings['login_form_border_color_checkbox'] = 'off';
235
+ $new_settings['login_form_border_color_opacity'] = '';
236
+ $new_settings['login_form_box_shadow'] = $old_settings['login_form_box_shadow_1'] . 'px ' . $old_settings['login_form_box_shadow_2'] . 'px ' . $old_settings['login_form_box_shadow_3'] . 'px';
237
+ $new_settings['login_form_box_shadow_color'] = CL_Scripts_Styles::is_rgba( $old_settings['html_background_color'] ) ? CL_Scripts_Styles::rgba2hex( $old_settings['login_form_box_shadow_4'] ) : $old_settings['login_form_box_shadow_4'];
238
+ $new_settings['login_form_box_shadow_color_checkbox'] = 'off';
239
+ $new_settings['login_form_box_shadow_color_opacity'] = '';
240
+ $new_settings['label_color'] = CL_Scripts_Styles::is_rgba( $old_settings['html_background_color'] ) ? CL_Scripts_Styles::rgba2hex( $old_settings['label_color'] ) : $old_settings['label_color'];
241
+ $new_settings['label_color_checkbox'] = 'off';
242
+ $new_settings['label_color_opacity'] = '';
243
+ $new_settings['nav_color'] = '';
244
+ $new_settings['nav_color_checkbox'] = 'off';
245
+ $new_settings['nav_color_opacity'] = '';
246
+ $new_settings['nav_text_shadow_color'] = '';
247
+ $new_settings['nav_text_shadow_color_checkbox'] = 'off';
248
+ $new_settings['nav_text_shadow_color_opacity'] = '';
249
+ $new_settings['nav_hover_color'] = '';
250
+ $new_settings['nav_hover_color_checkbox'] = 'off';
251
+ $new_settings['nav_hover_color_opacity'] = '';
252
+ $new_settings['nav_text_shadow_hover_color'] = '';
253
+ $new_settings['nav_text_shadow_hover_color_checkbox'] = 'off';
254
+ $new_settings['nav_text_shadow_hover_color_opacity'] = '';
255
+ $new_settings['custom_css'] = wp_filter_nohtml_kses( $old_settings['custom_css'] );
256
+ $new_settings['custom_html'] = wp_kses_post( $old_settings['custom_html'] );
257
+ $new_settings['custom_jquery'] = wp_specialchars_decode( stripslashes( $old_settings['custom_jquery'] ), 1, 0, 1 );
258
+
259
+ update_option( 'custom_login', $new_settings );
260
+ delete_option( 'custom_login_settings' );
261
+ return true;
262
+ }
263
+
264
+ /**
265
+ * Upgrade routine for v3.0
266
+ *
267
+ * @access private
268
+ * @since 3.0.0
269
+ * @return void
270
+ */
271
+ private function cl_v30_upgrades() {
272
+
273
+ $old_settings = get_option( 'custom_login', array() );
274
+ $design_settings = get_option( CUSTOM_LOGIN_OPTION . '_design', array() );
275
+ $general_settings = get_option( CUSTOM_LOGIN_OPTION . '_general', array() );
276
+
277
+ /** Design */
278
+ $design_settings['html_background_color'] = $this->get_old_setting( $old_settings, 'html_background_color' );
279
+ $design_settings['html_background_color_checkbox'] = $this->get_old_setting( $old_settings, 'html_background_color_checkbox' );
280
+ $design_settings['html_background_color_opacity'] = $this->get_old_setting( $old_settings, 'html_background_color_opacity' );
281
+ $design_settings['html_background_url'] = $this->get_old_setting( $old_settings, 'html_background_url' );
282
+ $design_settings['html_background_position'] = $this->get_old_setting( $old_settings, 'html_background_position' );
283
+ $design_settings['html_background_repeat'] = $this->get_old_setting( $old_settings, 'html_background_repeat' );
284
+ $design_settings['html_background_size'] = $this->get_old_setting( $old_settings, 'html_background_size' );
285
+
286
+ $design_settings['logo_force_form_max_width'] = 'off'; // New
287
+ $design_settings['hide_wp_logo'] = $this->get_old_setting( $old_settings, 'hide_wp_logo' );
288
+ $design_settings['logo_background_url'] = $this->get_old_setting( $old_settings, 'logo_background_url' );
289
+ $design_settings['logo_background_size_width'] = $this->get_old_setting( $old_settings, 'logo_background_size_width' );
290
+ $design_settings['logo_background_size_height'] = $this->get_old_setting( $old_settings, 'logo_background_size_height' );
291
+ $design_settings['logo_background_position'] = $this->get_old_setting( $old_settings, 'logo_background_position' );
292
+ $design_settings['logo_background_repeat'] = $this->get_old_setting( $old_settings, 'logo_background_repeat' );
293
+ $design_settings['logo_background_size'] = $this->get_old_setting( $old_settings, 'logo_background_size' );
294
+
295
+ $design_settings['login_form_width'] = ''; // New
296
+
297
+ $design_settings['login_form_background_color'] = $this->get_old_setting( $old_settings, 'login_form_background_color' );
298
+ $design_settings['login_form_background_color_checkbox'] = $this->get_old_setting( $old_settings, 'login_form_background_color_checkbox' );
299
+ $design_settings['login_form_background_color_opacity'] = $this->get_old_setting( $old_settings, 'login_form_background_color_opacity' );
300
+ $design_settings['login_form_background_url'] = $this->get_old_setting( $old_settings, 'login_form_background_url' );
301
+ $design_settings['login_form_background_position'] = $this->get_old_setting( $old_settings, 'login_form_background_position' );
302
+ $design_settings['login_form_background_repeat'] = $this->get_old_setting( $old_settings, 'login_form_background_repeat' );
303
+ $design_settings['login_form_background_size'] = $this->get_old_setting( $old_settings, 'login_form_background_size' );
304
+
305
+ $design_settings['login_form_border_radius'] = $this->get_old_setting( $old_settings, 'login_form_border_radius' );
306
+ $design_settings['login_form_border_size'] = $this->get_old_setting( $old_settings, 'login_form_border_size' );
307
+ $design_settings['login_form_border_color'] = $this->get_old_setting( $old_settings, 'login_form_border_color' );
308
+ $design_settings['login_form_border_color_checkbox'] = $this->get_old_setting( $old_settings, 'login_form_border_color_checkbox' );
309
+ $design_settings['login_form_border_color_opacity'] = $this->get_old_setting( $old_settings, 'login_form_border_color_opacity' );
310
+ $design_settings['login_form_box_shadow'] = $this->get_old_setting( $old_settings, 'login_form_box_shadow' );
311
+ $design_settings['login_form_box_shadow_color'] = $this->get_old_setting( $old_settings, 'login_form_box_shadow_color' );
312
+ $design_settings['login_form_box_shadow_color_checkbox'] = $this->get_old_setting( $old_settings, 'login_form_box_shadow_color_checkbox' );
313
+ $design_settings['login_form_box_shadow_color_opacity'] = $this->get_old_setting( $old_settings, 'login_form_box_shadow_color_opacity' );
314
+
315
+ $design_settings['label_color'] = $this->get_old_setting( $old_settings, 'label_color' );
316
+ $design_settings['label_color_checkbox'] = $this->get_old_setting( $old_settings, 'label_color_checkbox' );
317
+ $design_settings['label_color_opacity'] = $this->get_old_setting( $old_settings, 'label_color_opacity' );
318
+
319
+ $design_settings['nav_color'] = $this->get_old_setting( $old_settings, 'nav_color' );
320
+ $design_settings['nav_color_checkbox'] = $this->get_old_setting( $old_settings, 'nav_color_checkbox' );
321
+ $design_settings['nav_color_opacity'] = $this->get_old_setting( $old_settings, 'nav_color_opacity' );
322
+ $design_settings['nav_text_shadow_color'] = $this->get_old_setting( $old_settings, 'nav_text_shadow_color' );
323
+ $design_settings['nav_text_shadow_color_checkbox'] = $this->get_old_setting( $old_settings, 'nav_text_shadow_color_checkbox' );
324
+ $design_settings['nav_text_shadow_color_opacity'] = $this->get_old_setting( $old_settings, 'nav_text_shadow_color_opacity' );
325
+ $design_settings['nav_hover_color'] = $this->get_old_setting( $old_settings, 'nav_hover_color' );
326
+ $design_settings['nav_hover_color_checkbox'] = $this->get_old_setting( $old_settings, 'nav_hover_color_checkbox' );
327
+ $design_settings['nav_hover_color_opacity'] = $this->get_old_setting( $old_settings, 'nav_hover_color_opacity' );
328
+ $design_settings['nav_text_shadow_hover_color'] = $this->get_old_setting( $old_settings, 'nav_text_shadow_hover_color' );
329
+ $design_settings['nav_text_shadow_hover_color_checkbox'] = $this->get_old_setting( $old_settings, 'nav_text_shadow_hover_color_checkbox' );
330
+ $design_settings['nav_text_shadow_hover_color_opacity'] = $this->get_old_setting( $old_settings, 'nav_text_shadow_hover_color_opacity' );
331
+
332
+ $design_settings['custom_css'] = wp_filter_nohtml_kses( $this->get_old_setting( $old_settings, 'custom_css' ) );
333
+ $design_settings['custom_html'] = wp_kses_post( $this->get_old_setting( $old_settings, 'custom_html' ) );
334
+ $design_settings['custom_jquery'] = wp_specialchars_decode( stripslashes( $this->get_old_setting( $old_settings, 'custom_jquery' ) ), 1, 0, 1 );
335
+
336
+ /** General */
337
+ $general_settings['active'] = $this->get_old_setting( $old_settings, 'active' );
338
+ $general_settings['capability'] = 'manage_options'; // New
339
+ $general_settings['tracking'] = 'off'; // New
340
+ $general_settings['admin_notices'] = 'on'; // New
341
+ $general_settings['wp_shake_js'] = 'off'; // New
342
+ $general_settings['remove_login_css'] = 'off'; // New
343
+ $general_settings['lostpassword_text'] = 'off'; // New
344
+ $general_settings['allow_password_reset'] = 'off'; // New
345
+ $general_settings['auth_timeout'] = '2'; // New
346
+ $general_settings['auth_timeout_remember'] = '14'; // New
347
+
348
+
349
+ update_option( CUSTOM_LOGIN_OPTION . '_design', $design_settings );
350
+ update_option( CUSTOM_LOGIN_OPTION . '_general', $general_settings );
351
+ update_option( CUSTOM_LOGIN_OPTION . '_version', CUSTOM_LOGIN_VERSION );
352
+ delete_option( 'custom_login' );
353
+ return true;
354
+ }
355
+
356
+ /**
357
+ * Helper function to check if option isset
358
+ *
359
+ * @since 12/26/2014
360
+ */
361
+ private function get_old_setting( $setting = array(), $option = null, $default = '' ) {
362
+ if ( is_null( $option ) )
363
+ return $default;
364
+
365
+ if ( isset( $setting[$option] ) )
366
+ return $setting[$option];
367
+
368
+ return $default;
369
+ }
370
+
371
+ }
372
+ CL_Settings_Upgrade::instance();
classes/templates.php → includes/class-cl-templates.php RENAMED
@@ -1,112 +1,112 @@
1
- <?php
2
-
3
- // Exit if accessed directly
4
- if ( ! defined( 'ABSPATH' ) ) exit;
5
-
6
- if ( !class_exists( 'Custom_Login_Templates' ) ) :
7
- class Custom_Login_Templates {
8
-
9
- /**
10
- * Returns the path to the CL templates directory
11
- *
12
- * @access private
13
- * @since 2.0
14
- * @return string
15
- */
16
- function get_templates_dir() {
17
- return CUSTOM_LOGIN_DIR . 'templates';
18
- }
19
-
20
- /**
21
- * Returns the URL to the CL templates directory
22
- *
23
- * @access private
24
- * @since 2.0
25
- * @return string
26
- */
27
- function get_templates_url() {
28
- return CUSTOM_LOGIN_URL . 'templates';
29
- }
30
-
31
- /**
32
- * Retrieves a template part
33
- *
34
- * @since 2.0
35
- *
36
- * @param string $slug
37
- * @param string $name Optional. Default null
38
- *
39
- * @uses custom_login_locate_template()
40
- * @uses load_template()
41
- * @uses get_template_part()
42
- */
43
- function get_template_part( $slug, $name = null, $load = true ) {
44
- // Execute code for this part
45
- do_action( 'get_template_part_' . $slug, $slug, $name );
46
-
47
- // Setup possible parts
48
- $templates = array();
49
- if ( isset( $name ) )
50
- $templates[] = $slug . '-' . $name . '.php';
51
- $templates[] = $slug . '.php';
52
-
53
- // Allow template parst to be filtered
54
- $templates = apply_filters( 'custom_login_get_template_part', $templates, $slug, $name );
55
-
56
- // Return the part that is found
57
- return self::locate_template( $templates, $load, false );
58
- }
59
-
60
- /**
61
- * Retrieve the name of the highest priority template file that exists.
62
- *
63
- * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
64
- * inherit from a parent theme can just overload one file. If the template is
65
- * not found in either of those, it looks in the theme-compat folder last.
66
- *
67
- * @since 2.0
68
- *
69
- * @param string|array $template_names Template file(s) to search for, in order.
70
- * @param bool $load If true the template file will be loaded if it is found.
71
- * @param bool $require_once Whether to require_once or require. Default true.
72
- * Has no effect if $load is false.
73
- * @return string The template filename if one is located.
74
- */
75
- function locate_template( $template_names, $load = false, $require_once = true ) {
76
- // No file found yet
77
- $located = false;
78
-
79
- // Try to find a template file
80
- foreach ( (array) $template_names as $template_name ) {
81
-
82
- // Continue if template is empty
83
- if ( empty( $template_name ) )
84
- continue;
85
-
86
- // Trim off any slashes from the template name
87
- $template_name = ltrim( $template_name, '/' );
88
-
89
- // Check child theme first
90
- if ( file_exists( trailingslashit( get_stylesheet_directory() ) . 'custom_login_templates/' . $template_name ) ) {
91
- $located = trailingslashit( get_stylesheet_directory() ) . 'custom_login_templates/' . $template_name;
92
- break;
93
-
94
- // Check parent theme next
95
- } elseif ( file_exists( trailingslashit( get_template_directory() ) . 'custom_login_templates/' . $template_name ) ) {
96
- $located = trailingslashit( get_template_directory() ) . 'custom_login_templates/' . $template_name;
97
- break;
98
-
99
- // Check plugin compatibility last
100
- } elseif ( file_exists( trailingslashit( self::get_templates_dir() ) . $template_name ) ) {
101
- $located = trailingslashit( self::get_templates_dir() ) . $template_name;
102
- break;
103
- }
104
- }
105
-
106
- if ( ( true == $load ) && ! empty( $located ) )
107
- load_template( $located, $require_once );
108
-
109
- return $located;
110
- }
111
- }
112
- endif;
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) exit;
5
+
6
+ class CL_Templates {
7
+
8
+ /**
9
+ * Returns the path to the CL templates directory
10
+ *
11
+ * @access private
12
+ * @since 2.0
13
+ * @return string
14
+ */
15
+ public static function get_templates_dir() {
16
+ return CUSTOM_LOGIN_DIR . 'templates';
17
+ }
18
+
19
+ /**
20
+ * Returns the URL to the CL templates directory
21
+ *
22
+ * @access private
23
+ * @since 2.0
24
+ * @return string
25
+ */
26
+ public static function get_templates_url() {
27
+ return CUSTOM_LOGIN_URL . 'templates';
28
+ }
29
+
30
+ /**
31
+ * Retrieves a template part
32
+ *
33
+ * @since 2.0
34
+ *
35
+ * @param string $slug
36
+ * @param string $name Optional. Default null
37
+ *
38
+ * @uses custom_login_locate_template()
39
+ * @uses load_template()
40
+ * @uses get_template_part()
41
+ */
42
+ public static function get_template_part( $slug, $name = null, $load = true ) {
43
+
44
+ // Execute code for this part
45
+ do_action( 'get_template_part_' . $slug, $slug, $name );
46
+
47
+ // Setup possible parts
48
+ $templates = array();
49
+ if ( isset( $name ) )
50
+ $templates[] = $slug . '-' . $name . '.php';
51
+ $templates[] = $slug . '.php';
52
+
53
+ // Allow template parst to be filtered
54
+ $templates = apply_filters( 'custom_login_get_template_part', $templates, $slug, $name );
55
+
56
+ // Return the part that is found
57
+ return self::locate_template( $templates, $load, false );
58
+ }
59
+
60
+ /**
61
+ * Retrieve the name of the highest priority template file that exists.
62
+ *
63
+ * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
64
+ * inherit from a parent theme can just overload one file. If the template is
65
+ * not found in either of those, it looks in the theme-compat folder last.
66
+ *
67
+ * @since 2.0
68
+ *
69
+ * @param string|array $template_names Template file(s) to search for, in order.
70
+ * @param bool $load If true the template file will be loaded if it is found.
71
+ * @param bool $require_once Whether to require_once or require. Default true.
72
+ * Has no effect if $load is false.
73
+ * @return string The template filename if one is located.
74
+ */
75
+ public static function locate_template( $template_names, $load = false, $require_once = true ) {
76
+
77
+ // No file found yet
78
+ $located = false;
79
+
80
+ // Try to find a template file
81
+ foreach ( (array) $template_names as $template_name ) {
82
+
83
+ // Continue if template is empty
84
+ if ( empty( $template_name ) )
85
+ continue;
86
+
87
+ // Trim off any slashes from the template name
88
+ $template_name = ltrim( $template_name, '/' );
89
+
90
+ // Check child theme first
91
+ if ( file_exists( trailingslashit( get_stylesheet_directory() ) . 'custom_login_templates/' . $template_name ) ) {
92
+ $located = trailingslashit( get_stylesheet_directory() ) . 'custom_login_templates/' . $template_name;
93
+ break;
94
+
95
+ // Check parent theme next
96
+ } elseif ( file_exists( trailingslashit( get_template_directory() ) . 'custom_login_templates/' . $template_name ) ) {
97
+ $located = trailingslashit( get_template_directory() ) . 'custom_login_templates/' . $template_name;
98
+ break;
99
+
100
+ // Check plugin compatibility last
101
+ } elseif ( file_exists( trailingslashit( self::get_templates_dir() ) . $template_name ) ) {
102
+ $located = trailingslashit( self::get_templates_dir() ) . $template_name;
103
+ break;
104
+ }
105
+ }
106
+
107
+ if ( ( true == $load ) && ! empty( $located ) )
108
+ load_template( $located, $require_once );
109
+
110
+ return $located;
111
+ }
112
+ }
includes/class-cl-wp-login.php ADDED
@@ -0,0 +1,267 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package CustomLogin
4
+ * @subpackage Classes/CL_Common
5
+ * @author Austin Passy <http://austin.passy.co>
6
+ * @copyright Copyright (c) 2014-2015, Austin Passy
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) exit;
12
+
13
+ class CL_WP_Login {
14
+
15
+ /** Singleton *************************************************************/
16
+ private static $instance;
17
+
18
+ /**
19
+ * Main Instance
20
+ *
21
+ * @staticvar array $instance
22
+ * @return The one true instance
23
+ */
24
+ public static function instance() {
25
+ if ( ! isset( self::$instance ) ) {
26
+ self::$instance = new self;
27
+ self::$instance->init();
28
+ }
29
+ return self::$instance;
30
+ }
31
+
32
+ private function init() {
33
+
34
+ if ( 'off' === CL_Common::get_option( 'active', 'general', 'off' ) )
35
+ return;
36
+
37
+ $this->actions();
38
+ $this->filters();
39
+ }
40
+
41
+ private function actions() {
42
+
43
+ add_action( 'login_enqueue_scripts', array( $this, 'login_enqueue_scripts' ) );
44
+ add_action( 'login_footer', array( $this, 'login_footer_html' ), 8 );
45
+ add_action( 'login_footer', array( $this, 'login_footer_jquery' ), 19 );
46
+
47
+ add_action( 'init', array( $this, 'login_remove_scripts' ) );
48
+ add_action( 'login_head', array( $this, 'login_head' ), 10 );
49
+ add_filter( 'login_headerurl', array( $this, 'login_headerurl' ) );
50
+ add_filter( 'login_headertitle', array( $this, 'login_headertitle' ) );
51
+ }
52
+
53
+ private function filters() {
54
+
55
+ # add_filter( 'auth_cookie_expiration', array( $this, 'auth_cookie_expiration' ), 99, 3 );
56
+ add_filter( 'allow_password_reset', array( $this, 'allow_password_reset' ) );
57
+ add_filter( 'gettext', array( $this, 'remove_lostpassword_text' ), 20, 2 );
58
+ }
59
+
60
+ /**
61
+ *************************************************************
62
+ **************** ACTIONS **********************************
63
+ *************************************************************
64
+ */
65
+
66
+ /**
67
+ * Enqueue additional scripts.
68
+ *
69
+ * @since 2.0
70
+ * @updated 3.0
71
+ */
72
+ function login_enqueue_scripts() {
73
+ global $cl_css_atts;
74
+
75
+ $cl_css_atts = array(
76
+ 'version' => CUSTOM_LOGIN_VERSION,
77
+ 'trans_key' => CL_Common::get_transient_key( 'style' ),
78
+ );
79
+ $cl_css_atts = wp_parse_args( CL_Common::get_options( 'design' ), $cl_css_atts );
80
+
81
+ ob_start();
82
+ echo "<style type=\"text/css\">\n";
83
+ CL_Templates::get_template_part( 'wp-login', 'style' );
84
+ echo "\n</style>\n";
85
+ echo ob_get_clean();
86
+
87
+ /* Custom jQuery */
88
+ $jquery = CL_Common::get_option( 'custom_jquery', 'design', false );
89
+ if ( $jquery ) {
90
+ wp_enqueue_script( array( 'jquery' ) );
91
+ }
92
+ }
93
+
94
+ /**
95
+ * If there is custom HTML set in the settings echo it to the
96
+ * 'login_footer' hook in wp-login.php.
97
+ *
98
+ * @return string|void
99
+ */
100
+ public function login_footer_html() {
101
+
102
+ $custom_html = CL_Common::get_option( 'custom_html', 'design', false );
103
+
104
+ if ( $custom_html ) {
105
+ $html = wp_kses_post( $custom_html );
106
+ $html .= "\n";
107
+
108
+ echo $html;
109
+ }
110
+ }
111
+
112
+ /**
113
+ * Database access to the scripts and styles.
114
+ *
115
+ * @since 2.1
116
+ * @return string|void
117
+ */
118
+ public function login_footer_jquery() {
119
+
120
+ $jquery = CL_Common::get_option( 'custom_jquery', 'design', false );
121
+
122
+ if ( $jquery ) {
123
+
124
+ global $cl_js_atts;
125
+
126
+ $cl_js_atts = array(
127
+ 'version' => CUSTOM_LOGIN_VERSION,
128
+ 'trans_key' => CL_Common::get_transient_key( 'script' ),
129
+ );
130
+ $cl_js_atts = wp_parse_args( CL_Common::get_options( 'design' ), $cl_js_atts );
131
+
132
+ foreach( $cl_js_atts as $atts => $value ) {
133
+ if ( 'custom_jquery' !== $atts && 'version' !== $atts && 'trans_key' !== $atts )
134
+ unset( $cl_js_atts[$atts] );
135
+ }
136
+
137
+ ob_start();
138
+ echo "<script type=\"text/javascript\">\n";
139
+ CL_Templates::get_template_part( 'wp-login', 'script' );
140
+ echo "\n</script>\n";
141
+ echo ob_get_clean();
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Finds the global page for the wp-login.php. When on the page
147
+ * remove default stylesheets so we can add our own.
148
+ *
149
+ * @return void
150
+ */
151
+ function login_remove_scripts() {
152
+ global $pagenow;
153
+
154
+ if ( 'wp-login.php' == $pagenow ) {
155
+
156
+ $suffix = is_rtl() ? '-rtl' : '';
157
+ $suffix .= defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
158
+
159
+ wp_deregister_style( array( 'login' ) );
160
+ wp_register_style( 'login', plugins_url( "css/login/login.css", CUSTOM_LOGIN_FILE ), array( 'buttons' ), CUSTOM_LOGIN_VERSION, 'all' );
161
+
162
+ if ( 'on' === CL_Common::get_option( 'remove_login_css', 'general' ) ) {
163
+ add_filter( 'wp_admin_css', '__return_false' );
164
+ wp_deregister_style( array( 'login' ) );
165
+ }
166
+ }
167
+ }
168
+
169
+ /**
170
+ * Actions hooked into login_head
171
+ *
172
+ */
173
+ public function login_head() {
174
+
175
+ if ( 'on' === CL_Common::get_option( 'wp_shake_js', 'general' ) ) {
176
+ remove_action( 'login_head', 'wp_shake_js', 12 );
177
+ }
178
+ }
179
+
180
+ /**
181
+ * Replace the default link to your URL
182
+ */
183
+ public function login_headerurl() {
184
+
185
+ if ( !is_multisite() ) return home_url();
186
+ }
187
+
188
+ /**
189
+ * Replace the default title to your description
190
+ */
191
+ public function login_headertitle() {
192
+
193
+ if ( !is_multisite() ) return get_bloginfo( 'description' );
194
+ }
195
+
196
+ /**
197
+ *************************************************************
198
+ **************** FILTERS **********************************
199
+ *************************************************************
200
+ */
201
+
202
+ /**
203
+ * Allow password reset.
204
+ *
205
+ * @added 3.0.5
206
+ * @updated 3.0.8
207
+ * @ref https://wordpress.org/plugins/configure-login-timeout/
208
+ */
209
+ public function auth_cookie_expiration( $seconds, $user_id, $remember ) {
210
+
211
+ $expire_in = 0;
212
+
213
+ if ( $remember ) {
214
+ $expire_in = (int) CL_Common::get_option( 'auth_timeout_remember', 'general', 14 * DAY_IN_SECONDS );
215
+ if ( $expire_in <= 0 )
216
+ $expire_in = 14 * DAY_IN_SECONDS;
217
+ }
218
+ else {
219
+ $expire_in = (int) CL_Common::get_option( 'auth_timeout', 'general', 2 * DAY_IN_SECONDS );
220
+ if ( $expire_in <= 0 )
221
+ $expire_in = 2 * DAY_IN_SECONDS;
222
+ }
223
+
224
+ // check for Year 2038 problem - http://en.wikipedia.org/wiki/Year_2038_problem
225
+ if ( PHP_INT_MAX - time() < $expire_in ) {
226
+ $expire_in = PHP_INT_MAX - time() - 5;
227
+ }
228
+
229
+ return $expire_in;
230
+ }
231
+
232
+ /**
233
+ * Allow password reset.
234
+ *
235
+ * @updated 3.0.5
236
+ */
237
+ public function allow_password_reset( $user_id ) {
238
+ if ( 'on' === CL_Common::get_option( 'allow_password_reset', 'general', 'off' ) )
239
+ return false;
240
+
241
+ return true;
242
+ }
243
+
244
+ /**
245
+ * Remove the "Lost your password?" text.
246
+ */
247
+ public function remove_lostpassword_text( $translated_text, $untranslated_text ) {
248
+ global $pagenow;
249
+
250
+ if ( 'wp-login.php' == $pagenow ) {
251
+
252
+ if ( 'off' !== CL_Common::get_option( 'lostpassword_text', 'general' ) ) {
253
+ //make the changes to the text
254
+ switch( $untranslated_text ) {
255
+
256
+ case 'Lost your password?':
257
+ $translated_text = '';
258
+ break;
259
+ }
260
+ }
261
+ }
262
+
263
+ return $translated_text;
264
+ }
265
+
266
+ }
267
+ add_action( CUSTOM_LOGIN_OPTION . '_actions', array( 'CL_WP_Login', 'instance' ) );
includes/default-settings.php ADDED
@@ -0,0 +1,527 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) exit;
5
+
6
+ $sections = array(
7
+ array(
8
+ 'id' => CUSTOM_LOGIN_OPTION . '_design',
9
+ 'title' => __( 'Design Settings', CUSTOM_LOGIN_DIRNAME ),
10
+ 'submit' => true,
11
+ ),
12
+ array(
13
+ 'id' => CUSTOM_LOGIN_OPTION . '_general',
14
+ 'title' => __( 'General Settings', CUSTOM_LOGIN_DIRNAME ),
15
+ 'submit' => true,
16
+ ),
17
+ );
18
+
19
+ /**
20
+ * Design Settings Section
21
+ *
22
+ */
23
+ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
24
+ /** BREAK **/
25
+ array(
26
+ 'name' => 'break_1',
27
+ 'label' => sprintf( '<h4>%s</h4>', __( '<abbr title="Hyper Text Markup Language">HTML</abbr>', CUSTOM_LOGIN_DIRNAME ) ),
28
+ 'desc' => '',
29
+ 'type' => 'html',
30
+ ),
31
+ /** BREAK **/
32
+
33
+ array(
34
+ 'name' => 'html_background_color',
35
+ 'label' => __( 'Background color', CUSTOM_LOGIN_DIRNAME ),
36
+ 'desc' => '',
37
+ 'type' => 'colorpicker',
38
+ 'default' => '',
39
+ ),
40
+ array(
41
+ 'name' => 'html_background_url',
42
+ 'label' => __( 'Background image', CUSTOM_LOGIN_DIRNAME ),
43
+ 'desc' => '',
44
+ 'type' => 'file',
45
+ 'default' => '',
46
+ 'size' => 'large',
47
+ 'sanitize' => 'esc_url',
48
+ ),
49
+ array(
50
+ 'name' => 'html_background_position',
51
+ 'label' => __( 'Background position', CUSTOM_LOGIN_DIRNAME ),
52
+ 'desc' => sprintf( '<a href="http://www.w3schools.com/cssref/pr_background-position.asp" target="_blank">%s</a>.', __( 'html background position', CUSTOM_LOGIN_DIRNAME ) ),
53
+ 'type' => 'select',
54
+ 'options' => array(
55
+ 'left top' => 'left top',
56
+ 'left center' => 'left center',
57
+ 'left bottom' => 'left bottom',
58
+ 'right top' => 'right top',
59
+ 'right center' => 'right center',
60
+ 'right bottom' => 'right bottom',
61
+ 'center top' => 'center top',
62
+ 'center center' => 'center center',
63
+ 'center bottom' => 'center bottom',
64
+ ),
65
+ ),
66
+ array(
67
+ 'name' => 'html_background_repeat',
68
+ 'label' => __( 'Background repeat', CUSTOM_LOGIN_DIRNAME ),
69
+ 'desc' => '',
70
+ 'type' => 'select',
71
+ 'options' => array(
72
+ 'no-repeat' => 'no-repeat',
73
+ 'repeat' => 'repeat',
74
+ 'repeat-x' => 'repeat-x',
75
+ 'repeat-y' => 'repeat-y',
76
+ )
77
+ ),
78
+ array(
79
+ 'name' => 'html_background_size',
80
+ 'label' => __( 'Background size', CUSTOM_LOGIN_DIRNAME ),
81
+ 'desc' => '',
82
+ 'type' => 'select',
83
+ 'options' => array(
84
+ 'none' => 'none',
85
+ 'cover' => 'cover',
86
+ 'contain' => 'contain',
87
+ 'flex' => 'flex',
88
+ )
89
+ ),
90
+
91
+ /** BREAK **/
92
+ array(
93
+ 'name' => 'break_2',
94
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Logo', CUSTOM_LOGIN_DIRNAME ) ),
95
+ 'desc' => '',
96
+ 'type' => 'html',
97
+ ),
98
+ /** BREAK **/
99
+
100
+ array(
101
+ 'name' => 'hide_wp_logo',
102
+ 'label' => __( 'Hide the WP logo', CUSTOM_LOGIN_DIRNAME ),
103
+ 'desc' => __( 'By default Custom Login removes the WP login from the login screen. This setting hides the h1 element.', CUSTOM_LOGIN_DIRNAME ),
104
+ 'type' => 'checkbox'
105
+ ),
106
+ array(
107
+ 'name' => 'logo_background_url',
108
+ 'label' => __( 'Image', CUSTOM_LOGIN_DIRNAME ),
109
+ 'desc' => __( 'The default form width is 320px, so an image <strong>should</strong> be the same. You can always modify the form width (below).', CUSTOM_LOGIN_DIRNAME ),
110
+ 'type' => 'file',
111
+ 'default' => '',
112
+ 'size' => 'large',
113
+ 'sanitize' => 'esc_url',
114
+ ),
115
+ array(
116
+ 'name' => 'logo_background_size_width',
117
+ 'label' => __( 'Image width', CUSTOM_LOGIN_DIRNAME ),
118
+ 'desc' => __( 'Enter your desired image height (All not integers will be removed).', CUSTOM_LOGIN_DIRNAME ),
119
+ 'type' => 'text_number',
120
+ 'size' => 'small',
121
+ 'default' => '',
122
+ 'sanitize' => 'int',
123
+ ),
124
+ array(
125
+ 'name' => 'logo_background_size_height',
126
+ 'label' => __( 'Image height', CUSTOM_LOGIN_DIRNAME ),
127
+ 'desc' => __( 'Enter your desired image height (All not integers will be removed).', CUSTOM_LOGIN_DIRNAME ),
128
+ 'type' => 'text_number',
129
+ 'size' => 'small',
130
+ 'default' => '',
131
+ 'sanitize' => 'int',
132
+ ),
133
+ array(
134
+ 'name' => 'logo_background_position',
135
+ 'label' => __( 'Background position', CUSTOM_LOGIN_DIRNAME ),
136
+ 'desc' => sprintf( '<a href="http://www.w3schools.com/cssref/pr_background-position.asp" target="_blank">%s</a>', __( 'html background position', CUSTOM_LOGIN_DIRNAME ) ),
137
+ 'type' => 'select',
138
+ 'options' => array(
139
+ 'left top' => 'left top',
140
+ 'left center' => 'left center',
141
+ 'left bottom' => 'left bottom',
142
+ 'right top' => 'right top',
143
+ 'right center' => 'right center',
144
+ 'right bottom' => 'right bottom',
145
+ 'center top' => 'center top',
146
+ 'center center' => 'center center',
147
+ 'center bottom' => 'center bottom',
148
+ ),
149
+ ),
150
+ array(
151
+ 'name' => 'logo_background_repeat',
152
+ 'label' => __( 'Background repeat', CUSTOM_LOGIN_DIRNAME ),
153
+ 'desc' => '',
154
+ 'type' => 'select',
155
+ 'options' => array(
156
+ 'no-repeat' => 'no-repeat',
157
+ 'repeat' => 'repeat',
158
+ 'repeat-x' => 'repeat-x',
159
+ 'repeat-y' => 'repeat-y',
160
+ )
161
+ ),
162
+ array(
163
+ 'name' => 'logo_background_size',
164
+ 'label' => __( 'Background size', CUSTOM_LOGIN_DIRNAME ),
165
+ 'desc' => '',
166
+ 'type' => 'select',
167
+ 'options' => array(
168
+ 'none' => 'none',
169
+ 'cover' => 'cover',
170
+ 'contain' => 'contain',
171
+ 'flex' => 'flex',
172
+ )
173
+ ),
174
+
175
+ /** BREAK **/
176
+ array(
177
+ 'name' => 'break_3',
178
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Login Form', CUSTOM_LOGIN_DIRNAME ) ),
179
+ 'desc' => '',
180
+ 'type' => 'html',
181
+ ),
182
+ /** BREAK **/
183
+
184
+ array(
185
+ 'name' => 'logo_force_form_max_width',
186
+ 'label' => __( 'Force max-width', CUSTOM_LOGIN_DIRNAME ),
187
+ 'desc' => __( 'If checked and the login form width (set below) is not empty, a CSS rule of <code>width</code> will be applied on the logo wrapper element <code>.login h1</code>. This settings applies to the Logo image (when background size is used).', CUSTOM_LOGIN_DIRNAME ),
188
+ 'type' => 'checkbox'
189
+ ),
190
+ array(
191
+ 'name' => 'login_form_width',
192
+ 'label' => __( 'Width', CUSTOM_LOGIN_DIRNAME ),
193
+ 'desc' => __( 'Set a different width in pixel value.', CUSTOM_LOGIN_DIRNAME ),
194
+ 'type' => 'text_number',
195
+ 'size' => 'small',
196
+ 'default' => '',
197
+ 'sanitize' => 'int',
198
+ ),
199
+ array(
200
+ 'name' => 'login_form_background_color',
201
+ 'label' => __( 'Background color', CUSTOM_LOGIN_DIRNAME ),
202
+ 'desc' => '',
203
+ 'type' => 'colorpicker',
204
+ 'default' => ''
205
+ ),
206
+ array(
207
+ 'name' => 'login_form_background_url',
208
+ 'label' => __( 'Background URL', CUSTOM_LOGIN_DIRNAME ),
209
+ 'desc' => __( 'Add a background image to the login form.', CUSTOM_LOGIN_DIRNAME ),
210
+ 'type' => 'file',
211
+ 'default' => '',
212
+ 'size' => 'large',
213
+ 'sanitize' => 'esc_url',
214
+ ),
215
+ array(
216
+ 'name' => 'login_form_background_position',
217
+ 'label' => __( 'Background position', CUSTOM_LOGIN_DIRNAME ),
218
+ 'desc' => sprintf( '<a href="http://www.w3schools.com/cssref/pr_background-position.asp" target="_blank">%s</a>', __( 'html background position', CUSTOM_LOGIN_DIRNAME ) ),
219
+ 'type' => 'select',
220
+ 'options' => array(
221
+ 'left top' => 'left top',
222
+ 'left center' => 'left center',
223
+ 'left bottom' => 'left bottom',
224
+ 'right top' => 'right top',
225
+ 'right center' => 'right center',
226
+ 'right bottom' => 'right bottom',
227
+ 'center top' => 'center top',
228
+ 'center center' => 'center center',
229
+ 'center bottom' => 'center bottom',
230
+ ),
231
+ ),
232
+ array(
233
+ 'name' => 'login_form_background_repeat',
234
+ 'label' => __( 'Background repeat', CUSTOM_LOGIN_DIRNAME ),
235
+ 'desc' => '',
236
+ 'type' => 'select',
237
+ 'options' => array(
238
+ 'no-repeat' => 'no-repeat',
239
+ 'repeat' => 'repeat',
240
+ 'repeat-x' => 'repeat-x',
241
+ 'repeat-y' => 'repeat-y',
242
+ )
243
+ ),
244
+ array(
245
+ 'name' => 'login_form_background_size',
246
+ 'label' => __( 'Background size', CUSTOM_LOGIN_DIRNAME ),
247
+ 'desc' => '',
248
+ 'type' => 'select',
249
+ 'options' => array(
250
+ 'none' => 'none',
251
+ 'cover' => 'cover',
252
+ 'contain' => 'contain',
253
+ 'flex' => 'flex',
254
+ )
255
+ ),
256
+ array(
257
+ 'name' => 'login_form_border_radius',
258
+ 'label' => __( 'Border radius', CUSTOM_LOGIN_DIRNAME ),
259
+ 'desc' => '',
260
+ 'type' => 'text_number',
261
+ 'size' => 'small',
262
+ 'default' => '',
263
+ 'sanitize' => 'int',
264
+ ),
265
+ array(
266
+ 'name' => 'login_form_border_size',
267
+ 'label' => __( 'Border size', CUSTOM_LOGIN_DIRNAME ),
268
+ 'desc' => '',
269
+ 'type' => 'text_number',
270
+ 'size' => 'small',
271
+ 'default' => '',
272
+ 'sanitize' => 'int',
273
+ ),
274
+ array(
275
+ 'name' => 'login_form_border_color',
276
+ 'label' => __( 'Border color', CUSTOM_LOGIN_DIRNAME ),
277
+ 'desc' => '',
278
+ 'type' => 'colorpicker',
279
+ 'default' => ''
280
+ ),
281
+ array(
282
+ 'name' => 'login_form_box_shadow',
283
+ 'label' => __( 'Box shadow', CUSTOM_LOGIN_DIRNAME ),
284
+ 'desc' => sprintf( __( 'Use <a href="%s" target="_blank">box shadow</a> syntax w/ out color. <code>inset h-shadow v-shadow blur spread</code>', CUSTOM_LOGIN_DIRNAME ), 'http://www.w3schools.com/cssref/css3_pr_box-shadow.asp' ),
285
+ 'type' => 'text',
286
+ 'size' => 'medium',
287
+ 'default' => '5px 5px 10px'
288
+ ),
289
+ array(
290
+ 'name' => 'login_form_box_shadow_color',
291
+ 'label' => __( 'Box shadow color', CUSTOM_LOGIN_DIRNAME ),
292
+ 'desc' => '',
293
+ 'type' => 'colorpicker',
294
+ 'default' => ''
295
+ ),
296
+
297
+ /** BREAK **/
298
+ array(
299
+ 'name' => 'break_4',
300
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Miscellaneous', CUSTOM_LOGIN_DIRNAME ) ),
301
+ 'desc' => '',
302
+ 'type' => 'html',
303
+ ),
304
+ /** BREAK **/
305
+
306
+ array(
307
+ 'name' => 'label_color',
308
+ 'label' => __( 'Label color', CUSTOM_LOGIN_DIRNAME ),
309
+ 'desc' => '',
310
+ 'type' => 'colorpicker',
311
+ 'default' => ''
312
+ ),
313
+
314
+ /** BREAK **/
315
+ array(
316
+ 'name' => 'break_5',
317
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Below Form anchor', CUSTOM_LOGIN_DIRNAME ) ),
318
+ 'desc' => '',
319
+ 'type' => 'html',
320
+ ),
321
+ /** BREAK **/
322
+
323
+ array(
324
+ 'name' => 'nav_color',
325
+ 'label' => __( 'Nav color', CUSTOM_LOGIN_DIRNAME ),
326
+ 'desc' => '',
327
+ 'type' => 'colorpicker',
328
+ 'default' => '',
329
+ ),
330
+ array(
331
+ 'name' => 'nav_text_shadow_color',
332
+ 'label' => __( 'Nav text-shadow color', CUSTOM_LOGIN_DIRNAME ),
333
+ 'desc' => '',
334
+ 'type' => 'colorpicker',
335
+ 'default' => '',
336
+ ),
337
+ array(
338
+ 'name' => 'nav_hover_color',
339
+ 'label' => __( 'Nav color hover', CUSTOM_LOGIN_DIRNAME ),
340
+ 'desc' => '',
341
+ 'type' => 'colorpicker',
342
+ 'default' => '',
343
+ ),
344
+ array(
345
+ 'name' => 'nav_text_shadow_hover_color',
346
+ 'label' => __( 'Nav text-shadow hover', CUSTOM_LOGIN_DIRNAME ),
347
+ 'desc' => '',
348
+ 'type' => 'colorpicker',
349
+ 'default' => '',
350
+ ),
351
+
352
+ /** BREAK **/
353
+ array(
354
+ 'name' => 'break_6',
355
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Custom CSS', CUSTOM_LOGIN_DIRNAME ) ),
356
+ 'desc' => '',
357
+ 'type' => 'html',
358
+ ),
359
+ /** BREAK **/
360
+
361
+ array(
362
+ 'name' => 'custom_css',
363
+ 'label' => '',
364
+ 'desc' => sprintf( '%s %s', __( 'Allowed variables:', CUSTOM_LOGIN_DIRNAME ), '<ul>
365
+ <li>{BSLASH} = "\" (backslash)</li>
366
+ <li><a href="http://wordpress.org/support/topic/quotes-in-custom-css-gets-replaced-with-useless-quote?replies=4">Request others</a></li>
367
+ </ul>' ),
368
+ 'type' => 'textarea',
369
+ 'sanitize' => 'wp_filter_nohtml_kses',
370
+ ),
371
+
372
+ /** BREAK **/
373
+ array(
374
+ 'name' => 'break_7',
375
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Custom HTML', CUSTOM_LOGIN_DIRNAME ) ),
376
+ 'desc' => '',
377
+ 'type' => 'html',
378
+ ),
379
+ /** BREAK **/
380
+
381
+ array(
382
+ 'name' => 'custom_html',
383
+ 'label' => '',
384
+ 'desc' => '',
385
+ 'type' => 'textarea',
386
+ 'sanitize' => 'wp_kses_post', //Allow HTML
387
+ ),
388
+
389
+ /** BREAK **/
390
+ array(
391
+ 'name' => 'break_8',
392
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Custom jQuery', CUSTOM_LOGIN_DIRNAME ) ),
393
+ 'desc' => '',
394
+ 'type' => 'html',
395
+ ),
396
+ /** BREAK **/
397
+
398
+ array(
399
+ 'name' => 'custom_jquery',
400
+ 'label' => '',
401
+ 'desc' => '',
402
+ 'type' => 'textarea',
403
+ 'sanitize' => 'wp_specialchars_decode',
404
+ ),
405
+ );
406
+
407
+ /**
408
+ * General Settings Section
409
+ *
410
+ */
411
+ $fields [CUSTOM_LOGIN_OPTION . '_general'] = array(
412
+ array(
413
+ 'name' => 'active',
414
+ 'label' => __( 'Activate', CUSTOM_LOGIN_DIRNAME ),
415
+ 'desc' => __( 'Allow Custom Login to hook into WordPress.', CUSTOM_LOGIN_DIRNAME ),
416
+ 'type' => 'checkbox'
417
+ ),
418
+ array(
419
+ 'name' => 'capability',
420
+ 'label' => __( 'Capability', CUSTOM_LOGIN_DIRNAME ),
421
+ 'desc' => sprintf( __( 'Set the minimum user capability to manage these settings. The default capability is <code>%s</code>', CUSTOM_LOGIN_DIRNAME ), 'manage_options' ),
422
+ 'type' => 'select',
423
+ 'size' => 'large',
424
+ 'default' => 'manage_options',
425
+ 'options' => custom_login_get_editable_roles()
426
+ ),
427
+
428
+ /** BREAK **/
429
+ array(
430
+ 'name' => 'break_1',
431
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Tracking Settings', CUSTOM_LOGIN_DIRNAME ) ),
432
+ 'desc' => '',
433
+ 'type' => 'html',
434
+ ),
435
+ /** BREAK **/
436
+
437
+ array(
438
+ 'name' => 'tracking',
439
+ 'label' => __( 'Allow usage tracking?', CUSTOM_LOGIN_DIRNAME ),
440
+ 'desc' => __( 'Allow Frosty Media to anonymously track how this plugin is used and help us make the plugin better. Opt-in and receive a 20% discount code for any purchase from the Frosty Media store. Your discount code will be emailed to you.', CUSTOM_LOGIN_DIRNAME ),
441
+ 'type' => 'checkbox'
442
+ ),
443
+
444
+ /** BREAK **/
445
+ array(
446
+ 'name' => 'break_2',
447
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Notices', CUSTOM_LOGIN_DIRNAME ) ),
448
+ 'desc' => '',
449
+ 'type' => 'html',
450
+ ),
451
+ /** BREAK **/
452
+
453
+ array(
454
+ 'name' => 'admin_notices',
455
+ 'label' => __( 'Allow admin notices?', CUSTOM_LOGIN_DIRNAME ),
456
+ 'desc' => __( 'Allow admin notices everywhere in WordPress. Leave unchecked to disable global notices.', CUSTOM_LOGIN_DIRNAME ),
457
+ 'type' => 'checkbox'
458
+ ),
459
+
460
+ /** BREAK **/
461
+ array(
462
+ 'name' => 'break_3',
463
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Login functions', CUSTOM_LOGIN_DIRNAME ) ),
464
+ 'desc' => '',
465
+ 'type' => 'html',
466
+ ),
467
+ /** BREAK **/
468
+
469
+ array(
470
+ 'name' => 'wp_shake_js',
471
+ 'label' => __( 'Login shake', CUSTOM_LOGIN_DIRNAME ),
472
+ 'desc' => __( 'Disable the login form animated "shake" on error.', CUSTOM_LOGIN_DIRNAME ),
473
+ 'type' => 'checkbox'
474
+ ),
475
+ array(
476
+ 'name' => 'remove_login_css',
477
+ 'label' => __( 'Remove login CSS', CUSTOM_LOGIN_DIRNAME ),
478
+ 'desc' => __( 'Remove WordPress\' login CSS. Warning: You\'ll have to add aditional syles not set by this plugin.', CUSTOM_LOGIN_DIRNAME ),
479
+ 'type' => 'checkbox'
480
+ ),
481
+ array(
482
+ 'name' => 'lostpassword_text',
483
+ 'label' => __( 'Remove lost password text', CUSTOM_LOGIN_DIRNAME ),
484
+ 'desc' => __( 'Remove the "Lost Password?" text. This does <strong>not<strong> disable the lost password function.', CUSTOM_LOGIN_DIRNAME ),
485
+ 'type' => 'checkbox'
486
+ ),
487
+ array(
488
+ 'name' => 'allow_password_reset',
489
+ 'label' => __( 'Disable lost password', CUSTOM_LOGIN_DIRNAME ),
490
+ 'desc' => __( 'Disable the lost password reset function.', CUSTOM_LOGIN_DIRNAME ),
491
+ 'type' => 'checkbox'
492
+ ),
493
+
494
+ /** BREAK **/
495
+ array(
496
+ 'name' => 'break_4',
497
+ 'label' => sprintf( '<h4>%s</h4>', __( 'Sessions', CUSTOM_LOGIN_DIRNAME ) ),
498
+ 'desc' => '',
499
+ 'type' => 'html',
500
+ ),
501
+ /** BREAK **/
502
+
503
+ array(
504
+ 'name' => 'auth_timeout',
505
+ 'label' => __( 'Auth timeout', CUSTOM_LOGIN_DIRNAME ),
506
+ 'desc' => __( 'Authentication timeout <strong>without</strong> "remember me" checked at login.', CUSTOM_LOGIN_DIRNAME ),
507
+ 'type' => 'text_number',
508
+ 'size' => 'small',
509
+ 'default' => '2',
510
+ 'sanitize' => 'absint',
511
+ ),
512
+ array(
513
+ 'name' => 'auth_timeout_remember',
514
+ 'label' => __( 'Auth timeout', CUSTOM_LOGIN_DIRNAME ),
515
+ 'desc' => __( 'Authentication timeout <strong>with</strong> "remember me" checked at login.', CUSTOM_LOGIN_DIRNAME ),
516
+ 'type' => 'text_number',
517
+ 'size' => 'small',
518
+ 'default' => '14',
519
+ 'sanitize' => 'absint',
520
+ ),
521
+ array(
522
+ 'name' => 'break_5',
523
+ 'label' => '',
524
+ 'desc' => sprintf( '<small>%s</small>', __( 'The default WordPress behavior for logging a user out is to make a login session cookie that expires in 48 hours or when the browser is closed. If the "Remember Me" box is checked, WordPress will give you 14 days before forcing you to authenticate again. Never set below "0".', CUSTOM_LOGIN_DIRNAME ) ),
525
+ 'type' => 'html',
526
+ ),
527
+ );
includes/functions.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) exit;
5
+
6
+ /**
7
+ * Return all editiable role capabilites.
8
+ *
9
+ * @ref http://codex.wordpress.org/Function_Reference/get_editable_roles
10
+ * @return array
11
+ */
12
+ function custom_login_get_editable_roles() {
13
+
14
+ $roles = array();
15
+ foreach ( get_editable_roles() as $role_name => $role ) :
16
+
17
+ // https://wordpress.org/support/topic/invalid-argument-supplied-for-foreach-error-line-in-wp-dashboard?replies=2#post-6427631
18
+ if ( !is_array( $role['capabilities'] ) )
19
+ break;
20
+
21
+ foreach ( $role['capabilities'] as $capability => $array ) :
22
+
23
+ // Remove the (deprecated) capabilities from the array
24
+ if ( preg_match( '/^level_/', $capability ) )
25
+ break;
26
+
27
+ $roles[$capability] = $capability;
28
+ endforeach;
29
+
30
+ endforeach;
31
+
32
+ return $roles;
33
+ }
includes/libraries/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
{classes → includes/libraries}/edd-remote-install-client/EDD_Remote_Install_Client.php RENAMED
@@ -7,7 +7,7 @@
7
  * @version 1.7.2 (FROSTY HACK)
8
  */
9
 
10
- class Extendd_Remote_Install_Client {
11
  private $api_url = '';
12
  private $options = array(
13
  'skipplugincheck' => false
@@ -31,7 +31,7 @@ class Extendd_Remote_Install_Client {
31
 
32
  $options['page'] = $page;
33
  $this->options = $options;
34
-
35
  add_action( 'load-' . $page, array($this, 'register_scripts' ));
36
 
37
  add_action('wp_ajax_edd-activate-plugin-' . $page, array($this, 'activate_plugin'));
@@ -54,6 +54,7 @@ class Extendd_Remote_Install_Client {
54
  */
55
 
56
  private function slug($str) {
 
57
  $str = strtolower( $str );
58
  $str = preg_replace("/[\s_]/", "-", $str);
59
 
@@ -333,20 +334,18 @@ class Extendd_Remote_Install_Client {
333
  }
334
 
335
  $api_params = array(
336
- 'edd_action' => 'get_download',
337
- 'item_name' => urlencode( $download ),
338
- 'license' => urlencode( $license )
339
  );
340
 
341
- //$download_link = add_query_arg($api_params, $this->api_url);
342
-
343
  // decode the license data
344
  $download_id = $this->get_remote_download_id( $download );
345
 
346
  $download_link = $this->get_encoded_download_package_url( $download_id, $license );
347
- //var_dump( $download_link ); exit;
348
-
349
- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; //for plugins_api..
350
 
351
  $upgrader = new Plugin_Upgrader();
352
 
7
  * @version 1.7.2 (FROSTY HACK)
8
  */
9
 
10
+ class CL_Remote_Install_Client {
11
  private $api_url = '';
12
  private $options = array(
13
  'skipplugincheck' => false
31
 
32
  $options['page'] = $page;
33
  $this->options = $options;
34
+
35
  add_action( 'load-' . $page, array($this, 'register_scripts' ));
36
 
37
  add_action('wp_ajax_edd-activate-plugin-' . $page, array($this, 'activate_plugin'));
54
  */
55
 
56
  private function slug($str) {
57
+ // var_dump( $str ); exit;
58
  $str = strtolower( $str );
59
  $str = preg_replace("/[\s_]/", "-", $str);
60
 
334
  }
335
 
336
  $api_params = array(
337
+ 'edd_action' => 'get_download',
338
+ 'item_name' => urlencode( $download ),
339
+ 'license' => urlencode( $license )
340
  );
341
 
 
 
342
  // decode the license data
343
  $download_id = $this->get_remote_download_id( $download );
344
 
345
  $download_link = $this->get_encoded_download_package_url( $download_id, $license );
346
+
347
+ if ( !class_exists( 'Plugin_Upgrader' ) )
348
+ include_once ( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for plugins_api..
349
 
350
  $upgrader = new Plugin_Upgrader();
351
 
includes/libraries/edd-remote-install-client/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
includes/libraries/edd-remote-install-client/css/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
{classes → includes/libraries}/edd-remote-install-client/css/edd-remote-install-admin.css RENAMED
@@ -1,4 +1,4 @@
1
- .edd-remote-install{
2
  display: inline-block;
3
  font-size:14px;
4
  color:#fff !important;
@@ -48,11 +48,6 @@
48
  .eddri-addon {
49
  vertical-align: top;
50
  border: 1px solid #CCC;
51
- -moz-box-shadow: 0 0 5px rgba(0,0,0,0.25);
52
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
53
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
54
- width: auto;
55
- margin-bottom: 10px;
56
  }
57
 
58
  .eddri-addon .eddri-addon-container {
@@ -87,6 +82,11 @@
87
  height: auto;
88
  }
89
 
 
 
 
 
 
90
  .eddri-addon a.button {
91
  margin-top: 12px;
92
  }
1
+ .edd-remote-install {
2
  display: inline-block;
3
  font-size:14px;
4
  color:#fff !important;
48
  .eddri-addon {
49
  vertical-align: top;
50
  border: 1px solid #CCC;
 
 
 
 
 
51
  }
52
 
53
  .eddri-addon .eddri-addon-container {
82
  height: auto;
83
  }
84
 
85
+ .eddri-addon h3 {
86
+ line-height: 1.4em !important;
87
+ min-height: 60px;
88
+ }
89
+
90
  .eddri-addon a.button {
91
  margin-top: 12px;
92
  }
includes/libraries/edd-remote-install-client/js/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
{classes → includes/libraries}/edd-remote-install-client/js/edd-remote-install-admin.js RENAMED
@@ -321,7 +321,8 @@ jQuery(document).ready(function ($) {
321
  }
322
 
323
  $.post(ajaxurl, data, function (res) {
324
- window.location.href = res;
 
325
  });
326
 
327
  } else if (res.search('already exists') > 0) {
@@ -351,6 +352,7 @@ jQuery(document).ready(function ($) {
351
  }
352
 
353
  $.post(ajaxurl, data, function (res) {
 
354
  window.location.href = res;
355
  });
356
 
321
  }
322
 
323
  $.post(ajaxurl, data, function (res) {
324
+ // console.log(res);
325
+ window.location.href = res;
326
  });
327
 
328
  } else if (res.search('already exists') > 0) {
352
  }
353
 
354
  $.post(ajaxurl, data, function (res) {
355
+ //console.log(res);
356
  window.location.href = res;
357
  });
358
 
js/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
js/ace/src-min-noconflict/ace.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(){function s(r){var i=function(e,t){return n("",e,t)},s=e;r&&(e[r]||(e[r]={}),s=e[r]);if(!s.define||!s.define.packaged)t.original=s.define,s.define=t,s.define.packaged=!0;if(!s.require||!s.require.packaged)n.original=s.require,s.require=i,s.require.packaged=!0}var ACE_NAMESPACE = "ace",e=function(){return this}();if(!ACE_NAMESPACE&&typeof requirejs!="undefined")return;var t=function(e,n,r){if(typeof e!="string"){t.original?t.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=n),t.modules||(t.modules={},t.payloads={}),t.payloads[e]=r,t.modules[e]=null},n=function(e,t,r){if(Object.prototype.toString.call(t)==="[object Array]"){var s=[];for(var o=0,u=t.length;o<u;++o){var a=i(e,t[o]);if(!a&&n.original)return n.original.apply(window,arguments);s.push(a)}r&&r.apply(null,s)}else{if(typeof t=="string"){var f=i(e,t);return!f&&n.original?n.original.apply(window,arguments):(r&&r(),f)}if(n.original)return n.original.apply(window,arguments)}},r=function(e,t){if(t.indexOf("!")!==-1){var n=t.split("!");return r(e,n[0])+"!"+r(e,n[1])}if(t.charAt(0)=="."){var i=e.split("/").slice(0,-1).join("/");t=i+"/"+t;while(t.indexOf(".")!==-1&&s!=t){var s=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},i=function(e,i){i=r(e,i);var s=t.modules[i];if(!s){s=t.payloads[i];if(typeof s=="function"){var o={},u={id:i,uri:"",exports:o,packaged:!0},a=function(e,t){return n(i,e,t)},f=s(a,o,u);o=f||u.exports,t.modules[i]=o,delete t.payloads[i]}s=t.modules[i]=o||s}return s};s(ACE_NAMESPACE)})(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";function o(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function u(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=r.exec.call(/()??/,"")[1]===undefined,s=function(){var e=/^/g;return r.test.call(e,""),!e.lastIndex}();if(s&&i)return;RegExp.prototype.exec=function(e){var t=r.exec.apply(this,arguments),n,a;if(typeof e=="string"&&t){!i&&t.length>1&&u(t,"")>-1&&(a=RegExp(this.source,r.replace.call(o(this),"g","")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(t[e]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var f=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return t},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t})}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function H(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function B(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function j(e){var t,n,r;if(B(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(B(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(B(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=u.call(arguments,1),s=function(){if(this instanceof s){var e=n.apply(this,i.concat(u.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(u.call(arguments)))};return n.prototype&&(r.prototype=n.prototype,s.prototype=new r,r.prototype=null),s});var i=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty),l,c,h,p,d;if(d=f(o,"__defineGetter__"))l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(var h=0;h<l;++h)this[f+h]=this[a+h];else if(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);else{this.length=c+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(u.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(t){return a(t)=="[object Array]"});var m=Object("a"),g=m[0]!="a"||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError;while(++s<o)s in r&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var u=0;u<i;u++)u in r&&(s[u]=t.call(o,r[u],u,n));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=[],o,u=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var f=0;f<i;f++)f in r&&(o=r[f],t.call(u,o,f,n)&&s.push(o));return s}),Array.prototype.every||(Array.prototype.every=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var s=0,o;if(arguments.length>=2)o=arguments[1];else do{if(s in r){o=r[s++];break}if(++s>=i)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;s<i;s++)s in r&&(o=t.call(void 0,o,r[s],s,n));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var s,o=i-1;if(arguments.length>=2)s=arguments[1];else do{if(o in r){s=r[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do o in this&&(s=t.call(void 0,s,r[o],o,n));while(o--);return s});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,H(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:o)});if(!Object.getOwnPropertyDescriptor){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(y+t);if(!f(t,n))return;var r,i,s;r={enumerable:!0,configurable:!0};if(d){var u=t.__proto__;t.__proto__=o;var i=h(t,n),s=p(t,n);t.__proto__=u;if(i||s)return i&&(r.get=i),s&&(r.set=s),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var b;Object.prototype.__proto__===null?b=function(){return{__proto__:null}}:b=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=b();else{if(typeof t!="object")throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var E=w({}),S=typeof document=="undefined"||w(document.createElement("div"));if(!E||!S)var x=Object.defineProperty}if(!Object.defineProperty||x){var T="Property description must be an object: ",N="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(N+t);if(typeof r!="object"&&typeof r!="function"||r===null)throw new TypeError(T+r);if(x)try{return x.call(Object,t,n,r)}catch(i){}if(f(r,"value"))if(d&&(h(t,n)||p(t,n))){var s=t.__proto__;t.__proto__=o,delete t[n],t[n]=r.value,t.__proto__=s}else t[n]=r.value;else{if(!d)throw new TypeError(C);f(r,"get")&&l(t,n,r.get),f(r,"set")&&c(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)f(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(k){Object.freeze=function(t){return function(n){return typeof n=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n="";while(f(t,n))n+="?";t[n]=!0;var r=f(t,n);return delete t[n],r});if(!Object.keys){var L=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],O=A.length;for(var M in{toString:null})L=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)f(e,t)&&I.push(t);if(L)for(var n=0,r=O;n<r;n++){var i=A[n];f(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var _=" \n\f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||_.trim()){_="["+_+"]";var D=new RegExp("^"+_+_+"*"),P=new RegExp(_+_+"*$");String.prototype.trim=function(){return String(this).replace(D,"").replace(P,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){"use strict";var r="http://www.w3.org/1999/xhtml";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||r,e):document.createElement(e)},t.hasCssClass=function(e,t){var n=(e.className||"").split(/\s+/g);return n.indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){var n=e.className.split(/\s+/g);for(;;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){var n=e.className.split(/\s+/g),r=!0;for(;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;t=t||document;if(t.createStyleSheet&&(r=t.styleSheets)){while(n<r.length)if(r[n++].owningElement.id===e)return!0}else if(r=t.getElementsByTagName("style"))while(n<r.length)if(r[n++].id===e)return!0;return!1},t.importCssString=function(n,i,s){s=s||document;if(i&&t.hasCssString(i,s))return null;var o;s.createStyleSheet?(o=s.createStyleSheet(),o.cssText=n,i&&(o.owningElement.id=i)):(o=s.createElementNS?s.createElementNS(r,"style"):s.createElement("style"),o.appendChild(s.createTextNode(n)),i&&(o.id=i),t.getDocumentHead(s).appendChild(o))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var r=t.createElement("link");r.rel="stylesheet",r.href=e,t.getDocumentHead(n).appendChild(r)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight};if(typeof document=="undefined")return;window.pageYOffset!==undefined?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var s=e.documentElement;s.appendChild(r);var o=n.offsetWidth;i.overflow="scroll";var u=n.offsetWidth;return o==u&&(u=r.clientWidth),s.removeChild(r),o-u},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,n){"use strict";e("./fixoldbrowsers");var r=e("./oop"),i=function(){var e={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,"super":8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}},t,n;for(n in e.FUNCTION_KEYS)t=e.FUNCTION_KEYS[n].toLowerCase(),e[t]=parseInt(n,10);for(n in e.PRINTABLE_KEYS)t=e.PRINTABLE_KEYS[n].toLowerCase(),e[t]=parseInt(n,10);return r.mixin(e,e.MODIFIER_KEYS),r.mixin(e,e.PRINTABLE_KEYS),r.mixin(e,e.FUNCTION_KEYS),e.enter=e["return"],e.escape=e.esc,e.del=e["delete"],e[173]="-",function(){var t=["cmd","ctrl","alt","shift"];for(var n=Math.pow(2,t.length);n--;)e.KEY_MODS[n]=t.filter(function(t){return n&e.KEY_MODS[t]}).join("-")+"-"}(),e.KEY_MODS[0]="",e.KEY_MODS[-1]="input",e}();r.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};if(typeof navigator!="object")return;var r=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),i=navigator.userAgent;t.isWin=r=="win",t.isMac=r=="mac",t.isLinux=r=="linux",t.isIE=navigator.appName=="Microsoft Internet Explorer"||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&window.navigator.product==="Gecko",t.isOldGecko=t.isGecko&&parseInt((i.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]",t.isWebKit=parseFloat(i.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(i.split(" Chrome/")[1])||undefined,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isIPad=i.indexOf("iPad")>=0,t.isTouchPad=i.indexOf("TouchPad")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function o(e,t,n){var o=s(t);if(!i.isMac&&u){if(u[91]||u[92])o|=8;if(u.altGr){if((3&o)==3)return;u.altGr=0}if(n===18||n===17){var f="location"in t?t.location:t.keyLocation;if(n===17&&f===1)a=t.timeStamp;else if(n===18&&o===3&&f===2){var l=-a;a=t.timeStamp,l+=a,l<3&&(u.altGr=!0)}}}if(n in r.MODIFIER_KEYS){switch(r.MODIFIER_KEYS[n]){case"Alt":o=2;break;case"Shift":o=4;break;case"Ctrl":o=1;break;default:o=8}n=-1}o&8&&(n===91||n===93)&&(n=-1);if(!o&&n===13){var f="location"in t?t.location:t.keyLocation;if(f===3){e(t,o,-n);if(t.defaultPrevented)return}}if(i.isChromeOS&&o&8){e(t,o,n);if(t.defaultPrevented)return;o&=-9}return!!o||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS?e(t,o,n):!1}var r=e("./keys"),i=e("./useragent");t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n.call(e,window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return e.type=="dblclick"?0:e.type=="contextmenu"||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,r){function i(e){n&&n(e),r&&r(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",i,!0),t.removeListener(document,"dragstart",i,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",i,!0),t.addListener(document,"dragstart",i,!0),i},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;e.wheelDeltaX!==undefined?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=(e.deltaX||0)*5,e.wheelY=(e.deltaY||0)*5}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=(e.detail||0)*5,e.wheelY=0):(e.wheelX=0,e.wheelY=(e.detail||0)*5),n(e)})},t.addMultiMouseDownListener=function(e,n,r,s){var o=0,u,a,f,l={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){t.getButton(e)!==0?o=0:e.detail>1?(o++,o>4&&(o=1)):o=1;if(i.isIE){var c=Math.abs(e.clientX-u)>5||Math.abs(e.clientY-a)>5;if(!f||c)o=1;f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600),o==1&&(u=e.clientX,a=e.clientY)}e._clicks=o,r[s]("mousedown",e);if(o>4)o=0;else if(o>1)return r[s](l[o],e)}),i.isOldIE&&t.addListener(e,"dblclick",function(e){o=2,f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600),r[s]("mousedown",e),r[s](l[o],e)})};var s=!i.isMac||!i.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};t.getModifierString=function(e){return r.KEY_MODS[s(e)]};var u=null,a=0;t.addCommandKeyListener=function(e,n){var r=t.addListener;if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var s=null;r(e,"keydown",function(e){s=e.keyCode}),r(e,"keypress",function(e){return o(n,e,s)})}else{var a=null;r(e,"keydown",function(e){u[e.keyCode]=!0;var t=o(n,e,e.keyCode);return a=e.defaultPrevented,t}),r(e,"keypress",function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),r(e,"keyup",function(e){u[e.keyCode]=null}),u||(u=Object.create(null),r(window,"focus",function(e){u=Object.create(null)}))}};if(window.postMessage&&!i.isOldIE){var f=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+f;t.addListener(n,"message",function i(s){s.data==r&&(t.stopPropagation(s),t.removeListener(n,"message",i),e())}),n.postMessage(r,"*")}}t.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/dom"),o=e("../lib/lang"),u=i.isChrome<18,a=i.isIE,f=function(e,t){function b(e){if(h)return;if(k)t=0,r=e?0:n.value.length-1;else var t=e?2:1,r=2;try{n.setSelectionRange(t,r)}catch(i){}}function w(){if(h)return;n.value=f,i.isWebKit&&y.schedule()}function R(){clearTimeout(q),q=setTimeout(function(){p&&(n.style.cssText=p,p=""),t.renderer.$keepTextAreaAtCursor==null&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},i.isOldIE?200:0)}var n=s.createElement("textarea");n.className="ace_text-input",i.isTouchPad&&n.setAttribute("x-palm-disable-auto-cap",!0),n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",i.isOldIE&&(n.style.top="-100px"),e.insertBefore(n,e.firstChild);var f="",l=!1,c=!1,h=!1,p="",d=!0;try{var v=document.activeElement===n}catch(m){}r.addListener(n,"blur",function(e){t.onBlur(e),v=!1}),r.addListener(n,"focus",function(e){v=!0,t.onFocus(e),b()}),this.focus=function(){n.style.position="fixed",n.style.top="-10000000px",n.focus(),setTimeout(function(){n.style.position=""},0)},this.blur=function(){n.blur()},this.isFocused=function(){return v};var g=o.delayedCall(function(){v&&b(d)}),y=o.delayedCall(function(){h||(n.value=f,v&&b())});i.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=d&&(d=!d,g.schedule())}),w(),v&&t.onFocus();var E=function(e){return e.selectionStart===0&&e.selectionEnd===e.value.length};!n.setSelectionRange&&n.createTextRange&&(n.setSelectionRange=function(e,t){var n=this.createTextRange();n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select()},E=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.text==e.value});if(i.isOldIE){var S=!1,x=function(e){if(S)return;var t=n.value;if(h||!t||t==f)return;if(e&&t==f[0])return T.schedule();A(t),S=!0,w(),S=!1},T=o.delayedCall(x);r.addListener(n,"propertychange",x);var N={13:1,27:1};r.addListener(n,"keyup",function(e){h&&(!n.value||N[e.keyCode])&&setTimeout(F,0);if((n.value.charCodeAt(0)||0)<129)return T.call();h?j():B()}),r.addListener(n,"keydown",function(e){T.schedule(50)})}var C=function(e){l?l=!1:E(n)?(t.selectAll(),b()):k&&b(t.selection.isEmpty())},k=null;this.setInputHandler=function(e){k=e},this.getInputHandler=function(){return k};var L=!1,A=function(e){k&&(e=k(e),k=null),c?(b(),e&&t.onPaste(e),c=!1):e==f.charAt(0)?L?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==f?e=e.substr(2):e.charAt(0)==f.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),L&&(L=!1)},O=function(e){if(h)return;var t=n.value;A(t),w()},M=function(e,t){var n=e.clipboardData||window.clipboardData;if(!n||u)return;var r=a?"Text":"text/plain";return t?n.setData(r,t)!==!1:n.getData(r)},_=function(e,i){var s=t.getCopyText();if(!s)return r.preventDefault(e);M(e,s)?(i?t.onCut():t.onCopy(),r.preventDefault(e)):(l=!0,n.value=s,n.select(),setTimeout(function(){l=!1,w(),b(),i?t.onCut():t.onCopy()}))},D=function(e){_(e,!0)},P=function(e){_(e,!1)},H=function(e){var s=M(e);typeof s=="string"?(s&&t.onPaste(s),i.isIE&&setTimeout(b),r.preventDefault(e)):(n.value="",c=!0)};r.addCommandKeyListener(n,t.onCommandKey.bind(t)),r.addListener(n,"select",C),r.addListener(n,"input",O),r.addListener(n,"cut",D),r.addListener(n,"copy",P),r.addListener(n,"paste",H),(!("oncut"in n)||!("oncopy"in n)||!("onpaste"in n))&&r.addListener(e,"keydown",function(e){if(i.isMac&&!e.metaKey||!e.ctrlKey)return;switch(e.keyCode){case 67:P(e);break;case 86:H(e);break;case 88:D(e)}});var B=function(e){if(h||!t.onCompositionStart||t.$readOnly)return;h={},t.onCompositionStart(),setTimeout(j,0),t.on("mousedown",F),t.selection.isEmpty()||(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup()},j=function(){if(!h||!t.onCompositionUpdate||t.$readOnly)return;var e=n.value.replace(/\x01/g,"");if(h.lastValue===e)return;t.onCompositionUpdate(e),h.lastValue&&t.undo(),h.lastValue=e;if(h.lastValue){var r=t.selection.getRange();t.insert(h.lastValue),t.session.markUndoGroup(),h.range=t.selection.getRange(),t.selection.setRange(r),t.selection.clearSelection()}},F=function(e){if(!t.onCompositionEnd||t.$readOnly)return;var r=h;h=!1;var i=setTimeout(function(){i=null;var e=n.value.replace(/\x01/g,"");if(h)return;e==r.lastValue?w():!r.lastValue&&e&&(w(),A(e))});k=function(n){return i&&clearTimeout(i),n=n.replace(/\x01/g,""),n==r.lastValue?"":(r.lastValue&&i&&t.undo(),n)},t.onCompositionEnd(),t.removeListener("mousedown",F),e.type=="compositionend"&&r.range&&t.selection.setRange(r.range)},I=o.delayedCall(j,50);r.addListener(n,"compositionstart",B),i.isGecko?r.addListener(n,"text",function(){I.schedule()}):(r.addListener(n,"keyup",function(){I.schedule()}),r.addListener(n,"keydown",function(){I.schedule()})),r.addListener(n,"compositionend",F),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){L=!0,b(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,o){if(!o&&i.isOldIE)return;p||(p=n.style.cssText),n.style.cssText=(o?"z-index:100000;":"")+"height:"+n.style.height+";"+(i.isIE?"opacity:0.1;":"");var u=t.container.getBoundingClientRect(),a=s.computedStyle(t.container),f=u.top+(parseInt(a.borderTopWidth)||0),l=u.left+(parseInt(u.borderLeftWidth)||0),c=u.bottom-f-n.clientHeight-2,h=function(e){n.style.left=e.clientX-l-2+"px",n.style.top=Math.min(e.clientY-f-2,c)+"px"};h(e);if(e.type!="mousedown")return;t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),i.isWin&&!i.isOldIE&&r.capture(t.container,h,R)},this.onContextMenuClose=R;var q,U=function(e){t.textInput.onContextMenu(e),R()};r.addListener(t.renderer.scroller,"contextmenu",U),r.addListener(n,"contextmenu",U)};t.TextInput=f}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function u(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function a(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function f(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row==e.end.row-1&&!e.start.column&&!e.end.column)var n=t.column-4;else var n=2*t.row-e.start.row-e.end.row;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=0;(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();if(i!==0){var s=r.getSelectionRange(),o=s.isEmpty();r.$blockScrolling++,o&&r.selection.moveToPosition(n),r.$blockScrolling--,r.textInput.onContextMenu(e.domEvent);return}this.mousedownEvent.time=Date.now();if(t&&!r.isFocused()){r.focus();if(this.$focusTimout&&!this.$clickSelection&&!r.inMultiSelectMode){this.setState("focusWait"),this.captureMouse(e);return}}return this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);t.$blockScrolling++;if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=f(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);n.$blockScrolling++;if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(s==-1&&o<=0){t=this.$clickSelection.end;if(i.end.row!=r.row||i.end.column!=r.column)r=i.start}else if(o==1&&s>=0){t=this.$clickSelection.start;if(i.start.row!=r.row||i.start.column!=r.column)r=i.end}else if(s==-1&&o==1)r=i.end,t=i.start;else{var u=f(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>o||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(e.getAccelKey())return;e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor,i=r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);if(i||n<200)return this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(u.prototype),t.DefaultHandlers=u}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";function s(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var r=e("./lib/oop"),i=e("./lib/dom");(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){i.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){e!=null&&this.setText(e),t!=null&&n!=null&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(s.prototype),t.Tooltip=s}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";function u(e){function l(){var r=u.getDocumentPosition().row,s=n.$annotations[r];if(!s)return c();var o=t.session.getLength();if(r==o){var a=t.renderer.pixelToScreenCoordinates(0,u.y).row,l=u.$pos;if(a>t.session.documentToScreenRow(l.row,l.column))return c()}if(f==s)return;f=s.text.join("<br/>"),i.setHtml(f),i.show(),t.on("mousewheel",c);if(e.$tooltipFollowsMouse)h(u);else{var p=n.$cells[t.session.documentToScreenRow(r,0)].element,d=p.getBoundingClientRect(),v=i.getElement().style;v.left=d.right+"px",v.top=d.bottom+"px"}}function c(){o&&(o=clearTimeout(o)),f&&(i.hide(),f=null,t.removeEventListener("mousewheel",c))}function h(e){i.setPosition(e.x,e.y)}var t=e.editor,n=t.renderer.$gutterLayer,i=new a(t.container);e.editor.setDefaultHandler("guttermousedown",function(r){if(!t.isFocused()||r.getButton()!=0)return;var i=n.getRegion(r);if(i=="foldWidgets")return;var s=r.getDocumentPosition().row,o=t.session.selection;if(r.getShiftKey())o.selectTo(s,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.setState("selectByLines"),e.captureMouse(r),r.preventDefault()});var o,u,f;e.editor.setDefaultHandler("guttermousemove",function(t){var n=t.domEvent.target||t.domEvent.srcElement;if(r.hasCssClass(n,"ace_fold-widget"))return c();f&&e.$tooltipFollowsMouse&&h(t),u=t;if(o)return;o=setTimeout(function(){o=null,u&&!e.isMousePressed?l():c()},50)}),s.addListener(t.renderer.$gutter,"mouseout",function(e){u=null;if(!f||o)return;o=setTimeout(function(){o=null,c()},50)}),t.on("changeSession",c)}function a(e){o.call(this,e)}var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/event"),o=e("../tooltip").Tooltip;i.inherits(a,o),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),s=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+s>r&&(t-=20+s),o.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=u}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function f(e){function T(e,n){var r=Date.now(),i=!n||e.row!=n.row,s=!n||e.column!=n.column;if(!S||i||s)t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,S=r,x={x:p,y:d};else{var o=l(x.x,x.y,p,d);o>a?S=null:r-S>=u&&(t.renderer.scrollCursorIntoView(),S=null)}}function N(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,u=t.renderer.scroller.getBoundingClientRect(),a={x:{left:p-u.left,right:u.right-p},y:{top:d-u.top,bottom:u.bottom-d}},f=Math.min(a.x.left,a.x.right),l=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};f/s<=2&&(c.column+=a.x.left<a.x.right?-3:2),l/i<=1&&(c.row+=a.y.top<a.y.bottom?-1:1);var h=e.row!=c.row,v=e.column!=c.column,m=!n||e.row!=n.row;h||v&&!m?E?r-E>=o&&t.renderer.scrollCursorIntoView(c):E=r:E=null}function C(){var e=g;g=t.renderer.screenToTextCoordinates(p,d),T(g,e),N(g,e)}function k(){m=t.selection.toOrientedRange(),h=t.session.addMarker(m,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(v),C(),v=setInterval(C,20),y=0,i.addListener(document,"mousemove",O)}function L(){clearInterval(v),t.session.removeMarker(h),h=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(m),t.$blockScrolling-=1,t.isFocused()&&!w&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),m=null,g=null,y=0,E=null,S=null,i.removeListener(document,"mousemove",O)}function O(){A==null&&(A=setTimeout(function(){A!=null&&h&&L()},20))}function M(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return e=="text/plain"||e=="Text"})}function _(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var t=e.editor,n=r.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(t){e[t]=this[t]},this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var c=t.container,h,p,d,v,m,g,y=0,b,w,E,S,x;this.onDragStart=function(e){if(this.cancelDrag||!c.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}m=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",s.isOpera&&(t.container.appendChild(n),n.scrollTop=0),i.setDragImage&&i.setDragImage(n,0,0),s.isOpera&&t.container.removeChild(n),i.clearData(),i.setData("Text",t.session.getTextRange()),w=!0,this.setState("drag")},this.onDragEnd=function(e){c.draggable=!1,w=!1,this.setState(null);if(!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!b&&n=="move"&&t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||k(),y++,e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragOver=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||(k(),y++),A!==null&&(A=null),e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragLeave=function(e){y--;if(y<=0&&h)return L(),b=null,i.preventDefault(e)},this.onDrop=function(e){if(!g)return;var n=e.dataTransfer;if(w)switch(b){case"move":m.contains(g.row,g.column)?m={start:g,end:g}:m=t.moveText(m,g);break;case"copy":m=t.moveText(m,g,!0)}else{var r=n.getData("Text");m={start:g,end:t.session.insert(g,r)},t.focus(),b=null}return L(),i.preventDefault(e)},i.addListener(c,"dragstart",this.onDragStart.bind(e)),i.addListener(c,"dragend",this.onDragEnd.bind(e)),i.addListener(c,"dragenter",this.onDragEnter.bind(e)),i.addListener(c,"dragover",this.onDragOver.bind(e)),i.addListener(c,"dragleave",this.onDragLeave.bind(e)),i.addListener(c,"drop",this.onDrop.bind(e));var A=null}function l(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=200,u=200,a=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var n=s.isWin?"default":"move";e.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&this.state=="dragReady"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if(this.state==="dragWait"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(!this.$dragEnabled)return;this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton(),i=e.domEvent.detail||1;if(i===1&&r===0&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on");if(t.getDragDelay()){if(s.isWebKit){this.cancelDrag=!0;var u=t.container;u.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}).call(f.prototype),t.DragdropHandler=f}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){if(n||!i.readyState||i.readyState=="loaded"||i.readyState=="complete")i=i.onload=i.onreadystatechange=null,n||t()}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"no use strict";function o(e){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}function u(e,t){var n=new Error(e);n.data=t,typeof console=="object"&&console.error&&console.error(n),setTimeout(function(){throw n})}var r=e("./oop"),i=e("./event_emitter").EventEmitter,s={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]===t)return;var n=this.$options[e];if(!n)return o('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:o('misspelled option "'+e+'"')}},a=function(){this.$defaultOptions={}};(function(){r.implement(this,i),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];typeof r=="string"&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)}),r.implement(e,s),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},this.setDefaultValue=function(e,t,n){var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},this.warn=o,this.reportError=u}).call(a.prototype),t.AppConfig=a}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,n){"no use strict";function f(r){a.packaged=r||e.packaged||n.packaged||u.define&&define.packaged;if(!u.document)return"";var i={},s="",o=document.currentScript||document._currentScript,f=o&&o.ownerDocument||document,c=f.getElementsByTagName("script");for(var h=0;h<c.length;h++){var p=c[h],d=p.src||p.getAttribute("src");if(!d)continue;var v=p.attributes;for(var m=0,g=v.length;m<g;m++){var y=v[m];y.name.indexOf("data-ace-")===0&&(i[l(y.name.replace(/^data-ace-/,""))]=y.value)}var b=d.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);b&&(s=b[1])}s&&(i.base=i.base||s,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var w in i)typeof i[w]!="undefined"&&t.set(w,i[w])}function l(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./lib/net"),o=e("./lib/app_config").AppConfig;n.exports=t=new o;var u=function(){return this}(),a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return a[e]},t.set=function(e,t){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);a[e]=t},t.all=function(){return r.copyObject(a)},t.moduleUrl=function(e,t){if(a.$moduleUrls[e])return a.$moduleUrls[e];var n=e.split("/");t=t||n[n.length-2]||"";var r=t=="snippets"?"/":"-",i=n[n.length-1];if(t=="worker"&&r=="-"){var s=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(s,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var o=a[t+"Path"];return o==null?o=a.basePath:r=="/"&&(t=r=""),o&&o.slice(-1)!="/"&&(o+="/"),o+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{i=e(n)}catch(u){}if(i&&!t.$loading[n])return r&&r(i);t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r);if(t.$loading[n].length>1)return;var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(n,o),a)},t.init=f}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,u=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,f=e("../config"),l=function(e){var t=this;this.editor=e,new s(this),new o(this),new a(this);var n=function(t){(!document.hasFocus||!document.hasFocus())&&window.focus(),e.focus()},u=e.renderer.getMouseEventTarget();r.addListener(u,"click",this.onMouseEvent.bind(this,"click")),r.addListener(u,"mousemove",this.onMouseMove.bind(this,"mousemove")),r.addMultiMouseDownListener(u,[400,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(r.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),r.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),i.isIE&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n),r.addListener(e.renderer.scrollBarH.element,"mousedown",n))),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"));var f=e.renderer.$gutter;r.addListener(f,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),r.addListener(f,"click",this.onMouseEvent.bind(this,"gutterclick")),r.addListener(f,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),r.addListener(f,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),r.addListener(u,"mousedown",n),r.addListener(f,"mousedown",function(t){return e.focus(),r.preventDefault(t)}),e.on("mousemove",function(n){if(t.state||t.$dragDelay||!t.$dragEnabled)return;var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),s=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?s.setCursorStyle("default"):s.setCursorStyle("")})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new u(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;if(!n||!n.length)return;this.editor._emit(e,new u(t,this.editor))},this.onMouseWheel=function(e,t){var n=new u(t,this.editor);n.speed=this.$scrollSpeed*2,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var s=this,o=function(e){if(!e)return;if(i.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new u(e,s.editor),s.$mouseMoved=!0},a=function(e){clearInterval(l),f(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",n.$keepTextAreaAtCursor==null&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),s.isMousePressed=!1,s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e)},f=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(i.isOldIE&&e.domEvent.type=="dblclick")return setTimeout(function(){a(e)});s.$onCaptureMouseMove=o,s.releaseMouse=r.capture(this.editor.container,o,a);var l=setInterval(f,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){if(t&&t.domEvent&&t.domEvent.type!="contextmenu")return;this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent)}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(l.prototype),f.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){"use strict";function r(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on("gutterclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[r]&&e.session.onFoldWidgetClick(r,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session,s=i.getParentFoldRangeData(r,!0),o=s.range||s.firstRange;if(o){r=o.start.row;var u=i.getFoldAt(r,i.getLine(r).length,1);u?i.removeFold(u):(i.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}t.FoldHandler=r}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),s=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]==e)return;while(t[t.length-1]&&t[t.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)},this.addKeyboardHandler=function(e,t){if(!e)return;typeof e=="function"&&!e.handleKeyboard&&(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);n!=-1&&this.$handlers.splice(n,1),t==undefined?this.$handlers.push(e):this.$handlers.splice(t,0,e),n==-1&&e.attach&&e.attach(this.$editor)},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t==-1?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,r){var s,o=!1,u=this.$editor.commands;for(var a=this.$handlers.length;a--;){s=this.$handlers[a].handleKeyboard(this.$data,e,t,n,r);if(!s||!s.command)continue;s.command=="null"?o=!0:o=u.exec(s.command,this.$editor,s.args,r),o&&r&&e!=-1&&s.passEvent!=1&&s.command.passEvent!=1&&i.stopEvent(r);if(o)break}return o},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){var t=this.$callKeyboardHandlers(-1,e);t||this.$editor.commands.exec("insertstring",this.$editor,e)}}).call(s.prototype),t.KeyBinding=s}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){r.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty){this.moveCursorTo(this.lead.row,this.lead.column+e);return}var t=this.getSelectionAnchor(),n=this.getSelectionLead(),r=this.isBackwards();(!r||t.column!==0)&&this.setSelectionAnchor(t.row,t.column+e),(r||n.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(typeof t=="undefined"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n=typeof e=="number"?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t===!0?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column===0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column-n,e.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),e=this.lead;this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column,e.column+n).split(" ").length-1==n?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column),s=i.match(/^\s*/);s[0].length!=t&&!this.session.$useEmacsStyleLineStart&&(r.column+=s[0].length),this.moveCursorToPosition(r)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(i=this.session.nonTokenRe.exec(r))t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t);if(t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight();return}if(i=this.session.tokenRe.exec(r))t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1)){this.moveCursorTo(n.start.row,n.start.column);return}var r=this.session.getFoldStringAt(e,t,-1);r==null&&(r=this.doc.getLine(e).substring(0,t));var s=i.stringReverse(r),o;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;if(o=this.session.nonTokenRe.exec(s))t-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0;if(t<=0){this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft();return}if(o=this.session.tokenRe.exec(s))t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.$shortWordEndIndex=function(e){var t,n=0,r,i=/\s/,s=this.session.tokenRe;s.lastIndex=0;if(t=this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{while((r=e[n])&&i.test(r))n++;if(n<1){s.lastIndex=0;while((r=e[n])&&!s.test(r)){s.lastIndex=0,n++;if(i.test(r)){if(n>2){n--;break}while((r=e[n])&&i.test(r))n++;if(n>2)break}}}}return s.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e<s&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var o=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+o)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(n.start.row,n.start.column);var r=this.session.getLine(e).substring(0,t);if(t===0){do e--,r=this.doc.getLine(e);while(e>0&&/^\s*$/.test(r));t=r.length,/\s+$/.test(r)||(r="")}var s=i.stringReverse(r),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);t===0&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column);e!==0&&t===0&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&r.row++,this.moveCursorTo(r.row,r.column+t,t===0)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e.call(null,this);var n=this.getCursor();return o.fromPoints(t,n)}catch(r){return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(e.start==undefined){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e.isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(u.prototype),t.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var r=e("./config"),i=2e3,s=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){var n=this.states[t],r=[],i=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",u=[];for(var a=0;a<n.length;a++){var f=n[a];f.defaultToken&&(s.defaultToken=f.defaultToken),f.caseInsensitive&&(o="gi");if(f.regex==null)continue;f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var l=f.regex,c=(new RegExp("(?:("+l+")|(.))")).exec("a").length-2;Array.isArray(f.token)?f.token.length==1||c==1?f.token=f.token[0]:c-1!=f.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:f,groupCount:c-1}),f.token=f.token[0]):(f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens):typeof f.token=="function"&&!f.onMatch&&(c>1?f.onMatch=this.$applyToken:f.onMatch=f.token),c>1&&(/\\\d/.test(f.regex)?l=f.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(c=1,l=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&u.push(f)),s[i]=a,i+=c,r.push(l),f.onMatch||(f.onMatch=null)}r.length||(s[0]=0,r.push("$")),u.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",o)}};(function(){this.$setMaxTokenCount=function(e){i=e|0},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if(typeof n=="string")return[{type:n,value:e}];var r=[];for(var i=0,s=n.length;i<s;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";var n=[],r=this.tokenArray;for(var i=0,s=r.length;i<s;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},this.removeCapturingGroups=function(e){var t=e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e});return t},this.createSplitterRegexp=function(e,t){if(e.indexOf("(?=")!=-1){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,s,o,u,a){return r?r=u!="]":u?r=!0:o?(n==i.stack&&(i.end=a+1,i.stack=-1),n--):s&&(n++,s.length!=1&&(i.stack=n,i.start=a)),e}),i.end!=null&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&typeof t!="string"){var n=t.slice(0);t=n[0],t==="#tmp"&&(n.shift(),t=n.shift())}else var n=[];var r=t||"start",s=this.states[r];s||(r="start",s=this.states[r]);var o=this.matchMappings[r],u=this.regExps[r];u.lastIndex=0;var a,f=[],l=0,c=0,h={type:null,value:""};while(a=u.exec(e)){var p=o.defaultToken,d=null,v=a[0],m=u.lastIndex;if(m-v.length>l){var g=e.substring(l,m-v.length);h.type==p?h.value+=g:(h.type&&f.push(h),h={type:p,value:g})}for(var y=0;y<a.length-2;y++){if(a[y+1]===undefined)continue;d=s[o[y]],d.onMatch?p=d.onMatch(v,r,n):p=d.token,d.next&&(typeof d.next=="string"?r=d.next:r=d.next(r,n),s=this.states[r],s||(this.reportError("state doesn't exist",r),r="start",s=this.states[r]),o=this.matchMappings[r],l=m,u=this.regExps[r],u.lastIndex=m);break}if(v)if(typeof p=="string")!!d&&d.merge===!1||h.type!==p?(h.type&&f.push(h),h={type:p,value:v}):h.value+=v;else if(p){h.type&&f.push(h),h={type:null,value:""};for(var y=0;y<p.length;y++)f.push(p[y])}if(l==e.length)break;l=m;if(c++>i){c>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});while(l<e.length)h.type&&f.push(h),h={value:e.substring(l,l+=2e3),type:"overflow"};r="start",n=[];break}}return h.type&&f.push(h),n.length>1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:f,state:n.length?n:r}},this.reportError=r.reportError}).call(s.prototype),t.Tokenizer=s}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(!t){for(var n in e)this.$rules[n]=e[n];return}for(var n in e){var r=e[n];for(var i=0;i<r.length;i++){var s=r[i];if(s.next||s.onMatch)typeof s.next!="string"?s.nextState&&s.nextState.indexOf(t)!==0&&(s.nextState=t+s.nextState):s.next.indexOf(t)!==0&&(s.next=t+s.next)}this.$rules[t+n]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,s){var o=typeof e=="function"?(new e).getRules():e;if(i)for(var u=0;u<i.length;u++)i[u]=t+i[u];else{i=[];for(var a in o)i.push(t+a)}this.addRules(o,t);if(n){var f=Array.prototype[s?"push":"unshift"];for(var u=0;u<i.length;u++)f.apply(this.$rules[i[u]],r.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return(e!="start"||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){function i(s){var o=r[s];o.processed=!0;for(var u=0;u<o.length;u++){var a=o[u];!a.regex&&a.start&&(a.regex=a.start,a.next||(a.next=[]),a.next.push({defaultToken:a.token},{token:a.token+".end",regex:a.end||a.start,next:"pop"}),a.token=a.token+".start",a.push=!0);var f=a.next||a.push;if(f&&Array.isArray(f)){var l=a.stateName;l||(l=a.token,typeof l!="string"&&(l=l[0]||""),r[l]&&(l+=n++)),r[l]=f,a.next=l,i(l)}else f=="pop"&&(a.next=t);a.push&&(a.nextState=a.next||a.push,a.next=e,delete a.push);if(a.rules)for(var c in a.rules)r[c]?r[c].push&&r[c].push.apply(r[c],a.rules[c]):r[c]=a.rules[c];if(a.include||typeof a=="string")var h=a.include||a,p=r[h];else Array.isArray(a)&&(p=a);if(p){var d=[u,1].concat(p);a.noEscape&&(d=d.filter(function(e){return!e.next})),o.splice.apply(o,d),u--,p=null}a.keywordMap&&(a.token=this.createKeywordMapper(a.keywordMap,a.defaultToken||"text",a.caseInsensitive),delete a.defaultToken)}}var n=0,r=this.$rules;Object.keys(r).forEach(i,this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return Object.keys(e).forEach(function(t){var s=e[t];n&&(s=s.toLowerCase());var o=s.split(r||"|");for(var u=o.length;u--;)i[o[u]]=t}),Object.getPrototypeOf(i)&&(i.__proto__=null),this.$keywordList=Object.keys(i),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if(typeof e=="function")var n=(new e).getBehaviours(t);else var n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(!e)return this.$behaviours;var t={};for(var n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}}).call(r.prototype),t.Behaviour=r}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";function r(e){var n=/\w{4}/g;for(var r in e)t.packages[r]=e[r].replace(n,"\\u$&")}t.packages={},r({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/token_iterator",["require","exports","module"],function(e,t,n){"use strict";var r=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){this.$row-=1;if(this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;var e;while(this.$tokenIndex>=this.$rowTokens.length){this.$row+=1,e||(e=this.$session.getLength());if(this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n}}).call(r.prototype),t.TokenIterator=r}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var r=e("../tokenizer").Tokenizer,i=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour").Behaviour,o=e("../unicode"),u=e("../lib/lang"),a=e("../token_iterator").TokenIterator,f=e("../range").Range,l=function(){this.HighlightRules=i,this.$behaviour=new s};(function(){this.tokenRe=new RegExp("^["+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){function w(e){for(var t=n;t<=r;t++)e(i.getLine(t),t)}var i=t.doc,s=!0,o=!0,a=Infinity,f=t.getTabSize(),l=!1;if(!this.lineCommentStart){if(!this.blockComment)return!1;var c=this.blockComment.start,h=this.blockComment.end,p=new RegExp("^(\\s*)(?:"+u.escapeRegExp(c)+")"),d=new RegExp("(?:"+u.escapeRegExp(h)+")\\s*$"),v=function(e,t){if(g(e,t))return;if(!s||/\S/.test(e))i.insertInLine({row:t,column:e.length},h),i.insertInLine({row:t,column:a},c)},m=function(e,t){var n;(n=e.match(d))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(p))&&i.removeInLine(t,n[1].length,n[0].length)},g=function(e,n){if(p.test(e))return!0;var r=t.getTokens(n);for(var i=0;i<r.length;i++)if(r[i].type==="comment")return!0}}else{if(Array.isArray(this.lineCommentStart))var p=this.lineCommentStart.map(u.escapeRegExp).join("|"),c=this.lineCommentStart[0];else var p=u.escapeRegExp(this.lineCommentStart),c=this.lineCommentStart;p=new RegExp("^(\\s*)(?:"+p+") ?"),l=t.getUseSoftTabs();var m=function(e,t){var n=e.match(p);if(!n)return;var r=n[1].length,s=n[0].length;!b(e,r,s)&&n[0][s-1]==" "&&s--,i.removeInLine(t,r,s)},y=c+" ",v=function(e,t){if(!s||/\S/.test(e))b(e,a,a)?i.insertInLine({row:t,column:a},y):i.insertInLine({row:t,column:a},c)},g=function(e,t){return p.test(e)},b=function(e,t,n){var r=0;while(t--&&e.charAt(t)==" ")r++;if(r%f!=0)return!1;var r=0;while(e.charAt(n++)==" ")r++;return f>2?r%f!=f-1:r%f==0}}var E=Infinity;w(function(e,t){var n=e.search(/\S/);n!==-1?(n<a&&(a=n),o&&!g(e,t)&&(o=!1)):E>e.length&&(E=e.length)}),a==Infinity&&(a=E,s=!1,o=!1),l&&a%f!=0&&(a=Math.floor(a/f)*f),w(o?m:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(!i)return;!i.start&&i[0]&&(i=i[0]);var s=new a(t,r.row,r.column),o=s.getCurrentToken(),u=t.selection,l=t.selection.toOrientedRange(),c,h;if(o&&/comment/.test(o.type)){var p,d;while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.start);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;p=new f(m,g,m,g+i.start.length);break}o=s.stepBackward()}var s=new a(t,r.row,r.column),o=s.getCurrentToken();while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.end);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;d=new f(m,g,m,g+i.end.length);break}o=s.stepForward()}d&&t.remove(d),p&&(t.remove(p),c=p.start.row,h=-i.start.length)}else h=i.start.length,c=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==c&&(l.start.column+=h),l.end.row==c&&(l.end.column+=h),t.selection.fromOrientedRange(l)},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(var t=0;t<n.length;t++)(function(e){var r=n[t],i=e[r];e[n[t]]=function(){return this.$delegator(r,arguments,i)}})(this)},this.$delegator=function(e,t,n){var r=t[0];typeof r!="string"&&(r=r[0]);for(var i=0;i<this.$embeds.length;i++){if(!this.$modes[this.$embeds[i]])continue;var s=r.split(this.$embeds[i]);if(!s[0]&&s[1]){t[0]=s[1];var o=this.$modes[this.$embeds[i]];return o[e].apply(o,t)}}var u=n.apply(this,t);return n?u:undefined},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var s=this.$behaviour.getBehaviours();for(var o in s)if(s[o][t]){var u=s[o][t].apply(this,arguments);if(u)return u}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t){var i=t[r];for(var s=0,o=i.length;s<o;s++)if(typeof i[s].token=="string")/keyword|support|storage/.test(i[s].token)&&n.push(i[s].regex);else if(typeof i[s].token=="object")for(var u=0,a=i[s].token.length;u<a;u++)if(/keyword|support|storage/.test(i[s].token[u])){var r=i[s].regex.match(/\(.+?\)/g)[u];n.push(r.substr(1,r.length-2))}}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){var i=this.$keywordList||this.$createKeywordList();return i.map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(l.prototype),t.Mode=l}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(!n.running)return;var e=new Date,t=n.currentLine,r=-1,i=n.doc;while(n.lines[t])t++;var s=t,o=i.getLength(),u=0;n.running=!1;while(t<o){n.$tokenizeRow(t),r=t;do t++;while(n.lines[t]);u++;if(u%5===0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,s<=r&&n.fireUpdateEvent(s,r)}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.range,n=t.start.row,r=t.end.row-n;if(r===0)this.lines[n]=null;else if(e.action=="removeText"||e.action=="removeLines")this.lines.splice(n,r+1,null),this.states.splice(n,r+1,null);else{var i=Array(r+1);i.unshift(n,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(s.prototype),t.BackgroundTokenizer=s}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){if(this.regExp+""==e+"")return;this.regExp=e,this.cache=[]},this.update=function(e,t,n,i){if(!this.regExp)return;var o=i.firstRow,u=i.lastRow;for(var a=o;a<=u;a++){var f=this.cache[a];f==null&&(f=r.getMatchOffsets(n.getLine(a),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(e){return new s(a,e.offset,a,e.offset+e.length)}),this.cache[a]=f.length?f:"");for(var l=f.length;l--;)t.drawSingleLineMarker(e,f[l].toScreenRange(n),this.clazz,i)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r=0,i=this.folds,s,o,u,a=!0;t==null&&(t=this.end.row,n=this.end.column);for(var f=0;f<i.length;f++){s=i[f],o=s.range.compareStart(t,n);if(o==-1){e(null,t,n,r,a);return}u=e(null,s.start.row,s.start.column,r,a),u=!u&&e(s.placeholder,s.start.row,s.start.column,r);if(u||o===0)return;a=!s.sameRow,r=s.end.column}e(null,t,n,r,a)},this.getNextFoldTo=function(e,t){var n,r;for(var i=0;i<this.folds.length;i++){n=this.folds[i],r=n.range.compareEnd(e,t);if(r==-1)return{fold:n,kind:"after"};if(r===0)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var r=this.getNextFoldTo(e,t),i,s;if(r){i=r.fold;if(r.kind=="inside"&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){s=this.folds;var o=s.indexOf(i);o===0&&(this.start.column+=n);for(o;o<s.length;o++){i=s[o],i.start.column+=n;if(!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||n.kind=="inside")return null;var r=n.fold,s=this.folds,o=this.foldData,u=s.indexOf(r),a=s[u-1];this.end.row=a.end.row,this.end.column=a.end.column,s=s.splice(u,s.length-u);var f=new i(o,s);return o.splice(o.indexOf(this)+1,0,f),f},this.merge=function(e){var t=e.folds;for(var n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){var t=0;for(var n=0;n<this.folds.length;n++){var r=this.folds[n];e-=r.start.column-t;if(e<0)return{row:r.start.row,column:r.start.column+e};e-=r.placeholder.length;if(e<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range,i=r.comparePoints,s=function(){this.ranges=[]};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){var r=this.ranges;for(var s=n||0;s<r.length;s++){var o=r[s],u=i(e,o.end);if(u>0)continue;var a=i(e,o.start);return u===0?t&&a!==0?-s-2:s:a>0||a===0&&!t?s:-s-1}return-s-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){var t=[];for(var n=e.length;n--;)t.push.call(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return i(e.start,t.start)});var n=t[0],r;for(var s=1;s<t.length;s++){r=n,n=t[s];var o=i(r.end,n.start);if(o<0)continue;if(o==0&&!r.isEmpty()&&!n.isEmpty())continue;i(r.end,n.end)<0&&(r.end.row=n.end.row,r.end.column=n.end.column),t.splice(s,1),e.push(n),n=r,s--}return this.ranges=t,e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);var s=[];for(var o=r;o<i;o++)s.push(n[o]);return s},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){if(!this.session)return;this.session.removeListener("change",this.onChange),this.session=null},this.$onChange=function(e){var t=e.data.range;if(e.data.action[0]=="i")var n=t.start,r=t.end;else var r=t.start,n=t.end;var i=n.row,s=r.row,o=s-i,u=-n.column+r.column,a=this.ranges;for(var f=0,l=a.length;f<l;f++){var c=a[f];if(c.end.row<i)continue;if(c.start.row>i)break;c.start.row==i&&c.start.column>=n.column&&(c.start.column!=n.column||!this.$insertRight)&&(c.start.column+=u,c.start.row+=o);if(c.end.row==i&&c.end.column>=n.column){if(c.end.column==n.column&&this.$insertRight)continue;c.end.column==n.column&&u>0&&f<l-1&&c.end.column>c.start.column&&c.end.column==a[f+1].start.column&&(c.end.column-=u),c.end.column+=u,c.end.row+=o}}if(o!=0&&f<l)for(;f<l;f++){var c=a[f];c.start.row+=o,c.end.row+=o}}}).call(s.prototype),t.RangeList=s}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){"use strict";function u(e,t){e.row-=t.row,e.row==0&&(e.column-=t.column)}function a(e,t){u(e.start,t),u(e.end,t)}function f(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row}function l(e,t){f(e.start,t),f(e.end,t)}var r=e("../range").Range,i=e("../range_list").RangeList,s=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};s.inherits(o,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(this.range.isEqual(e))return;if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);a(e,this.start);var t=e.start.row,n=e.start.column;for(var r=0,i=-1;r<this.subFolds.length;r++){i=this.subFolds[r].range.compare(t,n);if(i!=1)break}var s=this.subFolds[r];if(i==0)return s.addSubFold(e);var t=e.range.end.row,n=e.range.end.column;for(var o=r,i=-1;o<this.subFolds.length;o++){i=this.subFolds[o].range.compare(t,n);if(i!=1)break}var u=this.subFolds[o];if(i==0)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);var f=this.subFolds.splice(r,o-r,e);return e.setFoldLine(this.foldLine),e},this.restoreRange=function(e){return l(e,this.start)}}.call(o.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){"use strict";function u(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;var i=r.folds;for(var s=0;s<i.length;s++){var o=i[s];if(o.range.contains(e,t)){if(n==1&&o.range.isEnd(e,t))continue;if(n==-1&&o.range.isStart(e,t))continue;return o}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var s=0;s<r.length;s++){var o=r[s].range.compareRange(e);if(o==2)continue;if(o==-2)break;var u=r[s].folds;for(var a=0;a<u.length;a++){var f=u[a];o=f.range.compareRange(e);if(o==-2)break;if(o==2)continue;if(o==42)break;i.push(f)}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){var e=[],t=this.$foldData;for(var n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){r=r||this.getFoldLine(e);if(!r)return null;var i={end:{column:0}},s,o;for(var u=0;u<r.folds.length;u++){o=r.folds[u];var a=o.range.compareEnd(e,t);if(a==-1){s=this.getLine(o.start.row).substring(i.end.column,o.start.column);break}if(a===0)return null;i=o}return s||(s=this.getLine(o.start.row).substring(i.end.column)),n==-1?s.substring(0,t-i.end.column):n==1?s.substring(t-i.end.column):s},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){var n=this.$foldData,r=t-e+1;for(var i=0;i<n.length;i++){var s=n[i],o=s.end.row,u=s.start.row;if(o>=t){u<t&&(u>=e?r-=t-u:r=0);break}o>=e&&(u>=e?r-=o-u:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof s?o=e:(o=new s(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var u=o.start.row,a=o.start.column,f=o.end.row,l=o.end.column;if(u<f||u==f&&a<=l-2){var c=this.getFoldAt(u,a,1),h=this.getFoldAt(f,l,-1);if(c&&h==c)return c.addSubFold(o);c&&!c.range.isStart(u,a)&&this.removeFold(c),h&&!h.range.isEnd(f,l)&&this.removeFold(h);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),p.forEach(function(e){o.addSubFold(e)}));for(var d=0;d<n.length;d++){var v=n[d];if(f==v.start.row){v.addFold(o),r=!0;break}if(u==v.end.row){v.addFold(o),r=!0;if(!o.sameRow){var m=n[d+1];if(m&&m.start.row==f){v.merge(m);break}}break}if(f<=v.start.row)break}return r||(v=this.$addFoldLine(new i(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(v.start.row,v.start.row):this.$updateRowLengthCache(v.start.row,v.start.row),this.$modified=!0,this._emit("changeFold",{data:o,action:"add"}),o}throw new Error("The range has to be at least 2 characters width")},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,s=t.folds;if(s.length==1)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column;else if(e.sameRow)s.splice(s.indexOf(e),1);else{var o=t.split(e.start.row,e.start.column);s=o.folds,s.shift(),o.start.row=s[0].start.row,o.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._emit("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){var t=[];for(var n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;e==null?(n=new r(0,0,this.getLength(),0),t=!0):typeof e=="number"?n=new r(e,0,e,this.getLine(e).length):"row"in e?n=r.fromPoints(e,e):n=e,i=this.getFoldsInRangeList(n);if(t)this.removeFolds(i);else{var s=i;while(s.length)this.expandFolds(s),s=this.getFoldsInRangeList(n)}if(i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r==null&&(r=e.start.row),i==null&&(i=0),t==null&&(t=e.end.row),n==null&&(n=this.getLine(t).length);var s=this.doc,o="";return e.walk(function(e,t,n,u){if(t<r)return;if(t==r){if(n<i)return;u=Math.max(i,u)}e!=null?o+=e:o+=s.getLine(t).substring(u,n)},t,n),o},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(!i){var s;return s=this.doc.getLine(e),s.substring(r||0,t||s.length)}return this.getFoldDisplayLine(i,e,t,n,r)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)}),e},this.toggleFold=function(e){var t=this.selection,n=t.getRange(),r,i;if(n.isEmpty()){var s=n.start;r=this.getFoldAt(s.row,s.column);if(r){this.expandFold(r);return}(i=this.findMatchingBracket(s))?n.comparePoint(i)==1?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:s.row,column:s.column+1}))?(n.comparePoint(i)==1?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(s.row,s.column)||n}else{var o=this.getFoldsInRange(n);if(e&&o.length){this.expandFolds(o);return}o.length==1&&(r=o[0])}r||(r=this.getFoldAt(n.start.row,n.start.column));if(r&&r.range.toString()==n.toString()){this.expandFold(r);return}var u="...";if(!n.isMultiLine()){u=this.getTextRange(n);if(u.length<4)return;u=u.trim().substring(0,2)+".."}this.addFold(u,n)},this.getCommentFoldRange=function(e,t,n){var i=new o(this,e,t),s=i.getCurrentToken();if(s&&/^comment|string/.test(s.type)){var u=new r,a=new RegExp(s.type.replace(/\..*/,"\\."));if(n!=1){do s=i.stepBackward();while(s&&a.test(s.type));i.stepForward()}u.start.row=i.getCurrentTokenRow(),u.start.column=i.getCurrentTokenColumn()+2,i=new o(this,e,t);if(n!=-1){do s=i.stepForward();while(s&&a.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return u.end.row=i.getCurrentTokenRow(),u.end.column=i.getCurrentTokenColumn()+s.value.length-2,u}},this.foldAll=function(e,t,n){n==undefined&&(n=1e5);var r=this.foldWidgets;if(!r)return;t=t||this.getLength(),e=e||0;for(var i=e;i<t;i++){r[i]==null&&(r[i]=this.getFoldWidget(i));if(r[i]!="start")continue;var s=this.getFoldWidgetRange(i);if(s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e){i=s.end.row;try{var o=this.addFold("...",s);o&&(o.collapseChildren=n)}catch(u){}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle==e)return;this.$foldStyle=e,e=="manual"&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)},this.$setFolding=function(e){if(this.$foldMode==e)return;this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._emit("changeAnnotation");if(!e||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};var r=e-1,i;while(r>=0){var s=n[r];s==null&&(s=n[r]=this.getFoldWidget(r));if(s=="start"){var o=this.getFoldWidgetRange(r);i||(i=o);if(o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},r=this.$toggleFoldWidget(e,n);if(!r){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(!this.getFoldWidget)return;var n=this.getFoldWidget(e),r=this.getLine(e),i=n==="end"?-1:1,s=this.getFoldAt(e,i===-1?0:r.length,i);if(s){t.children||t.all?this.removeFold(s):this.expandFold(s);return}var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()){s=this.getFoldAt(o.start.row,o.start.column,1);if(s&&o.isEqual(s.range)){this.removeFold(s);return}}if(t.siblings){var u=this.getParentFoldRangeData(e);if(u.range)var a=u.range.start.row+1,f=u.range.end.row;this.foldAll(a,f,t.all?1e4:0)}else t.children?(f=o?o.end.row:this.getLength(),this.foldAll(e+1,o.end.row,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(n)return;var r=this.getParentFoldRangeData(t,!0);n=r.range||r.firstRange;if(n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}},this.updateFoldWidgets=function(e){var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i===0)this.foldWidgets[r]=null;else if(t.action=="removeText"||t.action=="removeLines")this.foldWidgets.splice(r,i+1,null);else{var s=Array(i+1);s.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var r=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,o=e("../token_iterator").TokenIterator;t.Folding=u}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";function s(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n=="")return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,s=t.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);o||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1);if(!o)return null;if(o[1]){var u=this.$findClosingBracket(o[1],e);if(!u)return null;r=i.fromPoints(e,u),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var u=this.$findOpeningBracket(o[2],e);if(!u)return null;r=i.fromPoints(u,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));var a=t.column-o.getCurrentTokenColumn()-2,f=u.value;for(;;){while(a>=0){var l=f.charAt(a);if(l==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else l==e&&(s+=1);a-=1}do u=o.stepBackward();while(u&&!n.test(u.type));if(u==null)break;f=u.value,a=f.length-1}return null},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));var a=t.column-o.getCurrentTokenColumn();for(;;){var f=u.value,l=f.length;while(a<l){var c=f.charAt(a);if(c==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else c==e&&(s+=1);a+=1}do u=o.stepForward();while(u&&!n.test(u.type));if(u==null)break;a=0}return null}}var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=s}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./config"),o=e("./lib/event_emitter").EventEmitter,u=e("./selection").Selection,a=e("./mode/text").Mode,f=e("./range").Range,l=e("./document").Document,c=e("./background_tokenizer").BackgroundTokenizer,h=e("./search_highlight").SearchHighlight,p=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this);if(typeof e!="object"||!e.getLine)e=new l(e);this.setDocument(e),this.selection=new u(this),s.resetOptions(this),this.setMode(t),s._signal("session",this)};(function(){function m(e){return e<4352?!1:e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}r.implement(this,o),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){var n=0,r=e.length-1;while(n<=r){var i=n+r>>1,s=e[i];if(t>s)n=i+1;else{if(!(t<s))return i;r=i-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){var t=e.data;this.$modified=!0,this.$resetRowCache(t.range.start.row);var n=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&!t.ignore&&(this.$deltasDoc.push(t),n&&n.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:n}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(t),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),r,i=0;if(t==null)s=n.length-1,i=this.getLine(e).length;else for(var s=0;s<n.length;s++){i+=n[s].value.length;if(i>=t)break}return r=n[s],r?(r.index=s,r.start=i-r.value.length,r):null},this.setUndoManager=function(e){this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel();if(e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){t===undefined&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,r){var i=this.$markerId++,s={range:e,type:n||"line",renderer:typeof n=="function"?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=s,this._signal("changeFrontMarker")):(this.$backMarkers[i]=s,this._signal("changeBackMarker")),i},this.addDynamicMarker=function(e,t){if(!e.update)return;var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(!t)return;var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new h(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,r){typeof t!="number"&&(n=t,t=e),n||(n="ace_step");var i=new f(e,0,t,Infinity);return i.id=this.addMarker(i,n,"fullLine",r),i},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine="\n"},this.getWordRange=function(e,t){var n=this.getLine(e),r=!1;t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe));if(r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var s=t;if(s>0){do s--;while(s>=0&&n.charAt(s).match(i));s++}var o=t;while(o<n.length&&n.charAt(o).match(i))o++;return new f(e,s,e,o)},this.getAWordRange=function(e,t){var n=this.getWordRange(e,t),r=this.getLine(n.end.row);while(r.charAt(n.end.column).match(/[ \t]/))n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&typeof e=="object"){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a);if(this.$modes[r]&&!n){this.$onChangeMode(this.$modes[r]),t&&t();return}this.$modeId=r,s.loadModule(["mode",r],function(e){if(this.$modeId!==r)return t&&t();if(this.$modes[r]&&!n)return this.$onChangeMode(this.$modes[r]);e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e),t&&t())}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){t||(this.$modeId=e.$id);if(this.$mode===e)return;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(n.addEventListener!==undefined){var r=this.onReloadTokenizer.bind(this);n.addEventListener("update",r)}if(!this.bgTokenizer){this.bgTokenizer=new c(n);var i=this;this.bgTokenizer.addEventListener("update",function(e){i._signal("tokenizerUpdate",e)})}else this.bgTokenizer.setTokenizer(n);this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){if(this.$scrollTop===e||isNaN(e))return;this.$scrollTop=e,this._signal("changeScrollTop",e)},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){if(this.$scrollLeft===e||isNaN(e))return;this.$scrollLeft=e,this._signal("changeScrollLeft",e)},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){this.$modified=!1;if(this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:Infinity,u=t.length;for(var a=0;a<u;a++){if(a>o){a=s.end.row+1;if(a>=u)break;s=this.$foldData[i++],o=s?s.start.row:Infinity}n[a]==null&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.undoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=e.length-1;r!=-1;r--){var i=e[r];i.group=="doc"?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.redoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=0;r<e.length;r++){var i=e[r];i.group=="doc"&&(this.doc.applyDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function r(e){var n=e.action==="insertText"||e.action==="insertLines";return t?!n:n}var i=e[0],s,o,u=!1;r(i)?(s=f.fromPoints(i.range.start,i.range.end),u=!0):(s=f.fromPoints(i.range.start,i.range.start),u=!1);for(var a=1;a<e.length;a++)i=e[a],r(i)?(o=i.range.start,s.compare(o.row,o.column)==-1&&s.setStart(i.range.start),o=i.range.end,s.compare(o.row,o.column)==1&&s.setEnd(i.range.end),u=!0):(o=i.range.start,s.compare(o.row,o.column)==-1&&(s=f.fromPoints(i.range.start,i.range.start)),u=!1);if(n!=null){f.comparePoints(n.start,s.start)===0&&(n.start.column+=s.end.column-s.start.column,n.end.column+=s.end.column-s.start.column);var l=n.compareRange(s);l==1?s.setStart(n.start):l==-1&&s.setEnd(n.end)}return s},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),s=f.fromPoints(t,t);if(!n){this.remove(e);var o=e.start.row-e.end.row,u=o?-e.end.column:e.start.column-e.end.column;u&&(s.start.row==e.end.row&&s.start.column>e.end.column&&(s.start.column+=u),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=u)),o&&s.start.row>=e.end.row&&(s.start.row+=o,s.end.row+=o)}s.end=this.insert(s.start,r);if(i.length){var a=e.start,l=s.start,o=l.row-a.row,u=l.column-a.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=o,e.end.row+=o,e}))}return s},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.insert({row:r,column:0},n)},this.outdentRows=function(e){var t=e.collapseRows(),n=new f(0,0,0,0),r=this.getTabSize();for(var i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o<r;++o)if(s.charAt(o)!=" ")break;o<r&&s.charAt(o)==" "?(n.start.column=o,n.end.column=o+1):(n.start.column=0,n.end.column=o),this.remove(n)}},this.$moveLines=function(e,t,n){e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t);if(n<0){var r=this.getRowFoldStart(e+n);if(r<0)return 0;var i=r-e}else if(n>0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var s=new f(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(s).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),u=n==0?this.doc.getLines(e,t):this.doc.removeLines(e,t);return this.doc.insertLines(e+i,u),o.length&&this.addFolds(o),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){t=Math.max(0,t);if(e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0);if(e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){if(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this._signal("changeWrapMode")},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1?(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n,r=e.data.action,i=e.data.range.start.row,s=e.data.range.end.row,o=e.data.range.start,u=e.data.range.end,a=null;r.indexOf("Lines")!=-1?(r=="insertLines"?s=i+e.data.lines.length:s=i,n=e.data.lines?e.data.lines.length:s-i):n=s-i,this.$updating=!0;if(n!=0)if(r.indexOf("remove")!=-1){this[t?"$wrapData":"$rowLengthCache"].splice(i,n);var f=this.$foldData;a=this.getFoldsInRange(e.data.range),this.removeFolds(a);var l=this.getFoldLine(u.row),c=0;if(l){l.addRemoveChars(u.row,u.column,o.column-u.column),l.shiftRow(-n);var h=this.getFoldLine(i);h&&h!==l&&(h.merge(l),l=h),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=u.row&&l.shiftRow(-n)}s=i}else{var p=Array(n);p.unshift(i,0);var d=t?this.$wrapData:this.$rowLengthCache;d.splice.apply(d,p);var f=this.$foldData,l=this.getFoldLine(i),c=0;if(l){var v=l.range.compareInside(o.row,o.column);v==0?(l=l.split(o.row,o.column),l&&(l.shiftRow(n),l.addRemoveChars(s,0,u.column-o.column))):v==-1&&(l.addRemoveChars(i,0,u.column-o.column),l.shiftRow(n)),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=i&&l.shiftRow(n)}}else{n=Math.abs(e.data.range.start.column-e.data.range.end.column),r.indexOf("remove")!=-1&&(a=this.getFoldsInRange(e.data.range),this.removeFolds(a),n=-n);var l=this.getFoldLine(i);l&&l.addRemoveChars(i,o.column,n)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(i,s):this.$updateRowLengthCache(i,s),a},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var r=this.doc.getAllLines(),i=this.getTabSize(),s=this.$wrapData,o=this.$wrapLimit,a,f,l=e;t=Math.min(t,r.length-1);while(l<=t)f=this.getFoldLine(l,f),f?(a=[],f.walk(function(e,t,i,s){var o;if(e!=null){o=this.$getDisplayTokens(e,a.length),o[0]=n;for(var f=1;f<o.length;f++)o[f]=u}else o=this.$getDisplayTokens(r[t].substring(s,i),a.length);a=a.concat(o)}.bind(this),f.end.row,r[f.end.row].length+1),s[f.start.row]=this.$computeWrapSplits(a,o,i),l=f.end.row+1):(a=this.$getDisplayTokens(r[l]),s[l]=this.$computeWrapSplits(a,o,i),l++)};var e=1,t=2,n=3,u=4,l=9,p=10,d=11,v=12;this.$computeWrapSplits=function(e,r){function c(t){var n=e.slice(o,t),r=n.length;n.join("").replace(/12/g,function(){r-=1}).replace(/2/g,function(){r-=1}),a+=r,i.push(a),o=t}if(e.length==0)return[];var i=[],s=e.length,o=0,a=0,f=this.$wrapAsCode;while(s-o>r){var h=o+r;if(e[h-1]>=p&&e[h]>=p){c(h);continue}if(e[h]==n||e[h]==u){for(h;h!=o-1;h--)if(e[h]==n)break;if(h>o){c(h);continue}h=o+r;for(h;h<e.length;h++)if(e[h]!=u)break;if(h==e.length)break;c(h);continue}var d=Math.max(h-(f?10:r-(r>>2)),o-1);while(h>d&&e[h]<n)h--;if(f){while(h>d&&e[h]<n)h--;while(h>d&&e[h]==l)h--}else while(h>d&&e[h]<p)h--;if(h>d){c(++h);continue}h=o+r,e[h]==t&&h--,c(h)}return i},this.$getDisplayTokens=function(n,r){var i=[],s;r=r||0;for(var o=0;o<n.length;o++){var u=n.charCodeAt(o);if(u==9){s=this.getScreenTabSize(i.length+r),i.push(d);for(var a=1;a<s;a++)i.push(v)}else u==32?i.push(p):u>39&&u<48||u>57&&u<64?i.push(l):u>=4352&&m(u)?i.push(e,t):i.push(e)}return i},this.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t==null&&(t=Infinity),n=n||0;var r,i;for(i=0;i<e.length;i++){r=e.charCodeAt(i),r==9?n+=this.getScreenTabSize(n):r>=4352&&m(r)?n+=2:n+=1;if(n>t)break}return[n,i]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return!this.$useWrapMode||!this.$wrapData[e]?1+t:this.$wrapData[e].length+1+t},this.getRowLineCount=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:undefined},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var n,r=0,i=0,s,o=0,u=0,a=this.$screenRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var o=a[f],r=this.$docRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getLength()-1,p=this.getNextFoldLine(r),d=p?p.start.row:Infinity;while(o<=e){u=this.getRowLength(r);if(o+u>e||r>=h)break;o+=u,r++,r>d&&(r=p.end.row+1,p=this.getNextFoldLine(r,p),d=p?p.start.row:Infinity),c&&(this.$docRowCache.push(r),this.$screenRowCache.push(o))}if(p&&p.start.row<=r)n=this.getFoldDisplayLine(p),r=p.start.row;else{if(o+u<=e||r>h)return{row:h,column:this.getLine(h).length};n=this.getLine(r),p=null}if(this.$useWrapMode){var v=this.$wrapData[r];if(v){var m=Math.floor(e-o);s=v[m],m>0&&v.length&&(i=v[m-1]||v[v.length-1],n=n.substring(i))}}return i+=this.$getStringScreenWidth(n,t)[1],this.$useWrapMode&&i>=s&&(i=s-1),p?p.idxToPosition(i):{row:r,column:i}},this.documentToScreenPosition=function(e,t){if(typeof t=="undefined")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,s=null;s=this.getFoldAt(e,t,1),s&&(e=s.start.row,t=s.start.column);var o,u=0,a=this.$docRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var u=a[f],r=this.$screenRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getNextFoldLine(u),p=h?h.start.row:Infinity;while(u<e){if(u>=p){o=h.end.row+1;if(o>e)break;h=this.getNextFoldLine(o,h),p=h?h.start.row:Infinity}else o=u+1;r+=this.getRowLength(u),u=o,c&&(this.$docRowCache.push(u),this.$screenRowCache.push(r))}var d="";h&&u>=p?(d=this.getFoldDisplayLine(h,e,t),i=h.start.row):(d=this.getLine(e).substring(0,t),i=e);if(this.$useWrapMode){var v=this.$wrapData[i];if(v){var m=0;while(d.length>=v[m])r++,m++;d=d.substring(v[m-1]||0,d.length)}}return{row:r,column:this.$getStringScreenWidth(d)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(!this.$useWrapMode){e=this.getLength();var n=this.$foldData;for(var r=0;r<n.length;r++)t=n[r],e-=t.end.row-t.start.row}else{var i=this.$wrapData.length,s=0,r=0,t=this.$foldData[r++],o=t?t.start.row:Infinity;while(s<i){var u=this.$wrapData[s];e+=u?u.length+1:1,s++,s>o&&(s=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),s.defineOptions(p.prototype,"session",{wrap:{set:function(e){!e||e=="off"?e=!1:e=="free"?e=!0:e=="printMargin"?e=-1:typeof e=="string"&&(e=parseInt(e,10)||!1);if(this.$wrap==e)return;if(!e)this.setUseWrapMode(!1);else{var t=typeof e=="number"?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}this.$wrap=e},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e=e=="auto"?this.$mode.type!="text":e!="text",e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){if(isNaN(e)||this.$tabSize===e)return;this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize")},initialValue:4,handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=p}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i){if(!e.start){var o=e.offset+(i||0);r=new s(n,o,n,o+e.length);if(!e.length&&t.start&&t.start.start&&t.skipCurrent!=0&&r.isEqual(t.start))return r=null,!1}else r=e;return!0}),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],u=t.re;if(t.$isMultiLine){var a=u.length,f=i.length-a,l;e:for(var c=u.offset||0;c<=f;c++){for(var h=0;h<a;h++)if(i[c+h].search(u[h])==-1)continue e;var p=i[c],d=i[c+a-1],v=p.length-p.match(u[0])[0].length,m=d.match(u[a-1])[0].length;if(l&&l.end.row===c&&l.end.column>v)continue;o.push(l=new s(c,v,c+a-1,m)),a>2&&(c=c+a-2)}}else for(var g=0;g<i.length;g++){var y=r.getMatchOffsets(i[g],u);for(var h=0;h<y.length;h++){var b=y[h];o.push(new s(g,b.offset,g,b.offset+b.length))}}if(n){var w=n.start.column,E=n.start.column,g=0,h=o.length-1;while(g<h&&o[g].start.column<w&&o[g].start.row==n.start.row)g++;while(g<h&&o[h].end.column>E&&o[h].end.row==n.end.row)h--;o=o.slice(g,h+1);for(g=0,h=o.length;g<h;g++)o[g].start.row+=n.start.row,o[g].end.row+=n.start.row}return o},this.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(!r)return;var i=r.exec(e);if(!i||i[0].length!=e.length)return null;t=e.replace(r,t);if(n.preserveCase){t=t.split("");for(var s=Math.min(e.length,e.length);s--;){var o=e[s];o&&o.toLowerCase()!=o?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join("")}return t},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i;if(t.$isMultiLine)var o=n.length,u=function(t,r,u){var a=t.search(n[0]);if(a==-1)return;for(var f=1;f<o;f++){t=e.getLine(r+f);if(t.search(n[f])==-1)return}var l=t.match(n[o-1])[0].length,c=new s(r,a,r+o-1,l);n.offset==1?(c.start.row--,c.start.column=Number.MAX_VALUE):u&&(c.start.column+=u);if(i(c))return!0};else if(t.backwards)var u=function(e,t,s){var o=r.getMatchOffsets(e,n);for(var u=o.length-1;u>=0;u--)if(i(o[u],t,s))return!0};else var u=function(e,t,s){var o=r.getMatchOffsets(e,n);for(var u=0;u<o.length;u++)if(i(o[u],t,s))return!0};var a=this.$lineIterator(e,t);return{forEach:function(e){i=e,a.forEach(u)}}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n)),e.wholeWord&&(n="\\b"+n+"\\b");var i=e.caseSensitive?"gm":"gmi";e.$isMultiLine=!t&&/[\n\r]/.test(n);if(e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var s=new RegExp(n,i)}catch(o){s=!1}return e.re=s},this.$assembleMultilineRegExp=function(e,t){var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[];for(var i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(s){return!1}return n[0]==""?(r.shift(),r.offset=1):r.offset=0,r},this.$lineIterator=function(e,t){var n=t.backwards==1,r=t.skipCurrent!=0,i=t.range,s=t.start;s||(s=i?i[n?"end":"start"]:e.selection.getRange()),s.start&&(s=s[r!=n?"end":"start"]);var o=i?i.start.row:0,u=i?i.end.row:e.getLength()-1,a=n?function(n){var r=s.row,i=e.getLine(r).substring(0,s.column);if(n(i,r))return;for(r--;r>=o;r--)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=u,o=s.row;r>=o;r--)if(n(e.getLine(r),r))return}:function(n){var r=s.row,i=e.getLine(r).substr(s.column);if(n(i,r,s.column))return;for(r+=1;r<=u;r++)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=o,u=s.row;r<=u;r++)if(n(e.getLine(r),r))return};return{forEach:a}}}).call(o.prototype),t.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function o(e,t){this.platform=t||(i.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function u(e,t){o.call(this,e,t),this.$singleCommand=!1}var r=e("../lib/keys"),i=e("../lib/useragent"),s=r.KEY_MODS;u.prototype=o.prototype,function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&(typeof e=="string"?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var s=r[i];if(s==e)delete r[i];else if(Array.isArray(s)){var o=s.indexOf(e);o!=-1&&(s.splice(o,1),s.length==1&&(r[i]=s[0]))}}},this.bindKey=function(e,t,n){typeof e=="object"&&(e=e[this.platform]);if(!e)return;if(typeof t=="function")return this.addCommand({exec:t,bindKey:e,name:t.name||e});e.split("|").forEach(function(e){var r="";if(e.indexOf(" ")!=-1){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var o=this.parseKeys(e),u=s[o.hashId]+o.key;this._addCommandToBinding(r+u,t,n)},this)},this._addCommandToBinding=function(e,t,n){var r=this.commandKeyBinding,i;t?!r[e]||this.$singleCommand?r[e]=t:(Array.isArray(r[e])?(i=r[e].indexOf(t))!=-1&&r[e].splice(i,1):r[e]=[r[e]],n||t.isDefault?r[e].unshift(t):r[e].push(t)):delete r[e]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(!n)return;if(typeof n=="string")return this.bindKey(n,t);typeof n=="function"&&(n={exec:n});if(typeof n!="object")return;n.name||(n.name=t),this.addCommand(n)},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(t.length==1&&t[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}var s=0;for(var o=t.length;o--;){var u=r.KEY_MODS[t[o]];if(u==null)return typeof console!="undefined"&&console.error("invalid modifier "+t[o]+" in "+e),!1;s|=u}return{key:n,hashId:s}},this.findKeyCommand=function(t,n){var r=s[t]+n;return this.commandKeyBinding[r]},this.handleKeyboard=function(e,t,n,r){var i=s[t]+n,o=this.commandKeyBinding[i];e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o);if(o)if(o=="chainKeys"||o[o.length-1]=="chainKeys")return e.$keyChain=e.$keyChain||i,{command:"null"};return e.$keyChain&&r>0&&(e.$keyChain=""),{command:o}}}.call(o.prototype),t.HashHandler=o,t.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,o=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};r.inherits(o,i),function(){r.implement(this,s),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}typeof e=="string"&&(e=this.commands[e]);if(!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var i={editor:t,command:e,args:n};return i.returnValue=this._emit("exec",i),this._signal("afterExec",i),i.returnValue===!1?!1:!0},this.toggleRecording=function(e){if(this.$inReplay)return;return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}},this.trimMacro=function(e){return e.map(function(e){return typeof e[0]!="string"&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(o.prototype),t.CommandManager=o}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function o(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:o("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:o("Alt-E","Ctrl-E"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:o("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:o("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:o(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:o("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:o("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:o("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:o("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:o("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:o("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:o("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:o("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:o("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:o("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:o("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:o("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:o("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:o("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:o("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:o("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:o("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:o("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:o("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:o("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:o("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:o("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:o(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:o(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:o("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:o("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:o("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:o("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:o("null","null"),exec:function(){},passEvent:!0,readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"removeline",bindKey:o("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:o("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:o("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:o("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:o("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:o("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:o("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:o(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:o("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:o(null,null),exec:function(e){var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,u=e.session.doc.getTextRange(e.selection.getRange()),a=u.replace(/\n\s*/," ").length,f=e.session.doc.getLine(n.row);for(var l=n.row+1;l<=i.row+1;l++){var c=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));c.length!==0&&(c=" "+c),f+=c}i.row+1<e.session.doc.getLength()-1&&(f+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new s(n.row,0,i.row+2,0),f),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o<r.length;o++)o==r.length-1&&(r[o].end.row!==t||r[o].end.column!==n)&&i.push(new s(r[o].end.row,r[o].end.column,t,n)),o===0?(r[o].start.row!==0||r[o].start.column!==0)&&i.push(new s(0,0,r[o].start.row,r[o].start.column)):i.push(new s(r[o-1].end.row,r[o-1].end.column,r[o].start.row,r[o].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var o=0;o<i.length;o++)e.selection.addRange(i[o],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/lang"),o=e("./lib/useragent"),u=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,f=e("./mouse/fold_handler").FoldHandler,l=e("./keyboard/keybinding").KeyBinding,c=e("./edit_session").EditSession,h=e("./search").Search,p=e("./range").Range,d=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,g=e("./config"),y=e("./token_iterator").TokenIterator,b=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.commands=new v(o.isMac?"mac":"win",m),this.textInput=new u(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new l(this),this.$mouseHandler=new a(this),new f(this),this.$blockScrolling=0,this.$search=(new h).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new c("")),g.resetOptions(this),g._signal("editor",this)};(function(){r.implement(this,d),this.$initOperationListeners=function(){function e(e){return e[e.length-1]}this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&e.returnValue===!1)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling&&this.$blockScrolling--;if(t&&t.scrollIntoView){switch(t.scrollIntoView){case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),r=this.renderer.layerConfig;(n.start.row>=r.lastRow||n.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:}t.scrollIntoView=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(!this.$mergeUndoDeltas)return;var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if(e.command.name=="insertstring"){var i=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&n.indexOf(e.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:n.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())},this.setKeyboardHandler=function(e,t){if(e&&typeof e=="string"){this.$keybindingId=e;var n=this;g.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session==e)return;var t=this.session;if(t){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener("changeCursor",this.$onCursorChange),n.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(this.$highlightPending)return;var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(!t||!t.bgTokenizer)return;var n=t.findMatchingBracket(e.getCursorPosition());if(n)var r=new p(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)var r=t.$mode.getMatching(e.session);r&&(t.$bracketHighlight=t.addMarker(r,"ace_bracket","text"))},50)},this.$highlightTags=function(){if(this.$highlightTagPending)return;var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(!t||!t.bgTokenizer)return;var n=e.getCursorPosition(),r=new y(e.session,n.row,n.column),i=r.getCurrentToken();if(!i||!/\b(?:tag-open|tag-name)/.test(i.type)){t.removeMarker(t.$tagHighlight),t.$tagHighlight=null;return}i.type.indexOf("tag-open")!=-1&&(i=r.stepForward());var s=i.value,o=0,u=r.stepBackward();if(u.value=="<"){do u=i,i=r.stepForward(),i&&i.value===s&&i.type.indexOf("tag-name")!==-1&&(u.value==="<"?o++:u.value==="</"&&o--);while(i&&o>=0)}else{do i=u,u=r.stepBackward(),i&&i.value===s&&i.type.indexOf("tag-name")!==-1&&(u.value==="<"?o++:u.value==="</"&&o--);while(u&&o<=0);r.stepForward()}if(!i){t.removeMarker(t.$tagHighlight),t.$tagHighlight=null;return}var a=r.getCurrentTokenRow(),f=r.getCurrentTokenColumn(),l=new p(a,f,a,f+i.value.length);t.$tagHighlight&&l.compareRange(t.$backMarkers[t.$tagHighlight].range)!==0&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),l&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(l,"ace_bracket","text"))},50)},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){if(this.$isFocused)return;this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e)},this.onBlur=function(e){if(!this.$isFocused)return;this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e)},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=e.data,n=t.range,r;n.start.row==n.end.row&&t.action!="insertLines"&&t.action!="removeLines"?r=n.end.row:r=Infinity,this.renderer.updateLines(n.start.row,r,this.session.$useWrapMode),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(g.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e=this.getSession(),t;if(this.$highlightActiveLine){if(this.$selectionStyle!="line"||!this.selection.isMultiLine())t=this.getCursorPosition();this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(t=!1)}if(e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new p(t.row,t.column,t.row,Infinity);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null;if(!this.selection.isEmpty()){var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}else this.$updateHighlightActiveLine();var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(t.isEmpty()||t.isMultiLine())return;var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),s=i.length,o=i.substring(Math.max(n,0),Math.min(r,s));if(n>=0&&/^[\w\d]/.test(o)||r<=s&&/[\w\d]$/.test(o))return;o=i.substring(t.start.column,t.end.column);if(!/^[\w\d]+$/.test(o))return;var u=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o});return u},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e){if(this.$readOnly)return;var t={text:e};this._signal("paste",t),e=t.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(e);else{var n=e.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(n.length>r.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,e);for(var i=r.length;i--;){var s=r[i];s.isEmpty()||this.session.remove(s),this.session.insert(s.start,n[i])}}this.renderer.scrollCursorIntoView()},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var s=r.transformAction(n.getState(i.row),"insertion",this,n,e);s&&(e!==s.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=s.text)}e==" "&&(e=this.session.getTabString());if(!this.selection.isEmpty()){var o=this.getSelectionRange();i=this.session.remove(o),this.clearSelection()}else if(this.session.getOverwrite()){var o=new p.fromPoints(i,i);o.end.column+=e.length,this.session.remove(o)}if(e=="\n"||e=="\r\n"){var u=n.getLine(i.row);if(i.column>u.search(/\S|$/)){var a=u.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+a)}}this.clearSelection();var f=i.column,l=n.getState(i.row),u=n.getLine(i.row),c=r.checkOutdent(l,u,e),h=n.insert(i,e);s&&s.selection&&(s.selection.length==2?this.selection.setSelectionRange(new p(i.row,f+s.selection[0],i.row,f+s.selection[1])):this.selection.setSelectionRange(new p(i.row+s.selection[0],s.selection[1],i.row+s.selection[2],s.selection[3])));if(n.getDocument().isNewLine(e)){var d=r.getNextLineIndent(l,u.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},d)}c&&r.autoOutdent(l,n,i.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&(e=="left"?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(t.end.column===0){var s=n.getTextRange(t);if(s[s.length-1]=="\n"){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(!this.selection.isEmpty())return;var e=this.getCursorPosition(),t=e.column;if(t===0)return;var n=this.session.getLine(e.row),r,i;t<n.length?(r=n.charAt(t)+n.charAt(t-1),i=new p(e.row,t-1,e.row,t+1)):(r=n.charAt(t-1)+n.charAt(t-2),i=new p(e.row,t-2,e.row,t)),this.session.replace(i,r)},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var n=this.$getSelectedRows();e.indentRows(n.first,n.last," ");return}if(t.start.column<t.end.column){var r=e.getTextRange(t);if(!/^\s+$/.test(r)){var n=this.$getSelectedRows();e.indentRows(n.first,n.last," ");return}}var i=e.getLine(t.start.row),o=t.start,u=e.getTabSize(),a=e.documentToScreenColumn(o.row,o.column);if(this.session.getUseSoftTabs())var f=u-a%u,l=s.stringRepeat(" ",f);else{var f=a%u;while(i[t.start.column]==" "&&f)t.start.column--,f--;this.selection.setSelectionRange(t),l=" "}return this.insert(l)},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last," ")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,n=[];for(i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var r=new p(0,0,0,0);for(var i=e.first;i<=e.last;i++){var s=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var r=this.session.getLine(e);while(n.lastIndex<t){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t){var s={value:i[0],start:i.index,end:i.index+i[0].length};return s}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new p(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,u=s.start+s.value.length-o,a=parseFloat(s.value);a*=Math.pow(10,u),o!==s.end&&n<o?e*=Math.pow(10,s.end-n-1):e*=Math.pow(10,s.end-n),a+=e,a/=Math.pow(10,u);var f=a.toFixed(u),l=new p(t,s.start,t,s.end);this.session.replace(l,f),this.moveCursorTo(t,Math.max(s.start+1,n+f.length-s.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows(),t;e.first===0||e.last+1<this.session.getLength()?t=new p(e.first,0,e.last+1,0):t=new p(e.first-1,this.session.getLine(e.first-1).length,e.last,this.session.getLine(e.last).length),this.session.remove(t),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var s=r?n.start:n.end,o=t.insert(s,t.getTextRange(n),!1);n.start=s,n.end=o,e.setSelectionRange(n,r)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var s=i.toOrientedRange();n=this.$getSelectedRows(s),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&e==-1&&(r=0),s.moveBy(r,0),i.fromOrientedRange(s)}else{var o=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;var u=0,a=0,f=o.length;for(var l=0;l<f;l++){var c=l;o[l].moveBy(u,0),n=this.$getSelectedRows(o[l]);var h=n.first,p=n.last;while(++l<f){a&&o[l].moveBy(a,0);var d=this.$getSelectedRows(o[l]);if(t&&d.first!=p)break;if(!t&&d.first>p+1)break;p=d.last}l--,u=this.session.$moveLines(h,p,t?0:e),t&&e==-1&&(c=l+1);while(c<=l)o[c].moveBy(u,0),c++;t||(u=0),a+=u}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var s=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),s=i||r.stepForward();if(!s)return;var o,u=!1,a={},f=n.column-s.start,l,c={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g))for(;f<s.value.length&&!u;f++){if(!c[s.value[f]])continue;l=c[s.value[f]]+"."+s.type.replace("rparen","lparen"),isNaN(a[l])&&(a[l]=0);switch(s.value[f]){case"(":case"[":case"{":a[l]++;break;case")":case"]":case"}":a[l]--,a[l]===-1&&(o="bracket",u=!0)}}else s&&s.type.indexOf("tag-name")!==-1&&(isNaN(a[s.value])&&(a[s.value]=0),i.value==="<"?a[s.value]++:i.value==="</"&&a[s.value]--,a[s.value]===-1&&(o="tag",u=!0));u||(i=s,s=r.stepForward(),f=0)}while(s&&!u);if(!o)return;var h,d;if(o==="bracket"){h=this.session.getBracketRange(n);if(!h){h=new p(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+f-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+f-1),d=h.start;if(t||d.row===n.row&&Math.abs(d.column-n.column)<2)h=this.session.getBracketRange(d)}}else if(o==="tag"){if(!s||s.type.indexOf("tag-name")===-1)return;var v=s.value;h=new p(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2);if(h.compare(n.row,n.column)===0){u=!1;do s=i,i=r.stepBackward(),i&&(i.type.indexOf("tag-close")!==-1&&h.setEnd(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1),s.value===v&&s.type.indexOf("tag-name")!==-1&&(i.value==="<"?a[v]++:i.value==="</"&&a[v]--,a[v]===0&&(u=!0)));while(i&&!u)}s&&s.type.indexOf("tag-name")&&(d=h.start,d.row==n.row&&Math.abs(d.column-n.column)<2&&(d=h.end))}d=h&&h.cursor||d,d&&(e?h&&t?this.selection.setRange(h):h&&h.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(d.row,d.column):this.selection.moveTo(d.row,d.column))},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorLeft()}this.clearSelection()},this.navigateRight=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorRight()}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),n!==null&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;this.$blockScrolling+=1;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var s=n.length-1;s>=0;--s)this.$tryReplace(n[s],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t!==null?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),typeof e=="string"||e instanceof RegExp?t.needle=e:typeof e=="object"&&r.mixin(t,e);var i=this.selection.getRange();t.needle==null&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var s=this.$search.find(this.session);if(t.preventScroll)return s;if(s)return this.revealRange(s,n),s;t.backwards?i.start=i.end:i.end=i.start,this.selection.setRange(i)},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(!e)return;var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var s=this.on("changeSelection",function(){r=!0}),o=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),u=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,s=e.$cursorLayer.$pixelPos,o=e.layerConfig,u=s.top-o.offset;s.top>=0&&u+t.top<0?r=!0:s.top<o.height&&s.top+t.top+o.lineHeight>window.innerHeight?r=!1:r=null,r!=null&&(i.style.top=u+"px",i.style.left=s.left+"px",i.style.height=o.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){if(e)return;delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",s),this.renderer.removeEventListener("afterRender",u),this.renderer.removeEventListener("beforeRender",o)}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;if(!t)return;t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&e!="wide",i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e))}}).call(b.prototype),g.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session",mode:"session"}),t.Editor=b}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){"use strict";var r=function(){this.reset()};(function(){this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(t,e),this.$undoStack.push(t),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return this.dirtyCounter===0}}).call(r.prototype),t.UndoManager=r}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,u=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){i.implement(this,o),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[]});var o=n.text;o=o?s.escapeHTML(o):n.html||"",i.text.indexOf(o)===-1&&i.text.push(o);var u=n.type;u=="error"?i.className=" ace_error":u=="warning"&&i.className!=" ace_error"?i.className=" ace_warning":u=="info"&&!i.className&&(i.className=" ace_info")}},this.$updateAnnotations=function(e){if(!this.$annotations.length)return;var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i!==0)if(t.action=="removeText"||t.action=="removeLines")this.$annotations.splice(r,i+1,null);else{var s=new Array(i+1);s.unshift(r,1),this.$annotations.splice.apply(this.$annotations,s)}},this.update=function(e){var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),s=t.getNextFoldLine(n),o=s?s.start.row:Infinity,u=this.$showFoldWidgets&&t.foldWidgets,a=t.$breakpoints,f=t.$decorations,l=t.$firstLineNumber,c=0,h=t.gutterRenderer||this.$renderer,p=null,d=-1,v=n;for(;;){v>o&&(v=s.end.row+1,s=t.getNextFoldLine(v,s),o=s?s.start.row:Infinity);if(v>i){while(this.$cells.length>d+1)p=this.$cells.pop(),this.element.removeChild(p.element);break}p=this.$cells[++d],p||(p={element:null,textNode:null,foldWidget:null},p.element=r.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[d]=p);var m="ace_gutter-cell ";a[v]&&(m+=a[v]),f[v]&&(m+=f[v]),this.$annotations[v]&&(m+=this.$annotations[v].className),p.element.className!=m&&(p.element.className=m);var g=t.getRowLength(v)*e.lineHeight+"px";g!=p.element.style.height&&(p.element.style.height=g);if(u){var y=u[v];y==null&&(y=u[v]=t.getFoldWidget(v))}if(y){p.foldWidget||(p.foldWidget=r.createElement("span"),p.element.appendChild(p.foldWidget));var m="ace_fold-widget ace_"+y;y=="start"&&v==o&&v<s.end.row?m+=" ace_closed":m+=" ace_open",p.foldWidget.className!=m&&(p.foldWidget.className=m);var g=e.lineHeight+"px";p.foldWidget.style.height!=g&&(p.foldWidget.style.height=g)}else p.foldWidget&&(p.element.removeChild(p.foldWidget),p.foldWidget=null);var b=c=h?h.getText(t,v):v+l;b!=p.textNode.data&&(p.textNode.data=b),v++}this.element.style.height=e.minHeight+"px";if(this.$fixedWidth||t.$useWrapMode)c=t.getLength()+l;var w=h?h.getWidth(t,c,e):c.toString().length*e.characterWidth,E=this.$padding||this.$computePadding();w+=E.left+E.right,w!==this.gutterWidth&&!isNaN(w)&&(this.gutterWidth=w,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",w))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(e.x<t.left+n.left)return"markers";if(this.$showFoldWidgets&&e.x>n.right-t.right)return"foldWidgets"}}).call(u.prototype),t.Gutter=u}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(!e)return;this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var i=r.range.clipRows(e.firstRow,e.lastRow);if(i.isEmpty())continue;i=i.toScreenRange(this.session);if(r.renderer){var s=this.$getTop(i.start.row,e),o=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,o,s,e)}else r.type=="fullLine"?this.drawFullLineMarker(t,i,r.clazz,e):r.type=="screenLine"?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?r.type=="text"?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start",e)}this.element.innerHTML=t.join("")},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,i,s){var o=t.start.row,u=new r(o,t.start.column,o,this.session.getScreenLastRowColumn(o));this.drawSingleLineMarker(e,u,n+" ace_start",i,1,s),o=t.end.row,u=new r(o,0,o,t.end.column),this.drawSingleLineMarker(e,u,n,i,0,s);for(o=t.start.row+1;o<t.end.row;o++)u.start.row=o,u.end.row=o,u.end.column=this.session.getScreenLastRowColumn(o),this.drawSingleLineMarker(e,u,n,i,1,s)},this.drawMultiLineMarker=function(e,t,n,r,i){var s=this.$padding,o=r.lineHeight,u=this.$getTop(t.start.row,r),a=s+t.start.column*r.characterWidth;i=i||"",e.push("<div class='",n," ace_start' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",a,"px;",i,"'></div>"),u=this.$getTop(t.end.row,r);var f=t.end.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",o,"px;","width:",f,"px;","top:",u,"px;","left:",s,"px;",i,"'></div>"),o=(t.end.row-t.start.row-1)*r.lineHeight;if(o<0)return;u=this.$getTop(t.start.row+1,r),e.push("<div class='",n,"' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",s,"px;",i,"'></div>")},this.drawSingleLineMarker=function(e,t,n,r,i,s){var o=r.lineHeight,u=(t.end.column+(i||0)-t.start.column)*r.characterWidth,a=this.$getTop(t.start.row,r),f=this.$padding+t.start.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",o,"px;","width:",u,"px;","top:",a,"px;","left:",f,"px;",s||"","'></div>")},this.drawFullLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-s),e.push("<div class='",n,"' style='","height:",o,"px;","top:",s,"px;","left:0;right:0;",i||"","'></div>")},this.drawScreenLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;e.push("<div class='",n,"' style='","height:",o,"px;","top:",s,"px;","left:0;right:0;",i||"","'></div>")}}).call(s.prototype),t.Marker=s}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/useragent"),u=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){r.implement(this,u),this.EOF_CHAR="\u00b6",this.EOL_CHAR_LF="\u00ac",this.EOL_CHAR_CRLF="\u00a4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2192",this.SPACE_CHAR="\u00b7",this.$padding=0,this.$updateEolChar=function(){var e=this.session.doc.getNewLineCharacter()=="\n"?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;var t=this.$tabStrings=[0];for(var n=1;n<e+1;n++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+this.TAB_CHAR+s.stringRepeat("\u00a0",n-1)+"</span>"):t.push(s.stringRepeat("\u00a0",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",i="",o="";if(this.showInvisibles){r+=" ace_invisible",i=" ace_invisible_space",o=" ace_invisible_tab";var u=s.stringRepeat(this.SPACE_CHAR,this.tabSize),a=this.TAB_CHAR+s.stringRepeat("\u00a0",this.tabSize-1)}else var u=s.stringRepeat("\u00a0",this.tabSize),a=u;this.$tabStrings[" "]="<span class='"+r+i+"'>"+u+"</span>",this.$tabStrings[" "]="<span class='"+r+o+"'>"+a+"</span>"}},this.updateLines=function(e,t,n){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),s=this.element.childNodes,o=0;for(var u=e.firstRow;u<r;u++){var a=this.session.getFoldLine(u);if(a){if(a.containsRow(r)){r=a.start.row;break}u=a.end.row}o++}var u=r,a=this.session.getNextFoldLine(u),f=a?a.start.row:Infinity;for(;;){u>f&&(u=a.end.row+1,a=this.session.getNextFoldLine(u,a),f=a?a.start.row:Infinity);if(u>i)break;var l=s[o++];if(l){var c=[];this.$renderLine(c,u,!this.$useLineGroups(),u==f?a:!1),l.style.height=e.lineHeight*this.session.getRowLength(u)+"px",l.innerHTML=c.join("")}u++}},this.scrollLines=function(e){var t=this.config;this.config=e;if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var i=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}if(e.lastRow>t.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){var r=this.element.ownerDocument.createDocumentFragment(),s=t,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>n)break;var a=i.createElement("div"),f=[];this.$renderLine(f,s,!1,s==u?o:!1),a.innerHTML=f.join("");if(this.$useLineGroups())a.className="ace_line_group",r.appendChild(a),a.style.height=e.lineHeight*this.session.getRowLength(s)+"px";else while(a.firstChild)r.appendChild(a.firstChild);s++}return r},this.update=function(e){this.config=e;var t=[],n=e.firstRow,r=e.lastRow,i=n,s=this.session.getNextFoldLine(i),o=s?s.start.row:Infinity;for(;;){i>o&&(i=s.end.row+1,s=this.session.getNextFoldLine(i,s),o=s?s.start.row:Infinity);if(i>r)break;this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(i),"px'>"),this.$renderLine(t,i,!1,i==o?s:!1),this.$useLineGroups()&&t.push("</div>"),i++}this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,o=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,u=function(e,n,r,o,u){if(n)return i.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+s.stringRepeat(i.SPACE_CHAR,e.length)+"</span>":s.stringRepeat("\u00a0",e.length);if(e=="&")return"&#38;";if(e=="<")return"&#60;";if(e==" "){var a=i.session.getScreenTabSize(t+o);return t+=a-1,i.$tabStrings[a]}if(e=="\u3000"){var f=i.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",l=i.showInvisibles?i.SPACE_CHAR:"";return t+=1,"<span class='"+f+"' style='width:"+i.config.characterWidth*2+"px'>"+l+"</span>"}return r?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+i.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+i.config.characterWidth*2+"px'>"+e+"</span>")},a=r.replace(o,u);if(!this.$textToken[n.type]){var f="ace_"+n.type.replace(/\./g," ace_"),l="";n.type=="fold"&&(l=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",f,"'",l,">",a,"</span>")}else e.push(a);return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);return r<=0||r>=n?t:t[0]==" "?(r-=r%this.tabSize,e.push(s.stringRepeat(this.$tabStrings[" "],r/this.tabSize)),t.substr(r)):t[0]==" "?(e.push(s.stringRepeat(this.$tabStrings[" "],r)),t.substr(r)):t},this.$renderWrappedLine=function(e,t,n,r){var i=0,s=0,o=n[0],u=0;for(var a=0;a<t.length;a++){var f=t[a],l=f.value;if(a==0&&this.displayIndentGuides){i=l.length,l=this.renderIndentGuide(e,l,o);if(!l)continue;i-=l.length}if(i+l.length<o)u=this.$renderToken(e,u,f,l),i+=l.length;else{while(i+l.length>=o)u=this.$renderToken(e,u,f,l.substring(0,o-i)),l=l.substring(o-i),i=o,r||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),s++,u=0,o=n[s]||Number.MAX_VALUE;l.length!=0&&(i+=l.length,u=this.$renderToken(e,u,f,l))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var s=1;s<t.length;s++)r=t[s],i=r.value,n=this.$renderToken(e,n,r,i)},this.$renderLine=function(e,t,n,r){!r&&r!=0&&(r=this.session.getFoldLine(t));if(r)var i=this.$getFoldLineTokens(t,r);else var i=this.session.getTokens(t);n||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>");if(i.length){var s=this.session.getRowSplitData(t);s&&s.length?this.$renderWrappedLine(e,i,s,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){function i(e,t,n){var i=0,s=0;while(s+e[i].value.length<t){s+=e[i].value.length,i++;if(i==e.length)return}if(s!=t){var o=e[i].value.substring(t-s);o.length>n-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),s=t+o.length,i+=1}while(s<n&&i<e.length){var o=e[i].value;o.length+s>n?r.push({type:e[i].type,value:o.substring(0,n-s)}):r.push(e[i]),s+=o.length,i+=1}}var n=this.session,r=[],s=n.getTokens(e);return t.walk(function(e,t,o,u,a){e!=null?r.push({type:"fold",value:e}):(a&&(s=n.getTokens(t)),s.length&&i(s,u,o))},t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i,s=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),i===undefined&&(i="opacity"in this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateVisibility.bind(this)};(function(){this.$updateVisibility=function(e){var t=this.cursors;for(var n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){var t=this.cursors;for(var n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&!i&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=(e?this.$updateOpacity:this.$updateVisibility).bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0);if(!this.isBlinking||!this.blinkInterval||!this.isVisible)return;this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+n.column*this.config.characterWidth,i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;if(t===undefined||t.length===0)t=[{cursor:null}];for(var n=0,i=t.length;n<i;n++){var s=this.getPixelPosition(t[n].cursor,!0);if((s.top>e.height+e.offset||s.top<0)&&n>1)continue;var o=(this.cursors[r++]||this.addCursor()).style;this.drawCursor?this.drawCursor(o,s,e,t[n],this.session):(o.left=s.left+"px",o.top=s.top+"px",o.width=e.characterWidth+"px",o.height=e.lineHeight+"px")}while(this.cursors.length>r)this.removeCursor();var u=this.session.getOverwrite();this.$setOverwrite(u),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(s.prototype),t.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,u=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){r.implement(this,o),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(u.prototype);var a=function(e,t){u.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};r.inherits(a,u),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(a.prototype);var f=function(e,t){u.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(f,u),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(f.prototype),t.ScrollBar=a,t.ScrollBarV=a,t.ScrollBarH=f,t.VScrollBar=a,t.HScrollBar=f}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){this.changes=this.changes|e;if(!this.pending&&this.changes){this.pending=!0;var t=this;r.nextFrame(function(){t.pending=!1;var e;while(e=t.changes)t.changes=0,t.onRender(e)},this.window)}}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/useragent"),u=e("../lib/event_emitter").EventEmitter,a=0,f=t.FontMetrics=function(e,t){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),a||this.$testFractionalRect(),this.$measureNode.innerHTML=s.stringRepeat("X",a),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){r.implement(this,u),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=i.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;t>0&&t<1?a=50:a=100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",o.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&this.$pollSizeChangesTimer},this.$measureSizes=function(){if(a===50){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var n={height:e.height,width:e.width/a}}else var n={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/a};return n.width===0||n.height===0?null:n},this.$measureCharWidth=function(e){this.$main.innerHTML=s.stringRepeat(e,a);var t=this.$main.getBoundingClientRect();return t.width/a},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t===undefined&&(this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(f.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./config"),o=e("./lib/useragent"),u=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,f=e("./layer/text").Text,l=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,d=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,m='.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}';i.importCssString(m,"ace_editor");var g=function(e,t){var n=this;this.container=e||i.createElement("div"),this.$keepTextAreaAtCursor=!o.isOldIE,i.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var r=this.$textLayer=new f(this.content);this.canvas=r.element,this.$markerFront=new a(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new d(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,v),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e);if(!e)return;this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode)},this.updateLines=function(e,t,n){t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t};if(this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}if(this.$changedLines.firstRow>this.layerConfig.lastRow)return;this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(this.resizing>2)return;this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var s=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,s=this.$size,o={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};r&&(e||s.height!=r)&&(s.height=r,i|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL);if(n&&(e||s.width!=n)){i|=this.CHANGE_SIZE,s.width=n,t==null&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px";if(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)i|=this.CHANGE_FULL}return s.$dirty=!n||!r,i&&this._signal("resize",o),i},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(!this.$showPrintMargin&&!this.$printMarginEl)return;if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$keepTextAreaAtCursor)return;var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var r=this.textarea.style,i=this.lineHeight;if(t<0||t>e.height-i){r.top=r.left="0";return}var s=this.characterWidth;if(this.$composition){var o=this.textarea.value.replace(/^\x01+/,"");s*=this.session.$getStringScreenWidth(o)[0]+2,i+=2}n-=this.scrollLeft,n>this.$size.scrollerWidth-s&&(n=this.$size.scrollerWidth-s),n+=this.gutterWidth,r.height=i+"px",r.width=s+"px",r.left=Math.min(n,this.$size.scrollerWidth-s)+"px",r.top=Math.min(t,this.$size.height-i)+"px"},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){this.$changes&&(e|=this.$changes,this.$changes=0);if(!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t){this.$changes|=e;return}if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){e|=this.$computeLayerConfig();if(n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"}e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left");if(e&this.CHANGE_FULL){this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender");return}if(e&this.CHANGE_SCROLL){e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender");return}e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender")},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0),r=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,s=this.scrollTop%this.lineHeight,o=t.scrollerHeight+this.lineHeight,u=this.$getLongestLine(),a=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-u-2*this.$padding<0),f=this.$horizScroll!==a;f&&(this.$horizScroll=a,this.scrollBarH.setVisible(a));var l=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=l,this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,i-t.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,u+2*this.$padding-t.scrollerWidth+this.scrollMargin.right)));var c=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+l<0||this.scrollTop),h=this.$vScroll!==c;h&&(this.$vScroll=c,this.scrollBarV.setVisible(c));var p=Math.ceil(o/this.lineHeight)-1,d=Math.max(0,Math.round((this.scrollTop-s)/this.lineHeight)),v=d+p,m,g,y=this.lineHeight;d=e.screenToDocumentRow(d,0);var b=e.getFoldLine(d);b&&(d=b.start.row),m=e.documentToScreenRow(d,0),g=e.getRowLength(d)*y,v=Math.min(e.screenToDocumentRow(v,0),e.getLength()-1),o=t.scrollerHeight+e.getRowLength(v)*y+g,s=this.scrollTop-m*y;var w=0;this.layerConfig.width!=u&&(w=this.CHANGE_H_SCROLL);if(f||h)w=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),h&&(u=this.$getLongestLine());return this.layerConfig={width:u,padding:this.$padding,firstRow:d,firstRowScreen:m,lastRow:v,lineHeight:y,characterWidth:this.characterWidth,minHeight:o,maxHeight:i,offset:s,gutterOffset:Math.max(0,Math.ceil((s+t.height-t.scrollerHeight)/y)),height:this.$size.scrollerHeight},w},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(e>n.lastRow+1)return;if(t<n.firstRow)return;if(t===Infinity){this.$showGutter&&this.$gutterLayer.update(n),this.$textLayer.update(n);return}return this.$textLayer.updateLines(n,e,t),!0},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(this.$size.scrollerHeight===0)return;var r=this.$cursorLayer.getPixelPosition(e),i=r.left,s=r.top,o=n&&n.top||0,u=n&&n.bottom||0,a=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;a+o>s?(t&&(s-=t*this.$size.scrollerHeight),s===0&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):a+this.$size.scrollerHeight-u<s+this.lineHeight&&(t&&(s+=t*this.$size.scrollerHeight),this.session.setScrollTop(s+this.lineHeight-this.$size.scrollerHeight));var f=this.scrollLeft;f>i?(i<this.$padding+2*this.layerConfig.characterWidth&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):f+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):f<=this.$padding&&i-f<this.characterWidth&&this.session.setScrollLeft(0)},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){typeof e=="number"&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],s=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)i.push(s(n/this.STEPS,e,t-e));return i},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}),s=i.top;t&&(s-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(s),n!==!1&&this.animateScrolling(o,r)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(!this.$animatedScroll)return;var r=this;if(e==n)return;if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length){e=i[0];if(e==n)return}}var s=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:s},clearInterval(this.$timer),r.session.setScrollTop(s.shift()),r.session.$scrollTop=n,this.$timer=setInterval(function(){s.length?(r.session.setScrollTop(s.shift()),r.session.$scrollTop=n):n!=null?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):(r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,t&&t())},10)},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){if(t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top)return!0;if(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom)return!0;if(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left)return!0;if(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=Math.round(r);return{row:i,column:s,side:r-s>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(i,Math.max(r,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+Math.round(r.column*this.characterWidth),s=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){if(!this.$composition)return;i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null},this.setTheme=function(e,t){function o(r){if(n.$themeId!=e)return t&&t();if(!r.cssClass)return;i.importCssString(r.cssText,r.cssClass,n.container.ownerDocument),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var s="padding"in r?r.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&s!=n.$padding&&n.setPadding(s),n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,"ace_dark",r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t()}var n=this;this.$themeId=e,n._dispatchEvent("themeChange",{theme:e});if(!e||typeof e=="string"){var r=e||this.$options.theme.initialValue;s.loadModule(["theme",r],o)}else o(e)},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){i.setCssClass(this.container,e,t!==!1)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),s.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){typeof e=="number"&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight){this.$gutterLineHighlight=i.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight);return}this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){typeof e=="number"&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0;if(this.$scrollPastEnd==e)return;this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=g}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,o=e("../config"),u=function(t,n,r,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl);if(o.get("packaged")||!e.toUrl)i=i||o.moduleUrl(n,"worker");else{var s=this.$normalizePath;i=i||s(e.toUrl("ace/worker/worker.js",null,"_"));var u={};t.forEach(function(t){u[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{this.$worker=new Worker(i)}catch(a){if(!(a instanceof window.DOMException))throw a;var f=this.$workerBlob(i),l=window.URL||window.webkitURL,c=l.createObjectURL(f);this.$worker=new Worker(c),l.revokeObjectURL(c)}this.$worker.postMessage({init:!0,tlns:u,module:n,classname:r}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,s),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue?this.deltaQueue.push(e.data):(this.deltaQueue=[e.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var e=this.deltaQueue;if(!e)return;this.deltaQueue=null,e.length>20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e})},this.$workerBlob=function(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(n){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new r;return s.append(t),s.getBlob("application/javascript")}}}).call(u.prototype);var a=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,i=!1,u=Object.create(s),a=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){a.messageBuffer.push(e),r&&(i?setTimeout(f):f())},this.setEmitSync=function(e){i=e};var f=function(){var e=a.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&u._signal(e.event,e.data)};u.postMessage=function(e){a.onMessage({data:e})},u.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},u.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],function(e){r=new e[n](u);while(a.messageBuffer.length)f()})};a.prototype=u.prototype,t.UIWorkerClient=a,t.WorkerClient=u}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),o=function(e,t,n,r,i,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var u=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session,i=this.$pos;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(i.row,i.column),this.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){n.removeMarker(e.markerId),e.markerId=n.addMarker(new r(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);e.others.push(r)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(this.othersActive)return;var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1),n.on("change",function(i){e.removeMarker(n.markerId),n.markerId=e.addMarker(new r(i.value.row,i.value.column,i.value.row,i.value.column+t.length),t.othersClass,null,!1)})})},this.hideOtherMarkers=function(){if(!this.othersActive)return;this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)},this.onUpdate=function(e){var t=e.data,n=t.range;if(n.start.row!==n.end.row)return;if(n.start.row!==this.pos.row)return;if(this.$updating)return;this.$updating=!0;var i=t.action==="insertText"?n.end.column-n.start.column:n.start.column-n.end.column;if(n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1){var s=n.start.column-this.pos.column;this.length+=i;if(!this.session.$fromUndo){if(t.action==="insertText")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.insert(a,t.text)}else if(t.action==="removeText")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.remove(new r(a.row,a.column,a.row,a.column-i))}n.start.column===this.pos.column&&t.action==="insertText"?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-i);for(var e=0;e<this.others.length;e++){var t=this.others[e],r={row:t.row,column:t.column-i};t.row===n.start.row&&n.start.column<t.column&&(r.column+=i),t.setPosition(r.row,r.column)}}.bind(this),0):n.start.column===this.pos.column&&t.action==="removeText"&&setTimeout(function(){for(var e=0;e<this.others.length;e++){var t=this.others[e];t.row===n.start.row&&n.start.column<t.column&&t.setPosition(t.row,t.column-i)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var o=0;o<this.others.length;o++)this.others[o]._emit("change",{value:this.others[o]})}this.$updating=!1},this.onCursorChange=function(e){if(this.$updating||!this.session)return;var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;e<this.others.length;e++)this.others[e].detach();this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(this.$undoStackDepth===-1)throw Error("Canceling placeholders only supported with undo manager attached to session.");var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth;for(var n=0;n<t;n++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}).call(o.prototype),t.PlaceHolder=o}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){function s(e,t){return e.row==t.row&&e.column==t.column}function o(e){var t=e.domEvent,n=t.altKey,o=t.shiftKey,u=t.ctrlKey,a=e.getAccelKey(),f=e.getButton();u&&i.isMac&&(f=t.button);if(e.editor.inMultiSelectMode&&f==2){e.editor.textInput.onContextMenu(e.domEvent);return}if(!u&&!n&&!a){f===0&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode();return}if(f!==0)return;var l=e.editor,c=l.selection,h=l.inMultiSelectMode,p=e.getDocumentPosition(),d=c.getCursor(),v=e.inSelection()||c.isEmpty()&&s(p,d),m=e.x,g=e.y,y=function(e){m=e.clientX,g=e.clientY},b=l.session,w=l.renderer.pixelToScreenCoordinates(m,g),E=w,S;if(l.$mouseHandler.$enableJumpToDef)u&&n||a&&n?S="add":n&&(S="block");else if(a&&!n){S="add";if(!h&&o)return}else n&&(S="block");S&&i.isMac&&t.ctrlKey&&l.$mouseHandler.cancelContextMenu();if(S=="add"){if(!h&&v)return;if(!h){var x=c.toOrientedRange();l.addSelectionMarker(x)}var T=c.rangeList.rangeAtPoint(p);l.$blockScrolling++,l.inVirtualSelectionMode=!0,o&&(T=null,x=c.ranges[0],l.removeSelectionMarker(x)),l.once("mouseup",function(){var e=c.toOrientedRange();T&&e.isEmpty()&&s(T.cursor,e.cursor)?c.substractPoint(e.cursor):(o?c.substractPoint(x.cursor):x&&(l.removeSelectionMarker(x),c.addRange(x)),c.addRange(e)),l.$blockScrolling--,l.inVirtualSelectionMode=!1})}else if(S=="block"){e.stop(),l.inVirtualSelectionMode=!0;var N,C=[],k=function(){var e=l.renderer.pixelToScreenCoordinates(m,g),t=b.screenToDocumentPosition(e.row,e.column);if(s(E,e)&&s(t,c.lead))return;E=e,l.$blockScrolling++,l.selection.moveToPosition(t),l.renderer.scrollCursorIntoView(),l.removeSelectionMarkers(C),C=c.rectangularRangeBlock(E,w),l.$mouseHandler.$clickSelection&&C.length==1&&C[0].isEmpty()&&(C[0]=l.$mouseHandler.$clickSelection.clone()),C.forEach(l.addSelectionMarker,l),l.updateSelectionMarkers(),l.$blockScrolling--};l.$blockScrolling++,h&&!a?c.toSingleRange():!h&&a&&(N=c.toOrientedRange(),l.addSelectionMarker(N)),o?w=b.documentToScreenPosition(c.lead):c.moveToPosition(p),l.$blockScrolling--,E={row:-1,column:-1};var L=function(e){clearInterval(O),l.removeSelectionMarkers(C),C.length||(C=[c.toOrientedRange()]),l.$blockScrolling++,N&&(l.removeSelectionMarker(N),c.toSingleRange(N));for(var t=0;t<C.length;t++)c.addRange(C[t]);l.inVirtualSelectionMode=!1,l.$mouseHandler.$clickSelection=null,l.$blockScrolling--},A=k;r.capture(l.container,y,L);var O=setInterval(function(){A()},20);return e.preventDefault()}}var r=e("../lib/event"),i=e("../lib/useragent");t.onMouseDown=o}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readonly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readonly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readonly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readonly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readonly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readonly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readonly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readonly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){function h(e,t,n){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=n==-1,c.find(e)}function v(e,t){return e.row==t.row&&e.column==t.column}function m(e){if(e.$multiselectOnSessionChange)return;e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",o),e.commands.addCommands(f.defaultCommands),g(e)}function g(e){function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}var t=e.textInput.getElement(),n=!1;u.addListener(t,"keydown",function(t){t.keyCode==18&&!(t.ctrlKey||t.shiftKey||t.metaKey)?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),u.addListener(t,"keyup",r),u.addListener(t,"blur",r)}var r=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),a=e("./lib/lang"),f=e("./commands/multi_select_commands");t.commands=f.defaultCommands.concat(f.multiSelectCommands);var l=e("./search").Search,c=new l,p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(!e)return;if(!this.inMultiSelectMode&&this.rangeCount===0){var n=this.toOrientedRange();this.rangeList.add(n),this.rangeList.add(e);if(this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){this.rangeCount=this.rangeList.ranges.length;if(this.rangeCount==1&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){if(this.rangeList)return;this.rangeList=new r,this.ranges=[],this.rangeCount=0},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),s=n.start.row,o=n.end.row;if(s==o){if(r)var u=n.end,a=n.start;else var u=n.start,a=n.end;this.addRange(i.fromPoints(a,a)),this.addRange(i.fromPoints(u,u));return}var f=[],l=this.getLineRange(s,!0);l.start.column=n.start.column,f.push(l);for(var c=s+1;c<o;c++)f.push(this.getLineRange(c,!0));l=this.getLineRange(o,!0),l.end.column=n.end.column,f.push(l),f.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),s=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(r,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],s=e.column<t.column;if(s)var o=e.column,u=t.column;else var o=t.column,u=e.column;var a=e.row<t.row;if(a)var f=e.row,l=t.row;else var f=t.row,l=e.row;o<0&&(o=0),f<0&&(f=0),f==l&&(n=!0);for(var c=f;c<=l;c++){var h=i.fromPoints(this.session.screenToDocumentPosition(c,o),this.session.screenToDocumentPosition(c,u));if(h.isEmpty()){if(p&&v(h.end,p))break;var p=h.end}h.cursor=s?h.start:h.end,r.push(h)}a&&r.reverse();if(!n){var d=r.length-1;while(r[d].isEmpty()&&d>0)d--;if(d>0){var m=0;while(r[m].isEmpty())m++}for(var g=d;g>=m;g--)r[g].isEmpty()&&r.splice(g,1)}return r}}.call(s.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(!e.marker)return;this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length},this.removeSelectionMarkers=function(e){var t=this.session.$selectionMarkers;for(var n=e.length;n--;){var r=e[n];if(!r.marker)continue;this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){if(this.inMultiSelectMode)return;this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(f.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onSingleSelect=function(e){if(this.session.multiSelect.inVirtualMode)return;this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection")},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(!n.multiSelect)return;if(!t.multiSelectAction){var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}else t.multiSelectAction=="forEach"?r=n.forEachSelection(t,e.args):t.multiSelectAction=="forEachLine"?r=n.forEachSelection(t,e.args,!0):t.multiSelectAction=="single"?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});return r},this.forEachSelection=function(e,t,n){if(this.inVirtualSelectionMode)return;var r=n&&n.keepOrder,i=n==1||n&&n.$byLines,o=this.session,u=this.selection,a=u.rangeList,f=(r?u:a).ranges,l;if(!f.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var c=u._eventRegistry;u._eventRegistry={};var h=new s(o);this.inVirtualSelectionMode=!0;for(var p=f.length;p--;){if(i)while(p>0&&f[p].start.row==f[p-1].end.row)p--;h.fromOrientedRange(f[p]),h.index=p,this.selection=o.selection=h;var d=e.exec?e.exec(this,t||{}):e(this,t||{});!l&&d!==undefined&&(l=d),h.toOrientedRange(f[p])}h.detach(),this.selection=o.selection=u,this.inVirtualSelectionMode=!1,u._eventRegistry=c,u.mergeOverlappingRanges();var v=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),v&&v.from==v.to&&this.renderer.animateScrolling(v.from),l},this.exitMultiSelectMode=function(){if(!this.inMultiSelectMode||this.inVirtualSelectionMode)return;this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var t=this.multiSelect.rangeList.ranges,n=[];for(var r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();e=n.join(i),e.length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;(r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column)&&this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,n){t=t||{},t.needle=e||t.needle;if(t.needle==undefined){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;this.$blockScrolling+=1;var s=this.multiSelect;n||s.toSingleRange(i[0]);for(var o=i.length;o--;)s.addRange(i[o],!0);return r&&s.rangeList.rangeAtPoint(r.start)&&s.addRange(r,!0),this.$blockScrolling-=1,i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,s=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(s.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(s.row+e,s.column);if(!n.isEmpty())var u=this.session.documentToScreenPosition(r?n.end:n.start),a=this.session.screenToDocumentPosition(u.row+e,u.column);else var a=o;if(r){var f=i.fromPoints(o,a);f.cursor=f.start}else{var f=i.fromPoints(a,o);f.cursor=f.end}f.desiredColumn=s.column;if(!this.selection.inMultiSelectMode)this.selection.addRange(n);else if(t)var l=n.cursor;this.selection.addRange(f),l&&this.selection.substractPoint(l)},this.transposeSelections=function(e){var t=this.session,n=t.multiSelect,r=n.ranges;for(var i=r.length;i--;){var s=r[i];if(s.isEmpty()){var o=t.getWordRange(s.start.row,s.start.column);s.start.row=o.start.row,s.start.column=o.start.column,s.end.row=o.end.row,s.end.column=o.end.column}}n.mergeOverlappingRanges();var u=[];for(var i=r.length;i--;){var s=r[i];u.unshift(t.getTextRange(s))}e<0?u.unshift(u.pop()):u.push(u.shift());for(var i=r.length;i--;){var s=r[i],o=s.clone();t.replace(s,u[i]),s.start.row=o.start.row,s.start.column=o.start.column}},this.selectMore=function(e,t,n){var r=this.session,i=r.multiSelect,s=i.toOrientedRange();if(s.isEmpty()){s=r.getWordRange(s.start.row,s.start.column),s.cursor=e==-1?s.start:s.end,this.multiSelect.addRange(s);if(n)return}var o=r.getTextRange(s),u=h(r,o,e);u&&(u.cursor=e==-1?u.start:u.end,this.$blockScrolling+=1,this.session.unfold(u),this.multiSelect.addRange(u),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(s.cursor)},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,s=n.filter(function(e){if(e.cursor.row==r)return!0;r=e.cursor.row});if(!n.length||s.length==n.length-1){var o=this.selection.getRange(),u=o.start.row,f=o.end.row,l=u==f;if(l){var c=this.session.getLength(),h;do h=this.session.getLine(f);while(/[=:]/.test(h)&&++f<c);do h=this.session.getLine(u);while(/[=:]/.test(h)&&--u>0);u<0&&(u=0),f>=c&&(f=c-1)}var p=this.session.doc.removeLines(u,f);p=this.$reAlignText(p,l),this.session.doc.insert({row:u,column:0},p.join("\n")+"\n"),l||(o.start.column=0,o.end.column=p[p.length-1].length),this.selection.setRange(o)}else{s.forEach(function(e){t.substractPoint(e.cursor)});var d=0,v=Infinity,m=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\S/g);return i==-1&&(i=0),n.column>d&&(d=n.column),i<v&&(v=i),i});n.forEach(function(t,n){var r=t.cursor,s=d-r.column,o=m[n]-v;s>o?e.insert(r,a.stringRepeat(" ",s-o)):e.remove(new i(r.row,r.column,r.row,r.column-s+o)),t.start.column=t.end.column=d,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e,t){function u(e){return a.stringRepeat(" ",e)}function f(e){return e[2]?u(i)+e[2]+u(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function l(e){return e[2]?u(i+s-e[2].length)+e[2]+u(o," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function c(e){return e[2]?u(i)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var n=!0,r=!0,i,s,o;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?i==null?(i=t[1].length,s=t[2].length,o=t[3].length,t):(i+s+o!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(n=!1),i>t[1].length&&(i=t[1].length),s<t[2].length&&(s=t[2].length),o>t[3].length&&(o=t[3].length),t):[e]}).map(t?f:n?r?l:f:c)}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":t=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),o=s.search(i);if(o==-1)return;var u=n||s.length,a=e.getLength(),f=t,l=t;while(++t<a){var c=e.getLine(t).search(i);if(c==-1)continue;if(c<=o)break;l=t}if(l>f){var h=e.getLine(l).length;return new r(f,u,l,h)}},this.openingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i+1},u=e.$findClosingBracket(t,o,s);if(!u)return;var a=e.foldWidgets[u.row];return a==null&&(a=e.getFoldWidget(u.row)),a=="start"&&u.row>o.row&&(u.row--,u.column=e.getLine(u.row).length),r.fromPoints(o,u)},this.closingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i},u=e.$findOpeningBracket(t,o);if(!u)return;return u.column++,o.column--,r.fromPoints(u,o)}}).call(i.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function o(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeEditor",this.$onChangeEditor)}var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./range").Range;(function(){this.getRowLength=function(e){var t;return this.lineWidgets?t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:t=0,!this.$useWrapMode||!this.$wrapData[e]?1+t:this.$wrapData[e].length+1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach();if(this.editor==e)return;this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets))},this.detach=function(e){var t=this.editor;if(!t)return;this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(!t)return;var n=e.data,r=n.range,i=r.start.row,s=r.end.row-i;if(s!==0)if(n.action=="removeText"||n.action=="removeLines"){var o=t.splice(i+1,s);o.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var u=new Array(s);u.unshift(i,0),t.splice.apply(t,u),this.$updateRows()}},this.$updateRows=function(){var e=this.session.lineWidgets;if(!e)return;var t=!0;e.forEach(function(e,n){e&&(t=!1,e.row=n)}),t&&(this.session.lineWidgets=null)},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[e.row]=e;var t=this.editor.renderer;return e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),e.rowCount==null&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),e},this.removeLineWidget=function(e){e._inDocument=!1,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el);if(e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}this.session.lineWidgets&&(this.session.lineWidgets[e.row]=undefined),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(!n||!n.length)return;var i=Infinity;for(var s=0;s<n.length;s++){var o=n[s];o._inDocument||(o._inDocument=!0,t.container.appendChild(o.el)),o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/r.characterWidth));var u=o.h/r.lineHeight;o.coverLine&&(u-=this.session.getRowLineCount(o.row),u<0&&(u=0)),o.rowCount!=u&&(o.rowCount=u,o.row<i&&(i=o.row))}i!=Infinity&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]},this.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(!r)return;var i=Math.min(this.firstRow,n.firstRow),s=Math.max(this.lastRow,n.lastRow,r.length);while(i>0&&!r[i])i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=i;o<=s;o++){var u=r[o];if(!u||!u.el)continue;u._inDocument||(u._inDocument=!0,t.container.appendChild(u.el));var a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=a-n.offset+"px";var f=u.coverGutter?0:t.gutterWidth;u.fixedWidth||(f-=t.scrollLeft),u.el.style.left=f+"px",u.fixedWidth?u.el.style.right=t.scrollBar.getWidth()+"px":u.el.style.right=""}}}).call(o.prototype),t.LineWidgets=o}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function o(e,t,n){var r=0,i=e.length-1;while(r<=i){var s=r+i>>1,o=n(t,e[s]);if(o>0)r=s+1;else{if(!(o<0))return s;i=s-1}}return-(r+1)}function u(e,t,n){var r=e.getAnnotations().sort(s.comparePoints);if(!r.length)return;var i=o(r,{row:t,column:-1},s.comparePoints);i<0&&(i=-i-1),i>=r.length-1?i=n>0?0:r.length-1:i===0&&n<0&&(i=r.length-1);var u=r[i];if(!u||!n)return;if(u.row===t){do u=r[i+=n];while(u&&u.row===t);if(!u)return r.slice()}var a=[];t=u.row;do a[n<0?"unshift":"push"](u),u=r[i+=n];while(u&&u.row==t);return a.length&&a}var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),o=s.row,a=n.lineWidgets&&n.lineWidgets[o];a?a.destroy():o-=t;var f=u(n,o,t),l;if(f){var c=f[0];s.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,s.row=c.row,l=e.renderer.$gutterLayer.$annotations[s.row]}else{if(a)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div")},p=h.el.appendChild(i.createElement("div")),d=h.el.appendChild(i.createElement("div"));d.className="error_widget_arrow "+l.className;var v=e.renderer.$cursorLayer.getPixelPosition(s).left;d.style.left=v+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+l.className,p.innerHTML=l.text.join("<br>"),p.appendChild(i.createElement("div"));var m=function(e,t,n){if(t===0&&(n==="esc"||n==="return"))return h.destroy(),{command:"null"}};h.destroy=function(){if(e.$mouseHandler.isMousePressed)return;e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy)},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},i.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),s=e("./editor").Editor,o=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.edit=function(e){if(typeof e=="string"){var n=e;e=document.getElementById(n);if(!e)throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var o="";if(e&&/input|textarea/i.test(e.tagName)){var u=e;o=u.value,e=r.createElement("pre"),u.parentNode.replaceChild(e,u)}else o=r.getInnerText(e),e.innerHTML="";var f=t.createEditSession(o),l=new s(new a(e));l.setSession(f);var c={document:f,editor:l,onResize:l.resize.bind(l,null)};return u&&(c.textarea=u),i.addListener(window,"resize",c.onResize),l.on("destroy",function(){i.removeListener(window,"resize",c.onResize),c.editor.container.env=null}),l.container.env=l.env=c,l},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new u),n},t.EditSession=o,t.UndoManager=u});
2
+ (function() {
3
+ ace.require(["ace/ace"], function(a) {
4
+ a && a.config.init(true);
5
+ if (!window.ace)
6
+ window.ace = a;
7
+ for (var key in a) if (a.hasOwnProperty(key))
8
+ window.ace[key] = a[key];
9
+ });
10
+ })();
11
+
js/ace/src-min-noconflict/ext-beautify.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:"<?php"},{type:"support.php_tag",value:"<?"},{type:"support.php_tag",value:"?>"},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:"</",indent:!1,breakBefore:!0,dontBreak:!0},{type:"punctuation.operator",value:";"}],t.spaces=[{type:"xml-pe",prepend:!0},{type:"entity.other.attribute-name",prepend:!0},{type:"storage.type",value:"var",append:!0},{type:"storage.type",value:"function",append:!0},{type:"keyword.operator",value:"="},{type:"keyword",value:"as",prepend:!0,append:!0},{type:"keyword",value:"function",append:!0},{type:"support.function",next:/[^\(]/,append:!0},{type:"keyword",value:"or",append:!0,prepend:!0},{type:"keyword",value:"and",append:!0,prepend:!0},{type:"keyword",value:"case",append:!0},{type:"keyword.operator",value:"||",append:!0,prepend:!0},{type:"keyword.operator",value:"&&",append:!0,prepend:!0}],t.singleTags=["!doctype","area","base","br","hr","input","img","link","meta"],t.transform=function(e,n,r){var i=e.getCurrentToken(),s=t.newLines,o=t.spaces,u=t.singleTags,a="",f=0,l=!1,c,h,p={},d,v={},m=!1,g="";while(i!==null){console.log(i);if(!i){i=e.stepForward();continue}i.type=="support.php_tag"&&i.value!="?>"?r="php":i.type=="support.php_tag"&&i.value=="?>"?r="html":i.type=="meta.tag.name.style"&&r!="css"?r="css":i.type=="meta.tag.name.style"&&r=="css"?r="html":i.type=="meta.tag.name.script"&&r!="js"?r="js":i.type=="meta.tag.name.script"&&r=="js"&&(r="html"),v=e.stepForward(),v&&v.type.indexOf("meta.tag.name")==0&&(d=v.value),p.type=="support.php_tag"&&p.value=="<?="&&(l=!0),i.type=="meta.tag.name"&&(i.value=i.value.toLowerCase()),i.type=="text"&&(i.value=i.value.trim());if(!i.value){i=v;continue}g=i.value;for(var y in o)i.type==o[y].type&&(!o[y].value||i.value==o[y].value)&&v&&(!o[y].next||o[y].next.test(v.value))&&(o[y].prepend&&(g=" "+i.value),o[y].append&&(g+=" "));i.type.indexOf("meta.tag.name")==0&&(c=i.value),m=!1;for(y in s)if(i.type==s[y].type&&(!s[y].value||i.value==s[y].value)&&(!s[y].blockTag||u.indexOf(d)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!1&&f--;if(s[y].breakBefore&&(!s[y].prev||s[y].prev.test(p.value))){a+="\n",m=!0;for(y=0;y<f;y++)a+=" "}break}if(l===!1)for(y in s)if(p.type==s[y].type&&(!s[y].value||p.value==s[y].value)&&(!s[y].blockTag||u.indexOf(c)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!0&&f++;if(!s[y].dontBreak&&!m){a+="\n";for(y=0;y<f;y++)a+=" "}break}a+=g,p.type=="support.php_tag"&&p.value=="?>"&&(l=!1),h=c,p=i,i=v;if(i===null)break}return a}}),ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"],function(e,t,n){"use strict";var r=e("ace/token_iterator").TokenIterator,i=e("./beautify/php_rules").transform;t.beautify=function(e){var t=new r(e,0,0),n=t.getCurrentToken(),s=e.$modeId.split("/").pop(),o=i(t,s);e.doc.setValue(o)},t.commands=[{name:"beautify",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]});
2
+ (function() {
3
+ ace.require(["ace/ext/beautify"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-chromevox.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function gt(){return typeof cvox!="undefined"&&cvox&&cvox.Api}function wt(e){if(gt())mt(e);else{yt++;if(yt>=bt)return;window.setTimeout(wt,500,e)}}var r={};r.SpeechProperty,r.Cursor,r.Token,r.Annotation;var i={rate:.8,pitch:.4,volume:.9},s={rate:1,pitch:.5,volume:.9},o={rate:.8,pitch:.8,volume:.9},u={rate:.8,pitch:.3,volume:.9},a={rate:.8,pitch:.7,volume:.9},f={rate:.8,pitch:.8,volume:.9},l={punctuationEcho:"none",relativePitch:-0.6},c="ALERT_NONMODAL",h="ALERT_MODAL",p="INVALID_KEYPRESS",d="insertMode",v="start",m=[{substr:";",newSubstr:" semicolon "},{substr:":",newSubstr:" colon "}],g={SPEAK_ANNOT:"annots",SPEAK_ALL_ANNOTS:"all_annots",TOGGLE_LOCATION:"toggle_location",SPEAK_MODE:"mode",SPEAK_ROW_COL:"row_col",TOGGLE_DISPLACEMENT:"toggle_displacement",FOCUS_TEXT:"focus_text"},y="CONTROL + SHIFT ";r.editor=null;var b=null,w={},E=!1,S=!1,x=!1,T=null,N={},C={},k=function(e){return y+String.fromCharCode(e)},L=function(){var e=r.editor.keyBinding.getKeyboardHandler();return e.$id==="ace/keyboard/vim"},A=function(e){return r.editor.getSession().getTokenAt(e.row,e.column+1)},O=function(e){return r.editor.getSession().getLine(e.row)},M=function(e){w[e.row]&&cvox.Api.playEarcon(c),E?(cvox.Api.stop(),W(e),R(A(e)),I(e.row,1)):I(e.row,0)},_=function(e){var t=O(e),n=t.substr(e.column-1);e.column===0&&(n=" "+t);var r=/^\W(\w+)/,i=r.exec(n);return i!==null},D={constant:{prop:i},entity:{prop:o},keyword:{prop:u},storage:{prop:a},variable:{prop:f},meta:{prop:s,replace:[{substr:"</",newSubstr:" closing tag "},{substr:"/>",newSubstr:" close tag "},{substr:"<",newSubstr:" tag start "},{substr:">",newSubstr:" tag end "}]}},P={prop:P},H=function(e,t){var n=e;for(var r=0;r<t.length;r++){var i=t[r],s=new RegExp(i.substr,"g");n=n.replace(s,i.newSubstr)}return n},B=function(e,t,n){var r={};r.value="",r.type=e[t].type;for(var i=t;i<n;i++)r.value+=e[i].value;return r},j=function(e){if(e.length<=1)return e;var t=[],n=0;for(var r=1;r<e.length;r++){var i=e[n],s=e[r];U(i)!==U(s)&&(t.push(B(e,n,r)),n=r)}return t.push(B(e,n,e.length)),t},F=function(e){var t=r.editor.getSession().getLine(e),n=/^\s*$/;return n.exec(t)!==null},I=function(e,t){var n=r.editor.getSession().getTokens(e);if(n.length===0||F(e)){cvox.Api.playEarcon("EDITABLE_TEXT");return}n=j(n);var i=n[0];n=n.filter(function(e){return e!==i}),z(i,t),n.forEach(R)},q=function(e){z(e,0)},R=function(e){z(e,1)},U=function(e){if(!e||!e.type)return;var t=e.type.split(".");if(t.length===0)return;var n=t[0],r=D[n];return r?r:P},z=function(e,t){var n=U(e),r=H(e.value,m);n.replace&&(r=H(r,n.replace)),cvox.Api.speak(r,t,n.prop)},W=function(e){var t=O(e);cvox.Api.speak(t[e.column],1)},X=function(e,t){var n=O(t),r=n.substring(e.column,t.column);r=r.replace(/ /g," space "),cvox.Api.speak(r)},V=function(e,t){if(Math.abs(e.column-t.column)!==1){var n=O(t).length;if(t.column===0||t.column===n){I(t.row,0);return}if(_(t)){cvox.Api.stop(),R(A(t));return}}W(t)},$=function(e,t){r.editor.selection.isEmpty()?S?X(e,t):V(e,t):(X(e,t),cvox.Api.speak("selected",1))},J=function(e){if(x){x=!1;return}var t=r.editor.selection.getCursor();t.row!==b.row?M(t):$(b,t),b=t},K=function(e){r.editor.selection.isEmpty()&&cvox.Api.speak("unselected")},Q=function(e){var t=e.data;switch(t.action){case"removeText":cvox.Api.speak(t.text,0,l),x=!0;break;case"insertText":cvox.Api.speak(t.text,0),x=!0}},G=function(e){var t=e.row,n=e.column;return!w[t]||!w[t][n]},Y=function(e){w={};for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=n.column;w[r]||(w[r]={}),w[r][i]=n}},Z=function(e){var t=r.editor.getSession().getAnnotations(),n=t.filter(G);n.length>0&&cvox.Api.playEarcon(c),Y(t)},et=function(e){var t=e.type+" "+e.text+" on "+nt(e.row,e.column);t=t.replace(";","semicolon"),cvox.Api.speak(t,1)},tt=function(e){var t=w[e];for(var n in t)et(t[n])},nt=function(e,t){return"row "+(e+1)+" column "+(t+1)},rt=function(){cvox.Api.speak(nt(b.row,b.column))},it=function(){for(var e in w)tt(e)},st=function(){if(!L())return;switch(r.editor.keyBinding.$data.state){case d:cvox.Api.speak("Insert mode");break;case v:cvox.Api.speak("Command mode")}},ot=function(){E=!E,E?cvox.Api.speak("Speak location on row change enabled."):cvox.Api.speak("Speak location on row change disabled.")},ut=function(){S=!S,S?cvox.Api.speak("Speak displacement on column changes."):cvox.Api.speak("Speak current character or word on column changes.")},at=function(e){if(e.ctrlKey&&e.shiftKey){var t=N[e.keyCode];t&&t.func()}},ft=function(e,t){if(!L())return;var n=t.keyBinding.$data.state;if(n===T)return;switch(n){case d:cvox.Api.playEarcon(h),cvox.Api.setKeyEcho(!0);break;case v:cvox.Api.playEarcon(h),cvox.Api.setKeyEcho(!1)}T=n},lt=function(e){var t=e.detail.customCommand,n=C[t];n&&(n.func(),r.editor.focus())},ct=function(){var e=dt.map(function(e){return{desc:e.desc+k(e.keyCode),cmd:e.cmd}}),t=document.querySelector("body");t.setAttribute("contextMenuActions",JSON.stringify(e)),t.addEventListener("ATCustomEvent",lt,!0)},ht=function(e){e.match?I(b.row,0):cvox.Api.playEarcon(p)},pt=function(){r.editor.focus()},dt=[{keyCode:49,func:function(){tt(b.row)},cmd:g.SPEAK_ANNOT,desc:"Speak annotations on line"},{keyCode:50,func:it,cmd:g.SPEAK_ALL_ANNOTS,desc:"Speak all annotations"},{keyCode:51,func:st,cmd:g.SPEAK_MODE,desc:"Speak Vim mode"},{keyCode:52,func:ot,cmd:g.TOGGLE_LOCATION,desc:"Toggle speak row location"},{keyCode:53,func:rt,cmd:g.SPEAK_ROW_COL,desc:"Speak row and column"},{keyCode:54,func:ut,cmd:g.TOGGLE_DISPLACEMENT,desc:"Toggle speak displacement"},{keyCode:55,func:pt,cmd:g.FOCUS_TEXT,desc:"Focus text"}],vt=function(){r.editor=editor,editor.getSession().selection.on("changeCursor",J),editor.getSession().selection.on("changeSelection",K),editor.getSession().on("change",Q),editor.getSession().on("changeAnnotation",Z),editor.on("changeStatus",ft),editor.on("findSearchBox",ht),editor.container.addEventListener("keydown",at),b=editor.selection.getCursor()},mt=function(e){vt(),dt.forEach(function(e){N[e.keyCode]=e,C[e.cmd]=e}),e.on("focus",vt),L()&&cvox.Api.setKeyEcho(!1),ct()},yt=0,bt=15,Et=e("../editor").Editor;e("../config").defineOptions(Et.prototype,"editor",{enableChromevoxEnhancements:{set:function(e){e&&wt(this)},value:!0}})});
2
+ (function() {
3
+ ace.require(["ace/ext/chromevox"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-elastic_tabstops_lite.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";var r=function(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){var t=e.data.range;r&&(n.indexOf(t.start.row)==-1&&n.push(t.start.row),t.end.row!=t.start.row&&n.push(t.end.row))}};(function(){this.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t.indexOf(i)>-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a<f;a++){var l=o[a];t.push(u),this.$adjustRow(u,l),u++}}this.$inChange=!1},this.$findCellWidthsForBlock=function(e){var t=[],n,r=e;while(r>=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r<s-1){r++,n=this.$cellWidthsForRow(r);if(n.length==0)break;t.push(n)}return{cellWidths:t,firstRow:i}},this.$cellWidthsForRow=function(e){var t=this.$selectionColumnsForRow(e),n=[-1].concat(this.$tabsForRow(e)),r=n.map(function(e){return 0}).slice(1),i=this.$editor.session.getLine(e);for(var s=0,o=n.length-1;s<o;s++){var u=n[s]+1,a=n[s+1],f=this.$rightmostSelectionInCell(t,a),l=i.substring(u,a);r[s]=Math.max(l.replace(/\s+$/g,"").length,f-u)}return r},this.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},this.$setBlockCellWidthsToMax=function(e){var t=!0,n,r,i,s=this.$izip_longest(e);for(var o=0,u=s.length;o<u;o++){var a=s[o];if(!a.push){console.error(a);continue}a.push(NaN);for(var f=0,l=a.length;f<l;f++){var c=a[f];t&&(n=f,i=0,t=!1);if(isNaN(c)){r=f;for(var h=n;h<r;h++)e[h][o]=i;t=!0}i=Math.max(i,c)}}return e},this.$rightmostSelectionInCell=function(e,t){var n=0;if(e.length){var r=[];for(var i=0,s=e.length;i<s;i++)e[i]<=t?r.push(i):r.push(0);n=Math.max.apply(Math,r)}return n},this.$tabsForRow=function(e){var t=[],n=this.$editor.session.getLine(e),r=/\t/g,i;while((i=r.exec(n))!=null)t.push(i.index);return t},this.$adjustRow=function(e,t){var n=this.$tabsForRow(e);if(n.length==0)return;var r=0,i=-1,s=this.$izip(t,n);for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];i+=1+a,f+=r;var l=i-f;if(l==0)continue;var c=this.$editor.session.getLine(e).substr(0,f),h=c.replace(/\s*$/g,""),p=c.length-h.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+" "),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},this.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;r<n;r++){var i=e[r].length;i>t&&(t=i)}var s=[];for(var o=0;o<t;o++){var u=[];for(var r=0;r<n;r++)e[r][o]===""?u.push(NaN):u.push(e[r][o]);s.push(u)}return s},this.$izip=function(e,t){var n=e.length>=t.length?t.length:e.length,r=[];for(var i=0;i<n;i++){var s=[e[i],t[i]];r.push(s)}return r}}).call(r.prototype),t.ElasticTabstopsLite=r;var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{useElasticTabstops:{set:function(e){e?(this.elasticTabstops||(this.elasticTabstops=new r(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})});
2
+ (function() {
3
+ ace.require(["ace/ext/elastic_tabstops_lite"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-emmet.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),o=e("./range").Range,u=e("./anchor").Anchor,a=e("./keyboard/hash_handler").HashHandler,f=e("./tokenizer").Tokenizer,l=o.comparePoints,c=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,i),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return c.$tokenizer=new f({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:n.inFormatString&&(r=="n"?e="\n":r=="t"?e="\n":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1),n,r);return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var r=n[0];return r.fmtString=e,e=this.splitRegex.exec(e),r.guard=e[1],r.fmt=e[2],r.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),c.prototype.getTokenizer=function(){return c.$tokenizer},c.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];t=t.replace(/^TM_/,"");if(!e)return;var r=e.session;switch(t){case"CURRENT_WORD":var i=r.getWordRange();case"SELECTION":case"SELECTED_TEXT":return r.getTextRange(i);case"CURRENT_LINE":return r.getLine(e.getCursorPosition().row);case"PREV_LINE":return r.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return r.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return r.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),o=this,u=e.replace(i,function(){o.variables.__=arguments;var e=o.resolveVariables(s,n),t="E";for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="object"){e[r]="";if(i.changeCase&&i.local){var u=e[r+1];u&&typeof u=="string"&&(i.changeCase=="u"?e[r]=u[0].toUpperCase():e[r]=u[0].toLowerCase(),e[r+1]=u.substr(1))}else i.changeCase&&(t=i.changeCase)}else t=="U"?e[r]=i.toUpperCase():t=="L"&&(e[r]=i.toLowerCase())}return e.join("")});return this.variables.__=null,u},this.resolveVariables=function(e,t){function o(t){var n=e.indexOf(t,r+1);n!=-1&&(r=n)}var n=[];for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="string")n.push(i);else{if(typeof i!="object")continue;if(i.skip)o(i);else{if(i.processed<r)continue;if(i.text){var s=this.getVariableValue(t,i.text);s&&i.fmtString&&(s=this.tmStrFormat(s,i)),i.processed=r,i.expectIf==null?s&&(n.push(s),o(i)):s?i.skip=i.elseBranch:o(i)}else i.tabstopId!=null?n.push(i):i.changeCase!=null&&n.push(i)}}}return n},this.insertSnippetForSelection=function(e,t){function f(e){var t=[];for(var n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"){if(a[r.tabstopId])continue;var i=e.lastIndexOf(r,n-1);r=t[i]||{tabstopId:r.tabstopId}}t[n]=r}return t}var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=e.session.getTabString(),s=r.match(/^\s*/)[0];n.column<s.length&&(s=s.slice(0,n.column));var o=this.tokenizeTmSnippet(t);o=this.resolveVariables(o,e),o=o.map(function(e){return e=="\n"?e+s:typeof e=="string"?e.replace(/\t/g,i):e});var u=[];o.forEach(function(e,t){if(typeof e!="object")return;var n=e.tabstopId,r=u[n];r||(r=u[n]=[],r.index=n,r.value="");if(r.indexOf(e)!==-1)return;r.push(e);var i=o.indexOf(e,t+1);if(i===-1)return;var s=o.slice(t+1,i),a=s.some(function(e){return typeof e=="object"});a&&!r.value?r.value=s:s.length&&(!r.value||typeof r.value!="string")&&(r.value=s.join(""))}),u.forEach(function(e){e.length=0});var a={};for(var l=0;l<o.length;l++){var c=o[l];if(typeof c!="object")continue;var p=c.tabstopId,d=o.indexOf(c,l+1);if(a[p]){a[p]===c&&(a[p]=null);continue}var v=u[p],m=typeof v.value=="string"?[v.value]:f(v.value);m.unshift(l+1,Math.max(0,d-l)),m.push(c),a[p]=c,o.splice.apply(o,m),v.indexOf(c)===-1&&v.push(c)}var g=0,y=0,b="";o.forEach(function(e){typeof e=="string"?(e[0]==="\n"?(y=e.length-1,g++):y+=e.length,b+=e):e.start?e.end={row:g,column:y}:e.start={row:g,column:y}});var w=e.getSelectionRange(),E=e.session.replace(w,b),S=new h(e),x=e.inVirtualSelectionMode&&e.selection.index;S.addTabstops(u,w.start,E,x)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection(function(){n.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";t=t.split("/").pop();if(t==="html"||t==="php"){t==="php"&&!e.session.$mode.inlinePhp&&(t="html");var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r=="object"&&(r=r[0]),r.substring&&(r.substring(0,3)=="js-"?t="javascript":r.substring(0,4)=="css-"?t="css":r.substring(0,4)=="php-"&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,r=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},this.expandSnippetForSelection=function(e,t){var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.substring(0,n.column),s=r.substr(n.column),o=this.snippetMap,u;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(u=this.findMatchingSnippet(t,i,s)),!!u},this),u?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-u.replaceBefore.length,n.column+u.replaceAfter.length),this.variables.M__=u.matchBefore,this.variables.T__=u.matchAfter,this.insertSnippetForSelection(e,u.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(i.startRe&&!i.startRe.test(t))continue;if(i.endRe&&!i.endRe.test(n))continue;if(!i.startRe&&!i.endRe)continue;return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function u(e,t,n){return e=o(e),t=o(t),n?(e=t+e,e&&e[e.length-1]!="$"&&(e+="$")):(e+=t,e&&e[0]!="^"&&(e="^"+e)),new RegExp(e)}function a(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],r[t]={});var o=r[t];if(e.name){var a=o[e.name];a&&i.unregister(a),o[e.name]=e}n[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),e.startRe=u(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=u(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0)}var n=this.snippetMap,r=this.snippetNameMap,i=this;e||(e=[]),e&&e.content?a(e):Array.isArray(e)&&e.forEach(a),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function i(e){var i=r[e.scope||t];if(i&&i[e.name]){delete i[e.name];var s=n[e.scope||t],o=s&&s.indexOf(e);o>=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):n[o]=u}}return t},this.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r}}).call(c.prototype);var h=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e.data.range,n=e.data.action[0]=="r",r=t.start,i=t.end,s=r.row,o=i.row,u=o-s,a=i.column-r.column;n&&(u=-u,a=-a);if(!this.$inChange&&n){var f=this.selectedTabstop,c=f&&!f.some(function(e){return l(e.start,r)<=0&&l(e.end,i)>=0});if(c)return this.detach()}var h=this.ranges;for(var p=0;p<h.length;p++){var d=h[p];if(d.end.row<r.row)continue;if(n&&l(r,d.start)<0&&l(i,d.end)>0){this.removeRange(d),p--;continue}d.start.row==s&&d.start.column>r.column&&(d.start.column+=a),d.end.row==s&&d.end.column>=r.column&&(d.end.column+=a),d.start.row>=s&&(d.start.row+=u),d.end.row>=s&&(d.end.row+=u),l(d.start,d.end)>0&&this.removeRange(d)}h.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(!e||!e.hasLinkedRanges)return;this.$inChange=!0;var n=this.editor.session,r=n.getTextRange(e.firstNonLinked);for(var i=e.length;i--;){var s=e[i];if(!s.linked)continue;var o=t.snippetManager.tmStrFormat(r,s.original);n.replace(s,o)}this.$inChange=!1},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(!this.editor)return;var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty();for(var r=this.ranges.length;r--;){if(this.ranges[r].linked)continue;var i=this.ranges[r].contains(e.row,e.column),s=n||this.ranges[r].contains(t.row,t.column);if(i&&s)return}this.detach()},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);n=Math.min(Math.max(n,1),t),n==t&&(n=0),this.selectTabstop(n),n===0&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index];if(!t||!t.length)return;this.selectedTabstop=t;if(!this.editor.inVirtualSelectionMode){var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var r=t.length;r--;){if(t.hasLinkedRanges&&t[r].linked)continue;n.addRange(t[r].clone(),!0)}n.ranges[0]&&n.addRange(n.ranges[0].clone())}else this.editor.selection.setRange(t.firstNonLinked);this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.addTabstops=function(e,t,n){this.$openTabstops||(this.$openTabstops=[]);if(!e[0]){var r=o.fromPoints(n,n);v(r.start,t),v(r.end,t),e[0]=[r],e[0].index=0}var i=this.index,s=[i+1,0],u=this.ranges;e.forEach(function(e,n){var r=this.$openTabstops[n]||e;for(var i=e.length;i--;){var a=e[i],f=o.fromPoints(a.start,a.end||a.start);d(f.start,t),d(f.end,t),f.original=a,f.tabstop=r,u.push(f),r!=e?r.unshift(f):r[i]=f,a.fmtString?(f.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=f)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===e&&(s.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r)},this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new a,this.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(h.prototype);var p={};p.onChange=u.prototype.onChange,p.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},p.update=function(e,t,n){this.$insertRight=n,this.pos=e,this.onChange(t)};var d=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new c;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","resources","resources","range","tabStops","resources","utils","actions","ace/config","ace/config"],function(e,t,n){"use strict";function f(){}var r=e("ace/keyboard/hash_handler").HashHandler,i=e("ace/editor").Editor,s=e("ace/snippets").snippetManager,o=e("ace/range").Range,u,a;f.prototype={setupContext:function(e){this.ace=e,this.indentation=e.session.getTabString(),u||(u=window.emmet),u.require("resources").setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},getSelectionRange:function(){var e=this.ace.getSelectionRange(),t=this.ace.session.doc;return{start:t.positionToIndex(e.start),end:t.positionToIndex(e.end)}},createSelection:function(e,t){var n=this.ace.session.doc;this.ace.selection.setRange({start:n.indexToPosition(e),end:n.indexToPosition(t)})},getCurrentLineRange:function(){var e=this.ace,t=e.getCursorPosition().row,n=e.session.getLine(t).length,r=e.session.doc.positionToIndex({row:t,column:0});return{start:r,end:r+n}},getCaretPos:function(){var e=this.ace.getCursorPosition();return this.ace.session.doc.positionToIndex(e)},setCaretPos:function(e){var t=this.ace.session.doc.indexToPosition(e);this.ace.selection.moveToPosition(t)},getCurrentLine:function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},replaceContent:function(e,t,n,r){n==null&&(n=t==null?this.getContent().length:t),t==null&&(t=0);var i=this.ace,u=i.session.doc,a=o.fromPoints(u.indexToPosition(t),u.indexToPosition(n));i.session.remove(a),a.end=a.start,e=this.$updateTabstops(e),s.insertSnippet(i,e)},getContent:function(){return this.ace.getValue()},getSyntax:function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if(e=="html"||e=="php"){var t=this.ace.getCursorPosition(),n=this.ace.session.getState(t.row);typeof n!="string"&&(n=n[0]),n&&(n=n.split("-"),n.length>1?e=n[0]:e=="php"&&(e="html"))}return e},getProfileName:function(){switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var e=u.require("resources").getVariable("profile");return e||(e=this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i)!=-1?"xhtml":"html"),e}return"xhtml"},prompt:function(e){return prompt(e)},getSelection:function(){return this.ace.session.getTextRange()},getFilePath:function(){return""},$updateTabstops:function(e){var t=1e3,n=0,r=null,i=u.require("range"),s=u.require("tabStops"),o=u.require("resources").getVocabulary("user"),a={tabstop:function(e){var o=parseInt(e.group,10),u=o===0;u?o=++n:o+=t;var f=e.placeholder;f&&(f=s.processText(f,a));var l="${"+o+(f?":"+f:"")+"}";return u&&(r=i.create(e.start,l)),l},escape:function(e){return e=="$"?"\\$":e=="\\"?"\\\\":e}};return e=s.processText(e,a),o.variables.insert_final_tabstop&&!/\$\{0\}$/.test(e)?e+="${0}":r&&(e=u.require("utils").replaceSubstring(e,"${0}",r)),e}};var l={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},c=new f;t.commands=new r,t.runEmmetCommand=function(e){try{c.setupContext(e);if(c.getSyntax()=="php")return!1;var t=u.require("actions");if(this.action=="expand_abbreviation_with_tab"&&!e.selection.isEmpty())return!1;if(this.action=="wrap_with_abbreviation")return setTimeout(function(){t.run("wrap_with_abbreviation",c)},0);var n=e.selection.lead,r=e.session.getTokenAt(n.row,n.column);if(r&&/\btag\b/.test(r.type))return!1;var i=t.run(this.action,c)}catch(s){e._signal("changeStatus",typeof s=="string"?s:s.message),console.log(s),i=!1}return i};for(var h in l)t.commands.addCommand({name:"emmet:"+h,action:h,bindKey:l[h],exec:t.runEmmetCommand,multiSelectAction:"forEach"});t.updateCommands=function(e,n){n?e.keyBinding.addKeyboardHandler(t.commands):e.keyBinding.removeKeyboardHandler(t.commands)},t.isSupportedMode=function(e){return e&&/css|less|scss|sass|stylus|html|php|twig|ejs/.test(e)};var p=function(n,r){var i=r;if(!i)return;var s=t.isSupportedMode(i.session.$modeId);n.enableEmmet===!1&&(s=!1),s&&typeof a=="string"&&e("ace/config").loadModule(a,function(){a=null}),t.updateCommands(i,s)};t.AceEmmetEditor=f,e("ace/config").defineOptions(i.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on":"removeListener"]("changeMode",p),p({enableEmmet:!!e},this)},value:!0}}),t.setCore=function(e){typeof e=="string"?a=e:u=e}});
2
+ (function() {
3
+ ace.require(["ace/ext/emmet"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-error_marker.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ;
2
+ (function() {
3
+ ace.require(["ace/ext/error_marker"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-keybinding_menu.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";r.importCssString(i),n.exports.overlayPage=function(t,n,i,s,o,u){function l(e){e.keyCode===27&&a.click()}i=i?"top: "+i+";":"",o=o?"bottom: "+o+";":"",s=s?"right: "+s+";":"",u=u?"left: "+u+";":"";var a=document.createElement("div"),f=document.createElement("div");a.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",a.addEventListener("click",function(){document.removeEventListener("keydown",l),a.parentNode.removeChild(a),t.focus(),a=null}),document.addEventListener("keydown",l),f.style.cssText=i+s+o+u,f.addEventListener("click",function(e){e.stopPropagation()});var c=r.createElement("div");c.style.position="relative";var h=r.createElement("div");h.className="ace_closeButton",h.addEventListener("click",function(){a.click()}),c.appendChild(h),f.appendChild(c),f.appendChild(n),a.appendChild(f),document.body.appendChild(a),t.blur()}}),ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var t=e.commandKeyBinding;for(var r in t){var s=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),o=t[r];Array.isArray(o)||(o=[o]),o.forEach(function(e){typeof e!="string"&&(e=e.name),i[e]?i[e].key+="|"+s:(i[e]={key:s,command:e},n.push(i[e]))})}}),n}}),ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){"use strict";function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+t.command+"</span> : "+'<span class="ace_optionsMenuKey">'+t.key+"</span></div>"},"");s.id="kbshortcutmenu",s.innerHTML="<h1>Keyboard Shortcuts</h1>"+o+"</div>",n(t,s,"0","0","0",null)}}var r=e("ace/editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}});
2
+ (function() {
3
+ ace.require(["ace/ext/keybinding_menu"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-language_tools.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),o=e("./range").Range,u=e("./anchor").Anchor,a=e("./keyboard/hash_handler").HashHandler,f=e("./tokenizer").Tokenizer,l=o.comparePoints,c=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,i),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return c.$tokenizer=new f({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:n.inFormatString&&(r=="n"?e="\n":r=="t"?e="\n":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1),n,r);return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var r=n[0];return r.fmtString=e,e=this.splitRegex.exec(e),r.guard=e[1],r.fmt=e[2],r.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),c.prototype.getTokenizer=function(){return c.$tokenizer},c.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];t=t.replace(/^TM_/,"");if(!e)return;var r=e.session;switch(t){case"CURRENT_WORD":var i=r.getWordRange();case"SELECTION":case"SELECTED_TEXT":return r.getTextRange(i);case"CURRENT_LINE":return r.getLine(e.getCursorPosition().row);case"PREV_LINE":return r.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return r.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return r.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),o=this,u=e.replace(i,function(){o.variables.__=arguments;var e=o.resolveVariables(s,n),t="E";for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="object"){e[r]="";if(i.changeCase&&i.local){var u=e[r+1];u&&typeof u=="string"&&(i.changeCase=="u"?e[r]=u[0].toUpperCase():e[r]=u[0].toLowerCase(),e[r+1]=u.substr(1))}else i.changeCase&&(t=i.changeCase)}else t=="U"?e[r]=i.toUpperCase():t=="L"&&(e[r]=i.toLowerCase())}return e.join("")});return this.variables.__=null,u},this.resolveVariables=function(e,t){function o(t){var n=e.indexOf(t,r+1);n!=-1&&(r=n)}var n=[];for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="string")n.push(i);else{if(typeof i!="object")continue;if(i.skip)o(i);else{if(i.processed<r)continue;if(i.text){var s=this.getVariableValue(t,i.text);s&&i.fmtString&&(s=this.tmStrFormat(s,i)),i.processed=r,i.expectIf==null?s&&(n.push(s),o(i)):s?i.skip=i.elseBranch:o(i)}else i.tabstopId!=null?n.push(i):i.changeCase!=null&&n.push(i)}}}return n},this.insertSnippetForSelection=function(e,t){function f(e){var t=[];for(var n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"){if(a[r.tabstopId])continue;var i=e.lastIndexOf(r,n-1);r=t[i]||{tabstopId:r.tabstopId}}t[n]=r}return t}var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=e.session.getTabString(),s=r.match(/^\s*/)[0];n.column<s.length&&(s=s.slice(0,n.column));var o=this.tokenizeTmSnippet(t);o=this.resolveVariables(o,e),o=o.map(function(e){return e=="\n"?e+s:typeof e=="string"?e.replace(/\t/g,i):e});var u=[];o.forEach(function(e,t){if(typeof e!="object")return;var n=e.tabstopId,r=u[n];r||(r=u[n]=[],r.index=n,r.value="");if(r.indexOf(e)!==-1)return;r.push(e);var i=o.indexOf(e,t+1);if(i===-1)return;var s=o.slice(t+1,i),a=s.some(function(e){return typeof e=="object"});a&&!r.value?r.value=s:s.length&&(!r.value||typeof r.value!="string")&&(r.value=s.join(""))}),u.forEach(function(e){e.length=0});var a={};for(var l=0;l<o.length;l++){var c=o[l];if(typeof c!="object")continue;var p=c.tabstopId,d=o.indexOf(c,l+1);if(a[p]){a[p]===c&&(a[p]=null);continue}var v=u[p],m=typeof v.value=="string"?[v.value]:f(v.value);m.unshift(l+1,Math.max(0,d-l)),m.push(c),a[p]=c,o.splice.apply(o,m),v.indexOf(c)===-1&&v.push(c)}var g=0,y=0,b="";o.forEach(function(e){typeof e=="string"?(e[0]==="\n"?(y=e.length-1,g++):y+=e.length,b+=e):e.start?e.end={row:g,column:y}:e.start={row:g,column:y}});var w=e.getSelectionRange(),E=e.session.replace(w,b),S=new h(e),x=e.inVirtualSelectionMode&&e.selection.index;S.addTabstops(u,w.start,E,x)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection(function(){n.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";t=t.split("/").pop();if(t==="html"||t==="php"){t==="php"&&!e.session.$mode.inlinePhp&&(t="html");var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r=="object"&&(r=r[0]),r.substring&&(r.substring(0,3)=="js-"?t="javascript":r.substring(0,4)=="css-"?t="css":r.substring(0,4)=="php-"&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,r=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},this.expandSnippetForSelection=function(e,t){var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.substring(0,n.column),s=r.substr(n.column),o=this.snippetMap,u;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(u=this.findMatchingSnippet(t,i,s)),!!u},this),u?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-u.replaceBefore.length,n.column+u.replaceAfter.length),this.variables.M__=u.matchBefore,this.variables.T__=u.matchAfter,this.insertSnippetForSelection(e,u.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(i.startRe&&!i.startRe.test(t))continue;if(i.endRe&&!i.endRe.test(n))continue;if(!i.startRe&&!i.endRe)continue;return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function u(e,t,n){return e=o(e),t=o(t),n?(e=t+e,e&&e[e.length-1]!="$"&&(e+="$")):(e+=t,e&&e[0]!="^"&&(e="^"+e)),new RegExp(e)}function a(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],r[t]={});var o=r[t];if(e.name){var a=o[e.name];a&&i.unregister(a),o[e.name]=e}n[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),e.startRe=u(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=u(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0)}var n=this.snippetMap,r=this.snippetNameMap,i=this;e||(e=[]),e&&e.content?a(e):Array.isArray(e)&&e.forEach(a),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function i(e){var i=r[e.scope||t];if(i&&i[e.name]){delete i[e.name];var s=n[e.scope||t],o=s&&s.indexOf(e);o>=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):n[o]=u}}return t},this.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r}}).call(c.prototype);var h=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e.data.range,n=e.data.action[0]=="r",r=t.start,i=t.end,s=r.row,o=i.row,u=o-s,a=i.column-r.column;n&&(u=-u,a=-a);if(!this.$inChange&&n){var f=this.selectedTabstop,c=f&&!f.some(function(e){return l(e.start,r)<=0&&l(e.end,i)>=0});if(c)return this.detach()}var h=this.ranges;for(var p=0;p<h.length;p++){var d=h[p];if(d.end.row<r.row)continue;if(n&&l(r,d.start)<0&&l(i,d.end)>0){this.removeRange(d),p--;continue}d.start.row==s&&d.start.column>r.column&&(d.start.column+=a),d.end.row==s&&d.end.column>=r.column&&(d.end.column+=a),d.start.row>=s&&(d.start.row+=u),d.end.row>=s&&(d.end.row+=u),l(d.start,d.end)>0&&this.removeRange(d)}h.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(!e||!e.hasLinkedRanges)return;this.$inChange=!0;var n=this.editor.session,r=n.getTextRange(e.firstNonLinked);for(var i=e.length;i--;){var s=e[i];if(!s.linked)continue;var o=t.snippetManager.tmStrFormat(r,s.original);n.replace(s,o)}this.$inChange=!1},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(!this.editor)return;var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty();for(var r=this.ranges.length;r--;){if(this.ranges[r].linked)continue;var i=this.ranges[r].contains(e.row,e.column),s=n||this.ranges[r].contains(t.row,t.column);if(i&&s)return}this.detach()},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);n=Math.min(Math.max(n,1),t),n==t&&(n=0),this.selectTabstop(n),n===0&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index];if(!t||!t.length)return;this.selectedTabstop=t;if(!this.editor.inVirtualSelectionMode){var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var r=t.length;r--;){if(t.hasLinkedRanges&&t[r].linked)continue;n.addRange(t[r].clone(),!0)}n.ranges[0]&&n.addRange(n.ranges[0].clone())}else this.editor.selection.setRange(t.firstNonLinked);this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.addTabstops=function(e,t,n){this.$openTabstops||(this.$openTabstops=[]);if(!e[0]){var r=o.fromPoints(n,n);v(r.start,t),v(r.end,t),e[0]=[r],e[0].index=0}var i=this.index,s=[i+1,0],u=this.ranges;e.forEach(function(e,n){var r=this.$openTabstops[n]||e;for(var i=e.length;i--;){var a=e[i],f=o.fromPoints(a.start,a.end||a.start);d(f.start,t),d(f.end,t),f.original=a,f.tabstop=r,u.push(f),r!=e?r.unshift(f):r[i]=f,a.fmtString?(f.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=f)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===e&&(s.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r)},this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new a,this.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(h.prototype);var p={};p.onChange=u.prototype.onChange,p.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},p.update=function(e,t,n){this.$insertRight=n,this.pos=e,this.onChange(t)};var d=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new c;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/edit_session","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../edit_session").EditSession,i=e("../virtual_renderer").VirtualRenderer,s=e("../editor").Editor,o=e("../range").Range,u=e("../lib/event"),a=e("../lib/lang"),f=e("../lib/dom"),l=function(e){var t=new i(e);t.$maxLines=4;var n=new s(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusWaitTimout=0,n.$highlightTagPending=!0,n},c=function(e){var t=f.createElement("div"),n=new l(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),c.start.row=c.end.row=t.row,e.stop()});var i,s=new o(-1,0,-1,Infinity),c=new o(-1,0,-1,Infinity);c.id=n.session.addMarker(c,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?s.id&&(n.session.removeMarker(s.id),s.id=null):s.id=n.session.addMarker(s,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(!i){i=e;return}if(i.x==e.x&&i.y==e.y)return;i=e,i.scrollTop=n.renderer.scrollTop;var t=i.getDocumentPosition().row;s.start.row!=t&&(s.id||n.setRow(t),p(t))}),n.renderer.on("beforeRender",function(){if(i&&s.start.row!=-1){i.$pos=null;var e=i.getDocumentPosition().row;s.id||n.setRow(e),p(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,r=t.element.childNodes[e-t.config.firstRow];if(r==t.selectedNode)return;t.selectedNode&&f.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=r,r&&f.addCssClass(r,"ace_selected")});var h=function(){p(-1)},p=function(e,t){e!==s.start.row&&(s.start.row=s.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return s.start.row},u.addListener(n.container,"mouseout",h),n.on("hide",h),n.on("changeSelection",h),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return typeof t=="string"?t:t&&t.value||""};var d=n.session.bgTokenizer;return d.$tokenizeRow=function(e){var t=n.data[e],r=[];if(!t)return r;typeof t=="string"&&(t={value:t}),t.caption||(t.caption=t.value||t.name);var i=-1,s,o;for(var u=0;u<t.caption.length;u++)o=t.caption[u],s=t.matchMask&1<<u?1:0,i!==s?(r.push({type:t.className||""+(s?"completion-highlight":""),value:o}),i=s):r[r.length-1].value+=o;if(t.meta){var a=n.renderer.$size.scrollerWidth/n.renderer.layerConfig.characterWidth;t.meta.length+t.caption.length<a-2&&r.push({type:"rightAlignedText",value:t.meta})}return r},d.$updateOnChange=r,d.start=r,n.session.$computeWidth=function(){return this.screenWidth=0},n.$blockScrolling=Infinity,n.isOpen=!1,n.isTopdown=!1,n.data=[],n.setData=function(e){n.data=e||[],n.setValue(a.stringRepeat("\n",e.length),-1),n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return c.start.row},n.setRow=function(e){e=Math.max(-1,Math.min(this.data.length,e)),c.start.row!=e&&(n.selection.clearSelection(),c.start.row=c.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()}),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(e,t,r){var s=this.container,o=window.innerHeight,u=window.innerWidth,a=this.renderer,f=a.$maxLines*t*1.4,l=e.top+this.$borderSize;l+f>o-t&&!r?(s.style.top="",s.style.bottom=o-l+"px",n.isTopdown=!1):(l+=t,s.style.top=l+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="",this.renderer.$textLayer.checkForSizeChanges();var c=e.left;c+s.offsetWidth>u&&(c=u-s.offsetWidth),s.style.left=c+"px",this._signal("show"),i=null,n.isOpen=!0},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n};f.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=c}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){"use strict";t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var s=0;s<i;s++)t(e[s],function(e,t){r++,r===i&&n(e,t)})};var r=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t-1;s>=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s<e.length;s++){if(!n.test(e[s]))break;i.push(e[s])}return i}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"],function(e,t,n){"use strict";var r=e("./keyboard/hash_handler").HashHandler,i=e("./autocomplete/popup").AcePopup,s=e("./autocomplete/util"),o=e("./lib/event"),u=e("./lib/lang"),a=e("./lib/dom"),f=e("./snippets").snippetManager,l=function(){this.autoInsert=!0,this.autoSelect=!0,this.exactMatch=!1,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=u.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=u.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.gatherCompletionsId=0,this.$init=function(){return this.popup=new i(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(e,t,n){this.popup||this.$init(),this.popup.setData(this.completions.filtered);var r=e.renderer;this.popup.setRow(this.autoSelect?0:-1);if(!n){this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var i=r.layerConfig.lineHeight,s=r.$cursorLayer.getPixelPosition(this.base,!0);s.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();s.top+=o.top-r.layerConfig.offset,s.left+=o.left-e.renderer.scrollLeft,s.left+=r.$gutterLayer.gutterWidth,this.popup.show(s,i)}else n&&!t&&this.detach()},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.popup&&this.popup.isOpen&&(this.gatherCompletionsId+=1,this.popup.hide()),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement();t!=n&&t.parentNode!=this.popup.container&&t!=this.tooltipNode&&e.relatedTarget!=this.tooltipNode&&e.relatedTarget!=n&&this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){var t=this.popup.getRow(),n=this.popup.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.popup.setRow(t)},this.insertMatch=function(e){e||(e=this.popup.getData(this.popup.getRow()));if(!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText){var t=this.editor.selection.getAllRanges();for(var n=0,r;r=t[n];n++)r.start.column-=this.completions.filterText.length,this.editor.session.remove(r)}e.snippet?f.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Space:function(e){e.completer.detach(),e.insert(" ")},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(!0)},Tab:function(e){var t=e.completer.insertMatch();if(!!t||!!e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=n.getLine(r.row),o=s.retrievePrecedingIdentifier(i,r.column);this.base=n.doc.createAnchor(r.row,r.column-o.length),this.base.$insertRight=!0;var u=[],a=e.completers.length;return e.completers.forEach(function(i,f){i.getCompletions(e,n,r,o,function(r,i){r||(u=u.concat(i));var o=e.getCursorPosition(),f=n.getLine(o.row);t(null,{prefix:s.retrievePrecedingIdentifier(f,o.column,i[0]&&i[0].identifierRegex),matches:u,finished:--a===0})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.keyBinding.addKeyboardHandler(this.keyboardHandler),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),n=this.editor.session.getTextRange({start:this.base,end:t});if(n==this.completions.filterText)return;this.completions.setFilter(n);if(!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==n&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,n,e);return}var r=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,n){var i=function(){if(!n.finished)return;return this.detach()}.bind(this),s=n.prefix,o=n&&n.matches;if(!o||!o.length)return i();if(s.indexOf(n.prefix)!==0||r!=this.gatherCompletionsId)return;this.completions=new c(o),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(s);var u=this.completions.filtered;if(!u.length)return i();if(u.length==1&&u[0].value==s&&!u[0].snippet)return i();if(this.autoInsert&&u.length==1&&n.finished)return this.insertMatch(u[0]);this.openPopup(this.editor,s,e)}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),r=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();this.editor.completers.some(function(e){return e.getDocTooltip&&(r=e.getDocTooltip(n)),r}),r||(r=n),typeof r=="string"&&(r={docText:r});if(!r||!r.docHTML&&!r.docText)return this.hideDocTooltip();this.showDocTooltip(r)},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var n=this.popup,r=n.container.getBoundingClientRect();t.style.top=n.container.style.top,t.style.bottom=n.container.style.bottom,window.innerWidth-r.right<320?(t.style.right=window.innerWidth-r.left+"px",t.style.left=""):(t.style.left=r.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){this.tooltipTimer.cancel();if(!this.tooltipNode)return;var e=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==e&&this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}}).call(l.prototype),l.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new l),e.completer.autoInsert=e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var c=function(e,t,n){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){var u=o.value||o.caption||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;if(this.exactMatch){if(t!==u.substr(0,t.length))continue e}else for(var p=0;p<t.length;p++){var d=u.indexOf(i[p],a+1),v=u.indexOf(r[p],a+1);c=d>=0?v<0||d<v?d:v:v;if(c<0)continue e;h=c-a-1,h>0&&(a===-1&&(l+=10),l+=h),f|=1<<c,a=c}o.matchMask=f,o.exactMatch=l?0:1,o.score=(o.score||0)-l,n.push(o)}return n}}).call(c.prototype),t.Autocomplete=l,t.FilteredList=c}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){function s(e,t){var n=e.getTextRange(r.fromPoints({row:0,column:0},t));return n.split(i).length-1}function o(e,t){var n=s(e,t),r=e.getValue().split(i),o=Object.create(null),u=r[n];return r.forEach(function(e,t){if(!e||e===u)return;var i=Math.abs(n-t),s=r.length-i;o[e]?o[e]=Math.max(s,o[e]):o[e]=s}),o}var r=e("../range").Range,i=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,r,i){var s=o(t,n,r),u=Object.keys(s);i(null,u.map(function(e){return{caption:e,value:e,score:s[e],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t,n){"use strict";function m(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row),r=u.retrievePrecedingIdentifier(n,t.column);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!r&&e&&(r=u.retrievePrecedingIdentifier(n,t.column,e))})}),r}var r=e("../snippets").snippetManager,i=e("../autocomplete").Autocomplete,s=e("../config"),o=e("../lib/lang"),u=e("../autocomplete/util"),a=e("../autocomplete/text_completer"),f={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var s=e.session.getState(n.row),o=t.$mode.getCompletions(s,t,n,r);i(null,o)}},l={getCompletions:function(e,t,n,i,s){var o=r.snippetMap,u=[];r.getActiveScopes(e).forEach(function(e){var t=o[e]||[];for(var n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;if(!i)continue;u.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+"\u21e5 ":"snippet",type:"snippet"})}},this),s(null,u)},getDocTooltip:function(e){e.type=="snippet"&&!e.docHTML&&(e.docHTML=["<b>",o.escapeHTML(e.caption),"</b>","<hr></hr>",o.escapeHTML(e.snippet)].join(""))}},c=[l,a,f];t.setCompleters=function(e){c=e||[]},t.addCompleter=function(e){c.push(e)},t.textCompleter=a,t.keyWordCompleter=f,t.snippetCompleter=l;var h={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},p=function(e,t){d(t.session.$mode)},d=function(e){var t=e.$id;r.files||(r.files={}),v(t),e.modes&&e.modes.forEach(d)},v=function(e){if(!e||r.files[e])return;var t=e.replace("mode","snippets");r.files[e]={},s.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){v("ace/mode/"+e)})))})},g=function(e){var t=e.editor,n=e.args||"",r=t.completer&&t.completer.activated;if(e.command.name==="backspace")r&&!m(t)&&t.completer.detach();else if(e.command.name==="insertstring"){var s=m(t);s&&!r&&(t.completer||(t.completer=new i),t.completer.autoSelect=!1,t.completer.autoInsert=!1,t.completer.showPopup(t))}},y=e("../editor").Editor;e("../config").defineOptions(y.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:c),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:c),this.commands.on("afterExec",g)):this.commands.removeListener("afterExec",g)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(h),this.off("changeMode",p))},value:!1}})});
2
+ (function() {
3
+ ace.require(["ace/ext/language_tools"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-linking.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}})});
2
+ (function() {
3
+ ace.require(["ace/ext/linking"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-modelist.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;if(/\^/.test(n))var r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$";else var r="^.*\\.("+n+")$";this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ActionScript:["as"],ADA:["ada|adb"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],AsciiDoc:["asciidoc"],Assembly_x86:["asm"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],C9Search:["c9search_results"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Dummy:["dummy"],DummySyntax:["dummy"],Eiffel:["e"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Forth:["frt|fs|ldr"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],golang:["go"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],haXe:["hx"],HTML:["html|htm|xhtml"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Jack:["jack"],Jade:["jade"],Java:["java"],JavaScript:["js|jsm"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSX:["jsx"],Julia:["jl"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],MEL:["mel"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nix:["nix"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],RDoc:["Rd"],RHTML:["Rhtml"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Scheme:["scm|rkt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Smarty:["smarty|tpl"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SQL:["sql"],Stylus:["styl|stylus"],SVG:["svg"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],Twig:["twig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],XQuery:["xq"],YAML:["yaml|yml"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",FTL:"FreeMarker"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}});
2
+ (function() {
3
+ ace.require(["ace/ext/modelist"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-old_ie.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),o=".ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 325px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;float: right;font: 16px/16px Arial;height: 14px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing: border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys");r.importCssString(o,"ace_searchbox");var f='<div class="ace_search right"> <button type="button" action="hide" class="ace_searchbtn_close"></button> <div class="ace_search_form"> <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input> <button type="button" action="findNext" class="ace_searchbtn next"></button> <button type="button" action="findPrev" class="ace_searchbtn prev"></button> <button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button> </div> <div class="ace_replace_form"> <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input> <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button> <button type="button" action="replaceAll" class="ace_replacebtn">All</button> </div> <div class="ace_search_options"> <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span> <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span> <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span> </div></div>'.replace(/>\s+/g,">"),l=function(e,t,n){var i=r.createElement("div");i.innerHTML=f,this.element=i.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;s.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,"click",function(e){var n=e.target||e.srcElement,r=n.getAttribute("action");r&&t[r]?t[r]():t.$searchBarKb.commands[r]&&t.$searchBarKb.commands[r].exec(t),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,n,r){var i=a.keyCodeToString(r),o=t.$searchBarKb.findKeyCommand(n,i);o&&o.exec&&(o.exec(t),s.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),s.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),s.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),s.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new u([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new u,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e[t?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){r.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),r.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),r.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t){var n=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),i=!n&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",i),this.editor._emit("findSearchBox",{match:!i}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(l.prototype),t.SearchBox=l,t.Search=function(e,t){var n=e.searchBox||new l(e);n.show(e.session.getTextRange(),t)}}),ace.define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox","ace/mode/text"],function(require,exports,module){"use strict";function patch(obj,name,regexp,replacement){eval("obj['"+name+"']="+obj[name].toString().replace(regexp,replacement))}var MAX_TOKEN_COUNT=1e3,useragent=require("../lib/useragent"),TokenizerModule=require("../tokenizer");useragent.isIE&&useragent.isIE<10&&window.top.document.compatMode==="BackCompat"&&(useragent.isOldIE=!0);if(typeof document!="undefined"&&!document.documentElement.querySelector){useragent.isOldIE=!0;var qs=function(e,t){if(t.charAt(0)==".")var n=t.slice(1);else var r=t.match(/(\w+)=(\w+)/),i=r&&r[1],s=r&&r[2];for(var o=0;o<e.all.length;o++){var u=e.all[o];if(n){if(u.className.indexOf(n)!=-1)return u}else if(i&&u.getAttribute(i)==s)return u}},sb=require("./searchbox").SearchBox.prototype;patch(sb,"$initElements",/([^\s=]*).querySelector\((".*?")\)/g,"qs($1, $2)")}var compliantExecNpcg=/()??/.exec("")[1]===undefined;if(compliantExecNpcg)return;var proto=TokenizerModule.Tokenizer.prototype;TokenizerModule.Tokenizer_orig=TokenizerModule.Tokenizer,proto.getLineTokens_orig=proto.getLineTokens,patch(TokenizerModule,"Tokenizer","ruleRegExps.push(adjustedregex);\n",function(e){return e+' if (state[i].next && RegExp(adjustedregex).test(""))\n rule._qre = RegExp(adjustedregex, "g");\n '}),TokenizerModule.Tokenizer.prototype=proto,patch(proto,"getLineTokens",/if \(match\[i \+ 1\] === undefined\)\s*continue;/,"if (!match[i + 1]) {\n if (value)continue;\n var qre = state[mapping[i]]._qre;\n if (!qre) continue;\n qre.lastIndex = lastIndex;\n if (!qre.exec(line) || qre.lastIndex != lastIndex)\n continue;\n }"),patch(require("../mode/text").Mode.prototype,"getTokenizer",/Tokenizer/,"TokenizerModule.Tokenizer"),useragent.isOldIE=!0});
2
+ (function() {
3
+ ace.require(["ace/ext/old_ie"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-searchbox.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),o=".ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 325px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;float: right;font: 16px/16px Arial;height: 14px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing: border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys");r.importCssString(o,"ace_searchbox");var f='<div class="ace_search right"> <button type="button" action="hide" class="ace_searchbtn_close"></button> <div class="ace_search_form"> <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input> <button type="button" action="findNext" class="ace_searchbtn next"></button> <button type="button" action="findPrev" class="ace_searchbtn prev"></button> <button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button> </div> <div class="ace_replace_form"> <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input> <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button> <button type="button" action="replaceAll" class="ace_replacebtn">All</button> </div> <div class="ace_search_options"> <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span> <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span> <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span> </div></div>'.replace(/>\s+/g,">"),l=function(e,t,n){var i=r.createElement("div");i.innerHTML=f,this.element=i.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;s.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,"click",function(e){var n=e.target||e.srcElement,r=n.getAttribute("action");r&&t[r]?t[r]():t.$searchBarKb.commands[r]&&t.$searchBarKb.commands[r].exec(t),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,n,r){var i=a.keyCodeToString(r),o=t.$searchBarKb.findKeyCommand(n,i);o&&o.exec&&(o.exec(t),s.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),s.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),s.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),s.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new u([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new u,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e[t?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){r.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),r.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),r.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t){var n=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),i=!n&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",i),this.editor._emit("findSearchBox",{match:!i}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(l.prototype),t.SearchBox=l,t.Search=function(e,t){var n=e.searchBox||new l(e);n.show(e.session.getTextRange(),t)}});
2
+ (function() {
3
+ ace.require(["ace/ext/searchbox"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-settings_menu.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"],function(e,t,n){"use strict";n.exports.createOption=function(t){var n,r=document.createElement("option");for(n in t)t.hasOwnProperty(n)&&(n==="selected"?r.setAttribute(n,t[n]):r[n]=t[n]);return r},n.exports.createCheckbox=function(t,n,r){var i=document.createElement("input");return i.setAttribute("type","checkbox"),i.setAttribute("id",t),i.setAttribute("name",t),i.setAttribute("value",n),i.setAttribute("class",r),n&&i.setAttribute("checked","checked"),i},n.exports.createInput=function(t,n,r){var i=document.createElement("input");return i.setAttribute("type","text"),i.setAttribute("id",t),i.setAttribute("name",t),i.setAttribute("value",n),i.setAttribute("class",r),i},n.exports.createLabel=function(t,n){var r=document.createElement("label");return r.setAttribute("for",n),r.textContent=t,r},n.exports.createSelection=function(t,r,i){var s=document.createElement("select");return s.setAttribute("id",t),s.setAttribute("name",t),s.setAttribute("class",i),r.forEach(function(e){s.appendChild(n.exports.createOption(e))}),s}}),ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;if(/\^/.test(n))var r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$";else var r="^.*\\.("+n+")$";this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ActionScript:["as"],ADA:["ada|adb"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],AsciiDoc:["asciidoc"],Assembly_x86:["asm"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],C9Search:["c9search_results"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Dummy:["dummy"],DummySyntax:["dummy"],Eiffel:["e"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Forth:["frt|fs|ldr"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],golang:["go"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],haXe:["hx"],HTML:["html|htm|xhtml"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Jack:["jack"],Jade:["jade"],Java:["java"],JavaScript:["js|jsm"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSX:["jsx"],Julia:["jl"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],MEL:["mel"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nix:["nix"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],RDoc:["Rd"],RHTML:["Rhtml"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Scheme:["scm|rkt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Smarty:["smarty|tpl"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SQL:["sql"],Stylus:["styl|stylus"],SVG:["svg"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],Twig:["twig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],XQuery:["xq"],YAML:["yaml|yml"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",FTL:"FreeMarker"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}}),ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}),ace.define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"],function(e,t,n){"use strict";n.exports.addEditorMenuOptions=function(n){var r=e("../modelist"),i=e("../themelist");n.menuOptions={setNewLineMode:[{textContent:"unix",value:"unix"},{textContent:"windows",value:"windows"},{textContent:"auto",value:"auto"}],setTheme:[],setMode:[],setKeyboardHandler:[{textContent:"ace",value:""},{textContent:"vim",value:"ace/keyboard/vim"},{textContent:"emacs",value:"ace/keyboard/emacs"},{textContent:"textarea",value:"ace/keyboard/textarea"},{textContent:"sublime",value:"ace/keyboard/sublime"}]},n.menuOptions.setTheme=i.themes.map(function(e){return{textContent:e.caption,value:e.theme}}),n.menuOptions.setMode=r.modes.map(function(e){return{textContent:e.name,value:e.mode}})}}),ace.define("ace/ext/menu_tools/get_set_functions",["require","exports","module"],function(e,t,n){"use strict";n.exports.getSetFunctions=function(t){var n=[],r={editor:t,session:t.session,renderer:t.renderer},i=[],s=["setOption","setUndoManager","setDocument","setValue","setBreakpoints","setScrollTop","setScrollLeft","setSelectionStyle","setWrapLimitRange"];return["renderer","session","editor"].forEach(function(e){var t=r[e],o=e;for(var u in t)s.indexOf(u)===-1&&/^set/.test(u)&&i.indexOf(u)===-1&&(i.push(u),n.push({functionName:u,parentObj:t,parentName:o}))}),n}}),ace.define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions"],function(e,t,n){"use strict";var r=e("./element_generator"),i=e("./add_editor_menu_options").addEditorMenuOptions,s=e("./get_set_functions").getSetFunctions;n.exports.generateSettingsMenu=function(t){function o(){n.sort(function(e,t){var n=e.getAttribute("contains"),r=t.getAttribute("contains");return n.localeCompare(r)})}function u(){var e=document.createElement("div");e.setAttribute("id","ace_settingsmenu"),n.forEach(function(t){e.appendChild(t)});var t=e.appendChild(document.createElement("div")),r="1.1.8";return t.style.padding="1em",t.textContent="Ace version "+r,e}function a(e,n,i,s){var o,u=document.createElement("div");return u.setAttribute("contains",i),u.setAttribute("class","ace_optionsMenuEntry"),u.setAttribute("style","clear: both;"),u.appendChild(r.createLabel(i.replace(/^set/,"").replace(/([A-Z])/g," $1").trim(),i)),Array.isArray(s)?(o=r.createSelection(i,s,n),o.addEventListener("change",function(n){try{t.menuOptions[n.target.id].forEach(function(e){e.textContent!==n.target.textContent&&delete e.selected}),e[n.target.id](n.target.value)}catch(r){throw new Error(r)}})):typeof s=="boolean"?(o=r.createCheckbox(i,s,n),o.addEventListener("change",function(t){try{e[t.target.id](!!t.target.checked)}catch(n){throw new Error(n)}})):(o=r.createInput(i,s,n),o.addEventListener("change",function(t){try{t.target.value==="true"?e[t.target.id](!0):t.target.value==="false"?e[t.target.id](!1):e[t.target.id](t.target.value)}catch(n){throw new Error(n)}})),o.style.cssText="float:right;",u.appendChild(o),u}function f(e,n,r,i){var s=t.menuOptions[e],o=n[i]();return typeof o=="object"&&(o=o.$id),s.forEach(function(e){e.value===o&&(e.selected="selected")}),a(n,r,e,s)}function l(e){var r=e.functionName,i=e.parentObj,s=e.parentName,o,u=r.replace(/^set/,"get");if(t.menuOptions[r]!==undefined)n.push(f(r,i,s,u));else if(typeof i[u]=="function")try{o=i[u](),typeof o=="object"&&(o=o.$id),n.push(a(i,s,r,o))}catch(l){}}var n=[];return i(t),s(t).forEach(function(e){l(e)}),o(),u()}}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";r.importCssString(i),n.exports.overlayPage=function(t,n,i,s,o,u){function l(e){e.keyCode===27&&a.click()}i=i?"top: "+i+";":"",o=o?"bottom: "+o+";":"",s=s?"right: "+s+";":"",u=u?"left: "+u+";":"";var a=document.createElement("div"),f=document.createElement("div");a.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",a.addEventListener("click",function(){document.removeEventListener("keydown",l),a.parentNode.removeChild(a),t.focus(),a=null}),document.addEventListener("keydown",l),f.style.cssText=i+s+o+u,f.addEventListener("click",function(e){e.stopPropagation()});var c=r.createElement("div");c.style.position="relative";var h=r.createElement("div");h.className="ace_closeButton",h.addEventListener("click",function(){a.click()}),c.appendChild(h),f.appendChild(c),f.appendChild(n),a.appendChild(f),document.body.appendChild(a),t.blur()}}),ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"],function(e,t,n){"use strict";function s(e){var t=document.getElementById("ace_settingsmenu");t||i(e,r(e),"0","0","0")}var r=e("./menu_tools/generate_settings_menu").generateSettingsMenu,i=e("./menu_tools/overlay_page").overlayPage;n.exports.init=function(t){var n=e("ace/editor").Editor;n.prototype.showSettingsMenu=function(){s(this)}}});
2
+ (function() {
3
+ ace.require(["ace/ext/settings_menu"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-spellcheck.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})});
2
+ (function() {
3
+ ace.require(["ace/ext/spellcheck"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-split.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";function l(e,t){this.$u=e,this.$doc=t}var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./editor").Editor,u=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,f=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new u(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splits<this.$editors.length&&this.$splits<e)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;while(this.$splits<e)this.$createEditor(),this.$splits++}else while(this.$splits>e)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();if(n){var r=new l(n,t);t.setUndoManager(r)}return t.$informUndoManager=i.delayedCall(function(){t.$deltas=[]}),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+"px",n.container.style.top="0px",n.container.style.left=i*r+"px",n.container.style.height=t+"px",n.resize()}else{var s=t/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+"px",n.container.style.top=i*s+"px",n.container.style.left="0px",n.container.style.height=s+"px",n.resize()}}}).call(f.prototype),function(){this.execute=function(e){this.$u.execute(e)},this.undo=function(){var e=this.$u.undo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.redo=function(){var e=this.$u.redo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.reset=function(){this.$u.reset()},this.hasUndo=function(){return this.$u.hasUndo()},this.hasRedo=function(){return this.$u.hasRedo()}}.call(l.prototype),t.Split=f}),ace.define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")});
2
+ (function() {
3
+ ace.require(["ace/ext/split"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-static_highlight.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;}.ace_static_highlight .ace_gutter {width: 25px !important;float: left;text-align: right;padding: 0 3px 0 0;margin-right: 3px;position: static !important;}.ace_static_highlight .ace_line { clear: both; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}",o=e("../config"),u=e("../lib/dom"),a=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",f=[];if(e.firstElementChild){var l=0;for(var c=0;c<e.childNodes.length;c++){var h=e.childNodes[c];h.nodeType==3?(l+=h.data.length,o+=h.data):f.push(l,h)}}else o=u.getInnerText(e),t.trim&&(o=o.trim());a.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight"),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<f.length;i+=2){var s=t.session.doc.indexToPosition(f[i]),o=f[i+1],a=r.children[s.row];a&&a.appendChild(o)}n&&n()})};a.render=function(e,t,n,i,s,u){function h(){var r=a.renderSync(e,t,n,i,s);return u?u(r):r}var f=1,l=r.prototype.$modes;typeof n=="string"&&(f++,o.loadModule(["theme",n],function(e){n=e,--f||h()}));var c;return t&&typeof t=="object"&&!t.getTokenizer&&(c=t,t=c.path),typeof t=="string"&&(f++,o.loadModule(["mode",t],function(e){if(!l[t]||c)l[t]=new e.Mode(c);t=l[t],--f||h()})),--f||h()},a.renderSync=function(e,t,n,o,u){o=parseInt(o||1,10);var a=new r("");a.setUseWorker(!1),a.setMode(t);var f=new i(document.createElement("div"));f.setSession(a),f.config={characterWidth:10,lineHeight:20},a.setValue(e);var l=[],c=a.getLength();for(var h=0;h<c;h++)l.push("<div class='ace_line'>"),u||l.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'></span>"),f.$renderLine(l,h,!0,!1),l.push("\n</div>");var p="<div class='"+n.cssClass+"'>"+"<div class='ace_static_highlight' style='counter-reset:ace_line "+(o-1)+"'>"+l.join("")+"</div>"+"</div>";return f.destroy(),{css:s+n.cssText,html:p,session:a}},n.exports=a,n.exports.highlight=a});
2
+ (function() {
3
+ ace.require(["ace/ext/static_highlight"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-statusbar.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this));e.on("changeStatus",function(){n.schedule(100)}),e.on("changeSelection",function(){n.schedule(100)})};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection.lead;n(r.row+":"+r.column," ");if(!e.selection.isEmpty()){var i=e.getSelectionRange();n("("+(i.end.row-i.start.row)+":"+(i.end.column-i.start.column)+")")}t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s});
2
+ (function() {
3
+ ace.require(["ace/ext/statusbar"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-textarea.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),s=e("./editor").Editor,o=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.edit=function(e){if(typeof e=="string"){var n=e;e=document.getElementById(n);if(!e)throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var o="";if(e&&/input|textarea/i.test(e.tagName)){var u=e;o=u.value,e=r.createElement("pre"),u.parentNode.replaceChild(e,u)}else o=r.getInnerText(e),e.innerHTML="";var f=t.createEditSession(o),l=new s(new a(e));l.setSession(f);var c={document:f,editor:l,onResize:l.resize.bind(l,null)};return u&&(c.textarea=u),i.addListener(window,"resize",c.onResize),l.on("destroy",function(){i.removeListener(window,"resize",c.onResize),c.editor.container.env=null}),l.container.env=l.env=c,l},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new u),n},t.EditSession=o,t.UndoManager=u}),ace.define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate"],function(e,t,n){"use strict";function a(e,t){for(var n in t)e.style[n]=t[n]}function f(e,t){if(e.type!="textarea")throw new Error("Textarea required!");var n=e.parentNode,i=document.createElement("div"),s=function(){var t="position:relative;";["margin-top","margin-left","margin-right","margin-bottom"].forEach(function(n){t+=n+":"+u(e,i,n)+";"});var n=u(e,i,"width")||e.clientWidth+"px",r=u(e,i,"height")||e.clientHeight+"px";t+="height:"+r+";width:"+n+";",t+="display:inline-block;",i.setAttribute("style",t)};r.addListener(window,"resize",s),s(),n.insertBefore(i,e.nextSibling);while(n!==document){if(n.tagName.toUpperCase()==="FORM"){var o=n.onsubmit;n.onsubmit=function(n){e.value=t(),o&&o.call(this,n)};break}n=n.parentNode}return i}function l(t,n,r){s.loadScript(t,function(){e([n],r)})}function c(e,t,n,r,i,s){function a(e){return e==="true"||e==1}var o=e.getSession(),u=e.renderer;return s=s||l,e.setDisplaySettings=function(t){t==null&&(t=n.style.display=="none"),t?(n.style.display="block",n.hideButton.focus(),e.on("focus",function r(){e.removeListener("focus",r),n.style.display="none"})):e.focus()},e.$setOption=e.setOption,e.$getOption=e.getOption,e.setOption=function(t,n){switch(t){case"mode":e.$setOption("mode","ace/mode/"+n);break;case"theme":e.$setOption("theme","ace/theme/"+n);break;case"keybindings":switch(n){case"vim":e.setKeyboardHandler("ace/keyboard/vim");break;case"emacs":e.setKeyboardHandler("ace/keyboard/emacs");break;default:e.setKeyboardHandler(null)}break;case"softWrap":case"fontSize":e.$setOption(t,n);break;default:e.$setOption(t,a(n))}},e.getOption=function(t){switch(t){case"mode":return e.$getOption("mode").substr("ace/mode/".length);case"theme":return e.$getOption("theme").substr("ace/theme/".length);case"keybindings":var n=e.getKeyboardHandler();switch(n&&n.$id){case"ace/keyboard/vim":return"vim";case"ace/keyboard/emacs":return"emacs";default:return"ace"}break;default:return e.$getOption(t)}},e.setOptions(i),e}function h(e,n,i){function f(e,t,n,r){if(!n){e.push("<input type='checkbox' title='",t,"' ",r+""=="true"?"checked='true'":"","'></input>");return}e.push("<select title='"+t+"'>");for(var i in n)e.push("<option value='"+i+"' "),r==i&&e.push(" selected "),e.push(">",n[i],"</option>");e.push("</select>")}var s=null,o={mode:"Mode:",wrap:"Soft Wrap:",theme:"Theme:",fontSize:"Font Size:",showGutter:"Display Gutter:",keybindings:"Keyboard",showPrintMargin:"Show Print Margin:",useSoftTabs:"Use Soft Tabs:",showInvisibles:"Show Invisibles"},u={mode:{text:"Plain",javascript:"JavaScript",xml:"XML",html:"HTML",css:"CSS",scss:"SCSS",python:"Python",php:"PHP",java:"Java",ruby:"Ruby",c_cpp:"C/C++",coffee:"CoffeeScript",json:"json",perl:"Perl",clojure:"Clojure",ocaml:"OCaml",csharp:"C#",haxe:"haXe",svg:"SVG",textile:"Textile",groovy:"Groovy",liquid:"Liquid",Scala:"Scala"},theme:{clouds:"Clouds",clouds_midnight:"Clouds Midnight",cobalt:"Cobalt",crimson_editor:"Crimson Editor",dawn:"Dawn",eclipse:"Eclipse",idle_fingers:"Idle Fingers",kr_theme:"Kr Theme",merbivore:"Merbivore",merbivore_soft:"Merbivore Soft",mono_industrial:"Mono Industrial",monokai:"Monokai",pastel_on_dark:"Pastel On Dark",solarized_dark:"Solarized Dark",solarized_light:"Solarized Light",textmate:"Textmate",twilight:"Twilight",vibrant_ink:"Vibrant Ink"},showGutter:s,fontSize:{"10px":"10px","11px":"11px","12px":"12px","14px":"14px","16px":"16px"},wrap:{off:"Off",40:"40",80:"80",free:"Free"},keybindings:{ace:"ace",vim:"vim",emacs:"emacs"},showPrintMargin:s,useSoftTabs:s,showInvisibles:s},a=[];a.push("<table><tr><th>Setting</th><th>Value</th></tr>");for(var l in t.defaultOptions)a.push("<tr><td>",o[l],"</td>"),a.push("<td>"),f(a,l,u[l],i.getOption(l)),a.push("</td></tr>");a.push("</table>"),e.innerHTML=a.join("");var c=function(e){var t=e.currentTarget;i.setOption(t.title,t.value)},h=function(e){var t=e.currentTarget;i.setOption(t.title,t.checked)},p=e.getElementsByTagName("select");for(var d=0;d<p.length;d++)p[d].onchange=c;var v=e.getElementsByTagName("input");for(var d=0;d<v.length;d++)v[d].onclick=h;var m=document.createElement("input");m.type="button",m.value="Hide",r.addListener(m,"click",function(){i.setDisplaySettings(!1)}),e.appendChild(m),e.hideButton=m}var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/net"),o=e("../ace");e("../theme/textmate"),n.exports=t=o;var u=function(e,t,n){var r=e.style[n];r||(window.getComputedStyle?r=window.getComputedStyle(e,"").getPropertyValue(n):r=e.currentStyle[n]);if(!r||r=="auto"||r=="intrinsic")r=t.style[n];return r};t.transformTextarea=function(e,n){var s,u=f(e,function(){return s.getValue()});e.style.display="none",u.style.background="white";var p=document.createElement("div");a(p,{top:"0px",left:"0px",right:"0px",bottom:"0px",border:"1px solid gray",position:"absolute"}),u.appendChild(p);var d=document.createElement("div");a(d,{position:"absolute",right:"0px",bottom:"0px",background:"red",cursor:"nw-resize",borderStyle:"solid",borderWidth:"9px 8px 10px 9px",width:"2px",borderColor:"lightblue gray gray lightblue",zIndex:101});var v=document.createElement("div"),m={top:"0px",left:"20%",right:"0px",bottom:"0px",position:"absolute",padding:"5px",zIndex:100,color:"white",display:"none",overflow:"auto",fontSize:"14px",boxShadow:"-5px 2px 3px gray"};i.isOldIE?m.backgroundColor="#333":m.backgroundColor="rgba(0, 0, 0, 0.6)",a(v,m),u.appendChild(v),n=n||t.defaultOptions;var g=o.edit(p);s=g.getSession(),s.setValue(e.value||e.innerHTML),g.focus(),u.appendChild(d),c(g,p,v,o,n,l),h(v,d,g);var y="";return r.addListener(d,"mousemove",function(e){var t=this.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;n+r<(t.width+t.height)/2?(this.style.cursor="pointer",y="toggle"):(y="resize",this.style.cursor="nw-resize")}),r.addListener(d,"mousedown",function(e){if(y=="toggle"){g.setDisplaySettings();return}u.style.zIndex=1e5;var t=u.getBoundingClientRect(),n=t.width+t.left-e.clientX,i=t.height+t.top-e.clientY;r.capture(d,function(e){u.style.width=e.clientX-t.left+n+"px",u.style.height=e.clientY-t.top+i+"px",g.resize()},function(){})}),g},t.defaultOptions={mode:"javascript",theme:"textmate",wrap:"off",fontSize:"12px",showGutter:"false",keybindings:"ace",showPrintMargin:"false",useSoftTabs:"true",showInvisibles:"false"}});
2
+ (function() {
3
+ ace.require(["ace/ext/textarea"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-themelist.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})});
2
+ (function() {
3
+ ace.require(["ace/ext/themelist"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/ext-whitespace.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){function c(e){var t=0;for(var r=e;r<n.length;r+=e)t+=n[r]||0;return t}var n=[],r=[],i=0,s=0,o=Math.min(e.length,1e3);for(var u=0;u<o;u++){var a=e[u];if(!/^\s*[^*+\-\s]/.test(a))continue;a[0]==" "&&i++;var f=a.match(/^ */)[0].length;if(f&&a[f]!=" "){var l=f-s;l>0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f;while(u<o&&a[a.length-1]=="\\")a=e[u++]}var h=r.reduce(function(e,t){return e+t},0),p={score:0,length:0},d=0;for(var u=1;u<12;u++){var v=c(u);u==1?(d=v,v=n[1]?.9:.8,n.length||(v=0)):v/=d,r[u]&&(v+=r[u]/h),v>p.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1)return{ch:" ",length:m};if(d>i+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t?-1:0;for(var s=0,o=r.length;s<o;s++){var u=r[s],a=u.search(/\s+$/);a>i&&n.removeInLine(s,a,u.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t==" "?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c<h;c++){var p=a[c],d=p.match(/^\s*/)[0];if(d){var v=e.$getStringScreenWidth(d)[0],m=Math.floor(v/s),g=v%s,y=f[m]||(f[m]=r.stringRepeat(o,m));y+=l[g]||(l[g]=r.stringRepeat(" ",g)),y!=d&&(u.removeInLine(c,0,d.length),u.insertInLine({row:c,column:0},y))}}e.setTabSize(n),e.setUseSoftTabs(t==" ")},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?typeof e=="string"?t.$parseStringArg(e):typeof e.text=="string"?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]});
2
+ (function() {
3
+ ace.require(["ace/ext/whitespace"], function() {});
4
+ })();
5
+
js/ace/src-min-noconflict/keybinding-emacs.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"],function(e,t,n){"use strict";function a(){}var r=e("./lib/oop"),i=e("./range").Range,s=e("./search").Search,o=e("./edit_session").EditSession,u=e("./search_highlight").SearchHighlight;r.inherits(a,s),function(){this.enter=function(e,t){if(!t.needle)return!1;var n=e.getCursorPosition();this.displayOccurContent(e,t);var r=this.originalToOccurPosition(e.session,n);return e.moveCursorToPosition(r),!0},this.exit=function(e,t){var n=t.translatePosition&&e.getCursorPosition(),r=n&&this.occurToOriginalPosition(e.session,n);return this.displayOriginalContent(e),r&&e.moveCursorToPosition(r),!0},this.highlight=function(e,t){var n=e.$occurHighlight=e.$occurHighlight||e.addDynamicMarker(new u(null,"ace_occur-highlight","text"));n.setRegexp(t),e._emit("changeBackMarker")},this.displayOccurContent=function(e,t){this.$originalSession=e.session;var n=this.matchingLines(e.session,t),r=n.map(function(e){return e.content}),i=new o(r.join("\n"));i.$occur=this,i.$occurMatchingLines=n,e.setSession(i),this.$useEmacsStyleLineStart=this.$originalSession.$useEmacsStyleLineStart,i.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart,this.highlight(i,t.re),i._emit("changeBackMarker")},this.displayOriginalContent=function(e){e.setSession(this.$originalSession),this.$originalSession.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart},this.originalToOccurPosition=function(e,t){var n=e.$occurMatchingLines,r={row:0,column:0};if(!n)return r;for(var i=0;i<n.length;i++)if(n[i].row===t.row)return{row:i,column:t.column};return r},this.occurToOriginalPosition=function(e,t){var n=e.$occurMatchingLines;return!n||!n[t.row]?t:{row:n[t.row].row,column:t.column}},this.matchingLines=function(e,t){t=r.mixin({},t);if(!e||!t.needle)return[];var n=new s;return n.set(t),n.findAll(e).reduce(function(t,n){var r=n.start.row,i=t[t.length-1];return i&&i.row===r?t:t.concat({row:r,content:e.getLine(r)})},[])}}.call(a.prototype);var f=e("./lib/dom");f.importCssString(".ace_occur-highlight {\n border-radius: 4px;\n background-color: rgba(87, 255, 8, 0.25);\n position: absolute;\n z-index: 4;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n box-shadow: 0 0 4px rgb(91, 255, 50);\n}\n.ace_dark .ace_occur-highlight {\n background-color: rgb(80, 140, 85);\n box-shadow: 0 0 4px rgb(60, 120, 70);\n}\n","incremental-occur-highlighting"),t.Occur=a}),ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"],function(e,t,n){function f(){}var r=e("../config"),i=e("../occur").Occur,s={name:"occur",exec:function(e,t){var n=!!e.session.$occur,r=(new i).enter(e,t);r&&!n&&f.installIn(e)},readOnly:!0},o=[{name:"occurexit",bindKey:"esc|Ctrl-G",exec:function(e){var t=e.session.$occur;if(!t)return;t.exit(e,{}),e.session.$occur||f.uninstallFrom(e)},readOnly:!0},{name:"occuraccept",bindKey:"enter",exec:function(e){var t=e.session.$occur;if(!t)return;t.exit(e,{translatePosition:!0}),e.session.$occur||f.uninstallFrom(e)},readOnly:!0}],u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/oop");a.inherits(f,u),function(){this.isOccurHandler=!0,this.attach=function(e){u.call(this,o,e.commands.platform),this.$editor=e};var e=this.handleKeyboard;this.handleKeyboard=function(t,n,r,i){var s=e.call(this,t,n,r,i);return s&&s.command?s:undefined}}.call(f.prototype),f.installIn=function(e){var t=new this;e.keyBinding.addKeyboardHandler(t),e.commands.addCommands(o)},f.uninstallFrom=function(e){e.commands.removeCommands(o);var t=e.getKeyboardHandler();t.isOccurHandler&&e.keyBinding.removeKeyboardHandler(t)},t.occurStartCommand=s}),ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"],function(e,t,n){function u(e){this.$iSearch=e}var r=e("../config"),i=e("../lib/oop"),s=e("../keyboard/hash_handler").HashHandler,o=e("./occur_commands").occurStartCommand;t.iSearchStartCommands=[{name:"iSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e,t){r.loadModule(["core","ace/incremental_search"],function(n){var r=n.iSearch=n.iSearch||new n.IncrementalSearch;r.activate(e,t.backwards),t.jumpToFirstMatch&&r.next(t)})},readOnly:!0},{name:"iSearchBackwards",exec:function(e,t){e.execCommand("iSearch",{backwards:!0})},readOnly:!0},{name:"iSearchAndGo",bindKey:{win:"Ctrl-K",mac:"Command-G"},exec:function(e,t){e.execCommand("iSearch",{jumpToFirstMatch:!0,useCurrentOrPrevSearch:!0})},readOnly:!0},{name:"iSearchBackwardsAndGo",bindKey:{win:"Ctrl-Shift-K",mac:"Command-Shift-G"},exec:function(e){e.execCommand("iSearch",{jumpToFirstMatch:!0,backwards:!0,useCurrentOrPrevSearch:!0})},readOnly:!0}],t.iSearchCommands=[{name:"restartSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e){e.cancelSearch(!0)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"searchForward",bindKey:{win:"Ctrl-S|Ctrl-K",mac:"Ctrl-S|Command-G"},exec:function(e,t){t.useCurrentOrPrevSearch=!0,e.next(t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"searchBackward",bindKey:{win:"Ctrl-R|Ctrl-Shift-K",mac:"Ctrl-R|Command-Shift-G"},exec:function(e,t){t.useCurrentOrPrevSearch=!0,t.backwards=!0,e.next(t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"extendSearchTerm",exec:function(e,t){e.addString(t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"extendSearchTermSpace",bindKey:"space",exec:function(e){e.addString(" ")},readOnly:!0,isIncrementalSearchCommand:!0},{name:"shrinkSearchTerm",bindKey:"backspace",exec:function(e){e.removeChar()},readOnly:!0,isIncrementalSearchCommand:!0},{name:"confirmSearch",bindKey:"return",exec:function(e){e.deactivate()},readOnly:!0,isIncrementalSearchCommand:!0},{name:"cancelSearch",bindKey:"esc|Ctrl-G",exec:function(e){e.deactivate(!0)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"occurisearch",bindKey:"Ctrl-O",exec:function(e){var t=i.mixin({},e.$options);e.deactivate(),o.exec(e.$editor,t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"yankNextWord",bindKey:"Ctrl-w",exec:function(e){var t=e.$editor,n=t.selection.getRangeOfMovements(function(e){e.moveCursorWordRight()}),r=t.session.getTextRange(n);e.addString(r)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"yankNextChar",bindKey:"Ctrl-Alt-y",exec:function(e){var t=e.$editor,n=t.selection.getRangeOfMovements(function(e){e.moveCursorRight()}),r=t.session.getTextRange(n);e.addString(r)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"recenterTopBottom",bindKey:"Ctrl-l",exec:function(e){e.$editor.execCommand("recenterTopBottom")},readOnly:!0,isIncrementalSearchCommand:!0},{name:"selectAllMatches",bindKey:"Ctrl-space",exec:function(e){var t=e.$editor,n=t.session.$isearchHighlight,r=n&&n.cache?n.cache.reduce(function(e,t){return e.concat(t?t:[])},[]):[];e.deactivate(!1),r.forEach(t.selection.addRange.bind(t.selection))},readOnly:!0,isIncrementalSearchCommand:!0},{name:"searchAsRegExp",bindKey:"Alt-r",exec:function(e){e.convertNeedleToRegExp()},readOnly:!0,isIncrementalSearchCommand:!0}],i.inherits(u,s),function(){this.attach=function(e){var n=this.$iSearch;s.call(this,t.iSearchCommands,e.commands.platform),this.$commandExecHandler=e.commands.addEventListener("exec",function(e){return e.command.isIncrementalSearchCommand?(e.stopPropagation(),e.preventDefault(),e.command.exec(n,e.args||{})):undefined})},this.detach=function(e){if(!this.$commandExecHandler)return;e.commands.removeEventListener("exec",this.$commandExecHandler),delete this.$commandExecHandler};var e=this.handleKeyboard;this.handleKeyboard=function(t,n,r,i){if((n===1||n===8)&&r==="v"||n===1&&r==="y")return null;var s=e.call(this,t,n,r,i);if(s.command)return s;if(n==-1){var o=this.commands.extendSearchTerm;if(o)return{command:o,args:r}}return{command:"null",passEvent:n==0||n==4}}}.call(u.prototype),t.IncrementalSearchKeyboardHandler=u}),ace.define("ace/incremental_search",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"],function(e,t,n){"use strict";function f(){this.$options={wrap:!1,skipCurrent:!1},this.$keyboardHandler=new a(this)}function l(e){return e instanceof RegExp}function c(e){var t=String(e),n=t.indexOf("/"),r=t.lastIndexOf("/");return{expression:t.slice(n+1,r),flags:t.slice(r+1)}}function h(e,t){try{return new RegExp(e,t)}catch(n){return e}}function p(e){return h(e.expression,e.flags)}var r=e("./lib/oop"),i=e("./range").Range,s=e("./search").Search,o=e("./search_highlight").SearchHighlight,u=e("./commands/incremental_search_commands"),a=u.IncrementalSearchKeyboardHandler;r.inherits(f,s),function(){this.activate=function(e,t){this.$editor=e,this.$startPos=this.$currentPos=e.getCursorPosition(),this.$options.needle="",this.$options.backwards=t,e.keyBinding.addKeyboardHandler(this.$keyboardHandler),this.$originalEditorOnPaste=e.onPaste,e.onPaste=this.onPaste.bind(this),this.$mousedownHandler=e.addEventListener("mousedown",this.onMouseDown.bind(this)),this.selectionFix(e),this.statusMessage(!0)},this.deactivate=function(e){this.cancelSearch(e);var t=this.$editor;t.keyBinding.removeKeyboardHandler(this.$keyboardHandler),this.$mousedownHandler&&(t.removeEventListener("mousedown",this.$mousedownHandler),delete this.$mousedownHandler),t.onPaste=this.$originalEditorOnPaste,this.message("")},this.selectionFix=function(e){e.selection.isEmpty()&&!e.session.$emacsMark&&e.clearSelection()},this.highlight=function(e){var t=this.$editor.session,n=t.$isearchHighlight=t.$isearchHighlight||t.addDynamicMarker(new o(null,"ace_isearch-result","text"));n.setRegexp(e),t._emit("changeBackMarker")},this.cancelSearch=function(e){var t=this.$editor;return this.$prevNeedle=this.$options.needle,this.$options.needle="",e?(t.moveCursorToPosition(this.$startPos),this.$currentPos=this.$startPos):t.pushEmacsMark&&t.pushEmacsMark(this.$startPos,!1),this.highlight(null),i.fromPoints(this.$currentPos,this.$currentPos)},this.highlightAndFindWithNeedle=function(e,t){if(!this.$editor)return null;var n=this.$options;t&&(n.needle=t.call(this,n.needle||"")||"");if(n.needle.length===0)return this.statusMessage(!0),this.cancelSearch(!0);n.start=this.$currentPos;var r=this.$editor.session,s=this.find(r),o=this.$editor.emacsMark?!!this.$editor.emacsMark():!this.$editor.selection.isEmpty();return s&&(n.backwards&&(s=i.fromPoints(s.end,s.start)),this.$editor.selection.setRange(i.fromPoints(o?this.$startPos:s.end,s.end)),e&&(this.$currentPos=s.end),this.highlight(n.re)),this.statusMessage(s),s},this.addString=function(e){return this.highlightAndFindWithNeedle(!1,function(t){if(!l(t))return t+e;var n=c(t);return n.expression+=e,p(n)})},this.removeChar=function(e){return this.highlightAndFindWithNeedle(!1,function(e){if(!l(e))return e.substring(0,e.length-1);var t=c(e);return t.expression=t.expression.substring(0,t.expression.length-1),p(t)})},this.next=function(e){return e=e||{},this.$options.backwards=!!e.backwards,this.$currentPos=this.$editor.getCursorPosition(),this.highlightAndFindWithNeedle(!0,function(t){return e.useCurrentOrPrevSearch&&t.length===0?this.$prevNeedle||"":t})},this.onMouseDown=function(e){return this.deactivate(),!0},this.onPaste=function(e){this.addString(e)},this.convertNeedleToRegExp=function(){return this.highlightAndFindWithNeedle(!1,function(e){return l(e)?e:h(e,"ig")})},this.convertNeedleToString=function(){return this.highlightAndFindWithNeedle(!1,function(e){return l(e)?c(e).expression:e})},this.statusMessage=function(e){var t=this.$options,n="";n+=t.backwards?"reverse-":"",n+="isearch: "+t.needle,n+=e?"":" (not found)",this.message(n)},this.message=function(e){this.$editor.showCommandLine?(this.$editor.showCommandLine(e),this.$editor.focus()):console.log(e)}}.call(f.prototype),t.IncrementalSearch=f;var d=e("./lib/dom");d.importCssString&&d.importCssString(".ace_marker-layer .ace_isearch-result { position: absolute; z-index: 6; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}div.ace_isearch-result { border-radius: 4px; background-color: rgba(255, 200, 0, 0.5); box-shadow: 0 0 4px rgb(255, 200, 0);}.ace_dark div.ace_isearch-result { background-color: rgb(100, 110, 160); box-shadow: 0 0 4px rgb(80, 90, 140);}","incremental-search-highlighting");var v=e("./commands/command_manager");(function(){this.setupIncrementalSearch=function(e,t){if(this.usesIncrementalSearch==t)return;this.usesIncrementalSearch=t;var n=u.iSearchStartCommands,r=t?"addCommands":"removeCommands";this[r](n)}}).call(v.CommandManager.prototype);var m=e("./editor").Editor;e("./config").defineOptions(m.prototype,"editor",{useIncrementalSearch:{set:function(e){this.keyBinding.$handlers.forEach(function(t){t.setupIncrementalSearch&&t.setupIncrementalSearch(this,e)}),this._emit("incrementalSearchSettingChanged",{isEnabled:e})}}})}),ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../lib/dom");e("../incremental_search");var i=e("../commands/incremental_search_commands"),s=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.floor((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(i,r)},o=e("./hash_handler").HashHandler;t.handler=new o,t.handler.isEmacs=!0,t.handler.$id="ace/keyboard/emacs";var u=!1,a,f;t.handler.attach=function(e){u||(u=!0,r.importCssString(" .emacs-mode .ace_cursor{ border: 1px rgba(50,250,50,0.8) solid!important; -moz-box-sizing: border-box!important; -webkit-box-sizing: border-box!important; box-sizing: border-box!important; background-color: rgba(0,250,0,0.9); opacity: 0.5; } .emacs-mode .ace_hidden-cursors .ace_cursor{ opacity: 1; background-color: transparent; } .emacs-mode .ace_overwrite-cursors .ace_cursor { opacity: 1; background-color: transparent; border-width: 0 0 2px 2px !important; } .emacs-mode .ace_text-layer { z-index: 4 } .emacs-mode .ace_cursor-layer { z-index: 2 }","emacsMode")),a=e.session.$selectLongWords,e.session.$selectLongWords=!0,f=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.$emacsMark=null,e.session.$emacsMarkRing=e.session.$emacsMarkRing||[],e.emacsMark=function(){return this.session.$emacsMark},e.setEmacsMark=function(e){this.session.$emacsMark=e},e.pushEmacsMark=function(e,t){var n=this.session.$emacsMark;n&&this.session.$emacsMarkRing.push(n),!e||t?this.setEmacsMark(e):this.session.$emacsMarkRing.push(e)},e.popEmacsMark=function(){var e=this.emacsMark();return e?(this.setEmacsMark(null),e):this.session.$emacsMarkRing.pop()},e.getLastEmacsMark=function(e){return this.session.$emacsMark||this.session.$emacsMarkRing.slice(-1)[0]},e.emacsMarkForSelection=function(e){var t=this.selection,n=this.multiSelect?this.multiSelect.getAllRanges().length:1,r=t.index||0,i=this.session.$emacsMarkRing,s=i.length-(n-r),o=i[s]||t.anchor;return e&&i.splice(s,1,"row"in e&&"column"in e?e:undefined),o},e.on("click",c),e.on("changeSession",l),e.renderer.screenToTextCoordinates=s,e.setStyle("emacs-mode"),e.commands.addCommands(v),t.handler.platform=e.commands.platform,e.$emacsModeHandler=this,e.addEventListener("copy",this.onCopy),e.addEventListener("paste",this.onPaste)},t.handler.detach=function(e){delete e.renderer.screenToTextCoordinates,e.session.$selectLongWords=a,e.session.$useEmacsStyleLineStart=f,e.removeEventListener("click",c),e.removeEventListener("changeSession",l),e.unsetStyle("emacs-mode"),e.commands.removeCommands(v),e.removeEventListener("copy",this.onCopy),e.removeEventListener("paste",this.onPaste),e.$emacsModeHandler=null};var l=function(e){e.oldSession&&(e.oldSession.$selectLongWords=a,e.oldSession.$useEmacsStyleLineStart=f),a=e.session.$selectLongWords,e.session.$selectLongWords=!0,f=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.hasOwnProperty("$emacsMark")||(e.session.$emacsMark=null),e.session.hasOwnProperty("$emacsMarkRing")||(e.session.$emacsMarkRing=[])},c=function(e){e.editor.session.$emacsMark=null},h=e("../lib/keys").KEY_MODS,p={C:"ctrl",S:"shift",M:"alt",CMD:"command"},d=["C-S-M-CMD","S-M-CMD","C-M-CMD","C-S-CMD","C-S-M","M-CMD","S-CMD","S-M","C-CMD","C-M","C-S","CMD","M","S","C"];d.forEach(function(e){var t=0;e.split("-").forEach(function(e){t|=h[p[e]]}),p[t]=e.toLowerCase()+"-"}),t.handler.onCopy=function(e,n){if(n.$handlesEmacsOnCopy)return;n.$handlesEmacsOnCopy=!0,t.handler.commands.killRingSave.exec(n),n.$handlesEmacsOnCopy=!1},t.handler.onPaste=function(e,t){t.pushEmacsMark(t.getCursorPosition())},t.handler.bindKey=function(e,t){typeof e=="object"&&(e=e[this.platform]);if(!e)return;var n=this.commandKeyBinding;e.split("|").forEach(function(e){e=e.toLowerCase(),n[e]=t;var r=e.split(" ").slice(0,-1);r.reduce(function(e,t,n){var r=e[n-1]?e[n-1]+" ":"";return e.concat([r+t])},[]).forEach(function(e){n[e]||(n[e]="null")})},this)},t.handler.getStatusText=function(e,t){var n="";return t.count&&(n+=t.count),t.keyChain&&(n+=" "+t.keyChain),n},t.handler.handleKeyboard=function(e,t,n,r){if(r===-1)return undefined;var i=e.editor;i._signal("changeStatus");if(t==-1){i.pushEmacsMark();if(e.count){var s=(new Array(e.count+1)).join(n);return e.count=null,{command:"insertstring",args:s}}}var o=p[t];if(o=="c-"||e.count){var u=parseInt(n[n.length-1]);if(typeof u=="number"&&!isNaN(u))return e.count=Math.max(e.count,0)||0,e.count=10*e.count+u,{command:"null"}}o&&(n=o+n),e.keyChain&&(n=e.keyChain+=" "+n);var a=this.commandKeyBinding[n];e.keyChain=a=="null"?n:"";if(!a)return undefined;if(a==="null")return{command:"null"};if(a==="universalArgument")return e.count=-4,{command:"null"};var f;typeof a!="string"&&(f=a.args,a.command&&(a=a.command),a==="goorselect"&&(a=i.emacsMark()?f[1]:f[0],f=null));if(typeof a=="string"){(a==="insertstring"||a==="splitline"||a==="togglecomment")&&i.pushEmacsMark(),a=this.commands[a]||i.commands.commands[a];if(!a)return undefined}!a.readOnly&&!a.isYank&&(e.lastCommand=null),!a.readOnly&&i.emacsMark()&&i.setEmacsMark(null);if(e.count){var u=e.count;e.count=0;if(!a||!a.handlesCount)return{args:f,command:{exec:function(e,t){for(var n=0;n<u;n++)a.exec(e,t)},multiSelectAction:a.multiSelectAction}};f||(f={}),typeof f=="object"&&(f.count=u)}return{command:a,args:f}},t.emacsKeys={"Up|C-p":{command:"goorselect",args:["golineup","selectup"]},"Down|C-n":{command:"goorselect",args:["golinedown","selectdown"]},"Left|C-b":{command:"goorselect",args:["gotoleft","selectleft"]},"Right|C-f":{command:"goorselect",args:["gotoright","selectright"]},"C-Left|M-b":{command:"goorselect",args:["gotowordleft","selectwordleft"]},"C-Right|M-f":{command:"goorselect",args:["gotowordright","selectwordright"]},"Home|C-a":{command:"goorselect",args:["gotolinestart","selecttolinestart"]},"End|C-e":{command:"goorselect",args:["gotolineend","selecttolineend"]},"C-Home|S-M-,":{command:"goorselect",args:["gotostart","selecttostart"]},"C-End|S-M-.":{command:"goorselect",args:["gotoend","selecttoend"]},"S-Up|S-C-p":"selectup","S-Down|S-C-n":"selectdown","S-Left|S-C-b":"selectleft","S-Right|S-C-f":"selectright","S-C-Left|S-M-b":"selectwordleft","S-C-Right|S-M-f":"selectwordright","S-Home|S-C-a":"selecttolinestart","S-End|S-C-e":"selecttolineend","S-C-Home":"selecttostart","S-C-End":"selecttoend","C-l":"recenterTopBottom","M-s":"centerselection","M-g":"gotoline","C-x C-p":"selectall","C-Down":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"C-Up":{command:"goorselect",args:["gotopageup","selectpageup"]},"PageDown|C-v":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"PageUp|M-v":{command:"goorselect",args:["gotopageup","selectpageup"]},"S-C-Down":"selectpagedown","S-C-Up":"selectpageup","C-s":"iSearch","C-r":"iSearchBackwards","M-C-s":"findnext","M-C-r":"findprevious","S-M-5":"replace",Backspace:"backspace","Delete|C-d":"del","Return|C-m":{command:"insertstring",args:"\n"},"C-o":"splitline","M-d|C-Delete":{command:"killWord",args:"right"},"C-Backspace|M-Backspace|M-Delete":{command:"killWord",args:"left"},"C-k":"killLine","C-y|S-Delete":"yank","M-y":"yankRotate","C-g":"keyboardQuit","C-w|C-S-W":"killRegion","M-w":"killRingSave","C-Space":"setMark","C-x C-x":"exchangePointAndMark","C-t":"transposeletters","M-u":"touppercase","M-l":"tolowercase","M-/":"autocomplete","C-u":"universalArgument","M-;":"togglecomment","C-/|C-x u|S-C--|C-z":"undo","S-C-/|S-C-x u|C--|S-C-z":"redo","C-x r":"selectRectangularRegion","M-x":{command:"focusCommandLine",args:"M-x "}},t.handler.bindKeys(t.emacsKeys),t.handler.addCommands({recenterTopBottom:function(e){var t=e.renderer,n=t.$cursorLayer.getPixelPosition(),r=t.$size.scrollerHeight-t.lineHeight,i=t.scrollTop;Math.abs(n.top-i)<2?i=n.top-r:Math.abs(n.top-i-r*.5)<2?i=n.top:i=n.top-r*.5,e.session.setScrollTop(i)},selectRectangularRegion:function(e){e.multiSelect.toggleBlockSelection()},setMark:{exec:function(e,t){function u(){var t=e.popEmacsMark();t&&e.moveCursorToPosition(t)}if(t&&t.count){e.inMultiSelectMode?e.forEachSelection(u):u(),u();return}var n=e.emacsMark(),r=e.selection.getAllRanges(),i=r.map(function(e){return{row:e.start.row,column:e.start.column}}),s=!0,o=r.every(function(e){return e.isEmpty()});if(s&&(n||!o)){e.inMultiSelectMode?e.forEachSelection({exec:e.clearSelection.bind(e)}):e.clearSelection(),n&&e.pushEmacsMark(null);return}if(!n){i.forEach(function(t){e.pushEmacsMark(t)}),e.setEmacsMark(i[i.length-1]);return}},readOnly:!0,handlesCount:!0},exchangePointAndMark:{exec:function(t,n){var r=t.selection;if(!n.count&&!r.isEmpty()){r.setSelectionRange(r.getRange(),!r.isBackwards());return}if(n.count){var i={row:r.lead.row,column:r.lead.column};r.clearSelection(),r.moveCursorToPosition(t.emacsMarkForSelection(i))}else r.selectToPosition(t.emacsMarkForSelection())},readOnly:!0,handlesCount:!0,multiSelectAction:"forEach"},killWord:{exec:function(e,n){e.clearSelection(),n=="left"?e.selection.selectWordLeft():e.selection.selectWordRight();var r=e.getSelectionRange(),i=e.session.getTextRange(r);t.killRing.add(i),e.session.remove(r),e.clearSelection()},multiSelectAction:"forEach"},killLine:function(e){e.pushEmacsMark(null);var n=e.getCursorPosition();n.column===0&&e.session.doc.getLine(n.row).length===0?e.selection.selectLine():(e.clearSelection(),e.selection.selectLineEnd());var r=e.getSelectionRange(),i=e.session.getTextRange(r);t.killRing.add(i),e.session.remove(r),e.clearSelection()},yank:function(e){e.onPaste(t.killRing.get()||""),e.keyBinding.$data.lastCommand="yank"},yankRotate:function(e){if(e.keyBinding.$data.lastCommand!="yank")return;e.undo(),e.session.$emacsMarkRing.pop(),e.onPaste(t.killRing.rotate()),e.keyBinding.$data.lastCommand="yank"},killRegion:{exec:function(e){t.killRing.add(e.getCopyText()),e.commands.byName.cut.exec(e)},readOnly:!0,multiSelectAction:"forEach"},killRingSave:{exec:function(e){e.$handlesEmacsOnCopy=!0;var n=e.session.$emacsMarkRing.slice(),r=[];t.killRing.add(e.getCopyText()),setTimeout(function(){function t(){var t=e.selection,n=t.getRange(),i=t.isBackwards()?n.end:n.start;r.push({row:i.row,column:i.column}),t.clearSelection()}e.$handlesEmacsOnCopy=!1,e.inMultiSelectMode?e.forEachSelection({exec:t}):t(),e.session.$emacsMarkRing=n.concat(r.reverse())},0)},readOnly:!0},keyboardQuit:function(e){e.selection.clearSelection(),e.setEmacsMark(null),e.keyBinding.$data.count=null},focusCommandLine:function(e,t){e.showCommandLine&&e.showCommandLine(t)}}),t.handler.addCommands(i.iSearchStartCommands);var v=t.handler.commands;v.yank.isYank=!0,v.yankRotate.isYank=!0,t.killRing={$data:[],add:function(e){e&&this.$data.push(e),this.$data.length>30&&this.$data.shift()},get:function(e){return e=e||1,this.$data.slice(this.$data.length-e,this.$data.length).reverse().join("\n")},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}})
js/ace/src-min-noconflict/keybinding-vim.js ADDED
@@ -0,0 +1 @@
 
1
+ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/multi_select"],function(e,t,n){"use strict";function r(){function t(e){return typeof e!="object"?e+"":"line"in e?e.line+":"+e.ch:"anchor"in e?t(e.anchor)+"->"+t(e.head):Array.isArray(e)?"["+e.map(function(e){return t(e)})+"]":JSON.stringify(e)}var e="";for(var n=0;n<arguments.length;n++){var r=arguments[n],i=t(r);e+=i+" "}console.log(e)}function v(e){return{row:e.line,column:e.ch}}function m(e){return new b(e.row,e.column)}function T(e){var t=e.keyCode;if(w.indexOf(t)!=-1)return;var n=e.ctrlKey||e.metaKey,r=d.keyNames[t];r=E[r]||r;var i="";e.ctrlKey&&(i+="C-"),e.altKey&&(i+="A-");if(S&&e.metaKey||!n&&e.shiftKey&&r.length<2)return;return e.shiftKey&&!/^[A-Za-z]$/.test(r)&&(i+="S-"),r.length==1&&(r=r.toLowerCase()),i+=r,i.length>1&&(i="<"+i+">"),i}function N(e,t){var n=T(t);if(!n)return;d.signal(e,"vim-keypress",n),d.Vim.handleKey(e,n,"user")&&d.e_stop(t)}function C(e,t){var n=t.charCode||t.keyCode;if(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey&&n<32)return;var r=String.fromCharCode(n);d.signal(e,"vim-keypress",r),d.Vim.handleKey(e,r,"user")&&d.e_stop(t)}function k(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),d.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",Rn),tt(e),d.on(e.getInputField(),"paste",M(e)),e.on("keypress",C),e.on("keydown",N)}function L(e){e.setOption("disableInput",!1),e.off("cursorActivity",Rn),d.off(e.getInputField(),"paste",M(e)),e.state.vim=null,e.off("keypress",C),e.off("keydown",N)}function A(e,t){this==d.keyMap.vim&&d.rmClass(e.getWrapperElement(),"cm-fat-cursor"),(!t||t.attach!=O)&&L(e,!1)}function O(e,t){this==d.keyMap.vim&&d.addClass(e.getWrapperElement(),"cm-fat-cursor"),(!t||t.attach!=O)&&k(e)}function M(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(yt(e.getCursor(),0,1)),vt.enterInsertMode(e,{},t))}),t.onPasteFn}function H(e,t){var n=[];for(var r=e;r<e+t;r++)n.push(String.fromCharCode(r));return n}function R(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function U(e){return/^[a-z]$/.test(e)}function z(e){return"()[]{}".indexOf(e)!=-1}function W(e){return _.test(e)}function X(e){return/^[A-Z]$/.test(e)}function V(e){return/^\s*$/.test(e)}function $(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}function K(e,t,n){if(t===undefined)throw Error("defaultValue is required");n||(n="string");var r=e;typeof e=="string"?r={type:n,defaultValue:t}:e=r.name,J[e]=r,Q(e,t)}function Q(e,t,n){var r=J[e];if(!r)throw Error("Unknown option: "+e);if(r.type=="boolean"){if(t&&t!==!0)throw Error("Invalid argument: "+e+"="+t);t!==!1&&(t=!0)}r.value=t,r.set&&r.set(t,n)}function G(e){var t=J[e];if(!t)throw Error("Unknown option: "+e);return t.value}function et(){this.latestRegister=undefined,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=undefined,this.lastInsertModeChanges=Z()}function tt(e){return e.state.vim||(e.state.vim={inputState:new ot,lastEditInputState:undefined,lastEditActionCommand:undefined,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:undefined,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{}}),e.state.vim}function rt(){nt={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:undefined,jumpList:Y(),macroModeState:new et,lastChararacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new ft({}),searchHistoryController:new lt({}),exCommandHistoryController:new lt({})};for(var e in J){var t=J[e];t.value=t.defaultValue}}function ot(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function ut(e,t){e.state.vim.inputState=new ot,d.signal(e,"vim-command-done",t)}function at(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function ft(e){this.registers=e,this.unnamedRegister=e['"']=new at,e["."]=new at,e[":"]=new at,e["/"]=new at}function lt(){this.historyBuffer=[],this.iterator,this.initialPrefix=null}function pt(e,t){var n=[];for(var r=0;r<t;r++)n.push(e);return n}function mt(e,t,n){var r=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),i=Ot(e,r)-1;i=n?i+1:i;var s=Math.min(Math.max(0,t.ch),i);return b(r,s)}function gt(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function yt(e,t,n){return typeof t=="object"&&(n=t.ch,t=t.line),b(e.line+t,e.ch+n)}function bt(e,t){return{line:t.line-e.line,ch:t.line-e.line}}function wt(e,t,n,r){var i,s=[],o=[];for(var u=0;u<t.length;u++){var a=t[u];if(n=="insert"&&a.context!="insert"||a.context&&a.context!=n||r.operator&&a.type=="action"||!(i=Et(e,a.keys)))continue;i=="partial"&&s.push(a),i=="full"&&o.push(a)}return{partial:s.length&&s,full:o.length&&o}}function Et(e,t){if(t.slice(-11)=="<character>"){var n=t.length-11,r=e.slice(0,n),i=t.slice(0,n);return r==i&&e.length>n?"full":i.indexOf(r)==0?"partial":!1}return e==t?"full":t.indexOf(e)==0?"partial":!1}function St(e){var t=/^.*(<[\w\-]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"<CR>":n="\n";break;case"<Space>":n=" ";break;default:}return n}function xt(e,t,n){return function(){for(var r=0;r<n;r++)t(e)}}function Tt(e){return b(e.line,e.ch)}function Nt(e,t){return e.ch==t.ch&&e.line==t.line}function Ct(e,t){return e.line<t.line?!0:e.line==t.line&&e.ch<t.ch?!0:!1}function kt(e,t){return arguments.length>2&&(t=kt.apply(undefined,Array.prototype.slice.call(arguments,1))),Ct(e,t)?e:t}function Lt(e,t){return arguments.length>2&&(t=Lt.apply(undefined,Array.prototype.slice.call(arguments,1))),Ct(e,t)?t:e}function At(e,t,n){var r=Ct(e,t),i=Ct(t,n);return r&&i}function Ot(e,t){return e.getLine(t).length}function Mt(e){return e.split("").reverse().join("")}function _t(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Dt(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Pt(e,t,n){var r=Ot(e,t),i=(new Array(n-r+1)).join(" ");e.setCursor(b(t,r)),e.replaceRange(i,e.getCursor())}function Ht(e,t){var n=[],r=e.listSelections(),i=Tt(e.clipPos(t)),s=!Nt(t,i),o=e.getCursor("head"),u=jt(r,o),a=Nt(r[u].head,r[u].anchor),f=r.length-1,l=f-u>u?f:0,c=r[l].anchor,h=Math.min(c.line,i.line),p=Math.max(c.line,i.line),d=c.ch,v=i.ch,m=r[l].head.ch-d,g=v-d;m>0&&g<=0?(d++,s||v--):m<0&&g>=0?(d--,a||v++):m<0&&g==-1&&(d--,v++);for(var y=h;y<=p;y++){var w={anchor:new b(y,d),head:new b(y,v)};n.push(w)}return u=i.line==p?n.length-1:0,e.setSelections(n),t.ch=v,c.ch=d,c}function Bt(e,t,n){var r=[];for(var i=0;i<n;i++){var s=yt(t,i,0);r.push({anchor:s,head:s})}e.setSelections(r,0)}function jt(e,t,n){for(var r=0;r<e.length;r++){var i=n!="head"&&Nt(e[r].anchor,t),s=n!="anchor"&&Nt(e[r].head,t);if(i||s)return r}return-1}function Ft(e,t){var n=t.lastSelection,r=function(){var t=e.listSelections(),n=t[0],r=t[t.length-1],i=Ct(n.anchor,n.head)?n.anchor:n.head,s=Ct(r.anchor,r.head)?r.head:r.anchor;return[i,s]},i=function(){var t=e.getCursor(),r=e.getCursor(),i=n.visualBlock;if(i){var s=i.width,o=i.height;r=b(t.line+o,t.ch+s);var u=[];for(var a=t.line;a<r.line;a++){var f=b(a,t.ch),l=b(a,r.ch),c={anchor:f,head:l};u.push(c)}e.setSelections(u)}else{var h=n.anchorMark.find(),p=n.headMark.find(),d=p.line-h.line,v=p.ch-h.ch;r={line:r.line+d,ch:d?r.ch:v+r.ch},n.visualLine&&(t=b(t.line,0),r=b(r.line,Ot(e,r.line))),e.setSelection(t,r)}return[t,r]};return t.visualMode?r():i()}function It(e,t){var n=t.sel.anchor,r=t.sel.head;t.lastPastedText&&(r=e.posFromIndex(e.indexFromPos(n)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(n),headMark:e.setBookmark(r),anchor:Tt(n),head:Tt(r),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function qt(e,t,n){var r=e.state.vim.sel,i=r.head,s=r.anchor,o;return Ct(n,t)&&(o=n,n=t,t=o),Ct(i,s)?(i=kt(t,i),s=Lt(s,n)):(s=kt(t,s),i=Lt(i,n),i=yt(i,0,-1),i.ch==-1&&i.line!=e.firstLine()&&(i=b(i.line-1,Ot(e,i.line-1)))),[s,i]}function Rt(e,t,n){var r=e.state.vim;t=t||r.sel;var n=n||r.visualLine?"line":r.visualBlock?"block":"char",i=Ut(e,t,n);e.setSelections(i.ranges,i.primary),Un(e)}function Ut(e,t,n,r){var i=Tt(t.head),s=Tt(t.anchor);if(n=="char"){var o=!r&&!Ct(t.head,t.anchor)?1:0,u=Ct(t.head,t.anchor)?1:0;return i=yt(t.head,0,o),s=yt(t.anchor,0,u),{ranges:[{anchor:s,head:i}],primary:0}}if(n=="line"){if(!Ct(t.head,t.anchor)){s.ch=0;var a=e.lastLine();i.line>a&&(i.line=a),i.ch=Ot(e,i.line)}else i.ch=0,s.ch=Ot(e,s.line);return{ranges:[{anchor:s,head:i}],primary:0}}if(n=="block"){var f=Math.min(s.line,i.line),l=Math.min(s.ch,i.ch),c=Math.max(s.line,i.line),h=Math.max(s.ch,i.ch)+1,p=c-f+1,d=i.line==f?0:p-1,v=[];for(var m=0;m<p;m++)v.push({anchor:b(f+m,l),head:b(f+m,h)});return{ranges:v,primary:d}}}function zt(e){var t=e.getCursor("head");return e.getSelection().length==1&&(t=kt(t,e.getCursor("anchor"))),t}function Wt(e,t){var n=e.state.vim;t!==!1&&e.setCursor(mt(e,n.sel.head)),It(e,n),n.visualMode=!1,n.visualLine=!1,n.visualBlock=!1,d.signal(e,"vim-mode-change",{mode:"normal"}),n.fakeCursor&&n.fakeCursor.clear()}function Xt(e,t,n){var r=e.getRange(t,n);if(/\n\s*$/.test(r)){var i=r.split("\n");i.pop();var s;for(var s=i.pop();i.length>0&&s&&V(s);s=i.pop())n.line--,n.ch=0;s?(n.line--,n.ch=Ot(e,n.line)):n.ch=0}}function Vt(e,t,n){t.ch=0,n.ch=0,n.line++}function $t(e){if(!e)return 0;var t=e.search(/\S/);return t==-1?e.length:t}function Jt(e,t,n,r,i){var s=zt(e),o=e.getLine(s.line),u=s.ch,a=o.substring(u),f;i?f=a.search(/\w/):f=a.search(/\S/);if(f==-1)return null;u+=f,a=o.substring(u);var l=o.substring(0,u),c;r?c=/^\S+/:/\w/.test(o.charAt(u))?c=/^\w+/:c=/^[^\w\s]+/;var h=c.exec(a),p=u,d=u+h[0].length,v=Mt(l),m=c.exec(v);m&&(p-=m[0].length);if(t){var g=o.substring(d),y=g.match(/^\s*/)[0].length;if(y>0)d+=y;else{var w=v.length-p,E=v.substring(w),S=E.match(/^\s*/)[0].length;p-=S}}return{start:b(s.line,p),end:b(s.line,d)}}function Kt(e,t,n){Nt(t,n)||nt.jumpList.add(e,t,n)}function Qt(e,t){nt.lastChararacterSearch.increment=e,nt.lastChararacterSearch.forward=t.forward,nt.lastChararacterSearch.selectedCharacter=t.selectedCharacter}function Zt(e,t,n,r){var i=Tt(e.getCursor()),s=n?1:-1,o=n?e.lineCount():-1,u=i.ch,a=i.line,f=e.getLine(a),l={lineText:f,nextCh:f.charAt(u),lastCh:null,index:u,symb:r,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[r],forward:n,depth:0,curMoveThrough:!1},c=Gt[r];if(!c)return i;var h=Yt[c].init,p=Yt[c].isComplete;h&&h(l);while(a!==o&&t){l.index+=s,l.nextCh=l.lineText.charAt(l.index);if(!l.nextCh){a+=s,l.lineText=e.getLine(a)||"";if(s>0)l.index=0;else{var d=l.lineText.length;l.index=d>0?d-1:0}l.nextCh=l.lineText.charAt(l.index)}p(l)&&(i.line=a,i.ch=l.index,t--)}return l.nextCh||l.curMoveThrough?b(a,l.index):i}function en(e,t,n,r,i){var s=t.line,o=t.ch,u=e.getLine(s),a=n?1:-1,f=r?P:D;if(i&&u==""){s+=a,u=e.getLine(s);if(!R(e,s))return null;o=n?0:u.length}for(;;){if(i&&u=="")return{from:0,to:0,line:s};var l=a>0?u.length:-1,c=l,h=l;while(o!=l){var p=!1;for(var d=0;d<f.length&&!p;++d)if(f[d].test(u.charAt(o))){c=o;while(o!=l&&f[d].test(u.charAt(o)))o+=a;h=o,p=c!=h;if(c==t.ch&&s==t.line&&h==c+a)continue;return{from:Math.min(c,h+1),to:Math.max(c,h),line:s}}p||(o+=a)}s+=a;if(!R(e,s))return null;u=e.getLine(s),o=a>0?0:u.length}throw new Error("The impossible happened.")}function tn(e,t,n,r,i,s){var o=Tt(t),u=[];(r&&!i||!r&&i)&&n++;var a=!r||!i;for(var f=0;f<n;f++){var l=en(e,t,r,s,a);if(!l){var c=Ot(e,e.lastLine());u.push(r?{line:e.lastLine(),from:c,to:c}:{line:0,from:0,to:0});break}u.push(l),t=b(l.line,r?l.to-1:l.from)}var h=u.length!=n,p=u[0],d=u.pop();return r&&!i?(!h&&(p.from!=o.ch||p.line!=o.line)&&(d=u.pop()),b(d.line,d.from)):r&&i?b(d.line,d.to-1):!r&&i?(!h&&(p.to!=o.ch||p.line!=o.line)&&(d=u.pop()),b(d.line,d.to)):b(d.line,d.from)}function nn(e,t,n,r){var i=e.getCursor(),s=i.ch,o;for(var u=0;u<t;u++){var a=e.getLine(i.line);o=on(s,a,r,n,!0);if(o==-1)return null;s=o}return b(e.getCursor().line,o)}function rn(e,t){var n=e.getCursor().line;return mt(e,b(n,t-1))}function sn(e,t,n,r){if(!$(n,I))return;t.marks[n]&&t.marks[n].clear(),t.marks[n]=e.setBookmark(r)}function on(e,t,n,r,i){var s;return r?(s=t.indexOf(n,e+1),s!=-1&&!i&&(s-=1)):(s=t.lastIndexOf(n,e-1),s!=-1&&!i&&(s+=1)),s}function un(e,t,n,r){var i=t,s,o,u={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[n],a={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[n],f=e.getLine(i.line).charAt(i.ch),l=f===a?1:0;s=e.scanForBracket(b(i.line,i.ch+l),-1,null,{bracketRegex:u}),o=e.scanForBracket(b(i.line,i.ch+l),1,null,{bracketRegex:u});if(!s||!o)return{start:i,end:i};s=s.pos,o=o.pos;if(s.line==o.line&&s.ch>o.ch||s.line>o.line){var c=s;s=o,o=c}return r?o.ch+=1:s.ch+=1,{start:s,end:o}}function an(e,t,n,r){var i=Tt(t),s=e.getLine(i.line),o=s.split(""),u,a,f,l,c=o.indexOf(n);i.ch<c?i.ch=c:c<i.ch&&o[i.ch]==n&&(a=i.ch,--i.ch);if(o[i.ch]==n&&!a)u=i.ch+1;else for(f=i.ch;f>-1&&!u;f--)o[f]==n&&(u=f+1);if(u&&!a)for(f=u,l=o.length;f<l&&!a;f++)o[f]==n&&(a=f);return!u||!a?{start:i,end:i}:(r&&(--u,++a),{start:b(i.line,u),end:b(i.line,a)})}function fn(){}function ln(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new fn)}function cn(e,t,n,r,i){e.openDialog?e.openDialog(t,r,{bottom:!0,value:i.value,onKeyDown:i.onKeyDown,onKeyUp:i.onKeyUp}):r(prompt(n,""))}function hn(e){var t=pn(e)||[];if(!t.length)return[];var n=[];if(t[0]!==0)return;for(var r=0;r<t.length;r++)typeof t[r]=="number"&&n.push(e.substring(t[r]+1,t[r+1]));return n}function pn(e){var t=!1,n=[];for(var r=0;r<e.length;r++){var i=e.charAt(r);!t&&i=="/"&&n.push(r),t=!t&&i=="\\"}return n}function dn(e){var t="|(){",n="}",r=!1,i=[];for(var s=-1;s<e.length;s++){var o=e.charAt(s)||"",u=e.charAt(s+1)||"",a=u&&t.indexOf(u)!=-1;r?((o!=="\\"||!a)&&i.push(o),r=!1):o==="\\"?(r=!0,u&&n.indexOf(u)!=-1&&(a=!0),(!a||u==="\\")&&i.push(o)):(i.push(o),a&&u!=="\\"&&i.push("\\"))}return i.join("")}function vn(e){var t=!1,n=[];for(var r=-1;r<e.length;r++){var i=e.charAt(r)||"",s=e.charAt(r+1)||"";t?(n.push(i),t=!1):i==="\\"?(t=!0,W(s)||s==="$"?n.push("$"):s!=="/"&&s!=="\\"&&n.push("\\")):(i==="$"&&n.push("$"),n.push(i),s==="/"&&n.push("\\"))}return n.join("")}function mn(e){var t=new d.StringStream(e),n=[];while(!t.eol()){while(t.peek()&&t.peek()!="\\")n.push(t.next());t.match("\\/",!0)?n.push("/"):t.match("\\\\",!0)?n.push("\\"):n.push(t.next())}return n.join("")}function gn(e,t,n){var r=nt.registerController.getRegister("/");r.setText(e);if(e instanceof RegExp)return e;var i=pn(e),s,o;if(!i.length)s=e;else{s=e.substring(0,i[0]);var u=e.substring(i[0]);o=u.indexOf("i")!=-1}if(!s)return null;G("pcre")||(s=dn(s)),n&&(t=/^[^A-Z]*$/.test(s));var a=new RegExp(s,t||o?"i":undefined);return a}function yn(e,t){e.openNotification?e.openNotification('<span style="color: red">'+t+"</span>",{bottom:!0,duration:5e3}):alert(t)}function bn(e,t){var n="";return e&&(n+='<span style="font-family: monospace">'+e+"</span>"),n+='<input type="text"/> <span style="color: #888">',t&&(n+='<span style="color: #888">',n+=t,n+="</span>"),n}function En(e,t){var n=(t.prefix||"")+" "+(t.desc||""),r=bn(t.prefix,t.desc);cn(e,r,n,t.onClose,t)}function Sn(e,t){if(e instanceof RegExp&&t instanceof RegExp){var n=["global","multiline","ignoreCase","source"];for(var r=0;r<n.length;r++){var i=n[r];if(e[i]!==t[i])return!1}return!0}return!1}function xn(e,t,n,r){if(!t)return;var i=ln(e),s=gn(t,!!n,!!r);if(!s)return;return Nn(e,s),Sn(s,i.getQuery())?s:(i.setQuery(s),s)}function Tn(e){if(e.source.charAt(0)=="^")var t=!0;return{token:function(n){if(t&&!n.sol()){n.skipToEnd();return}var r=n.match(e,!1);if(r){if(r[0].length==0)return n.next(),"searching";if(!n.sol()){n.backUp(1);if(!e.exec(n.next()+r[0]))return n.next(),null}return n.match(e),"searching"}while(!n.eol()){n.next();if(n.match(e,!1))break}},query:e}}function Nn(e,t){var n=ln(e).getOverlay();if(!n||t!=n.query)n&&e.removeOverlay(n),n=Tn(t),e.addOverlay(n),ln(e).setOverlay(n)}function Cn(e,t,n,r){return r===undefined&&(r=1),e.operation(function(){var i=e.getCursor(),s=e.getSearchCursor(n,i);for(var o=0;o<r;o++){var u=s.find(t);o==0&&u&&Nt(s.from(),i)&&(u=s.find(t));if(!u){s=e.getSearchCursor(n,t?b(e.lastLine()):b(e.firstLine(),0));if(!s.find(t))return}}return s.from()})}function kn(e){e.removeOverlay(ln(e).getOverlay()),ln(e).setOverlay(null)}function Ln(e,t,n){return typeof e!="number"&&(e=e.line),t instanceof Array?$(e,t):n?e>=t&&e<=n:e==t}function An(e){var t=e.ace.renderer;return{top:t.getFirstFullyVisibleRow(),bottom:t.getLastFullyVisibleRow()}}function Pn(e,t,n,r,i,s,o,u,a){function c(){e.operation(function(){while(!f)h(),p();v()})}function h(){var t=e.getRange(s.from(),s.to()),n=t.replace(o,u);s.replace(n)}function p(){var t;while(t=s.findNext()&&Ln(s.from(),r,i)){if(!n&&l&&s.from().line==l.line)continue;e.scrollIntoView(s.from(),30),e.setSelection(s.from(),s.to()),l=s.from(),f=!1;return}f=!0}function v(t){t&&t(),e.focus();if(l){e.setCursor(l);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=l.ch}a&&a()}function m(t,n,r){d.e_stop(t);var i=d.keyName(t);switch(i){case"Y":h(),p();break;case"N":p();break;case"A":var s=a;a=undefined,e.operation(c),a=s;break;case"L":h();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":v(r)}return f&&v(r),!0}e.state.vim.exMode=!0;var f=!1,l=s.from();p();if(f){yn(e,"No matches for "+o.source);return}if(!t){c(),a&&a();return}En(e,{prefix:"replace with <strong>"+u+"</strong> (y/n/a/q/l)",onKeyDown:m})}function Hn(e){var t=e.state.vim,n=nt.macroModeState,r=nt.registerController.getRegister("."),i=n.isPlaying,s=n.lastInsertModeChanges,o=[];if(!i){var u=s.inVisualBlock?t.lastSelection.visualBlock.height:1,a=s.changes,o=[],f=0;while(f<a.length)o.push(a[f]),a[f]instanceof Wn?f++:f+=u;s.changes=o,e.off("change",qn),d.off(e.getInputField(),"keydown",Xn)}!i&&t.insertModeRepeat>1&&(Vn(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),r.setText(s.changes.join("")),d.signal(e,"vim-mode-change",{mode:"normal"}),n.isRecording&&Fn(n)}function Bn(e,t,n,r){var i=nt.registerController.getRegister(r),s=i.keyBuffer,o=0;n.isPlaying=!0,n.replaySearchQueries=i.searchQueries.slice(0);for(var u=0;u<s.length;u++){var a=s[u],f,l;while(a){f=/<\w+-.+?>|<\w+>|./.exec(a),l=f[0],a=a.substring(f.index+l.length),d.Vim.handleKey(e,l,"macro");if(t.insertMode){var c=i.insertModeChanges[o++].changes;nt.macroModeState.lastInsertModeChanges.changes=c,$n(e,c,1),Hn(e)}}}n.isPlaying=!1}function jn(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=nt.registerController.getRegister(n);r&&r.pushText(t)}function Fn(e){if(e.isPlaying)return;var t=e.latestRegister,n=nt.registerController.getRegister(t);n&&n.pushInsertModeChanges(e.lastInsertModeChanges)}function In(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=nt.registerController.getRegister(n);r&&r.pushSearchQuery(t)}function qn(e,t){var n=nt.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)while(t){r.expectCursorActivityForChange=!0;if(t.origin=="+input"||t.origin=="paste"||t.origin===undefined){var i=t.text.join("\n");r.changes.push(i)}t=t.next}}function Rn(e){var t=e.state.vim;if(t.insertMode){var n=nt.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.changes=[]}else e.curOp.isVimOp||zn(e,t);t.visualMode&&Un(e)}function Un(e){var t=e.state.vim,n=Tt(t.sel.head),r=yt(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,r,{className:"cm-animate-fat-cursor"})}function zn(e,t){var n=e.getCursor("anchor"),r=e.getCursor("head");t.visualMode&&Nt(r,n)&&Ot(e,r.line)>r.ch?Wt(e,!1):!t.visualMode&&!t.insertMode&&e.somethingSelected()&&(t.visualMode=!0,t.visualLine=!1,d.signal(e,"vim-mode-change",{mode:"visual"}));if(t.visualMode){var i=Ct(r,n)?0:-1,s=Ct(r,n)?-1:0;r=yt(r,0,i),n=yt(n,0,s),t.sel={anchor:n,head:r},sn(e,t,"<",kt(r,n)),sn(e,t,">",Lt(r,n))}else t.insertMode||(t.lastHPos=e.getCursor().ch)}function Wn(e){this.keyName=e}function Xn(e){function i(){return n.changes.push(new Wn(r)),!0}var t=nt.macroModeState,n=t.lastInsertModeChanges,r=d.keyName(e);(r.indexOf("Delete")!=-1||r.indexOf("Backspace")!=-1)&&d.lookupKey(r,"vim-insert",i)}function Vn(e,t,n,r){function u(){s?ct.processAction(e,t,t.lastEditActionCommand):ct.evalInput(e,t)}function a(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;$n(e,r.changes,n)}}var i=nt.macroModeState;i.isPlaying=!0;var s=!!t.lastEditActionCommand,o=t.inputState;t.inputState=t.lastEditInputState;if(s&&t.lastEditActionCommand.interlaceInsertRepeat)for(var f=0;f<n;f++)u(),a(1);else r||u(),a(n);t.inputState=o,t.insertMode&&!r&&Hn(e),i.isPlaying=!1}function $n(e,t,n){function r(t){return typeof t=="string"?d.commands[t](e):t(e),!0}var i=e.getCursor("head"),s=nt.macroModeState.lastInsertModeChanges.inVisualBlock;if(s){var o=e.state.vim,u=o.lastSelection,a=bt(u.anchor,u.head);Bt(e,i,a.line+1),n=e.listSelections().length,e.setCursor(i)}for(var f=0;f<n;f++){s&&e.setCursor(yt(i,f,0));for(var l=0;l<t.length;l++){var c=t[l];if(c instanceof Wn)d.lookupKey(c.keyName,"vim-insert",r);else{var h=e.getCursor();e.replaceRange(c,h,h)}}}s&&e.setCursor(yt(i,0,1))}function T(e,t,n){t.length>1&&t[0]=="n"&&(t=t.replace("numpad","")),t=E[t]||t;var r="";return n.ctrlKey&&(r+="C-"),n.altKey&&(r+="A-"),n.shiftKey&&(r+="S-"),r+=t,r.length>1&&(r="<"+r+">"),r}function Kn(e){var t=new e.constructor;return Object.keys(e).forEach(function(n){var r=e[n];Array.isArray(r)?r=r.slice():r&&typeof r=="object"&&r.constructor!=Object&&(r=Kn(r)),t[n]=r}),e.sel&&(t.sel={head:e.sel.head&&Tt(e.sel.head),anchor:e.sel.anchor&&Tt(e.sel.anchor)}),t}function Qn(e,t,n){var r=!1,i=x.maybeInitVimState_(e),s=i.visualBlock||i.wasInVisualBlock;i.wasInVisualBlock&&!e.ace.inMultiSelectMode?i.wasInVisualBlock=!1:e.ace.inMultiSelectMode&&i.visualBlock&&(i.wasInVisualBlock=!0);if(t=="<Esc>"&&!i.insertMode&&!i.visualMode&&e.ace.inMultiSelectMode)e.ace.exitMultiSelectMode();else if(s||!e.ace.inMultiSelectMode||e.ace.inVirtualSelectionMode)r=x.handleKey(e,t,n);else{var o=Kn(i);e.operation(function(){e.ace.forEachSelection(function(){var i=e.ace.selection;e.state.vim.lastHPos=i.$desiredColumn==null?i.lead.column:i.$desiredColumn;var s=e.getCursor("head"),u=e.getCursor("anchor"),a=Ct(s,u)?0:-1,f=Ct(s,u)?-1:0;s=yt(s,0,a),u=yt(u,0,f),e.state.vim.sel.head=s,e.state.vim.sel.anchor=u,r=Jn(e,t,n),i.$desiredColumn=e.state.vim.lastHPos==-1?null:e.state.vim.lastHPos,e.virtualSelectionMode()&&(e.state.vim=Kn(o))}),e.curOp.cursorActivity&&!r&&(e.curOp.cursorActivity=!1)},!0)}return r}function Zn(e,t){t.off("beforeEndOperation",Zn);var n=t.state.cm.vimCmd;n&&t.execCommand(n.exec?n:n.name,n.args),t.curOp=t.prevOp}var i=e("../range").Range,s=e("../lib/event_emitter").EventEmitter,o=e("../lib/dom"),u=e("../lib/oop"),a=e("../lib/keys"),f=e("../lib/event"),l=e("../search").Search,c=e("../lib/useragent"),h=e("../search_highlight").SearchHighlight,p=e("../commands/multi_select_commands");e("../multi_select");var d=function(e){this.ace=e,this.state={},this.marks={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};d.Pos=function(e,t){if(!(this instanceof b))return new b(e,t);this.line=e,this.ch=t},d.defineOption=function(e,t,n){},d.commands={redo:function(e){e.ace.redo()},undo:function(e){e.ace.undo()},newlineAndIndent:function(e){e.ace.insert("\n")}},d.keyMap={},d.addClass=d.rmClass=d.e_stop=function(){},d.keyName=function(e){if(e.key)return e.key;var t=a[e.keyCode]||"";return t.length==1&&(t=t.toUpperCase()),t=f.getModifierString(e).replace(/(^|-)\w/g,function(e){return e.toUpperCase()})+t,t},d.keyMap["default"]=function(e){return function(t){var n=t.ace.commands.commandKeyBinding[e.toLowerCase()];return n&&t.ace.execCommand(n)!==!1}},d.lookupKey=function er(e,t,n){typeof t=="string"&&(t=d.keyMap[t]);var r=typeof t=="function"?t(e):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&n(r))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return er(e,t.fallthrough,n);for(var i=0;i<t.fallthrough.length;i++){var s=er(e,t.fallthrough[i],n);if(s)return s}}},d.signal=function(e,t,n){return e._signal(t,n)},d.on=f.addListener,d.off=f.removeListener,function(){u.implement(d.prototype,s),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(e){var t=e.data;e={start:t.range.start,end:t.range.end,action:t.action,lines:t.lines||[t.text]};if(e.action[0]=="i"){var n={text:e.lines},r=this.curOp=this.curOp||{};r.changeHandlers||(r.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice());if(this.virtualSelectionMode())return;r.lastChange?r.lastChange.next=r.lastChange=n:r.lastChange=r.change=n}this.$updateMarkers(e)},this.onSelectionChange=function(){var e=this.curOp=this.curOp||{};e.cursorActivityHandlers||(e.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(p.keyboardHandler)},this.operation=function(e,t){if(!t&&this.curOp||t&&this.curOp&&this.curOp.force)return e();(t||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation();if(!this.ace.curOp){var n=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var r=this.curOp=this.curOp||{};this.curOp.force=t;var i=e();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.ace.endOperation(),!r.cursorActivity&&!r.lastChange&&n&&(this.ace.prevOp=n)),(t||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),i},this.onBeforeEndOperation=function(){var e=this.curOp;e&&(e.change&&this.signal("change",e.change,e),e&&e.cursorActivity&&this.signal("cursorActivity",null,e),this.curOp=null)},this.signal=function(e,t,n){var r=n?n[e+"Handlers"]:(this._eventRegistry||{})[e];if(!r)return;r=r.slice();for(var i=0;i<r.length;i++)r[i](this,t)},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(e,t){typeof e=="object"&&(t=e.ch,e=e.line),this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.selection.moveTo(e,t)},this.getCursor=function(e){var t=this.ace.selection,n=e=="anchor"?t.isEmpty()?t.lead:t.anchor:e=="head"||!e?t.lead:t.getRange()[e];return m(n)},this.listSelections=function(e){var t=this.ace.multiSelect.rangeList.ranges;return!t.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:t.map(function(e){return{anchor:this.clipPos(m(e.cursor==e.end?e.start:e.end)),head:this.clipPos(m(e.cursor))}},this)},this.setSelections=function(e,t){var n=this.ace.multiSelect,r=e.map(function(e){var t=v(e.anchor),n=v(e.head),r=i.comparePoints(t,n)<0?new i.fromPoints(t,n):new i.fromPoints(n,t);return r.cursor=i.comparePoints(r.start,n)?r.end:r.start,r});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(r[0]);return}t?r[t]&&r.push(r.splice(t,1)[0]):r=r.reverse(),n.toSingleRange(r[0].clone());var s=this.ace.session;for(var o=0;o<r.length;o++){var u=s.$clipRangeToDocument(r[o]);n.addRange(u)}},this.setSelection=function(e,t,n){var r=this.ace.selection;r.moveTo(e.line,e.ch),r.selectTo(t.line,t.ch),n&&n.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(e){return!this.ace.selection.isEmpty()},this.clipPos=function(e){var t=this.ace.session.$clipPositionToDocument(e.line,e.ch);return m(t)},this.markText=function(e){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(e){var t=e.action=="insert",n=e.start,r=e.end,s=(r.row-n.row)*(t?1:-1),o=(r.column-n.column)*(t?1:-1);t&&(r=n);for(var u in this.marks){var a=this.marks[u],f=i.comparePoints(a,n);if(f<0)continue;if(f===0&&t){if(a.bias!=1){a.bias==-1;continue}f=1}var l=t?f:i.comparePoints(a,r);if(l>0){a.row+=s,a.column+=a.row==r.row?o:0;continue}!t&&l<=0&&(a.row=n.row,a.column=n.column,l===0&&(a.bias=1))}};var e=function(e,t,n,r){this.cm=e,this.id=t,this.row=n,this.column=r,e.marks[this.id]=this};e.prototype.clear=function(){delete this.cm.marks[this.id]},e.prototype.find=function(){return m(this)},this.setBookmark=function(t,n){var r=new e(this,this.$uid++,t.line,t.ch);if(!n||!n.insertLeft)r.$insertRight=!0;return this.marks[r.id]=r,r},this.moveH=function(e,t){if(t=="char"){var n=this.ace.selection;n.clearSelection(),n.moveCursorBy(0,e)}},this.findPosV=function(e,t,n,r){if(n=="line"){var i=this.ace.session.documentToScreenPosition(e.line,e.ch);r!=null&&(i.column=r),i.row+=t,i.row=Math.min(Math.max(0,i.row),this.ace.session.getScreenLength()-1);var s=this.ace.session.screenToDocumentPosition(i.row,i.column);return m(s)}debugger},this.charCoords=function(e,t){if(t=="div"||!t){var n=this.ace.session.documentToScreenPosition(e.line,e.ch);return{left:n.column,top:n.row}}if(t=="local"){var r=this.ace.renderer,n=this.ace.session.documentToScreenPosition(e.line,e.ch),i=r.layerConfig.lineHeight,s=r.layerConfig.characterWidth,o=i*n.row;return{left:n.column*s,top:o,bottom:o+i}}},this.coordsChar=function(e,t){var n=this.ace.renderer;if(t=="local"){var r=Math.max(0,Math.floor(e.top/n.lineHeight)),i=Math.max(0,Math.floor(e.left/n.characterWidth)),s=n.session.screenToDocumentPosition(r,i);return m(s)}if(t=="div")throw"not implemented"},this.openDialog=function(){debugger},this.getSearchCursor=function(e,t,n){var r=!1,i=!1;e instanceof RegExp&&!e.global&&(r=!e.ignoreCase,e=e.source,i=!0);var s=new l;t.ch==undefined&&(t.ch=Number.MAX_VALUE);var o={row:t.line,column:t.ch},u=this,a=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){s.setOptions({needle:e,caseSensitive:r,wrap:!1,backwards:t,regExp:i,start:a||o});var n=s.find(u.ace.session);return n&&n.isEmpty()&&u.getLine(n.start.row).length==n.start.column&&(s.$options.start=n,n=s.find(u.ace.session)),a=n,a},from:function(){return a&&m(a.start)},to:function(){return a&&m(a.end)},replace:function(e){a&&(a.end=u.ace.session.doc.replace(a,e))}}},this.scrollTo=function(e,t){var n=this.ace.renderer,r=n.layerConfig,i=r.maxHeight;i-=(n.$size.scrollerHeight-n.lineHeight)*n.$scrollPastEnd,t!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(t,i))),e!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(e,r.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(e,t){e&&this.ace.renderer.scrollCursorIntoView(v(e),null,t)},this.getLine=function(e){return this.ace.session.getLine(e)},this.getRange=function(e,t){return this.ace.session.getTextRange(new i(e.line,e.ch,t.line,t.ch))},this.replaceRange=function(e,t,n){return n||(n=t),this.ace.session.replace(new i(t.line,t.ch,n.line,n.ch),e)},this.replaceSelections=function(e){var t=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(t.getRange(),e[0]||"");return}t.inVirtualSelectionMode=!0;var n=t.rangeList.ranges;n.length||(n=[this.ace.multiSelect.getRange()]);for(var r=n.length;r--;)this.ace.session.replace(n[r],e[r]||"");t.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(e){return this.getRange(e.anchor,e.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.containter};var t={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",firstLineNumber:"firstLineNumber"};this.setOption=function(e,n){this.state[e]=n;switch(e){case"indentWithTabs":e=t[e],n=!n;break;default:e=t[e]}e&&this.ace.setOption(e,n)},this.getOption=function(e,n){var r=t[e];r&&(n=this.ace.getOption(r));switch(e){case"indentWithTabs":return e=t[e],!n}return r?n:this.state[e]},this.toggleOverwrite=function(e){return this.state.overwrite=e,this.ace.setOverwrite(e)},this.addOverlay=function(e){if(!this.$searchHighlight||!this.$searchHighlight.session){var t=new h(null,"ace_highlight-marker","text"),n=this.ace.session.addDynamicMarker(t);t.id=n.id,t.session=this.ace.session,t.destroy=function(e){t.session.off("change",t.updateOnChange),t.session.off("changeEditor",t.destroy),t.session.removeMarker(t.id),t.session=null},t.updateOnChange=function(e){e=e.data.range;var n=e.start.row;n==e.end.row?t.cache[n]=undefined:t.cache.splice(n,t.cache.length)},t.session.on("changeEditor",t.destroy),t.session.on("change",t.updateOnChange)}var r=new RegExp(e.query.source,"gmi");console.log(r),this.$searchHighlight=e.highlight=t,this.$searchHighlight.setRegexp(r),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(e){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var e=this.ace.renderer,t=e.layerConfig;return{left:e.scrollLeft,top:e.scrollTop,height:t.maxHeight,width:t.width,clientHeight:t.height,clientWidth:t.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(e){return this.ace.setValue(e)},this.getTokenTypeAt=function(e){var t=this.ace.session.getTokenAt(e.line,e.ch);return t&&/comment|string/.test(t.type)?"string":""},this.findMatchingBracket=function(e){var t=this.ace.session.findMatchingBracket(v(e));return{to:t&&m(t)}},this.indentLine=function(e,t){t===!0?this.ace.session.indentRows(e,e," "):t===!1&&this.ace.session.outdentRows(new i(e,0,e,0))},this.indexFromPos=function(e){return this.ace.session.doc.positionToIndex(v(e))},this.posFromIndex=function(e){return m(this.ace.session.doc.indexToPosition(e))},this.focus=function(e){return this.ace.focus()},this.blur=function(e){return this.ace.blur()},this.defaultTextHeight=function(e){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(e,t,n,r){var i=r.bracketRegex.source;if(t==1)var s=this.ace.session.$findClosingBracket(i.slice(1,2),v(e),/paren|text/);else var s=this.ace.session.$findOpeningBracket(i.slice(-2,-1),{row:e.line,column:e.ch+1},/paren|text/);return s&&{pos:m(s)}},this.refresh=function(){return this.ace.resize(!0)}}.call(d.prototype);var g=d.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};g.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if(typeof e=="string")var n=t==e;else var n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){var t=this.pos;while(this.eat(e));return this.pos>t},eatSpace:function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if(typeof e!="string"){var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}var r=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},d.defineExtension=function(e,t){d.prototype[e]=t},o.importCssString(".normal-mode .ace_cursor{ border: 0!important; background-color: red; opacity: 0.5;}.ace_dialog { position: absolute; left: 0; right: 0; background: white; z-index: 15; padding: .1em .8em; overflow: hidden; color: #333;}.ace_dialog-top { border-bottom: 1px solid #eee; top: 0;}.ace_dialog-bottom { border-top: 1px solid #eee; bottom: 0;}.ace_dialog input { border: none; outline: none; background: transparent; width: 20em; color: inherit; font-family: monospace;}","vimMode"),function(){function e(e,t,n){var r=e.ace.container,i;return i=r.appendChild(document.createElement("div")),n?i.className="ace_dialog ace_dialog-bottom":i.className="ace_dialog ace_dialog-top",typeof t=="string"?i.innerHTML=t:i.appendChild(t),i}function t(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}d.defineExtension("openDialog",function(n,r,i){function a(e){if(typeof e=="string")f.value=e;else{if(o)return;o=!0,s.parentNode.removeChild(s),u.focus(),i.onClose&&i.onClose(s)}}if(this.virtualSelectionMode())return;i||(i={}),t(this,null);var s=e(this,n,i.bottom),o=!1,u=this,f=s.getElementsByTagName("input")[0],l;if(f)i.value&&(f.value=i.value,f.select()),i.onInput&&d.on(f,"input",function(e){i.onInput(e,f.value,a)}),i.onKeyUp&&d.on(f,"keyup",function(e){i.onKeyUp(e,f.value,a)}),d.on(f,"keydown",function(e){if(i&&i.onKeyDown&&i.onKeyDown(e,f.value,a))return;if(e.keyCode==27||i.closeOnEnter!==!1&&e.keyCode==13)f.blur(),d.e_stop(e),a();e.keyCode==13&&r(f.value)}),i.closeOnBlur!==!1&&d.on(f,"blur",a),f.focus();else if(l=s.getElementsByTagName("button")[0])d.on(l,"click",function(){a(),u.focus()}),i.closeOnBlur!==!1&&d.on(l,"blur",a),l.focus();return a}),d.defineExtension("openNotification",function(n,r){function a(){if(s)return;s=!0,clearTimeout(o),i.parentNode.removeChild(i)}if(this.virtualSelectionMode())return;t(this,a);var i=e(this,n,r&&r.bottom),s=!1,o,u=r&&typeof r.duration!="undefined"?r.duration:5e3;return d.on(i,"click",function(e){d.e_preventDefault(e),a()}),u&&(o=setTimeout(a,u)),a})}();var y=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"xi",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"dcc",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],b=d.Pos,w=[16,17,18,91],E={Enter:"CR",Backspace:"BS",Delete:"Del"},S=/Mac/.test(navigator.platform),x=function(){return st};d.defineOption("vimMode",!1,function(e,t,n){t&&e.getOption("keyMap")!="vim"?e.setOption("keyMap","vim"):!t&&n!=d.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")});var _=/[\d]/,D=[/\w/,/[^\w\s]/],P=[/\S/],B=H(65,26),j=H(97,26),F=H(48,10),I=[].concat(B,j,F,["<",">"]),q=[].concat(B,j,F,["-",'"',".",":","/"]),J={},Y=function(){function s(s,o,u){function l(n){var r=++t%e,o=i[r];o&&o.clear(),i[r]=s.setBookmark(n)}var a=t%e,f=i[a];if(f){var c=f.find();c&&!Nt(c,o)&&l(o)}else l(o);l(u),n=t,r=t-e+1,r<0&&(r=0)}function o(s,o){t+=o,t>n?t=n:t<r&&(t=r);var u=i[(e+t)%e];if(u&&!u.find()){var a=o>0?1:-1,f,l=s.getCursor();do{t+=a,u=i[(e+t)%e];if(u&&(f=u.find())&&!Nt(l,f))break}while(t<n&&t>r)}return u}var e=100,t=-1,n=0,r=0,i=new Array(e);return{cachedCursor:undefined,add:s,move:o}},Z=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};et.prototype={exitMacroRecordMode:function(){var e=nt.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=undefined,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=nt.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var nt,it,st={buildKeyMap:function(){},getRegisterController:function(){return nt.registerController},resetVimGlobalState_:rt,getVimGlobalState_:function(){return nt},maybeInitVimState_:tt,InsertModeKey:Wn,map:function(e,t,n){Dn.map(e,t,n)},unmap:function(e,t){Dn.unmap(e,t)},setOption:Q,getOption:G,defineOption:K,defineEx:function(e,t,n){if(e.indexOf(t)!==0)throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered');_n[e]=n,Dn.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){function i(){var r=nt.macroModeState;if(r.isRecording){if(t=="q")return r.exitMacroRecordMode(),ut(e),!0;n!="mapping"&&jn(r,t)}}function s(){if(t=="<Esc>")return ut(e),r.visualMode?Wt(e):r.insertMode&&Hn(e),!0}function o(n){var r;while(n)r=/<\w+-.+?>|<\w+>|./.exec(n),t=r[0],n=n.substring(r.index+t.length),d.Vim.handleKey(e,t,"mapping")}function u(){if(s())return!0;var n=r.inputState.keyBuffer=r.inputState.keyBuffer+t,i=t.length==1,u=ct.matchCommand(n,y,r.inputState,"insert");while(n.length>1&&u.type!="full"){var n=r.inputState.keyBuffer=n.slice(1),a=ct.matchCommand(n,y,r.inputState,"insert");a.type!="none"&&(u=a)}if(u.type=="none")return ut(e),!1;if(u.type=="partial")return it&&window.clearTimeout(it),it=window.setTimeout(function(){r.insertMode&&r.inputState.keyBuffer&&ut(e)},G("insertModeEscKeysTimeout")),!i;it&&window.clearTimeout(it);if(i){var f=e.getCursor();e.replaceRange("",yt(f,0,-(n.length-1)),f,"+input")}ut(e);var l=u.command;return l.type=="keyToKey"?o(l.toKeys):ct.processCommand(e,r,l),!0}function a(){if(i()||s())return!0;var n=r.inputState.keyBuffer=r.inputState.keyBuffer+t;if(/^[1-9]\d*$/.test(n))return!0;var u=/^(\d*)(.*)$/.exec(n);if(!u)return ut(e),!1;var a=r.visualMode?"visual":"normal",f=ct.matchCommand(u[2]||u[1],y,r.inputState,a);if(f.type=="none")return ut(e),!1;if(f.type=="partial")return!0;r.inputState.keyBuffer="";var l=f.command,u=/^(\d*)(.*)$/.exec(n);return u[1]&&u[1]!="0"&&r.inputState.pushRepeatDigit(u[1]),l.type=="keyToKey"?o(l.toKeys):ct.processCommand(e,r,l),!0}var r=tt(e);return e.operation(function(){e.curOp.isVimOp=!0;try{return r.insertMode?u():a()}catch(t){throw e.state.vim=undefined,tt(e),t}})},handleEx:function(e,t){Dn.processCommand(e,t)}};ot.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},ot.prototype.getRepeat=function(){var e=0;if(this.prefixRepeat.length>0||this.motionRepeat.length>0)e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10));return e},at.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(Z(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},ft.prototype={pushText:function(e,t,n,r,i){r&&n.charAt(0)=="\n"&&(n=n.slice(1)+"\n"),r&&n.charAt(n.length-1)!=="\n"&&(n+="\n");var s=this.isValidRegister(e)?this.getRegister(e):null;if(!s){switch(t){case"yank":this.registers[0]=new at(n,r,i);break;case"delete":case"change":n.indexOf("\n")==-1?this.registers["-"]=new at(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new at(n,r))}this.unnamedRegister.setText(n,r,i);return}var o=X(e);o?s.pushText(n,r):s.setText(n,r,i),this.unnamedRegister.setText(s.toString(),r)},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new at),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&$(e,q)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},lt.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;this.initialPrefix===null&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i<n.length;i+=r){var s=n[i];for(var o=0;o<=s.length;o++)if(this.initialPrefix==s.substring(0,o))return this.iterator=i,s}if(i>=n.length)return this.iterator=n.length,this.initialPrefix;if(i<0)return e},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var ct={matchCommand:function(e,t,n,r){var i=wt(e,t,r,n);if(!i.full&&!i.partial)return{type:"none"};if(!i.full&&i.partial)return{type:"partial"};var s;for(var o=0;o<i.full.length;o++){var u=i.full[o];s||(s=u)}return s.keys.slice(-11)=="<character>"&&(n.selectedCharacter=St(e)),{type:"full",command:s}},processCommand:function(e,t,n){t.inputState.repeatOverride=n.repeatOverride;switch(n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n),ut(e);break;case"ex":case"keyToEx":this.processEx(e,t,n),ut(e);break;default:}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=gt(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator){r.motion="expandToLine",r.motionArgs={linewise:!0},this.evalInput(e,t);return}ut(e)}r.operator=n.operator,r.operatorArgs=gt(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=gt(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),s=!!i,o=gt(n.actionArgs)||{};r.selectedCharacter&&(o.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),o.repeat=i||1,o.repeatIsExplicit=s,o.registerName=r.registerName,ut(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),vt[n.action](e,o,t)},processSearch:function(e,t,n){function a(r,i,s){nt.searchHistoryController.pushInput(r),nt.searchHistoryController.reset();try{xn(e,r,i,s)}catch(o){yn(e,"Invalid regex: "+r);return}ct.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}function f(t){e.scrollTo(u.left,u.top),a(t,!0,!0);var n=nt.macroModeState;n.isRecording&&In(n,t)}function l(t,n,i){var s=d.keyName(t),o;s=="Up"||s=="Down"?(o=s=="Up"?!0:!1,n=nt.searchHistoryController.nextMatch(n,o)||"",i(n)):s!="Left"&&s!="Right"&&s!="Ctrl"&&s!="Alt"&&s!="Shift"&&nt.searchHistoryController.reset();var a;try{a=xn(e,n,!0,!0)}catch(t){}a?e.scrollIntoView(Cn(e,!r,a),30):(kn(e),e.scrollTo(u.left,u.top))}function c(t,n,r){var i=d.keyName(t);if(i=="Esc"||i=="Ctrl-C"||i=="Ctrl-[")nt.searchHistoryController.pushInput(n),nt.searchHistoryController.reset(),xn(e,o),kn(e),e.scrollTo(u.left,u.top),d.e_stop(t),r(),e.focus()}if(!e.getSearchCursor)return;var r=n.searchArgs.forward,i=n.searchArgs.wholeWordOnly;ln(e).setReversed(!r);var s=r?"/":"?",o=ln(e).getQuery(),u=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var h=nt.macroModeState;if(h.isPlaying){var p=h.replaySearchQueries.shift();a(p,!0,!1)}else En(e,{onClose:f,prefix:s,desc:wn,onKeyUp:l,onKeyDown:c});break;case"wordUnderCursor":var v=Jt(e,!1,!0,!1,!0),m=!0;v||(v=Jt(e,!1,!0,!1,!1),m=!1);if(!v)return;var p=e.getLine(v.start.line).substring(v.start.ch,v.end.ch);m&&i?p="\\b"+p+"\\b":p=Dt(p),nt.jumpList.cachedCursor=e.getCursor(),e.setCursor(v.start),a(p,!0,!1)}},processEx:function(e,t,n){function r(t){nt.exCommandHistoryController.pushInput(t),nt.exCommandHistoryController.reset(),Dn.processCommand(e,t)}function i(t,n,r){var i=d.keyName(t),s;if(i=="Esc"||i=="Ctrl-C"||i=="Ctrl-[")nt.exCommandHistoryController.pushInput(n),nt.exCommandHistoryController.reset(),d.e_stop(t),r(),e.focus();i=="Up"||i=="Down"?(s=i=="Up"?!0:!1,n=nt.exCommandHistoryController.nextMatch(n,s)||"",r(n)):i!="Left"&&i!="Right"&&i!="Ctrl"&&i!="Alt"&&i!="Shift"&&nt.exCommandHistoryController.reset()}n.type=="keyToEx"?Dn.processCommand(e,n.exArgs.input):t.visualMode?En(e,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:i}):En(e,{onClose:r,prefix:":",onKeyDown:i})},evalInput:function(e,t){var n=t.inputState,r=n.motion,i=n.motionArgs||{},s=n.operator,o=n.operatorArgs||{},u=n.registerName,a=t.sel,f=Tt(t.visualMode?a.head:e.getCursor("head")),l=Tt(t.visualMode?a.anchor:e.getCursor("anchor")),c=Tt(f),h=Tt(l),p,d,v;s&&this.recordLastEdit(t,n),n.repeatOverride!==undefined?v=n.repeatOverride:v=n.getRepeat();if(v>0&&i.explicitRepeat)i.repeatIsExplicit=!0;else if(i.noRepeat||!i.explicitRepeat&&v===0)v=1,i.repeatIsExplicit=!1;n.selectedCharacter&&(i.selectedCharacter=o.selectedCharacter=n.selectedCharacter),i.repeat=v,ut(e);if(r){var m=ht[r](e,f,i,t);t.lastMotion=ht[r];if(!m)return;if(i.toJumplist){var g=nt.jumpList,y=g.cachedCursor;y?(Kt(e,y,m),delete g.cachedCursor):Kt(e,f,m)}m instanceof Array?(d=m[0],p=m[1]):p=m,p||(p=Tt(f)),t.visualMode?(p=mt(e,p,!0),d&&(d=mt(e,d,!0)),d=d||h,a.anchor=d,a.head=p,Rt(e),sn(e,t,"<",Ct(d,p)?d:p),sn(e,t,">",Ct(d,p)?p:d)):s||(p=mt(e,p),e.setCursor(p.line,p.ch))}if(s){if(o.lastSel){d=h;var w=o.lastSel,E=Math.abs(w.head.line-w.anchor.line),S=Math.abs(w.head.ch-w.anchor.ch);w.visualLine?p=b(h.line+E,h.ch):w.visualBlock?p=b(h.line+E,h.ch+S):w.head.line==w.anchor.line?p=b(h.line,h.ch+S):p=b(h.line+E,h.ch),t.visualMode=!0,t.visualLine=w.visualLine,t.visualBlock=w.visualBlock,a=t.sel={anchor:d,head:p},Rt(e)}else t.visualMode&&(o.lastSel={anchor:Tt(a.anchor),head:Tt(a.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var x,T,N,C,k;if(t.visualMode){x=kt(a.head,a.anchor),T=Lt(a.head,a.anchor),N=t.visualLine||o.linewise,C=t.visualBlock?"block":N?"line":"char",k=Ut(e,{anchor:x,head:T},C);if(N){var L=k.ranges;if(C=="block")for(var A=0;A<L.length;A++)L[A].head.ch=Ot(e,L[A].head.line);else C=="line"&&(L[0].head=b(L[0].head.line+1,0))}}else{x=Tt(d||h),T=Tt(p||c);if(Ct(T,x)){var O=x;x=T,T=O}N=i.linewise||o.linewise,N?Vt(e,x,T):i.forward&&Xt(e,x,T),C="char";var M=!i.inclusive||N;k=Ut(e,{anchor:x,head:T},C,M)}e.setSelections(k.ranges,k.primary),t.lastMotion=null,o.repeat=v,o.registerName=u,o.linewise=N;var _=dt[s](e,o,k.ranges,h,p);t.visualMode&&Wt(e),_&&e.setCursor(_)}},recordLastEdit:function(e,t,n){var r=nt.macroModeState;if(r.isPlaying)return;e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1}},ht={moveToTopLine:function(e,t,n){var r=An(e).top+n.repeat-1;return b(r,$t(e.getLine(r)))},moveToMiddleLine:function(e){var t=An(e),n=Math.floor((t.top+t.bottom)*.5);return b(n,$t(e.getLine(n)))},moveToBottomLine:function(e,t,n){var r=An(e).bottom-n.repeat+1;return b(r,$t(e.getLine(r)))},expandToLine:function(e,t,n){var r=t;return b(r.line+n.repeat-1,Infinity)},findNext:function(e,t,n){var r=ln(e),i=r.getQuery();if(!i)return;var s=!n.forward;return s=r.isReversed()?!s:s,Nn(e,i),Cn(e,s,i,n.repeat)},goToMark:function(e,t,n,r){var i=r.marks[n.selectedCharacter];if(i){var s=i.find();return n.linewise?{line:s.line,ch:$t(e.getLine(s.line))}:s}return null},moveToOtherHighlightedEnd:function(e,t,n,r){if(r.visualBlock&&n.sameLine){var i=r.sel;return[mt(e,b(i.anchor.line,i.head.ch)),mt(e,b(i.head.line,i.anchor.ch))]}return[r.sel.head,r.sel.anchor]},jumpToMark:function(e,t,n,r){var i=t;for(var s=0;s<n.repeat;s++){var o=i;for(var u in r.marks){if(!U(u))continue;var a=r.marks[u].find(),f=n.forward?Ct(a,o):Ct(o,a);if(f)continue;if(n.linewise&&a.line==o.line)continue;var l=Nt(o,i),c=n.forward?At(o,a,i):At(i,a,o);if(l||c)i=a}}return n.linewise&&(i=b(i.line,$t(e.getLine(i.line)))),i},moveByCharacters:function(e,t,n){var r=t,i=n.repeat,s=n.forward?r.ch+i:r.ch-i;return b(r.line,s)},moveByLines:function(e,t,n,r){var i=t,s=i.ch;switch(r.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:s=r.lastHPos;break;default:r.lastHPos=s}var o=n.repeat+(n.repeatOffset||0),u=n.forward?i.line+o:i.line-o,a=e.firstLine(),f=e.lastLine();if(u<a&&i.line==a||u>f&&i.line==f)return;return n.toFirstChar&&(s=$t(e.getLine(u)),r.lastHPos=s),r.lastHSPos=e.charCoords(b(u,s),"div").left,b(u,s)},moveByDisplayLines:function(e,t,n,r){var i=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(i,"div").left}var s=n.repeat,o=e.findPosV(i,n.forward?s:-s,"line",r.lastHSPos);if(o.hitSide)if(n.forward)var u=e.charCoords(o,"div"),a={top:u.top+8,left:r.lastHSPos},o=e.coordsChar(a,"div");else{var f=e.charCoords(b(e.firstLine(),0),"div");f.left=r.lastHSPos,o=e.coordsChar(f,"div")}return r.lastHPos=o.ch,o},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=t.line,i=n.repeat,s=n.forward?1:-1;for(var o=0;o<i;o++){if(!n.forward&&r===e.firstLine()||n.forward&&r==e.lastLine())break;r+=s;while(r!==e.firstLine()&&r!=e.lastLine()&&e.getLine(r))r+=s}return b(r,0)},moveByScroll:function(e,t,n,r){var i=e.getScrollInfo(),s=null,o=n.repeat;o||(o=i.clientHeight/(2*e.defaultTextHeight()));var u=e.charCoords(t,"local");n.repeat=o;var s=ht.moveByDisplayLines(e,t,n,r);if(!s)return null;var a=e.charCoords(s,"local");return e.scrollTo(null,i.top+a.top-u.top),s},moveByWords:function(e,t,n){return tn(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=n.repeat,i=nn(e,r,n.forward,n.selectedCharacter),s=n.forward?-1:1;return Qt(s,n),i?(i.ch+=s,i):null},moveToCharacter:function(e,t,n){var r=n.repeat;return Qt(0,n),nn(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){var r=n.repeat;return Zt(e,r,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var i=n.repeat;return r.lastHPos=i-1,r.lastHSPos=e.charCoords(t,"div").left,rn(e,i)},moveToEol:function(e,t,n,r){var i=t;r.lastHPos=Infinity;var s=b(i.line+n.repeat-1,Infinity),o=e.clipPos(s);return o.ch--,r.lastHSPos=e.charCoords(o,"div").left,s},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return b(n.line,$t(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){var n=t,r=n.line,i=n.ch,s=e.getLine(r),o;do{o=s.charAt(i++);if(o&&z(o)){var u=e.getTokenTypeAt(b(r,i));if(u!=="string"&&u!=="comment")break}}while(o);if(o){var a=e.findMatchingBracket(b(r,i));return a.to}return n},moveToStartOfLine:function(e,t){return b(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var r=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(r=n.repeat-e.getOption("firstLineNumber")),b(r,$t(e.getLine(r)))},textObjectManipulation:function(e,t,n){var r={"(":")",")":"(","{":"}","}":"{","[":"]","]":"["},i={"'":!0,'"':!0},s=n.selectedCharacter;s=="b"?s="(":s=="B"&&(s="{");var o=!n.textObjectInner,u;if(r[s])u=un(e,t,s,o);else if(i[s])u=an(e,t,s,o);else if(s==="W")u=Jt(e,o,!0,!0);else if(s==="w")u=Jt(e,o,!0,!1);else{if(s!=="p")return null;u=expandParagraphUnderCursor(e,o,!0,!1)}return e.state.vim.visualMode?qt(e,u.start,u.end):[u.start,u.end]},repeatLastCharacterSearch:function(e,t,n){var r=nt.lastChararacterSearch,i=n.repeat,s=n.forward===r.forward,o=(r.increment?1:0)*(s?-1:1);e.moveH(-o,"char"),n.inclusive=s?!0:!1;var u=nn(e,i,s,r.selectedCharacter);return u?(u.ch+=o,u):(e.moveH(o,"char"),t)}},dt={change:function(e,t,n){var r,i,s=e.state.vim;nt.macroModeState.lastInsertModeChanges.inVisualBlock=s.visualBlock;if(!s.visualMode){var o=n[0].anchor,u=n[0].head;i=e.getRange(o,u);if(!V(i)){var a=/\s+$/.exec(i);a&&(u=yt(u,0,-a[0].length),i=i.slice(0,-a[0].length))}var f=u.line-1==e.lastLine();e.replaceRange("",o,u),t.linewise&&!f&&(d.commands.newlineAndIndent(e),o.ch=null),r=o}else{i=e.getSelection();var l=pt("",n.length);e.replaceSelections(l),r=kt(n[0].head,n[0].anchor)}nt.registerController.pushText(t.registerName,"change",i,t.linewise,n.length>1),vt.enterInsertMode(e,{head:r},e.state.vim)},"delete":function(e,t,n){var r,i,s=e.state.vim;if(!s.visualBlock){var o=n[0].anchor,u=n[0].head;t.linewise&&u.line!=e.firstLine()&&o.line==e.lastLine()&&o.line==u.line-1&&(o.line==e.firstLine()?o.ch=0:o=b(o.line-1,Ot(e,o.line-1))),i=e.getRange(o,u),e.replaceRange("",o,u),r=o,t.linewise&&(r=ht.moveToFirstNonWhiteSpaceCharacter(e,o))}else{i=e.getSelection();var a=pt("",n.length);e.replaceSelections(a),r=n[0].anchor}return nt.registerController.pushText(t.registerName,"delete",i,t.linewise,s.visualBlock),r},indent:function(e,t,n){var r=e.state.vim,i=n[0].anchor.line,s=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,o=r.visualMode?t.repeat:1;t.linewise&&s--;for(var u=i;u<=s;u++)for(var a=0;a<o;a++)e.indentLine(u,t.indentRight);return ht.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},changeCase:function(e,t,n,r,i){var s=e.getSelections(),o=[],u=t.toLower;for(var a=0;a<s.length;a++){var f=s[a],l="";if(u===!0)l=f.toLowerCase();else if(u===!1)l=f.toUpperCase();else for(var c=0;c<f.length;c++){var h=f.charAt(c);l+=X(h)?h.toLowerCase():h.toUpperCase()}o.push(l)}return e.replaceSelections(o),t.shouldMoveCursor?i:!e.state.vim.visualMode&&t.linewise&&n[0].anchor.line+1==n[0].head.line?ht.moveToFirstNonWhiteSpaceCharacter(e,r):t.linewise?r:kt(n[0].anchor,n[0].head)},yank:function(e,t,n,r){var i=e.state.vim,s=e.getSelection(),o=i.visualMode?kt(i.sel.anchor,i.sel.head,n[0].head,n[0].anchor):r;return nt.registerController.pushText(t.registerName,"yank",s,t.linewise,i.visualBlock),o}},vt={jumpListWalk:function(e,t,n){if(n.visualMode)return;var r=t.repeat,i=t.forward,s=nt.jumpList,o=s.move(e,i?r:-r),u=o?o.find():undefined;u=u?u:e.getCursor(),e.setCursor(u)},scroll:function(e,t,n){if(n.visualMode)return;var r=t.repeat||1,i=e.defaultTextHeight(),s=e.getScrollInfo().top,o=i*r,u=t.forward?s+o:s-o,a=Tt(e.getCursor()),f=e.charCoords(a,"local");if(t.forward)u>f.top?(a.line+=(u-f.top)/i,a.line=Math.ceil(a.line),e.setCursor(a),f=e.charCoords(a,"local"),e.scrollTo(null,f.top)):e.scrollTo(null,u);else{var l=u+e.getScrollInfo().clientHeight;l<f.bottom?(a.line-=(f.bottom-l)/i,a.line=Math.floor(a.line),e.setCursor(a),f=e.charCoords(a,"local"),e.scrollTo(null,f.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,u)}},scrollToCursor:function(e,t){var n=e.getCursor().line,r=e.charCoords(b(n,0),"local"),i=e.getScrollInfo().clientHeight,s=r.top,o=r.bottom-s;switch(t.position){case"center":s=s-i/2+o;break;case"bottom":s=s-i+o*1.4;break;case"top":s+=o*.4}e.scrollTo(null,s)},replayMacro:function(e,t,n){var r=t.selectedCharacter,i=t.repeat,s=nt.macroModeState;r=="@"&&(r=s.latestRegister);while(i--)Bn(e,n,s,r)},enterMacroRecordMode:function(e,t){var n=nt.macroModeState,r=t.selectedCharacter;n.enterMacroRecordMode(e,r)},enterInsertMode:function(e,t,n){if(e.getOption("readOnly"))return;n.insertMode=!0,n.insertModeRepeat=t&&t.repeat||1;var r=t?t.insertAt:null,i=n.sel,s=t.head||e.getCursor("head"),o=e.listSelections().length;if(r=="eol")s=b(s.line,Ot(e,s.line));else if(r=="charAfter")s=yt(s,0,1);else if(r=="firstNonBlank")s=ht.moveToFirstNonWhiteSpaceCharacter(e,s);else if(r=="startOfSelectedArea")n.visualBlock?(s=b(Math.min(i.head.line,i.anchor.line),Math.min(i.head.ch,i.anchor.ch)),o=Math.abs(i.head.line-i.anchor.line)+1):i.head.line<i.anchor.line?s=i.head:s=b(i.anchor.line,0);else if(r=="endOfSelectedArea")n.visualBlock?(s=b(Math.min(i.head.line,i.anchor.line),Math.max(i.head.ch+1,i.anchor.ch)),o=Math.abs(i.head.line-i.anchor.line)+1):i.head.line>=i.anchor.line?s=yt(i.head,0,1):s=b(i.anchor.line,0);else if(r=="inplace"&&n.visualMode)return;e.setOption("keyMap","vim-insert"),e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),d.signal(e,"vim-mode-change",{mode:"replace"})):(e.setOption("keyMap","vim-insert"),d.signal(e,"vim-mode-change",{mode:"insert"})),nt.macroModeState.isPlaying||(e.on("change",qn),d.on(e.getInputField(),"keydown",Xn)),n.visualMode&&Wt(e),Bt(e,s,o)},toggleVisualMode:function(e,t,n){var r=t.repeat,i=e.getCursor(),s;n.visualMode?n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,d.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Rt(e)):Wt(e):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,s=mt(e,b(i.line,i.ch+r-1),!0),n.sel={anchor:i,head:s},d.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Rt(e),sn(e,n,"<",kt(i,s)),sn(e,n,">",Lt(i,s)))},reselectLastSelection:function(e,t,n){var r=n.lastSelection;n.visualMode&&It(e,n);if(r){var i=r.anchorMark.find(),s=r.headMark.find();if(!i||!s)return;n.sel={anchor:i,head:s},n.visualMode=!0,n.visualLine=r.visualLine,n.visualBlock=r.visualBlock,Rt(e),sn(e,n,"<",kt(i,s)),sn(e,n,">",Lt(i,s)),d.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,i;if(n.visualMode)r=e.getCursor("anchor"),i=e.getCursor("head"),i.ch=Ot(e,i.line)-1;else{var s=Math.max(t.repeat,2);r=e.getCursor(),i=mt(e,b(r.line+s-1,Infinity))}var o=0;for(var u=r.line;u<i.line;u++){o=Ot(e,r.line);var a=b(r.line+1,Ot(e,r.line+1)),f=e.getRange(r,a);f=f.replace(/\n\s*/g," "),e.replaceRange(f,r,a)}var l=b(r.line,o);e.setCursor(l),n.visualMode&&Wt(e)},newLineAndEnterInsertMode:function(e,t,n){n.insertMode=!0;var r=Tt(e.getCursor());if(r.line===e.firstLine()&&!t.after)e.replaceRange("\n",b(e.firstLine(),0)),e.setCursor(e.firstLine(),0);else{r.line=t.after?r.line:r.line-1,r.ch=Ot(e,r.line),e.setCursor(r);var i=d.commands.newlineAndIndentContinueComment||d.commands.newlineAndIndent;i(e)}this.enterInsertMode(e,{repeat:t.repeat},n)},paste:function(e,t,n){var r=Tt(e.getCursor()),i=nt.registerController.getRegister(t.registerName),s=i.toString();if(!s)return;if(t.matchIndent){var o=e.getOption("tabSize"),u=function(e){var t=e.split(" ").length-1,n=e.split(" ").length-1;return t*o+n*1},a=e.getLine(e.getCursor().line),f=u(a.match(/^\s*/)[0]),l=s.replace(/\n$/,""),c=s!==l,h=u(s.match(/^\s*/)[0]),s=l.replace(/^\s*/gm,function(t){var n=f+(u(t)-h);if(n<0)return"";if(e.getOption("indentWithTabs")){var r=Math.floor(n/o);return Array(r+1).join(" ")}return Array(n+1).join(" ")});s+=c?"\n":""}if(t.repeat>1)var s=Array(t.repeat+1).join(s);var p=i.linewise,d=i.blockwise;if(p)n.visualMode?s=n.visualLine?s.slice(0,-1):"\n"+s.slice(0,s.length-1)+"\n":t.after?(s="\n"+s.slice(0,s.length-1),r.ch=Ot(e,r.line)):r.ch=0;else{if(d){s=s.split("\n");for(var v=0;v<s.length;v++)s[v]=s[v]==""?" ":s[v]}r.ch+=t.after?1:0}var m,g;if(n.visualMode){n.lastPastedText=s;var y,w=Ft(e,n),E=w[0],S=w[1],x=e.getSelection(),T=e.listSelections(),N=(new Array(T.length)).join("1").split("1");n.lastSelection&&(y=n.lastSelection.headMark.find()),nt.registerController.unnamedRegister.setText(x),d?(e.replaceSelections(N),S=b(E.line+s.length-1,E.ch),e.setCursor(E),Ht(e,S),e.replaceSelections(s),m=E):n.visualBlock?(e.replaceSelections(N),e.setCursor(E),e.replaceRange(s,E,E),m=E):(e.replaceRange(s,E,S),m=e.posFromIndex(e.indexFromPos(E)+s.length-1)),y&&(n.lastSelection.headMark=e.setBookmark(y)),p&&(m.ch=0)}else if(d){e.setCursor(r);for(var v=0;v<s.length;v++){var C=r.line+v;C>e.lastLine()&&e.replaceRange("\n",b(C,0));var k=Ot(e,C);k<r.ch&&Pt(e,C,r.ch)}e.setCursor(r),Ht(e,b(r.line+s.length-1,r.ch)),e.replaceSelections(s),m=r}else e.replaceRange(s,r),p&&t.after?m=b(r.line+1,$t(e.getLine(r.line+1))):p&&!t.after?m=b(r.line,$t(e.getLine(r.line))):!p&&t.after?(g=e.indexFromPos(r),m=e.posFromIndex(g+s.length-1)):(g=e.indexFromPos(r),m=e.posFromIndex(g+s.length));n.visualMode&&Wt(e),e.setCursor(m)},undo:function(e,t){e.operation(function(){xt(e,d.commands.undo,t.repeat)(),e.setCursor(e.getCursor("anchor"))})},redo:function(e,t){xt(e,d.commands.redo,t.repeat)()},setRegister:function(e,t,n){n.inputState.registerName=t.selectedCharacter},setMark:function(e,t,n){var r=t.selectedCharacter;sn(e,n,r,e.getCursor())},replace:function(e,t,n){var r=t.selectedCharacter,i=e.getCursor(),s,o,u=e.listSelections();if(n.visualMode)i=e.getCursor("start"),o=e.getCursor("end");else{var a=e.getLine(i.line);s=i.ch+t.repeat,s>a.length&&(s=a.length),o=b(i.line,s)}if(r=="\n")n.visualMode||e.replaceRange("",i,o),(d.commands.newlineAndIndentContinueComment||d.commands.newlineAndIndent)(e);else{var f=e.getRange(i,o);f=f.replace(/[^\n]/g,r);if(n.visualBlock){var l=(new Array(e.getOption("tabSize")+1)).join(" ");f=e.getSelection(),f=f.replace(/\t/g,l).replace(/[^\n]/g,r).split("\n"),e.replaceSelections(f)}else e.replaceRange(f,i,o);n.visualMode?(i=Ct(u[0].anchor,u[0].head)?u[0].anchor:u[0].head,e.setCursor(i),Wt(e)):e.setCursor(yt(o,0,-1))}},incrementNumberToken:function(e,t){var n=e.getCursor(),r=e.getLine(n.line),i=/-?\d+/g,s,o,u,a,f;while((s=i.exec(r))!==null){f=s[0],o=s.index,u=o+f.length;if(n.ch<u)break}if(!t.backtrack&&u<=n.ch)return;if(!f)return;var l=t.increase?1:-1,c=parseInt(f)+l*t.repeat,h=b(n.line,o),p=b(n.line,u);a=c.toString(),e.replaceRange(a,h,p),e.setCursor(b(n.line,o+a.length-1))},repeatLastEdit:function(e,t,n){var r=n.lastEditInputState;if(!r)return;var i=t.repeat;i&&t.repeatIsExplicit?n.lastEditInputState.repeatOverride=i:i=n.lastEditInputState.repeatOverride||i,Vn(e,n,i,!1)},exitInsertMode:Hn},Gt={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Yt={bracket:{isComplete:function(e){if(e.nextCh===e.symb){e.depth++;if(e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return e.index===0&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t=e.lastCh==="*"&&e.nextCh==="/";return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb=e.symb==="m"?"{":"}",e.reverseSymb=e.symb==="{"?"}":"{"},isComplete:function(e){return e.nextCh===e.symb?!0:!1}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if(e.nextCh==="#"){var t=e.lineText.match(/#(\w+)/)[1];if(t==="endif"){if(e.forward&&e.depth===0)return!0;e.depth++}else if(t==="if"){if(!e.forward&&e.depth===0)return!0;e.depth--}if(t==="else"&&e.depth===0)return!0}return!1}}};K("pcre",!0,"boolean"),fn.prototype={getQuery:function(){return nt.query},setQuery:function(e){nt.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return nt.isReversed},setReversed:function(e){nt.isReversed=e}};var wn="(Javascript regexp)",On=[{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"set"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],Mn=function(){this.buildCommandMap_()};Mn.prototype={processCommand:function(e,t,n){var r=e.state.vim,i=nt.registerController.getRegister(":"),s=i.toString();r.visualMode&&Wt(e);var o=new d.StringStream(t);i.setText(t);var u=n||{};u.input=t;try{this.parseInput_(e,o,u)}catch(a){throw yn(e,a),a}var f,l;if(!u.commandName)u.line!==undefined&&(l="move");else{f=this.matchCommand_(u.commandName);if(f){l=f.name,f.excludeFromCommandHistory&&i.setText(s),this.parseCommandArgs_(o,u,f);if(f.type=="exToKey"){for(var c=0;c<f.toKeys.length;c++)d.Vim.handleKey(e,f.toKeys[c],"mapping");return}if(f.type=="exToEx"){this.processCommand(e,f.toInput);return}}}if(!l){yn(e,'Not an editor command ":'+t+'"');return}try{_n[l](e,u),(!f||!f.possiblyAsync)&&u.callback&&u.callback()}catch(a){throw yn(e,a),a}},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),n.line!==undefined&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));var r=t.match(/^(\w+)/);return r?n.commandName=r[1]:n.commandName=t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return e.getCursor().line;case"$":return e.lastLine();case"'":var r=e.state.vim.marks[t.next()];if(r&&r.find())return r.find().line;throw new Error("Mark not set");default:return t.backUp(1),undefined}},parseCommandArgs_:function(e,t,n){if(e.eol())return;t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=_t(t.argString).split(r);i.length&&i[0]&&(t.args=i)},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(r.name.indexOf(e)===0)return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<On.length;e++){var t=On[e],n=t.shortName||t.name;this.commandMap_[n]=t}},map:function(e,t,n){if(e!=":"&&e.charAt(0)==":"){if(n)throw Error("Mode not supported for ex mappings");var r=e.substring(1);t!=":"&&t.charAt(0)==":"?this.commandMap_[r]={name:r,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[r]={name:r,type:"exToKey",toKeys:t,user:!0}}else if(t!=":"&&t.charAt(0)==":"){var i={keys:e,type:"keyToEx",exArgs:{input:t.substring(1)},user:!0};n&&(i.context=n),y.unshift(i)}else{var i={keys:e,type:"keyToKey",toKeys:t,user:!0};n&&(i.context=n),y.unshift(i)}},unmap:function(e,t){if(e!=":"&&e.charAt(0)==":"){if(t)throw Error("Mode not supported for ex mappings");var n=e.substring(1);if(this.commandMap_[n]&&this.commandMap_[n].user){delete this.commandMap_[n];return}}else{var r=e;for(var i=0;i<y.length;i++)if(r==y[i].keys&&y[i].context===t&&y[i].user){y.splice(i,1);return}}throw Error("No such mapping.")}};var _n={map:function(e,t,n){var r=t.args;if(!r||r.length<2){e&&yn(e,"Invalid mapping: "+t.input);return}Dn.map(r[0],r[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var r=t.args;if(!r||r.length<1){e&&yn(e,"No such mapping: "+t.input);return}Dn.unmap(r[0],n)},move:function(e,t){ct.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args;if(!n||n.length<1){e&&yn(e,"Invalid mapping: "+t.input);return}var r=n[0].split("="),i=r[0],s=r[1],o=!1;if(i.charAt(i.length-1)=="?"){if(s)throw Error("Trailing characters: "+t.argString);i=i.substring(0,i.length-1),o=!0}s===undefined&&i.substring(0,2)=="no"&&(i=i.substring(2),s=!1);var u=J[i]&&J[i].type=="boolean";u&&s==undefined&&(s=!0);if(!u&&!s||o){var a=G(i);a===!0||a===!1?yn(e," "+(a?"":"no")+i):yn(e," "+i+"="+a)}else Q(i,s,e)},registers:function(e,t){var n=t.args,r=nt.registerController.registers,i="----------Registers----------<br><br>";if(!n)for(var s in r){var o=r[s].toString();o.length&&(i+='"'+s+" "+o+"<br>")}else{var s;n=n.join("");for(var u=0;u<n.length;u++){s=n.charAt(u);if(!nt.registerController.isValidRegister(s))continue;var a=r[s]||new at;i+='"'+s+" "+a.toString()+"<br>"}}yn(e,i)},sort:function(e,t){function o(){if(t.argString){var e=new d.StringStream(t.argString);e.eat("!")&&(n=!0);if(e.eol())return;if(!e.eatSpace())return"Invalid arguments";var o=e.match(/[a-z]+/);if(o){o=o[0],r=o.indexOf("i")!=-1,i=o.indexOf("u")!=-1;var u=o.indexOf("d")!=-1&&1,a=o.indexOf("x")!=-1&&1,f=o.indexOf("o")!=-1&&1;if(u+a+f>1)return"Invalid arguments";s=u&&"decimal"||a&&"hex"||f&&"octal"}e.eatSpace()&&e.match(/\/.*\//)&&"patterns not supported"}}function w(e,t){if(n){var i;i=e,e=t,t=i}r&&(e=e.toLowerCase(),t=t.toLowerCase());var o=s&&p.exec(e),u=s&&p.exec(t);return o?(o=parseInt((o[1]+o[2]).toLowerCase(),v),u=parseInt((u[1]+u[2]).toLowerCase(),v),o-u):e<t?-1:1}var n,r,i,s,u=o();if(u){yn(e,u+": "+t.argString);return}var a=t.line||e.firstLine(),f=t.lineEnd||t.line||e.lastLine();if(a==f)return;var l=b(a,0),c=b(f,Ot(e,f)),h=e.getRange(l,c).split("\n"),p=s=="decimal"?/(-?)([\d]+)/:s=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:s=="octal"?/([0-7]+)/:null,v=s=="decimal"?10:s=="hex"?16:s=="octal"?8:null,m=[],g=[];if(s)for(var y=0;y<h.length;y++)p.exec(h[y])?m.push(h[y]):g.push(h[y]);else g=h;m.sort(w),g.sort(w),h=n?m.concat(g):g.concat(m);if(i){var E=h,S;h=[];for(var y=0;y<E.length;y++)E[y]!=S&&h.push(E[y]),S=E[y]}e.replaceRange(h.join("\n"),l,c)},global:function(e,t){var n=t.argString;if(!n){yn(e,"Regular Expression missing from global");return}var r=t.line!==undefined?t.line:e.firstLine(),i=t.lineEnd||t.line||e.lastLine(),s=hn(n),o=n,u;s.length&&(o=s[0],u=s.slice(1,s.length).join("/"));if(o)try{xn(e,o,!0,!0)}catch(a){yn(e,"Invalid regex: "+o);return}var f=ln(e).getQuery(),l=[],c="";for(var h=r;h<=i;h++){var p=f.test(e.getLine(h));p&&(l.push(h+1),c+=e.getLine(h)+"<br>")}if(!u){yn(e,c);return}var d=0,v=function(){if(d<l.length){var t=l[d]+u;Dn.processCommand(e,t,{callback:v})}d++};v()},substitute:function(e,t){if(!e.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var n=t.argString,r=n?hn(n):[],i,s="",o,u,a,f=!1,l=!1;if(r.length)i=r[0],s=r[1],s!==undefined&&(G("pcre")?s=mn(s):s=vn(s),nt.lastSubstituteReplacePart=s),o=r[2]?r[2].split(" "):[];else if(n&&n.length){yn(e,"Substitutions should be of the form :s/pattern/replace/");return}o&&(u=o[0],a=parseInt(o[1]),u&&(u.indexOf("c")!=-1&&(f=!0,u.replace("c","")),u.indexOf("g")!=-1&&(l=!0,u.replace("g","")),i=i+"/"+u));if(i)try{xn(e,i,!0,!0)}catch(c){yn(e,"Invalid regex: "+i);return}s=s||nt.lastSubstituteReplacePart;if(s===undefined){yn(e,"No previous substitute regular expression");return}var h=ln(e),p=h.getQuery(),d=t.line!==undefined?t.line:e.getCursor().line,v=t.lineEnd||d;a&&(d=v,v=d+a-1);var m=mt(e,b(d,0)),g=e.getSearchCursor(p,m);Pn(e,f,l,d,v,g,p,s,t.callback)},redo:d.commands.redo,undo:d.commands.undo,write:function(e){d.commands.save?d.commands.save(e):e.save()},nohlsearch:function(e){kn(e)},delmarks:function(e,t){if(!t.argString||!_t(t.argString)){yn(e,"Argument required");return}var n=e.state.vim,r=new d.StringStream(_t(t.argString));while(!r.eol()){r.eatSpace();var i=r.pos;if(!r.match(/[a-zA-Z]/,!1)){yn(e,"Invalid argument: "+t.argString.substring(i));return}var s=r.next();if(r.match("-",!0)){if(!r.match(/[a-zA-Z]/,!1)){yn(e,"Invalid argument: "+t.argString.substring(i));return}var o=s,u=r.next();if(!(U(o)&&U(u)||X(o)&&X(u))){yn(e,"Invalid argument: "+o+"-");return}var a=o.charCodeAt(0),f=u.charCodeAt(0);if(a>=f){yn(e,"Invalid argument: "+t.argString.substring(i));return}for(var l=0;l<=f-a;l++){var c=String.fromCharCode(a+l);delete n.marks[c]}}else delete n.marks[s]}}},Dn=new Mn;d.keyMap.vim={attach:O,detach:A},K("insertModeEscKeysTimeout",200,"number"),d.keyMap["vim-insert"]={"Ctrl-N":"autocomplete","Ctrl-P":"autocomplete",Enter:function(e){var t=d.commands.newlineAndIndentContinueComment||d.commands.newlineAndIndent;t(e)},fallthrough:["default"],attach:O,detach:A},d.keyMap["await-second"]={fallthrough:["vim-insert"],attach:O,detach:A},d.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:O,detach:A},rt(),d.Vim=x(),x=d.Vim,E={"return":"CR",backspace:"BS","delete":"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"};var Jn=x.handleKey;x.handleKey=function(e,t,n){return e.operation(function(){return Jn(e,t,n)},!0)},t.CodeMirror=d;var Gn=x.maybeInitVimState_;t.handler={$id:"ace/keyboard/vim",drawCursor:function(e,t,n,r,s){var o=this.state.vim||{},u=n.characterWidth,a=n.lineHeight,f=t.top,l=t.left;if(!o.insertMode){var c=r.cursor?i.comparePoints(r.cursor,r.start)<=0:s.selection.isBackwards()||s.selection.isEmpty();!c&&l>u&&(l-=u)}!o.insertMode&&o.status&&(a/=2,f+=a),e.left=l+"px",e.top=f+"px",e.width=u+"px",e.height=a+"px"},handleKeyboard:function(e,t,n,r,i){var s=e.editor,o=s.state.cm,u=Gn(o);if(r==-1)return;if(n=="c"&&t==1)return!c.isMac&&s.getCopyText()?(s.once("copy",function(){s.selection.clearSelection()}),{command:"null",passEvent:!0}):{command:coreCommands.stop};u.insertMode||c.isMac&&this.handleMacRepeat(e,t,n)&&(t=-1,n=e.inputChar);if(t==-1||t&1||t===0&&n.length>1){var a=u.insertMode,f=T(t,n,i||{});u.status==null&&(u.status="");var l=Qn(o,f,"user");u=Gn(o),l&&u.status!=null?u.status+=f:u.status==null&&(u.status=""),o._signal("changeStatus");if(!l&&(t!=-1||a))return;return{command:"null",passEvent:!l}}},attach:function(e){e.state||(e.state={});var t=new d(e);e.state.cm=t,e.$vimModeHandler=this,d.keyMap.vim.attach(t),Gn(t).status=null,t.on("vim-command-done",function(){if(t.virtualSelectionMode())return;Gn(t).status=null,t.ace._signal("changeStatus"),t.ace.session.markUndoGroup()}),t.on("changeStatus",function(){t.ace.renderer.updateCursor(),t.ace._signal("changeStatus")}),t.on("vim-mode-change",function(){if(t.virtualSelectionMode())return;t.ace.renderer.setStyle("normal-mode",!Gn(t).insertMode),t._signal("changeStatus")}),t.ace.renderer.setStyle("normal-mode",!Gn(t).insertMode),e.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(t),this.updateMacCompositionHandlers(e,!0)},detach:function(e){var t=e.state.cm;d.keyMap.vim.detach(t),t.destroy(),e.state.cm=null,e.$vimModeHandler=null,e.renderer.$cursorLayer.drawCursor=null,e.renderer.setStyle("normal-mode",!1),this.updateMacCompositionHandlers(e,!1)},getStatusText:function(e){var t=e.state.cm,n=Gn(t);if(n.insertMode)return"INSERT";var r="";return n.visualMode&&(r+="VISUAL",n.visualLine&&(r+=" LINE"),n.visualBlock&&(r+=" BLOCK")),n.status&&(r+=(r?" ":"")+n.status),r},handleMacRepeat:function(e,t,n){if(t==-1)e.inputChar=n,e.lastEvent="input";else if(e.inputChar&&e.$lastHash==t&&e.$lastKey==n){if(e.lastEvent=="input")e.lastEvent="input1";else if(e.lastEvent=="input1")return!0}else e.$lastHash=t,e.$lastKey=n,e.lastEvent="keypress"},updateMacCompositionHandlers:function(e,t){var n=function(t){var n=e.state.cm,r=Gn(n);if(!r.insertMode){var i=this.textInput.getElement();i.blur(),i.focus(),i.value=t}else this.onCompositionUpdateOrig(t)},r=function(t){var n=e.state.cm,r=Gn(n);r.insertMode||this.onCompositionStartOrig(t)};t?e.onCompositionUpdateOrig||(e.onCompositionUpdateOrig=e.onCompositionUpdate,e.onCompositionUpdate=n,e.onCompositionStartOrig=e.onCompositionStart,e.onCompositionStart=r):e.onCompositionUpdateOrig&&(e.onCompositionUpdate=e.onCompositionUpdateOrig,e.onCompositionUpdateOrig=null,e.onCompositionStart=e.onCompositionStartOrig,e.onCompositionStartOrig=null)}};var Yn={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\u00b7":""))+""},getWidth:function(e,t,n){return e.getLength().toString().length*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.rendere